Guide
TradingView webhook JSON format
TradingView needs no fixed JSON format. A buy alert can be {"action": "OPEN", "ticker": "{{ticker}}", "direction": "LONG"}. The matching sell swaps OPEN for CLOSE. TradingView posts valid JSON as application/json and anything else as text/plain. Nyria reads either, in your own wording. The message names the ticker, the side, and open or close. A body as short as AAPL long entry works.
Official documentation
Write and check a webhook message
- 1
Start with three fields
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, paste it over the text there and select Apply. Open Notifications, tick Webhook URL, paste the strategy's URL and select Apply.
- 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.
Watch the setup

Steps in the video
- 0:00Pick Nyria Paper or a broker. Open Integrations. Nyria Paper is free and needs no broker, so start there. Charles Schwab, Tradier and tastytrade connect through their own sign-in, and Alpaca takes an API key.
- 0:58Create a strategy. Select Create strategy and name it. Then, select your alert source. This example uses TradingView. Pick stocks and a ticker, then create the draft.
- 1:28Create the alert in TradingView. Copy the webhook URL and the alert message from the Integration tab. In TradingView, select Message, paste the message and select Apply. Then select Notifications, tick Webhook URL, paste the URL and select Apply.
- 3:13Check the format. Select Check format and add an entry and an exit alert. Nyria shows the ticker, side and order it read.
- 3:32Deploy a bot. Select Deploy bot, set a budget per entry and pick an account. Nyria Paper is free, so test there first. On a live broker account, pick it on the Account step. Send a sample alert and watch the paper order fill.
Messages to copy
Buy, long entry
{ "action": "OPEN", "ticker": "{{ticker}}", "direction": "LONG" }Sell, long exit
{ "action": "CLOSE", "ticker": "{{ticker}}", "direction": "LONG" }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": "OPEN", "direction": "LONG" }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.
- An option alert names the ticker and direction. The strategy's rules pick the contract. LONG uses the call rule, SHORT the put rule.
- An identical alert body that repeats straight after the first is dropped, so a double send does not open two positions.
Questions
- What's a TradingView webhook JSON example for buy and sell?
- Buy: {"action": "OPEN", "ticker": "{{ticker}}", "direction": "LONG"}. Sell: the same with "action": "CLOSE". A strategy alert can send {{strategy.order.action}}, which TradingView fills with buy or sell.
- 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.
- Copy-paste TradingView webhook JSON formats.
Guides
How do I automate TradingView alerts to my broker?
The alert, the webhook URL, the message, a paper test, then live.
Read guideWhat is a webhook in trading?
A URL a program posts to. A TradingView example, what the message needs and why the URL is secret.
Read guideWhy is my TradingView webhook not firing?
Six checks, most common first, ending at the logged reason.
Read guideHow do I auto execute trades from a TradingView strategy?
An alert on the strategy, Order fills only, and the strategy placeholders in the message.
Read guideWhy does my TradingView alert place duplicate orders?
TradingView fired twice. Nyria drops a repeat body, and skips a second entry when multiple entries are off.
Read guideHow do I send a limit order from a TradingView alert?
order_type limit plus a price, on an alert that names action and direction.
Read guideHow do I close or reverse a position with a TradingView alert?
CLOSE with the direction exits. One alert that reports the flip reverses.
Read guideHow do I test a trading webhook with curl?
One curl POST on Nyria Paper. Read the reply, then the Logs tab.
Read guideHow do I automate trades from a TradingView indicator?
One alert per side, Once per bar close, action and direction in each message.
Read guideTry a paper bot first
No card required. Paper is free. Live trading from $15 a month.