Algo / TradingView Webhook

Send your own algo's or TradingView's signals straight into copy-trading - no broker round-trip needed on the master side.

In short: Create an algo on the My Algos page, copy its webhook URL into your bot, and link the accounts that should trade it (each with its own multiplier). Your bot can keep running in paper mode - every signal it POSTs to the URL is placed live in all linked accounts. No live master trade is needed.

Where to get your URL

  1. Open Algos in the top menu and create an algo (just a name, e.g. "Shiv Shakti").
  2. Copy its Webhook URL into your bot / algo.
  3. Link your accounts to it, choosing the segment (Options / Futures / Cash) and a multiplier for each. Pause, issue a new URL or delete the algo any time from the same page.
  4. Alternatively, a Master account also has its own webhook (Accounts → Edit → "Algo / TradingView Webhook"); its signals go to the slaves mapped to that master in Master Network.

Request format

POST a JSON body to your webhook URL:

FieldTypeNotes
exchange_segmentstringDhan's own segment code - e.g. NSE_FNO, NSE_EQ
security_idstringDhan's security id of the instrument (e.g. 45436). Easiest for a bot that already trades through Dhan. Send this or trading_symbol.
trading_symbolstringDhan'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_typestringBUY or SELL
quantitynumberTotal quantity (not lots) for the master's own order
pricenumberPrice to log as the traded price - this isn't a real broker fill, so it's trusted as-is
order_idstring, optionalYour 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
}

Modifying price (e.g. SL/TP) on an open position

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.

Using it from TradingView

  1. Create an Alert on your chart (requires a TradingView plan with Webhook alerts).
  2. Paste your webhook URL into the alert's Webhook URL field.
  3. In the Message box, write the JSON above using TradingView's own placeholders for the values that change per signal - 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}}
    }

Security

  • Your webhook URL has a unique secret token built into it - anyone with the URL can trigger trades on this master's mapped slaves, so treat it like a password.
  • Each master account gets its own separate URL - there's no shared/platform-wide key, so one leaked URL only affects that one master.
  • If a URL ever leaks, click Regenerate on the same Edit Account page - the old URL stops working immediately and a new one is issued.

FAQ

Does this replace the normal copy-trading flow?

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.

Why do I get "Instrument not found"?

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.

Does this work for non-Dhan master accounts?

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.