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
  • Usage
  • Core Features
  • Search logic
  • Command
  • Practical Example
  • ETF Scenario
  • Key Notes
  1. Tree Terminal
  2. Features

Botting

The Botting Component in Tree Terminal enables users to automate trading decisions based on real-time news and tweets. This guide explains its usage, search and command logic, and common patterns.

PreviousSymbolsNextOrderbook

Last updated 5 months ago

Usage

This component should be used with caution. It allows the user to locally bot news & tweets received by Tree Terminal.

Main websocket is selected by default, you can also add your own Websocket in the field "News" in general settings.

Users should:

  1. Focus on non-obvious events, rather than hyper-optimized events like listings, which are highly competitive.

  2. Define specific, actionable conditions using regex, JavaScript, or keywords in the search box.

  3. Pair these conditions with commands to trigger trades.

  4. Test and validate all configurations before deploying.

  5. Activate pushover if they would like to be notified when the botting criteria fires.

Core Features

Search logic

The search box defines conditions to trigger commands. It supports plain text, regex, and JavaScript.

Simple regex:

bitcoin|solana|ethereum

Explaination:

  • Matches news containing "bitcoin," "solana," or "ethereum."

  • If a match is found, it will trigger whatever command is paired.

Javascript example:

+shouldEnter = /dwf/i.test(content) && /invest/i.test(content) && !/recap/i.test(content);+

Explanation:

  • content: News or tweet title.

  • shouldEnter: A variable that determines whether the bot will act.

  • This checks if content includes "dwf" and "invest" but excludes "recap."

  • Note that javascript in search logic must be encapsulated with "+"

  • If shouldEnter evaluates to True, the paired command will activate and Tree Terminal will enter into a position.

Command

Defines the action triggered when search -

  1. Plain text has a match

  2. Regex finds a match

  3. Javascript's shouldEnter resolves to True

Any command that works in the command-line also works in the "command" field of the botting component.

You can also use:

  • {coin} to reference the first coin in the "suggestions" of the news. Ex: l {coin} 50k

  • {coin!=BTC,ETH,BNB} to provide a blacklist of coins that Tree Terminal should not long here

Basic Command

l {coin} 100k binance
  • Longs the first coin in the news with 100k, on binance subaccount

Blacklist Coins:

l {coin!=BTC,ETH,BNB} 150k
  • Excludes BTC, ETH and BNB, longs on first subaccount defined in priority of accounts

Multiple Commands:

l btc 100k binance; l {coin} 50k binance
  • Executes commands sequentially, always forces a BTC long, alongside first coin from news item

Practical Example

ETF Scenario

Search

+shouldEnter = /Possible Bitcoin ETF Approval/i.test(content) && !window.longedETF; if(shouldEnter) window.longedETF = true;+

Command

l btc 100k 

Explanation:

  • If the content contains "Possible Bitcoin ETF Approval" and the ETF hasn’t been longed, the bot executes a long on BTC.

Key Notes

  • Two Reserved Variables in "Search's" Javascript

    • content: The title of the news or tweet.

    • shouldEnter: Boolean to decide if a command should execute.

  • Avoid Obvious Events:

    • Focus on niche or non-obvious scenarios where edge cases exist, instead of over-competitive events like listings (heavily optimized botters)

  • Testing:

    • Always test search logic and commands independently to avoid unintended behavior.

Use to check your search box syntax

Specify variant to ECMAScript

📈
🤖
regex testing site
Botting button