TradingView webhook JSON reference for Tradovate and NinjaTrader

This page lists what TradeCloner's webhook receiver reads from a TradingView alert, taken from the code that runs it. If a field, alias or value is not on this page, the receiver does not use it. For the setup steps, see TradingView alerts to multiple prop accounts.

The receiver places the order on your Master account, which must be on Tradovate or NinjaTrader (through its Tradovate login). Your followers then copy it like any other trade, if the copy group is active.

The URL

TradeCloner shows your full webhook URL when you create the webhook. It looks like this, with your own id in place of the placeholder:

https://tradecloner.com/api/tv-webhooks/receive/YOUR_WEBHOOK_ID

The id only says which webhook the alert is for. It is not the secret, so a leaked URL cannot place orders. TradingView's own page says it accepts only ports 80 and 443, and this URL uses 443.

Where the passphrase goes

The passphrase goes in the JSON body, in the field passphrase. The receiver also accepts the same value in secret or token. Never put it in the URL.

The message must be valid JSON. TradingView's page says a valid JSON message is sent as application/json and anything else as plain text. The receiver cannot read a passphrase from plain text, so it refuses the alert.

TradingView also says "webhook alerts are only allowed when 2-factor authentication is enabled." (TradingView, read 2026-11-14.) That page does not list which plans include webhook alerts, so check yours.

Fields

FieldAlso accepted asValuesIf missing
passphrasesecret, tokenThe secret shown once when you create the webhookRefused as unauthorized
actiondata, side, order_actionSee the table belowRefused: Invalid or missing action
tickersymbol, instrument, contractA product (MNQ), a continuous ticker (NQ1!), an exchange-qualified one (CME_MINI:NQ1!) or a contract (MNQZ6)The webhook's Default Contract. Refused if there is none
quantityqty, contracts, sizeA whole number from 1 to 99. Decimals are roundedThe webhook's Default Qty
order_typeorderType, typemarket, limit or stopLimit if a price is present, otherwise market
pricelimit_price, stop_priceA number above 0. The limit price for a limit order, the trigger for a stopRequired for limit and stop
sentimentmarket_positionOnly flat matters: it turns the alert into a closeNo effect
idalert_id, alertId, client_order_id, clientOrderIdAny text you chooseOnly used by duplicate protection

Names are matched in the order shown, and the first one present is used. A quantity above 99 is refused, never trimmed. Any other field is ignored.

Actions

Matching ignores capitals and treats a hyphen as an underscore.

ValueWhat it does
buy, longBuys the quantity on the Master
sell, shortSells the quantity on the Master
close, exit, flat, flattenCloses the Master's whole position in the alert's product at market. The quantity is ignored. With no position, the log says "No open position to exit" and nothing is sent
flatten_all, flattenall, close_all, closeall, exit_allCloses every position in every product, one at a time, and stops at the first refusal. Works only if you ticked Allow close-all alerts
cancel, cancel_allRecognised, but no webhook can enable it. The alert is logged as ignored

A new webhook accepts buy, sell, close, flatten and exit.

Order types

market also reads as mkt, m or 1. limit reads as lmt, l or 2, and stop as stp, s or 3. Market orders are sent immediate-or-cancel. Limit and stop orders rest until filled or cancelled.

  • Limit and stop need the webhook's Limit Orders switch set to Enabled. On a Market Only webhook they are refused, never turned into market orders.
  • A price on an explicit market order is refused. Leave price out, or use limit.
  • Trailing stop and stop-limit are refused. trailing_stop, trailingstop, trail, trailing, 4, stop_limit and stoplimit all get "is not supported. Use market, limit or stop".

How a ticker becomes a contract

Three layers, most trusted first:

LayerUsed whenWhat it means
Explicit contractThe ticker names an expiry, such as MNQZ6, MNQU25 or MNQU2025Sent as written. Two- and four-digit years become the one-digit year Tradovate uses. It is never moved to the front month
ListingThe ticker is a product or a continuous tickerThe front-month contract in TradeCloner's contract list, kept from the broker's own listing. A listed contract that has expired is skipped
Calendar estimateThe listing has no usable entryA contract worked out from a calendar of active months and roll dates. It is a guess

A continuous ticker such as NQ1! loses its exchange prefix and its 1!, leaving the product NQ. It goes to the listing, then to the calendar.

TradeCloner does not read TradingView's roll date, so around a roll its contract can differ from the one TradingView charts. To pin a contract, name it: NQZ6.

A close matches your Master's open position by product, so its contract month need not match the alert's. The webhook log shows the contract that actually traded, but not which layer chose it.

Duplicate alert protection

TradingView can deliver one alert twice. The receiver fingerprints every alert, ignoring the passphrase fields, and ignores an identical alert that arrives within 5 seconds of the first. The Webhooks page has no setting for that window.

If a message has an id, alert_id, alertId, client_order_id or clientOrderId, that id alone is the alert's identity. If you send identical alerts on purpose, make one field differ. If the duplicate check itself is unavailable, the alert goes through rather than being dropped.

What the receiver does with an alert it cannot accept

It answers HTTP 200 even when it refuses an alert, so TradingView never retries and cannot turn one alert into two orders. The reply body says what happened, for example {"ok": false, "error": "Invalid webhook credentials"}. TradingView says it cancels a request that takes over three seconds, so rely on the log, not on TradingView's alert history.

Open TV Webhooks, then View Logs, to see the last 50 events with status, action, contract, quantity, order id and error. The Failed tab lists failed, invalid_payload, rate_limited, unauthorized and blocked_ip.

