SignalBee
Docs/Signals & Webhooks

Webhook Templates

Copy-paste JSON templates for TradingView alerts. These templates work with SignalBee's webhook endpoints to automate your trading signals.


Template Format Overview

All webhook payloads use JSON format with string values for all fields (including numbers).

Complete Field Reference

FieldJSON KeyTypeRequiredValid Values
Webhook Secretwebhook_secretstringYesYour webhook's secret key
SidesidestringYesbuy, sell, close
SymbolsymbolstringYes6-20 chars, alphanumeric (e.g., BTCUSDT)
Quantity Typequantity_typestringYesfixed, percentage
QuantityquantitystringYesPositive number (0-100 for percentage)
Source Timestampsource_timestampISO 8601YesAlert trigger time (within 5 minutes). Use {{timenow}} in TradingView
Signal Pricesignal_pricestringNoReference price (for logging only)

Normalization Rules

SignalBee normalizes incoming values:

  • side: Case-insensitive → normalized to lowercase (BUYbuy)
  • symbol: Case-insensitive → normalized to uppercase (btcusdtBTCUSDT)
  • quantity_type: Case-insensitive → normalized to lowercase (PERCENTAGEpercentage)

Minimal vs Full Payload

Minimal (required fields only):

{
  "webhook_secret": "your-secret-here",
  "side": "buy",
  "symbol": "BTCUSDT",
  "quantity_type": "fixed",
  "quantity": "0.001",
  "source_timestamp": "{{timenow}}"
}

Full (all fields):

{
  "webhook_secret": "your-secret-here",
  "side": "buy",
  "symbol": "BTCUSDT",
  "quantity_type": "percentage",
  "quantity": "25",
  "source_timestamp": "{{timenow}}",
  "signal_price": "{{close}}"
}

Basic Templates

Simple Buy (Fixed Quantity)

Buys an exact amount of the asset.

{
  "webhook_secret": "your-secret-here",
  "side": "buy",
  "symbol": "BTCUSDT",
  "quantity_type": "fixed",
  "quantity": "0.001",
  "source_timestamp": "{{timenow}}"
}

Use case: Consistent position sizing regardless of account balance.

Simple Sell (Fixed Quantity)

Sells an exact amount of the asset.

{
  "webhook_secret": "your-secret-here",
  "side": "sell",
  "symbol": "BTCUSDT",
  "quantity_type": "fixed",
  "quantity": "0.001",
  "source_timestamp": "{{timenow}}"
}

Use case: Selling a specific amount at take-profit levels.

Buy with Percentage of Balance

Uses a percentage of your available quote currency (e.g., USDT).

{
  "webhook_secret": "your-secret-here",
  "side": "buy",
  "symbol": "ETHUSDT",
  "quantity_type": "percentage",
  "quantity": "25",
  "source_timestamp": "{{timenow}}"
}

Use case: Position sizing that scales with account growth. Uses 25% of available USDT.

Sell Percentage of Holdings

Sells a percentage of your current holdings.

{
  "webhook_secret": "your-secret-here",
  "side": "sell",
  "symbol": "ETHUSDT",
  "quantity_type": "percentage",
  "quantity": "50",
  "source_timestamp": "{{timenow}}"
}

Use case: Taking partial profits while maintaining exposure.

Close Entire Position

Sells 100% of your holdings for a symbol.

{
  "webhook_secret": "your-secret-here",
  "side": "close",
  "symbol": "BTCUSDT",
  "quantity_type": "percentage",
  "quantity": "100",
  "source_timestamp": "{{timenow}}"
}

Use case: Stop-loss exits, full position closes. The close side is equivalent to sell with 100% quantity.


TradingView Dynamic Variables

TradingView replaces placeholder variables with actual values when the alert fires.

Available Variables

