circle-exclamation
This documentation page is currently under development and may be updated frequently.

Signal Payload Format

The signal payload is the core JSON structure that Towerflow uses to trigger trading actions through webhooks or webhook email addresses. When a signal is sent, it must match this format so the system can understand and execute it properly.

Below is the expected payload schema:

SignalPayload = {
  id?: string,                  // A custom name/id for the alert (optional)
  key?: string,                 // Authorization key (required if webhook is key-protected)
  symbol: string,               // The trading pair (e.g., 'BTCUSDT', 'ETHUSDT')
  side: OrderSide,              // Either 'BUY | buy' or 'SELL | sell'
  size?: number,                // Trade size (open in quote, close in base currency), overrides default (optional)
  dilution?: boolean,           // If true, allows partial stacking of positions (optional)
  flag?: FlagType | FlagType[], // Additional tags like 'TEST', 'DEBUG', 'REVERSE' (optional)
  debug?: any,                  // Extra debugging info (optional)
}

🔍 Field Descriptions

  • id (optional): A custom label for the signal. Useful for identifying or grouping alerts in your dashboard.

  • key (optional, required in safe mode): The security key required for webhooks that are key-protected. Must match the one set during webhook creation.

  • symbol (required): The trading pair this signal targets. For example, BTCUSDT, ETHUSD, etc.

  • side (required): The trade direction. Must be either:

    • 'BUY | buy' – to open long or close a short position

    • 'SELL | sell' – to close long or open a short position

  • size (optional): The trade amount (open in quote, close in base currency). If not set, the default configured size for the connected bot will be used.

  • dilution (optional): If set to true, the bot will stack this trade on top of an existing position if it's in the same direction, instead of replacing it.

  • flag (optional): Tags that describe the signal’s purpose or behavior, such as:

    • 'TEST' – test only, no real trade

    • 'DEBUG' – for debugging

    • 'REVERSE' – interpret as reverse trade You can use a single flag or multiple in an array.

  • debug (optional): Any custom or diagnostic information. This data isn’t used by bots, but helps in testing or logging.


✅ Example Payloads

Simple

More complex

Last updated