πCommand line
The cli is designed for fast trading, enabling users to create tailored commands for various trading scenarios.


This guide introduces the syntax and offers quickstart examples on how to use the CLI.
Command Syntax
Commands in Tree Terminal follow a structured format. Understanding mandatory vs. optional variables is crucial for effective use.
Mandatory Variables:
{coin}:Required for all commands.
Specifies the coin symbol (e.g., BTC, ETH).
β οΈ
allis a reserved keyword in Tree Terminal. If you wish to trade ALLUSDT (on Binance), please useallusdtinstead ofall
Optional Variables:
{size}:Specifies the position size.
Defaults to the first size in your trading configuration if omitted.
Shorthand:
1k = $1,0001m = $1,000,000
{account}:Refers to the subaccount or trading account.
If omitted, the default account is used.
{price}:Limit price for the trade (e.g.,
p_41500for $41,500).Omit for market orders.
{timeInForce}:Specifies order duration:
GTC: Good Till Canceled.
IOC: Immediate or Cancel.
{slippage}:Sets acceptable price deviation.
Example:
slippage=0.5%.
{percent}:Contextual variable used for percentage-based actions, such as:
Closing: Closing 50% of a position.
Creating Limit Orders: Setting a limit price based on a percentage deviation from the market price.
{last}:Refers to the first coin from the most recent notification.
Example:
l {last} 10kexecutes a long position for the coin from the latest notification
{size1}, {size2}, {size3}:Correspond to predefined trading sizes in your configuration.
Example:
l btc {size2}uses the second trading size from your setup.
Examples
Basic Commands:
Long:
Long BTC with $10,000.
Short:
Short ETH with $5,000 on Binance.
Close:
Close 50% of BTC position across all accounts.
Limit Order:
Place a limit order to long BTC at $62,000.
Limit Order:
Place a limit order to long BTC 1% below current price
Scale Orders
Command Syntax
Splits your full intended position into {count} individual limit orders, each spaced {spacing}% apart. The first order is placed at the specified p_{price}
Examples
Long BTC in 5 tranches (using your default size), 2% apart, from 80k and below.
Click Shortcut: Assign a hotkey (e.g.
Ctrl+Shift+S) to runwhich will place 5 staggered buy orders 2% apart from each other for the coin from the mouse's y-axis current price, for total of 200k size.

TWAP Features
TWAP (Time-Weighted Average Price) splits orders into smaller intervals for better execution.
Syntax:
Modifiers:
<70000: Execute trades only below $70,000.max_200k: Stop once the position reaches $200,000.until_{time_in_minutes}: Set time constraints.maker: twap using only limit orders
Examples:
Long BTC in intervals:
Long BTC with $1,000 every 20 seconds.
Short ETH with a cap:
Time-limited TWAP:
Long $1,000 of BTC every 20 seconds for 30 minutes.
Using TWAP to close a position:
Close btc position on {account name} via 1% of position size orders and default twap interval
β οΈβ οΈβ οΈ Because this has no {account name} it will close btc position on all subaccounts via 1% of position size orders and default twap interval
Using TWAP to close all positions:
Close all positions via 1% of position size orders and default twap interval
How to cancel:
There are two ways:
Go to "open orders" and you will see your twap there. Click on the cancel button to stop the twap.
Type
cancel <ticker>, but do note this will cancel all outstanding limit / stop loss orders for the ticker as well.
Custom Commands
Custom commands build on the syntax and examples above, allowing users to simplify repetitive trading actions.
Adding Custom Commands:
Go to the "Shortcuts" field in General Settings and add commands.

Supported Variables:
{coin},{size},{timeInForce},{account},{cmd},{slippage},{percent}, {last}, {size(n)}.
Use Cases:
Rename commands for better readability.
Split orders across accounts for simultaneous entries.
Define commands for specific time-in-force options (e.g., GTC vs. IOC).
Telegram Integration
These commands can also be used with Telegram and Discord bots by enabling them in the Trading field found in the general settings.

These commands are specifically designed for users accessing Tree Terminal remotely via Telegram or Discord. They allow quick management of positions, balances, and orders.
1. Accounts
Command:
Displays all current positions and account balances across connected accounts.
2. Cancel <ticker>
<ticker>Command:
Cancels all active TWAPs and pending orders associated with the specified ticker.
Example:
Stops all TWAPs and cancels all orders for BTC.
3. Orders
Command:
Lists all active orders currently placed across your accounts.
Caution: Be mindful when using this command if you have many scale orders set, as it may produce a large amount of output and cause spam in Telegram or Discord.
Key Notes and Best Practices
Defaults:
{size}defaults to the first size in your trading configuration.{account}defaults to the main account if unspecified.
Testing:
Test all commands in a safe environment with small sizes.
Advanced Features
Tracking Twitter Accounts:
Add or remove Twitter accounts to monitor using simple commands:
Add Account:
Example:
add elonmuskwill start tracking Elon Muskβs tweets.Delete Account:
Example:
del elonmuskwill stop tracking Elon Muskβs tweets.Add Account with extra tracking
Example:
add elonmusk allwill start tracking Elon Muskβs tweets, retweets, follows, replies, bio and picture changes.
Tracking Specific Tweets:
Track specific tweets for potential deletions:
Example:
!track https://twitter.com/elonmusk/status/123456789will notify you if that tweet is deleted.
Shortening Keywords for Commands
Custom Aliases:
You can map commands to shorter keywords for faster execution.
Instead of typing
account, simply useposto view all your balances and positions on Tree Terminal.
Why Use Aliases?
Save time and effort during fast-paced trading.
Simplify repetitive actions with intuitive shortcuts
Shortcuts for Closing TWAPs:
Example:
cwap btc binancewill executec btc 1% twap binance, closing 1% of your BTC position per interval on the Binance account.
Left click entry last headline on size4:
Pressing
ctrl+leftwill long the coin from the last notification with the fourth trading size.
Wait command
Wait allows you to pause before a command or between two commands.
Unit is always in ms, so 500ms would be 0.5s
SL command
sl 25% of the btc position 2% below current price.
Last updated