VariableMaps toExample Output
{{strategy.order.action}}sidebuy or sell
{{ticker}}symbolBTCUSDT
{{close}}signal_price67543.21
{{timenow}}source_timestamp2024-01-15T10:30:00Z
{{open}}67100.00
{{high}}67800.00
{{low}}66900.00
{{volume}}1234.56
{{exchange}}BINANCE
{{strategy.order.price}}67500.00
{{strategy.position_size}}0.5

Strategy Alert Template

Use with Pine Script strategies that have built-in buy/sell signals:

{
  "webhook_secret": "your-secret-here",
  "side": "{{strategy.order.action}}",
  "symbol": "{{ticker}}",
  "quantity_type": "percentage",
  "quantity": "50",
  "signal_price": "{{close}}",
  "source_timestamp": "{{timenow}}"
}

Note: The {{strategy.order.action}} variable outputs buy or sell based on your strategy's order direction.

Manual Indicator Template (Fixed Side)

Use when your indicator doesn't output buy/sell signals—create separate alerts for each direction:

Buy Alert:

{
  "webhook_secret": "your-secret-here",
  "side": "buy",
  "symbol": "{{ticker}}",
  "quantity_type": "percentage",
  "quantity": "25",
  "signal_price": "{{close}}",
  "source_timestamp": "{{timenow}}"
}

Sell Alert:

{
  "webhook_secret": "your-secret-here",
  "side": "sell",
  "symbol": "{{ticker}}",
  "quantity_type": "percentage",
  "quantity": "100",
  "signal_price": "{{close}}",
  "source_timestamp": "{{timenow}}"
}

Strategy-Specific Templates

EMA Crossover Strategy

For moving average crossover signals:

{
  "webhook_secret": "your-secret-here",
  "side": "{{strategy.order.action}}",
  "symbol": "{{ticker}}",
  "quantity_type": "percentage",
  "quantity": "10",
  "source_timestamp": "{{timenow}}"
}

Setup:

  1. Add an EMA crossover strategy to your chart
  2. Create alert on "Order fills"
  3. Paste this template in the message field

RSI Overbought/Oversold

Create two separate alerts for RSI-based entries and exits.

RSI Oversold (Buy Signal) — RSI < 30:

{
  "webhook_secret": "your-secret-here",
  "side": "buy",
  "symbol": "{{ticker}}",
  "quantity_type": "percentage",
  "quantity": "20",
  "source_timestamp": "{{timenow}}"
}

RSI Overbought (Sell Signal) — RSI > 70:

{
  "webhook_secret": "your-secret-here",
  "side": "sell",
  "symbol": "{{ticker}}",
  "quantity_type": "percentage",
  "quantity": "100",
  "source_timestamp": "{{timenow}}"
}

Setup:

  1. Add RSI indicator to your chart
  2. Create first alert: RSI crossing up 30 → use buy template
  3. Create second alert: RSI crossing down 70 → use sell template

Dollar Cost Averaging (DCA)

Automated recurring purchases:

{
  "webhook_secret": "your-secret-here",
  "side": "buy",
  "symbol": "BTCUSDT",
  "quantity_type": "fixed",
  "quantity": "0.0005",
  "source_timestamp": "{{timenow}}"
}

Setup:

  1. Create a time-based alert in TradingView
  2. Set to trigger at your desired interval (daily, weekly)
  3. Use a fixed quantity for consistent DCA amounts

Breakout Trading

For price breakout strategies:

{
  "webhook_secret": "your-secret-here",
  "side": "buy",
  "symbol": "{{ticker}}",
  "quantity_type": "percentage",
  "quantity": "15",
  "source_timestamp": "{{timenow}}",
  "signal_price": "{{close}}"
}

Setup:

  1. Draw a horizontal line at resistance level
  2. Create alert: Price crossing up the line
  3. Use this template for breakout entries

Multi-Exchange Considerations

Exchange Selection

The exchange is determined by which webhook you use, not by a field in the payload. Each webhook in SignalBee is linked to a specific exchange.

  • Same JSON template works for all exchanges
  • Create separate webhooks for each exchange you want to trade on
  • Use the appropriate webhook URL for each alert

