AI-powered algorithmic trading for Indian markets
Webhooks

TradingView alerts to auto-trade on NSE

Connect TradingView Pine Script alerts to auto-execute on NSE and BSE. Symbol mapping translates TV symbols to broker instruments. Rate limiting prevents alert storms. Paper mode for testing, live mode for real execution.

Also supports Chartink screener alerts and custom HTTP bots. Works with Zerodha, Angel One, Upstox, Dhan.

How to set up TradingView webhooks

Five steps from TradingView alert to auto-execution on your broker.

Setup Guide
1

Create webhook in Anadi Algo

Go to Webhooks page. Click "New Webhook". Name it, select platform (TradingView/Chartink/Custom), choose broker, set trading mode (Paper/Live). You get a unique URL and secret key.

2

Add symbol mappings

Map source symbols to broker instruments. TV sends "NIFTY" but your broker needs "NIFTY 50" on NFO exchange with quantity 50. Set action: FOLLOW (same direction) or REVERSE (opposite).

3

Configure execution controls

Set trading window (e.g., 09:20-15:15), rate limits (e.g., max 5 per minute), and order type (Market/Limit). These prevent accidental over-trading and out-of-hours execution.

4

Add URL to TradingView alert

In TradingView, create or edit an alert. Under "Notifications", check "Webhook URL" and paste your Anadi Algo webhook URL. Set the alert message format.

5

Test with paper mode

Start with paper trading mode. Fire a test alert from TradingView. Check the webhook logs in Anadi Algo to verify the full flow works. Switch to live when satisfied.

Webhook configuration

What a configured webhook looks like in Anadi Algo.

Webhook Detail
Active
NameTV NIFTY Scalp
PlatformTradingView
Trading ModePaper
BrokerZerodha (Kite)
Start Time09:20
End Time15:15
Rate Limit5 per minute
https://api.anadialgo.com/webhooks/tv/abc123
wh_sk_a1b2c3...d4e5f6
{
  "symbol": "NIFTY",
  "action": "BUY",
  "secret": "your_secret"
}

Symbol mapping

TradingView uses different symbol names than brokers. Mappings translate source symbols to the correct broker instrument, exchange, and quantity.

Source (TV)Target (Broker)ExchangeQtyActionNote
NIFTYNIFTY 50NFO50FOLLOWTV says BUY → Anadi buys
BANKNIFTYNIFTY BANKNFO15FOLLOWDirect mapping
RELIANCERELIANCENSE10FOLLOWEquity segment
SBINSBINNSE25REVERSETV says BUY → Anadi sells
HDFCBANKHDFCBANKNSE15FOLLOWEquity segment

Execution controls

Safety guardrails to prevent accidental over-trading and out-of-hours execution.

Trading Window

Only execute orders within specified time range

09:20 - 15:15 IST

Rate Limiting

Max number of executions per time period

5 per minute, 50 per day

Duplicate Prevention

Ignore duplicate alerts within cooldown period

1 second cooldown per symbol

Paper/Live Toggle

Switch between paper and live without changing TV alerts

Paper mode for testing

Order Type

Market or limit orders for webhook execution

MARKET (default), LIMIT

Secret Validation

Verify webhook secret to prevent unauthorized requests

HMAC-SHA256 signature check

Webhook execution logs

Every webhook execution is logged with status, latency, and order details.

Webhook Logs — TV NIFTY Scalp
2026-03-08
TimeSymbolActionStatusLatencyOrder IDDetail
09:21:03NIFTYBUYSUCCESS142msORD-2026030801Market order placed, filled at 22,845.50
09:45:18NIFTYSELLSUCCESS118msORD-2026030802Exit order, filled at 22,892.00
10:12:45RELIANCEBUYSUCCESS156msORD-2026030803Market order, filled at 1,245.30
10:12:46RELIANCEBUYRATE_LIMITEDDuplicate alert within 1s, rate limited
10:30:02SBINBUYSUCCESS134msORD-2026030804Reversed to SELL (mapping), filled at 812.40
15:16:30NIFTYBUYREJECTEDOutside trading window (15:15 cutoff)

Supported alert platforms

TradingView is the most popular, but any HTTP source works.

TradingView

Pine Script alerts, chart alerts, and screener alerts. Most popular source of webhook signals.

JSON or plain text alert message

Chartink

Indian stock screener with scan-based alerts. Trigger when stocks enter/exit your scan.

HTTP POST with stock list

Custom Bots

Any system that can send HTTP POST requests. Python scripts, Node.js bots, Google Sheets macros.

JSON payload with symbol + action

Frequently asked questions

How do I connect TradingView alerts to auto-trade on Zerodha?

Create a webhook in Anadi Algo with Zerodha as the broker. You get a unique URL. Add this URL to your TradingView alert under Notifications > Webhook URL. Add symbol mappings (e.g., NIFTY → NIFTY 50, NFO, qty 50). When your TV alert fires, Anadi Algo places the order on Zerodha via Kite Connect API.

Can I use TradingView free plan with webhooks?

No. TradingView webhooks require a paid plan (Essential or higher). The webhook URL feature is not available on the free TradingView plan. However, you can use Chartink alerts or custom bots with Anadi Algo webhooks on any plan.

What happens if TradingView sends duplicate alerts?

Anadi Algo has built-in rate limiting and duplicate prevention. If the same symbol receives the same action (BUY/SELL) within the cooldown period (default 1 second), the duplicate is rejected and logged as RATE_LIMITED. You can configure the cooldown period.

Can I auto-trade on multiple brokers from one TradingView alert?

Yes. Create multiple webhooks in Anadi Algo, each connected to a different broker. Add all webhook URLs to your TradingView alert (TradingView supports multiple webhook URLs per alert on higher plans). Each webhook processes independently with its own symbol mappings and controls.

Related pages

NSE Algo Trading API

Full API reference for strategies, backtests, orders, and positions. REST endpoints with JWT auth.

NSE Algo Trading API

Supported Brokers

Zerodha, Angel One, Upstox, Dhan, Stoxkart. API details, segments, and connection flow.

Supported Brokers

Strategy Builder

Build strategies with AI Chat Wizard or DSL Builder. 30+ indicators, English and Hindi.

Strategy Builder

Turn your TradingView alerts into real trades

Set up in 5 minutes. Test with paper mode. Go live when ready.