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
SymbolsymbolstringYesCanonical format BASE-QUOTE (e.g., BTC-USDT)
Quantity Typequantity_typestringYesfixed, percentage
QuantityquantitystringYesPositive number (0-100 for percentage)
Source Timestampsource_timestampISO 8601YesAlert trigger time (within 5 minutes). Use {{timenow}} in TradingView
Order TypetypestringNomarket (default), limit, stop_loss, stop_limit, take_profit, take_profit_limit
PricepricestringNoLimit/execution price. Required for limit, stop_limit, take_profit_limit
Stop Pricestop_pricestringNoTrigger price. Required for stop_loss, stop_limit, take_profit, take_profit_limit
Reduce Onlyreduce_onlyboolean/stringNotrue/false or "true"/"false" (default: false). For futures: only reduce position, never increase

Normalization Rules

SignalBee normalizes incoming values:

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

Minimal vs Full Payload

Minimal (market order, required fields only):

{
  "webhook_secret": "your-webhook-secret",
  "side": "buy",
  "symbol": "BTC-USDT",
  "quantity_type": "fixed",
  "quantity": "0.001",
  "source_timestamp": "{{timenow}}"
}

Full (limit order, all fields):

{
  "webhook_secret": "your-webhook-secret",
  "side": "buy",
  "symbol": "BTC-USDT",
  "quantity_type": "percentage",
  "quantity": "25",
  "source_timestamp": "{{timenow}}",
  "type": "limit",
  "price": "{{close}}"
}

Basic Templates

Simple Buy (Fixed Quantity)

Buys an exact amount of the asset.

{
  "webhook_secret": "your-webhook-secret",
  "side": "buy",
  "symbol": "BTC-USDT",
  "quantity_type": "fixed",
  "quantity": "0.001",
  "source_timestamp": "2025-01-15T10:30:00Z"
}

Use case: Consistent position sizing regardless of account balance.

Simple Sell (Fixed Quantity)

Sells an exact amount of the asset.

{
  "webhook_secret": "your-webhook-secret",
  "side": "sell",
  "symbol": "BTC-USDT",
  "quantity_type": "fixed",
  "quantity": "0.001",
  "source_timestamp": "2025-01-15T10:30:00Z"
}

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-webhook-secret",
  "side": "buy",
  "symbol": "ETH-USDT",
  "quantity_type": "percentage",
  "quantity": "25",
  "source_timestamp": "2025-01-15T10:30:00Z"
}

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-webhook-secret",
  "side": "sell",
  "symbol": "ETH-USDT",
  "quantity_type": "percentage",
  "quantity": "50",
  "source_timestamp": "2025-01-15T10:30:00Z"
}

Use case: Taking partial profits while maintaining exposure.

Close Entire Position

Sells 100% of your holdings for a symbol.

{
  "webhook_secret": "your-webhook-secret",
  "side": "close",
  "symbol": "BTC-USDT",
  "quantity_type": "percentage",
  "quantity": "100",
  "source_timestamp": "2025-01-15T10:30:00Z"
}

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 (normalized to BTC-USDT)
{{close}}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-webhook-secret",
  "side": "{{strategy.order.action}}",
  "symbol": "{{ticker}}",
  "quantity_type": "percentage",
  "quantity": "50",
  "source_timestamp": "{{timenow}}"
}

Note: The {{strategy.order.action}} variable outputs buy or sell based on your strategy's order direction. Without a type field, the order executes at market price.

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-webhook-secret",
  "side": "buy",
  "symbol": "{{ticker}}",
  "quantity_type": "percentage",
  "quantity": "25",
  "source_timestamp": "{{timenow}}"
}

Sell Alert:

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

Strategy-Specific Templates

EMA Crossover Strategy

For moving average crossover signals:

{
  "webhook_secret": "your-webhook-secret",
  "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-webhook-secret",
  "side": "buy",
  "symbol": "{{ticker}}",
  "quantity_type": "percentage",
  "quantity": "20",
  "source_timestamp": "{{timenow}}"
}