Symbol Format by Exchange

Different exchanges use different symbol formats. Use the format that matches your connected exchange:

ExchangeFormatExample
BinanceNo separatorBTCUSDT
CoinbaseHyphenBTC-USD
KrakenVariesXXBTZUSD or BTCUSD
BybitNo separatorBTCUSDT
OKXHyphenBTC-USDT
KuCoinHyphenBTC-USDT
Gate.ioUnderscoreBTC_USDT

Tip: Check your exchange's API documentation for the exact symbol format.


Common Mistakes

Avoid these frequent errors that cause signal rejection.

Mistake❌ Wrong✅ Right
Percentage symbol in quantity"quantity": "50%""quantity": "50"
Missing webhook_secretNo webhook_secret fieldInclude webhook_secret
Unquoted numbers"quantity": 0.001"quantity": "0.001"
Wrong field name (action)"action": "buy""side": "buy"
Wrong field name (ticker)"ticker": "BTCUSDT""symbol": "BTCUSDT"
Slash in symbol"symbol": "BTC/USDT""symbol": "BTCUSDT"
Invalid side value"side": "long""side": "buy"
Trailing comma"quantity": "50",}"quantity": "50"}
Extra whitespace in secret"webhook_secret": " abc123 ""webhook_secret": "abc123"

Field Name Reference

SignalBee uses these canonical field names:

CorrectIncorrect (won't work)
sideaction, direction, type
symbolticker, pair, market
signal_priceprice, entry_price
source_timestamptimestamp, time

Validation Checklist

Before sending your first signal, verify each item:

Required Fields

  • webhook_secret — Matches exactly what's in SignalBee (copy-paste it)
  • side — Is one of: buy, sell, or close
  • symbol — Matches your exchange's format (no slashes for Binance)
  • quantity_type — Is either fixed or percentage
  • quantity — Is a positive number as a string (no % symbol)
  • source_timestamp — Use {{timenow}} for TradingView alerts (required for duplicate detection)

JSON Syntax

  • All values are strings (wrapped in double quotes)
  • No trailing commas after the last field
  • Proper JSON structure (validates at jsonlint.com)
  • No extra whitespace in field values

TradingView Variables

  • Variables use double curly braces: {{ticker}} not {ticker}
  • Variable names are spelled correctly
  • Variables are inside quotes: "{{ticker}}" not {{ticker}}

SignalBee Configuration

  • Webhook is enabled in SignalBee
  • Trading is enabled for the webhook
  • Symbol is in the allowed pairs list (or list is empty for all pairs)
  • Exchange is connected and tested successfully

Testing Your Template

Method 1: SignalBee's Test Feature

  1. Go to SignalBee DashboardWebhooks
  2. Click on your webhook
  3. Click Test Webhook
  4. The test sends a sample signal to verify connectivity

Method 2: TradingView's Test Button

  1. Create your alert in TradingView
  2. Before saving, click the Test button (if available)
  3. Check SignalBee's SignalsHistory for the test signal

Method 3: Live Testing with Small Quantities

  1. Use a very small quantity: "quantity": "0.0001"
  2. Create an alert on a condition that triggers quickly
  3. Monitor in SignalBee SignalsHistory
  4. Check your exchange for the executed trade
  5. Delete the test alert after verification

Method 4: JSON Validation Tools

Before pasting into TradingView:

  1. Copy your JSON template
  2. Paste into jsonlint.com
  3. Click "Validate JSON"
  4. Fix any syntax errors before using

Debugging Failed Signals

If your signal isn't working:

  1. Check TradingView Alert History — Verify the alert fired
  2. Check SignalBee Signal History — Look for the signal and its error
  3. Validate JSON syntax — Use jsonlint.com
  4. Verify field names — Use side and symbol, not action and ticker
  5. Check webhook_secret — Copy-paste it directly, don't type it