Tree Service
  • 🌳Welcome
    • How to Subscribe
  • 📈Tree Terminal
    • Installation
    • Setup
      • Create Binance API
      • Create Bybit API
      • Create OKX API
    • First-Timer Checklist
    • Features
      • 📈Charts
      • 📰News feed
      • 📋Command line
      • 💸Positions & orders
      • 💰Accounts
      • 💲Symbols
      • 🤖Botting
      • 📕Orderbook
      • 👆Buttons
      • Customization
      • 🔔Notifications
      • Filters
    • Security
    • FAQ
  • 🗃️Websockets
    • API Key
    • Python connection
    • JavaScript connection
    • Response
    • Like/Dislike feature
    • News history
Powered by GitBook
On this page
  • Command Syntax
  • Examples
  • Scale Orders
  • TWAP Features
  • Custom Commands
  • Telegram Integration
  • Key Notes and Best Practices
  • Advanced Features
  1. Tree Terminal
  2. Features

Command line

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

PreviousNews feedNextPositions & orders

Last updated 1 month ago

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:

  1. {coin}:

    • Required for all commands.

    • Specifies the coin symbol (e.g., BTC, ETH).

Optional Variables:

  1. {size}:

    • Specifies the position size.

    • Defaults to the first size in your trading configuration if omitted.

    • Shorthand:

      • 1k = $1,000

      • 1m = $1,000,000

  2. {account}:

    • Refers to the subaccount or trading account.

    • If omitted, the default account is used.

  3. {price}:

    • Limit price for the trade (e.g., p_41500 for $41,500).

    • Omit for market orders.

  4. {timeInForce}:

    • Specifies order duration:

      • GTC: Good Till Canceled.

      • IOC: Immediate or Cancel.

  5. {slippage}:

    • Sets acceptable price deviation.

    • Example: slippage=0.5%.

  6. {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.

  7. {last}:

    • Refers to the first coin from the most recent notification.

    • Example: l {last} 10k executes a long position for the coin from the latest notification

  8. {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:

  1. Long:

    l btc 10k
    • Long BTC with $10,000.

  2. Short:

    s eth 5k binance
    • Short ETH with $5,000 on Binance.

  3. Close:

    c btc 50%
    • Close 50% of BTC position across all accounts.

  4. Limit Order:

    l btc 10k p_62000
    • Place a limit order to long BTC at $62,000.

  5. Limit Order:

    l btc 10k -1%
    • Place a limit order to long BTC 1% below current price


Scale Orders

Command Syntax

{<l or s>} {coin} {size} scale_{count}_{spacing}% p_{price?}

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

  • l btc scale_5_2% p_80000

    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 run

    l {coin} 200k scale_5_2%

    which 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:

l {coin} {size_per_twap} twap {account}

Modifiers:

  • <70000: Execute trades only below $70,000.

  • max_200k: Stop once the position reaches $200,000.

  • until_{time_in_minutes}: Set time constraints.

Examples:

  1. Long BTC in intervals:

    l btc 1k twap_20s
    • Long BTC with $1,000 every 20 seconds.

  2. Short ETH with a cap:

    s eth 5k twap max_200k
  3. Time-limited TWAP:

    l btc 1k twap_20s until_30m
    • Long $1,000 of BTC every 20 seconds for 30 minutes.

How to cancel:

Go to "open orders" and you will see your twap there. Click on the cancel button to stop the twap. Keep in mind that TWAPs cannot be cancelled remotely via Telegram.


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:

  1. Rename commands for better readability.

  2. Split orders across accounts for simultaneous entries.

  3. Define commands for specific time-in-force options (e.g., GTC vs. IOC).


Telegram Integration

"account" command is unique to telegram and discord bot and will return your account balances and positions. Try it!

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:

    accounts
  • Displays all current positions and account balances across connected accounts.


2. Cancel <ticker>

  • Command:

    cancel <ticker>
  • Cancels all active TWAPs and pending orders associated with the specified ticker.

  • Example:

    cancel BTC
    • Stops all TWAPs and cancels all orders for BTC.


3. Orders

  • Command:

    orders
  • 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

  1. Defaults:

    • {size} defaults to the first size in your trading configuration.

    • {account} defaults to the main account if unspecified.

  2. Testing:

    • Test all commands in a safe environment with small sizes.

Advanced Features

  1. Tracking Twitter Accounts:

    • Add or remove Twitter accounts to monitor using simple commands:

      • Add Account:

        add <handle>

        Example: add elonmusk will start tracking Elon Musk’s tweets.

      • Delete Account:

        del <handle>

        Example: del elonmusk will stop tracking Elon Musk’s tweets.

      • Add Account with extra tracking

        add <handle> all

        Example: add elonmusk all will start tracking Elon Musk’s tweets, retweets, follows, replies, bio and picture changes.

  2. Tracking Specific Tweets:

    • Track specific tweets for potential deletions:

      !track <tweet URL>

      Example: !track https://twitter.com/elonmusk/status/123456789 will notify you if that tweet is deleted.

  3. Shortening Keywords for Commands

    1. Custom Aliases:

      • You can map commands to shorter keywords for faster execution.

        pos -> account
        • Instead of typing account, simply use pos to view all your balances and positions on Tree Terminal.

    2. Why Use Aliases?

      • Save time and effort during fast-paced trading.

      • Simplify repetitive actions with intuitive shortcuts

  4. Shortcuts for Closing TWAPs:

    cwap {coin} {account} -> c {coin} 1% twap {account}
    • Example: cwap btc binance will execute c btc 1% twap binance, closing 1% of your BTC position per interval on the Binance account.

  5. Left click entry last headline on size4:

    l {last} {size4} -> ctrl+left
    • Pressing ctrl+left will long the coin from the last notification with the fourth trading size.

  6. Wait command

    wait 500; l btc 5m
    
    l doge 1m; wait 500; l doge 2m
    • Wait allows you to pause before a command or between two commands.

    • Unit is always in ms, so 500ms would be 0.5s

  7. SL command

    sl btc -2% 25%
    • sl 25% of the btc position 2% below current price.

These commands can also be used with and Discord bots by enabling them in the Trading field found in the general settings.

📈
📋
Telegram
Command line button
example of click shortcut