Send your own algo's or TradingView's signals straight into copy-trading - no broker round-trip needed on the master side.
POST a JSON body to your webhook URL:
| Field | Type | Notes |
|---|---|---|
exchange_segment | string | Dhan's own segment code - e.g. NSE_FNO, NSE_EQ |
security_id | string | Dhan's security id of the instrument (e.g. 45436). Easiest for a bot that already trades through Dhan. Send this or trading_symbol. |
trading_symbol | string | Dhan's exact trading symbol string - e.g. NIFTY-Oct2026-23200-CE. Must match EXACTLY (no fuzzy search) - this comes from Dhan's own currently-listed instrument master, since Dhan is the reference broker used for symbol resolution across this whole platform. Not needed when you send security_id. |
transaction_type | string | BUY or SELL |
quantity | number | Total quantity (not lots) for the master's own order |
price | number | Price to log as the traded price - this isn't a real broker fill, so it's trusted as-is |
order_id | string, optional | Your own reference id, unique per signal. A repeated order_id is ignored, so a retry never places the order twice. A random one is generated if omitted. |
Example:
POST https://quantlevels.in/api/algo_signal/<your-unique-token>
Content-Type: application/json
{
"exchange_segment": "NSE_FNO",
"trading_symbol": "NIFTY-Oct2026-23200-CE",
"transaction_type": "BUY",
"quantity": 75,
"price": 185.5
}
To adjust the price of an order you placed earlier through this webhook - typically a stop-loss or target on an already-open position - POST to a second URL using the SAME order_id you sent (or got back) when that leg was first placed:
POST https://quantlevels.in/api/algo_signal/<your-unique-token>/modify
Content-Type: application/json
{
"order_id": "ALGO-a1b2c3d4e5f6",
"price": 172.0
}
This finds every slave's own order that was copied from that order_id and updates its price (quantity stays the same) - not just the master's own record. If you didn't supply your own order_id when placing the original signal, use the ALGO-... one returned in that call's response.
exchange_segment and trading_symbol usually need to be hardcoded per-alert, since TradingView doesn't know Dhan's own contract naming:
{
"exchange_segment": "NSE_FNO",
"trading_symbol": "NIFTY-Oct2026-23200-CE",
"transaction_type": "{{strategy.order.action}}",
"quantity": {{strategy.order.contracts}},
"price": {{close}}
}
No - both work side by side. If this master also places real orders through its own broker app, those still get detected and copied the usual way. The webhook is just an additional way to feed in a trade.
exchange_segment/trading_symbol must match Dhan's instrument master EXACTLY, including expiry/strike formatting. Double check the exact string Dhan currently lists for that contract.
Yes - exchange_segment/trading_symbol in your signal are always in Dhan's format regardless of which broker the master itself is on (Dhan has the most complete public instrument master, so it's the one consistent "language" to send). Behind the scenes, it's automatically translated to whatever broker your master account actually uses before the order is copied.