Guide
What JSON format does a TradingView webhook need?
TradingView needs no particular format. It posts the Message box as written: valid JSON goes out as application/json and anything else as text/plain. Nyria reads either one in your own wording. The message has to name the ticker, the side, and whether it opens or closes a position, and for an option it can add the strike, the expiry and call or put. A body as short as AAPL long entry works.
Official documentation
Write and check a webhook message
- 1
Start with the three things Nyria needs
The ticker, the side, and whether the alert opens or closes a position. Plain text such as AAPL long entry says all three.
- 2
Use placeholders for what changes
TradingView fills in placeholders such as {{ticker}} and {{strategy.order.action}} before it sends the alert, so one alert can serve every symbol a chart is on.
- 3
Paste the message in the alert
In the alert dialog open Message and paste it over the text there. In Notifications select Webhook URL and paste the strategy's URL.
- 4
Test it before it trades
Paste the message into the alert tester to see the ticker and side Nyria reads, then select Check format on the strategy. The Logs tab shows what each live alert was read as.
Messages to copy
Plain text
SPY long entry
JSON with TradingView placeholders
{
"ticker": "{{ticker}}",
"action": "{{strategy.order.action}}",
"marketPosition": "{{strategy.market_position}}",
"prevMarketPosition": "{{strategy.prev_market_position}}"
}An option, as JSON
{ "ticker": "SPY", "action": "BTO", "strike": 775, "expiry": "2026-12-18", "type": "call" }What to know about the message
- Do not put logins or passwords in a webhook message. TradingView warns against it.
- The message cannot set the size. The bot sizes each order from its Budget per entry.
- Leave an option's strike and expiry out and the strategy picks the contract from its own rules.
- An identical alert body that repeats straight after the first is dropped, so a double send does not open two positions.
Questions
- Does a TradingView webhook have to be JSON?
- No. TradingView sends plain text as text/plain and valid JSON as application/json, and Nyria reads both.
- Is there a required JSON template for Nyria?
- No. Name the ticker and the side in your own wording. The message Nyria shows on the Integration tab works as it is, and a message you already use can stay.
- Where can I try a message before it trades?
- In the alert tester and the alert builder. Both are free and need no broker.
- What does it cost?
- Paper is free. Live trading from $15 a month.
Next
- Paste an alert into the alert tester to see how Nyria reads it.
- Write a TradingView message with the alert builder.
- Step by step for one account: how to automate TradingView to Charles Schwab.
- Step by step for one account: how to automate Webhook to Nyria Paper.
Guides
How to auto execute trades from a TradingView strategy
The alert, the webhook URL, the message, a paper test, then live.
TradingView webhook not working: a checklist
Six checks, most common first: script type, the URL box, expiry, the message, the bot, and where the reason is logged.
What is a webhook in trading?
A URL a program posts to when something happens: a TradingView example, what the message needs, a 200 versus a fill, and why the URL is secret.
Test the strategy on a paper bot first
Paper is free. Live trading from $15 a month.