Duplicate, ignored and paused events show only under All. A webhook accepts 10 alerts a minute once the passphrase checks out.

What is not supported

  • Brackets. A take profit or stop loss cannot ride on an entry. The fields are ignored and the entry goes in alone. Send a protective stop as its own alert.
  • Trailing stops and stop-limit orders. Refused, as above.
  • ProjectX and Rithmic Masters. The log says "TradingView webhooks currently support Tradovate and NinjaTrader masters only".
  • Cancel-all by alert. Not enabled.

Four examples

Replace YOUR_PASSPHRASE with your own. Prices are examples only.

1. Buy 1 at market. It uses action buy, a continuous ticker, a quantity and an explicit market type.

{"passphrase": "YOUR_PASSPHRASE", "action": "buy", "ticker": "MNQ1!", "quantity": 1, "order_type": "market"}

2. Buy 1 with a limit. It needs Limit Orders set to Enabled, and price is the limit price.

{"passphrase": "YOUR_PASSPHRASE", "action": "buy", "ticker": "MNQ1!", "quantity": 1, "order_type": "limit", "price": 21000}

3. Close the position. It closes the Master's whole MNQ position at market, so no quantity is needed.

{"passphrase": "YOUR_PASSPHRASE", "action": "close", "ticker": "MNQ1!"}

4. Flatten everything. It needs Allow close-all alerts, and no ticker is needed.

{"passphrase": "YOUR_PASSPHRASE", "action": "flatten_all"}

Troubleshooting

SymptomCauseFix
Log status unauthorizedWrong or missing passphrase, a rotated passphrase, or a message that is not valid JSONPaste the current passphrase into a valid JSON message
No log row at allThe id in the URL is wrong (unknown ids are not logged), or TradingView never sent the alertRe-copy the URL. Check the alert, and that 2-factor authentication is on
blocked_ipThe sender was not TradingView, for example a test from your own computerTest with a real TradingView alert
invalid_payload: Invalid or missing actionThe action is not in the table aboveUse a listed value
invalid_payload: market orders onlyA limit or stop alert on a Market Only webhookCreate a webhook with Limit Orders set to Enabled
invalid_payload: Price can only be used with limit and stop ordersAn explicit market order carries a priceRemove the price, or use limit
invalid_payload: Quantity over the 99-contract limitThe quantity is above 99Send 99 or fewer
ignored: Action not allowedThe webhook does not allow that action, usually flatten_allTick Allow close-all alerts
failed: No symbol in the alertNo ticker, and no Default Contract on the webhookAdd a ticker, or set a Default Contract
failed: Master connection offlineThe Master's connection is downReconnect it on Connections
duplicateAn identical alert arrived within 5 secondsRemove the duplicate alert, or add an id that differs
Executed, but followers did not copyThe group is paused, or a follower skipped or failedSee Orders Not Copying

Full setup details are in the help article TradingView Webhooks.

Frequently asked questions

What does a TradingView webhook message for TradeCloner look like?

A JSON object with your passphrase, an action, and usually a ticker and quantity, for example {"passphrase": "YOUR_PASSPHRASE", "action": "buy", "ticker": "MNQ1!", "quantity": 1}. The passphrase goes in the body, never in the URL. Every field and alias is listed above.

Is the webhook URL a secret?

No. It holds only the webhook's id, which routes the alert. The secret is the passphrase in the message body, so a leaked URL cannot place orders.

Can I use NQ1! as the ticker?

Yes. TradeCloner strips the exchange prefix and the 1!, leaves NQ, and picks the contract from its own listing, then from a calendar estimate. It does not follow TradingView's roll date. To pin a contract, send an explicit one such as NQZ6.

Why does my alert show HTTP 200 when it did not trade?

The receiver always answers 200 so TradingView never retries and cannot create a second order. The outcome is in the reply body and in the webhook log under View Logs, with a status and an error message.

Can an alert carry a stop loss and take profit?

No. Bracket fields are ignored, so the entry goes in without them. Send the protective stop as its own alert with order_type set to stop. Trailing stops and stop-limit orders are refused.

Does a webhook work with a Rithmic or ProjectX Master?

No. The Master must be a Tradovate account, or a NinjaTrader account connected through its Tradovate login. Rithmic and ProjectX accounts can still be followers.

How does duplicate protection work?

An identical alert that arrives within 5 seconds of the first is ignored and logged as duplicate. If a message has an id field, that id alone decides what counts as the same alert.

Which TradingView plans include webhook alerts?

TradingView's webhook page does not list plans, so check your own. It does say webhook alerts are only allowed when 2-factor authentication is enabled (read 2026-11-14).

One alert. Every account.

Connect a Tradovate Master, create a webhook and test it on a demo account before you trust it.

Sources

TradeCloner behaviour comes from the product itself. The only third-party page is TradingView's, read on 2026-11-14.

Futures trading carries substantial risk of loss. TradeCloner does not promise profits, passed evaluations or payouts.

TradeCloner is not affiliated with, endorsed by or sponsored by TradingView or Tradovate. These names are trademarks of their owners.

The futures trade copier built for prop firm traders. Copy every fill across NinjaTrader, Tradovate, ProjectX and Rithmic prop firms, with each account's limits enforced live.

Get in touch

[email protected]

© 2026 TradeCloner. All rights reserved.

All trademarks are the property of their respective owners. TradeCloner is not affiliated with, endorsed by, or sponsored by NinjaTrader, Tradovate, ProjectX, TradingView, Topstep, Apex, or any other platform or proprietary trading firm mentioned on this site. Futures and forex trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Only risk capital should be used for trading, and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results.