RSI Overbought (Sell Signal) — RSI > 70:

{
  "webhook_secret": "your-webhook-secret",
  "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-webhook-secret",
  "side": "buy",
  "symbol": "BTC-USDT",
  "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-webhook-secret",
  "side": "buy",
  "symbol": "{{ticker}}",
  "quantity_type": "percentage",
  "quantity": "15",
  "source_timestamp": "{{timenow}}"
}

Setup:

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

Tip: This places a market order when the breakout is detected. To enter at a specific price instead, add "type": "limit" and "price": "68000.00" to the template.


Order Type Templates

By default, all signals use market order type. You can specify other order types for more precise execution.

Limit Order

Buy at a specific price or better:

{
  "webhook_secret": "your-webhook-secret",
  "side": "buy",
  "symbol": "BTC-USDT",
  "quantity_type": "fixed",
  "quantity": "0.001",
  "source_timestamp": "2025-01-15T10:30:00Z",
  "type": "limit",
  "price": "67000.00"
}

Use case: Enter a position only if the price is at or below your target.

Stop-Loss Order

Sell when price drops to a trigger level:

{
  "webhook_secret": "your-webhook-secret",
  "side": "sell",
  "symbol": "BTC-USDT",
  "quantity_type": "percentage",
  "quantity": "100",
  "source_timestamp": "2025-01-15T10:30:00Z",
  "type": "stop_loss",
  "stop_price": "65000.00"
}

Use case: Protect against downside by selling at market when price hits the stop level.

Stop-Limit Order

Trigger a limit order when price hits the stop level:

{
  "webhook_secret": "your-webhook-secret",
  "side": "sell",
  "symbol": "BTC-USDT",
  "quantity_type": "percentage",
  "quantity": "100",
  "source_timestamp": "2025-01-15T10:30:00Z",
  "type": "stop_limit",
  "stop_price": "65000.00",
  "price": "64800.00"
}

Use case: More precise stop-loss — triggers a limit sell at $64,800 when price drops to $65,000.

Take-Profit Order

Sell at market when price reaches a profit target:

{
  "webhook_secret": "your-webhook-secret",
  "side": "sell",
  "symbol": "BTC-USDT",
  "quantity_type": "percentage",
  "quantity": "50",
  "source_timestamp": "2025-01-15T10:30:00Z",
  "type": "take_profit",
  "stop_price": "72000.00"
}

Use case: Lock in profits by selling at market when price rises to the target.

Take-Profit Limit Order

Trigger a limit sell when price reaches a profit target:

{
  "webhook_secret": "your-webhook-secret",
  "side": "sell",
  "symbol": "BTC-USDT",
  "quantity_type": "percentage",
  "quantity": "50",
  "source_timestamp": "2025-01-15T10:30:00Z",
  "type": "take_profit_limit",
  "stop_price": "72000.00",
  "price": "71800.00"
}

Use case: Lock in profits with price control — triggers a limit sell at $71,800 when price rises to $72,000.

Reduce-Only Order (Futures)

Close a futures position without opening a new one:

{
  "webhook_secret": "your-webhook-secret",
  "side": "sell",
  "symbol": "BTC-USDT",
  "quantity_type": "percentage",
  "quantity": "100",
  "source_timestamp": "2025-01-15T10:30:00Z",
  "type": "market",
  "reduce_only": true
}

Use case: Safely close futures positions without risk of accidentally opening a position in the opposite direction.


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": "BTC-USDT""symbol": "BTC-USDT"
Wrong field name (signal_price)"signal_price": "{{close}}""price": "{{close}}"
Slash in symbol"symbol": "BTC/USDT""symbol": "BTC-USDT"
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
symbolticker, pair, market
pricesignal_price, entry_price
source_timestamptimestamp, time
typeorder_type, ord_type
stop_pricestopPrice, trigger_price
reduce_onlyreduceOnly, reduce

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