Skip to main content

Strategy webhooks

Strategy webhooks are private REST URLs on your TradePod. TradingView, Postman, a script, or an AI agent sends a signal; TradePod sizes it from strategy Settings and (when Auto-Execute is on) places the order on Dhan.

This is not TradeFlow HMAC / central strategies. Each strategy has its own URL and secret key.

Why TradePod (not Dhan TradingView alone)​

Dhan is the broker. TradePod is the strategy layer on top.

NeedDhan chart alert aloneTradePod webhook
Buy / sell from a chartYesYes
Attach SL + target with entryLimitedYes (sl / target)
Change SL / target after fillNoYes (MODIFY)
Exit only if you have a positionNoYes (EXIT)
Flatten everything on that strategyNoYes (FORCE_EXIT)
Size, market hours, square-off, daily limits per strategyNoYes (Settings)

You do not host your own server — the pod already has a Static IP (whitelist it in Connect Dhan).

Routes​

MethodPathAuth
POST/strategy/:strategy_idRequired — Normal webhook
POST/strategy/:strategy_id/eqRequired — Equity
POST/strategy/:strategy_id/futRequired — Futures
POST/strategy/:strategy_id/optRequired — Options
GET/strategy/:strategy_id/healthNone — health check

Example (Options):

https://YOUR_POD.tradepod.in/strategy/strat_xxxxx/opt?key=YOUR_API_KEY

In TradePod → Strategy → Config you can copy four URLs:

Label in appPath
Normal webhook/strategy/{id}?key=…
Options/strategy/{id}/opt?key=…
Futures/strategy/{id}/fut?key=…
Equity/strategy/{id}/eq?key=…

TradingView cannot send custom headers. Prefer /eq /fut /opt on the path. Keep ?key= on the URL. Message is entry/exit JSON only — Authentication.

Actions​

ActionWhat it does
BUY / SELLOpen a trade. Optional sl / target go with the entry
EXITClose the open trade for that symbol
EXIT_BUY / EXIT_SELLExit a long or short specifically
MODIFYChange SL / target (and related fields) on the open trade
FORCE_EXIT / EXIT_ALLFlatten — close all open trades on this strategy

Same URL for every action — the "action" field (or the first word of a plain-text alert) decides what happens.

Message format​

Send either:

  1. JSON (recommended for most setups), or
  2. Plain text pipe-style alerts (also accepted)

See TradingView alerts for both.

Not supported​

  • Multi-leg legs[] — HTTP 400. One contract per request. Use TradeFlow for spreads.
  • Running TradingView against localhost — use your public TradePod host.

Start here​

  1. Create a strategy
  2. TradingView alerts — URL + entry/exit Message
  3. Pine Script & extras — helpers + strategy examples
  4. Payload reference
  5. Authentication · F&O · Force exit · Postman