ℹ The steps below use TradingView as an example. The same approach works with any webhook-capable platform — TrendSpider, Python scripts, AI agents, or any tool that can POST JSON to a URL.
- Open TradingView and navigate to your chart or strategy
- Click the Alerts button (clock icon) → Create Alert
- Set your alert condition (price cross, indicator signal, strategy alert, etc.)
- In the Notifications tab, enable Webhook URL
- Paste your VoltRouter webhook URL from the dashboard
- Set the Message field to the JSON payload (see examples below)
Building Your Alert Message
The message field is the JSON body sent to VoltRouter when the alert fires. Build it as a string literal — you can reference TradingView built-in variables.
Minimal — market buy
{
"broker": "ibkr",
"symbol": "MNQ",
"action": "BUY",
"quantity": 1,
"api_key": "sk_your-key-from-dashboard"
}
With strategy ID and limit order
{
"broker": "ibkr",
"symbol": "MNQ",
"action": "BUY",
"quantity": 1,
"order_type": "LIMIT",
"take_profit_price": 21500.00,
"strategy_id": "breakout_v2",
"api_key": "sk_your-key-from-dashboard"
}
Routing to a specific account by label
{
"broker": "alpaca",
"symbol": "AAPL",
"action": "BUY",
"quantity": 10,
"account": "paper-account",
"api_key": "sk_your-key-from-dashboard"
}
IBKR — Micro Silver Futures (tradingClass suffix)
{
"broker": "ibkr",
"symbol": "SI_SIL",
"action": "BUY",
"quantity": 1,
"expiry": "202609",
"api_key": "sk_your-key-from-dashboard"
}
IBKR — Adaptive market order (native IB algo)
{
"broker": "ibkr",
"symbol": "MNQ",
"action": "BUY",
"quantity": 1,
"extra": {
"strategy": "Adaptive",
"strategyParameters": { "adaptivePriority": "Normal" }
},
"api_key": "sk_your-key-from-dashboard"
}
ℹ Pine Script — VoltRouterWebhook library (recommended)
The easiest way to build alerts is with the published Pine Script v6 library. Add this to the top of your script:
import yuzername/VoltRouterWebhook/5 as vr
The library provides helper functions that build the correct JSON payload for you. See the library page on TradingView for full usage examples.
Manual approach (Pine Script v5/v6): Pass your JSON payload as the alert_message parameter directly in your strategy function:
alertMsg = '{"symbol":"' + syminfo.ticker + '","action":"BUY","quantity":1,"broker":"ibkr","order_type":"MARKET","api_key":"YOUR_KEY"}'
strategy.entry("Long", strategy.long, alert_message=alertMsg)
VoltRouter reads the alert message field, not the alert condition description. Make sure your JSON is in the Message field, not the alert name.