· 1 min read
TradingView alerts to broker orders: a webhook guide for Indian traders
Turn TradingView strategy alerts into real orders across one or many accounts — the message format, F&O lots, exits and the security details that matter.
TradingView can call a webhook URL whenever an alert fires. A trading platform listening on that URL can turn the alert into orders in your accounts.
The message
Use TradingView placeholders so the alert carries the strategy's action and size:
{
"secret": "YOUR-SECRET",
"action": "{{strategy.order.action}}",
"symbol": "{{ticker}}",
"quantity": "{{strategy.order.contracts}}"
}
For futures and options it is usually clearer to send lots instead of quantity, for example "lots": 2.
Exits
Send "action": "EXIT" to square off the symbol in every account linked to the webhook, rather than calculating the opposite quantity yourself.
Duplicates
Alerts can be delivered twice. A good receiver ignores the same alert within a few seconds and logs it as a duplicate instead of doubling your position.
Security
- Keep the secret private — anyone with the URL and the secret can place orders.
- The receiver should store only a hash of the secret and log every attempt, including invalid ones.
- Alert orders should pass the same lot, price-band, kill-switch and risk checks as manual orders.
Requirements
TradingView needs a public HTTPS address and a paid TradingView plan that supports webhooks. Test the whole flow on paper accounts first.
This article is for education only and is not investment, tax or legal advice.