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
  • How Filters Work
  • How to Configure Filters
  • Sample Use Cases for Filters
  • Tips for Using Filters
  1. Tree Terminal
  2. Features

Filters

PreviousNotificationsNextSecurity

Last updated 21 days ago

The Filters function allows users to customize how specific events or keywords from various sources are processed and displayed within Tree Terminal. By selecting a source WebSocket, defining actions, and applying regex-based filters, users can create tailored responses to match their trading strategies.


How Filters Work

  1. Source WebSocket:

    • Users can select the WebSocket that acts as the input source for their filter.

    • Any: Applies the filter to all WebSockets.

  2. Sources:

    • Within a selected WebSocket, users can further specify the exact data source

    • e.g. Binance, Twitter, Telegram, Blogs, and more.

    • For Twitter , we support Any as a handle as well, to indicate that this filter applies to all incoming tweets from source websocket.

  3. Regex-Based Filtering:

    • Filters use regex (ECMA flavour) to match patterns in the incoming data.

    • Tree Terminal's Regex are always case-insensitive (/ /i )

    • Examples:

      • DUMPING: Matches all data containing the word "DUMPING."

    • We recommend using chatgpt to assist with regex creation, and specify ECMAflavour

  4. Actions:

    • Define what happens when a filter matches incoming data. Multiple actions can be applied.

    • Supported actions include:

      • show_feed: Display the matching content in the feed.

      • show_search: Make the match searchable in the terminal.

      • show_notif: Trigger a notification.

        • Supports screen location

          • top orbottom

          • left or center or right

        • E.g. show_notif left-center

      • pushover: Send a push notification.

      • play_sound <sound_name>: Play specified sound

        • E.g. play_sound sound3;

      • pin: Pin the notification for greater visibility.

      • highlight: Highlight the notification for increased visibility.

      • nothing: Do nothing.

      • default : Have all basic behaviors

    • They must be segmented by ;

When defining actions, please remember that it will override the defaults. That means if you define an action without default, you will no longer receive notifications for that source, if the regex matches your requirement.


How to Configure Filters

  1. Navigate to Filters:

    • Open the Filters section in Settings.

  2. Add a New Filter:

    • Select the WebSocket source

    • Specify the exact source within the WebSocket if needed (e.g., Twitter)

    • Add the username if needed

  3. Define the Regex:

    • Enter a regex pattern to match specific content.

    • Example:

      • To have the filter actions apply to every source, simply use . as the regex

      • To match news updates about "Added" on Coinbase:

        Added
  4. Set Actions:

    • Choose one or more actions for the matched content.

    • Example:

      • show_feed; show_notif; pushover for high-priority events.

  5. Save and Test:

    • Save your configuration and monitor the feed to ensure the filter behaves as expected.


Sample Use Cases for Filters

Filters in Tree Terminal can be configured to perform specific actions based on matched content. Below are examples of practical use cases:


Use Case 1: Someone Tweets

  • Scenario: You want to be notified in Discord whenever a specific user tweets.

  • Filter Configuration:

    • Source: "Any", Twitter

    • Regex:

      .
    • Action:

      discord_dm;
  • Outcome: The tweet will be forwarded to your Discord dm.

  • Important: We did not add default; and therefore this user will no longer appear on notifications. If you wish to retain it, you should instead do:

    • Action:

      discord_dm; default; 

Use Case 2: Trading Activity

  • Scenario: You want to get notified on large trading activity updates to Discord or a Pushover.

  • Filter Configuration:

    • Source: Community

    • Regex:

      Trading Activity.*[\d.+]M
      • Matches updates like "Trading Activity: +2.3M."

    • Action:

      pushover; discord_dm; default;
  • Outcome: High-volume trading activity notifications will be sent to your Discord and Pushover.


Use Case 3: Applying actions to a set of twitter users

  • Scenario: You want pushovers on a set of twitter users, and want to minimize the number of filters created.

  • Filter Configuration:

    • Source: Twitter

    • Handle: Any

    • Regex:

      ^@(handle1|handle2|handle3)
    • Action:

      pushover; default;
  • Outcome: Handle 1,2,3 will give a pushover when they tweet.


Tips for Using Filters

  • Have a test twitter account: Add yourself and test if your filters are functioning as expected.

  • Be Specific: Use precise regex patterns to avoid unnecessary matches or spam.

  • Update Regularly: Adjust your filters as market conditions and priorities change.

  • Combine Actions: For critical updates, combine actions like notifications, push alerts, and sound cues.

  • Sequential logic: Filters are applied from top to bottom, ordering matters.

The Filters feature in Tree Terminal ensures that you only receive relevant, actionable information, tailored to your trading strategy and preferences.

📈