Guide / Checked Nov 2026
How do I test a trading webhook with curl?
Deploy a paper bot and copy the webhook URL from the strategy's Integration tab. Then POST a JSON body such as {"ticker": "SPY", "action": "buy"} to it with curl. A 200 with "status": "processed" means Nyria read the alert and passed it on. The Logs tab shows what Nyria Paper did with it. Every bot on the strategy acts on a test, so send it while nothing live is deployed.
Official documentation
Test the webhook in six steps
- 1
Deploy on Nyria Paper
Create a Nyria Paper account in one click, then select Deploy bot on an Active strategy and choose Nyria Paper.
- 2
Copy the URL
Open the strategy's Integration tab and use the copy button. A token copied by hand can pick up a stray space and answer 400.
- 3
Send the smallest body
Run the curl below with your URL. ticker and action are the only required fields. Plain text such as SPY long entry works with Content-Type text/plain.
- 4
Read the reply
200 with status processed means Nyria read it. 200 with status rejected names the reason. 404 means no strategy has that token, and 422 means the alert couldn't be used.
- 5
Read the Logs tab
The strategy's Logs tab shows how the alert was read. The bot's Logs tab shows the order and the broker's response, with a badge such as Placed, Skipped or Failed.
- 6
Send a second copy on purpose
Repeat the same body within 30 seconds. It answers 200 with status duplicate and places nothing, which is what a retry should do.
Commands to copy
JSON entry
curl -X POST https://trades.nyria.io/webhooks/YOUR_TOKEN \
-H "Content-Type: application/json" \
-d '{"ticker": "SPY", "action": "buy"}'Plain text
curl -X POST https://trades.nyria.io/webhooks/YOUR_TOKEN \ -H "Content-Type: text/plain" \ --data-binary "SPY long entry"
Full close
curl -X POST https://trades.nyria.io/webhooks/YOUR_TOKEN \
-H "Content-Type: application/json" \
-d '{"ticker": "SPY", "action": "CLOSE", "direction": "LONG"}'Replies the webhook sends
- 200 with status processed means Nyria read the alert and handed it to your bots.
- 200 with status rejected names the reason: a ticker not in the list, a wrong direction, nothing to close.
- 200 with rejected true means the strategy isn't Active.
- 200 with status duplicate means the body repeats an earlier one.
- 400 means an empty body or a malformed token, and 404 an unknown one. Copy the URL again.
- 413 is a body over 256 KB, and 422 an alert Nyria couldn't use.
- 429 is too fast, with a Retry-After header. 503 is a temporary failure worth resending. 500 is anything else, and the strategy's Logs tab has the reason.
What a 200 leaves out
- It doesn't mean the broker filled anything. The bot's Logs tab does.
- The webhook reply carries no order id. The REST API gives you one for each order.
- A rejection and a duplicate both answer 200, so read the status as well as the code.
- Use https, not http. A row missing from the Logs tab means the request never arrived.
Questions
- Can I test without a bot or a broker?
- Yes. Paste the body into the alert tester at nyria.io/tools/alert-tester to see how Nyria reads it. Nothing trades.
- Is there a test button in the app?
- Yes. A new Nyria Paper bot's page has a Sample alert card. Select Send to watch one alert go from Sent to Filled. The trade is marked Sample.
- Does 200 OK mean the order filled?
- No. It means Nyria read the alert and passed it to your bots. Open the bot's Logs tab for the broker's response.
- How do I test a TradingView webhook with curl on Alpaca paper?
- The same way. Deploy the bot on your Alpaca paper account instead of Nyria Paper and send the curl. Alpaca then decides what happens to the order.
- 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 a webhook to Nyria Paper.
- Step by step for one account: how to automate a webhook to Alpaca.
- Alert tester.
- Nyria for developers.
Guides
What is a webhook in trading?
A URL a program posts to. A TradingView example, what the message needs and why the URL is secret.
Why is my TradingView webhook not firing?
Six checks, most common first, ending at the logged reason.
Python webhook alerts to your broker
The webhook URL, the documented fields, a minimal requests sender, the response and the Logs tab, paper first.
How do I keep a trading webhook URL secure?
The token in the URL is the only authentication. Rotate it if it leaks.
How do I send trade alerts from my own code with a REST API?
POST /v1/alerts with a Bearer token. The reply carries an order_id you can poll.
Try a paper bot first
No card required. Paper is free. Live trading from $15 a month.