Guide
TradingView webhook not working: a checklist
A TradingView alert that fires and never becomes an order has failed at one of six places, and the fault is almost always near the top of this list. Work down it in order. Most of the checks apply whatever is on the other end of the webhook; the last two are about where Nyria writes the reason down.
The checklist, most common first
- 1
The message uses placeholders the script does not have
The strategy placeholders, such as {{strategy.order.action}} and {{strategy.market_position}}, exist only in a strategy() script. An indicator() has none, so an indicator alert carrying them sends the placeholder text as typed, and nothing trades. The reverse fails too: a strategy alert set to Order fills only fires on every fill, so a message that spells out one side sends the entry's words on the exit. A strategy() needs one Order fills only alert per ticker with the strategy placeholders. An indicator() needs one alert per side, each stating its own action and direction, or a conversion to a strategy. TradingView replaces only its own placeholders: a Pine variable such as {{syminfo.ticker}} arrives exactly as written.
- 2
The Webhook URL box is empty, or on the wrong alert
The URL goes under the alert's Notifications, with Webhook URL ticked. Each strategy has its own URL, ending in a token that belongs to that strategy, so an alert pointed at another strategy's URL trades there or not at all. If you edited an alert, check the box is still filled on that alert itself, and not on the one you copied it from alone. When in doubt, copy the URL again from the strategy's Integration tab and paste it over whatever is there. A 404 from the webhook means no strategy has that token.
- 3
The alert expired
TradingView alerts expire. An expired alert fires nothing, so nothing reaches the webhook and the strategy's Logs tab shows no row for the time you expected one. Check TradingView's alert history to see whether it fired at all. If it did not, open the alert's status in TradingView and create it again with the same webhook URL and message.
- 4
The message does not say what to trade
Every alert needs a ticker, an action (open or close) and a direction (long or short), in JSON or plain words. A message that carries only a price, or only a word like "signal", cannot be traded. The strategy's Logs tab shows a row starting ALERT FAILED: with the reason, and the webhook answers 422. Paste the exact message into the alert tester to see how it is read and the refusal it would get, before it fires again.
- 5
The strategy, the bot or the market was off
The alert arrived and was read, and still nothing was ordered. The usual states: the strategy is a draft (a new strategy stays one until its format is checked, and the webhook answers Alert ignored: the strategy is a draft); the bot is Paused and ignores every alert, exits included; Budget per entry is below the cost of one share, contract or spread; the broker shows Disconnected on Integrations (Charles Schwab ends each sign-in after 7 days); the ticker is not in the bot's Selected tickers; an options alert arrived while the options market was closed, or an entry arrived outside the strategy's Limit trading hours.
- 6
Read the log before you change anything
The strategy's Logs tab has one row per incoming alert and shows how it was read; only the strategy's owner sees it. The bot's Logs tab has one row per alert for that bot: the order, the broker's response, or the refusal. Open a row for the details; a refusal carries a reason code under Raw JSON, such as budget_below_one_unit or ticker_not_selected. No row at all means nothing arrived: go back to the URL and the expiry. TradingView also sends late sometimes, by a minute, so a row can show up after you looked.
Check the message with the alert tester: paste it and see the order Nyria would send or the refusal it would give. To write one from scratch for a stock, option or crypto alert, use the TradingView alert message builder. The copy-ready messages for a strategy and for an indicator are in the TradingView alert messages reference.
A worked example: the wrong placeholder
The most common fault, in one alert. The script is an indicator() and the message was copied from a strategy.
Sent from an indicator alert: nothing trades
{
"action": "{{strategy.order.action}}",
"instrument": "{{ticker}}",
"price": {{close}}
}The long-entry message an indicator needs
{
"action": "OPEN",
"instrument": "{{ticker}}",
"direction": "LONG",
"price": {{close}}
}What arrives at the webhook when it fires on SPY
{
"action": "OPEN",
"instrument": "SPY",
"direction": "LONG",
"price": 772.1
}The first message arrives with the placeholder text itself where the action should be, because an indicator has no order to report, and the strategy log marks it ALERT FAILED. The second names the action and direction itself. Nyria reads SPY, open and long; the size comes from the bot's own budget per entry, never from the alert. An indicator needs one such alert per side: long entry, long exit, short entry, short exit.
Two things that look like a fault and are not
A repeated alert body is dropped. If a strategy scales in by sending the same fixed text twice, the second copy answers 200 with a status of duplicate and never trades. Add a value that changes each time, such as {{timenow}} in a metadata.message_id field, and each alert is its own.
A price-level exit in Pine, strategy.exit with a stop or a limit, closes the position inside the script. When it fills, TradingView sends one order-fill alert and Nyria treats it as an exit. No stop or target order waits at your broker, so a position that the script has not closed is still open.
Questions
- TradingView shows the alert fired, but Nyria shows no row. Why?
- The alert reached TradingView's log and not the webhook. Check that Webhook URL is ticked on that alert and holds the strategy's own URL from its Integration tab. An alert created before the token was rotated points at a URL that no longer works.
- Does a 200 from the webhook mean the order filled?
- No. A 200 means Nyria read the alert and handed it to the bots on the strategy. A 200 can also carry a rejection, such as a ticker that is not in the strategy's list or no open position to close. What the broker did is on the bot's Logs tab.
- Can I test the message without waiting for the alert to fire?
- Yes. Paste it into the alert tester. It shows the order, the ticker, any option legs and the refusal Nyria would give, in the app's own words. Nothing is traded and no account is needed.
TradingView alerts, by broker
TradingView to Schwab
Stocks and ETFs, Options up to 4 legs
TradingView to Tradier
Stocks and ETFs, Options up to 4 legs
TradingView to tastytrade
Stocks and ETFs, Options up to 4 legs, Crypto spot
TradingView to Alpaca
Stocks and ETFs, Options up to 4 legs, Crypto spot
TradingView to Nyria Paper
Stocks, options, crypto, free
Guides
Send the fixed alert to a paper bot
Paper is free. Live trading from $15 a month.