Developers / Checked Nov 2026
Build on Nyria
Send an alert by webhook, REST API or MCP server. Nyria places the order and reports the fill. Test on free paper bots first.
The webhook
Every strategy has its own URL. A POST with a ticker and an action is enough, and plain text such as SPY long entry works too. The token at the end of the URL is the only authentication, so keep it private.
curl
curl -X POST https://trades.nyria.io/webhooks/YOUR_STRATEGY_TOKEN \
-H "Content-Type: application/json" \
-d '{"ticker": "SPY", "action": "buy"}'| Field | What it does |
|---|---|
| ticker, instrument or symbol | The ticker, such as SPY or BTCUSD. All three keys mean the same thing. |
| action | OPEN or CLOSE for entries and exits. MODIFY and CANCEL manage a working order. buy, sell, entry and exit also work. |
| direction | LONG or SHORT, sent with OPEN and CLOSE. |
| price and order_type | A limit price, and market or limit for this one alert. |
| marketPosition and prevMarketPosition | TradingView's strategy position fields. Send both and Nyria works out the action and direction. |
From a TradingView strategy, put the placeholders in the alert message:
json
{
"ticker": "{{ticker}}",
"action": "{{strategy.order.action}}",
"marketPosition": "{{strategy.market_position}}",
"prevMarketPosition": "{{strategy.prev_market_position}}",
"price": {{close}}
}Paste any payload into the alert tester to see how Nyria reads it. Every field is in the webhook reference.
The REST API
The REST API uses the same token as the webhook, sent as a Bearer header. It sends alerts and reads positions, orders and fills. Each token allows 30 requests a minute.
curl
curl -X POST https://api.nyria.io/v1/alerts \
-H "Authorization: Bearer YOUR_STRATEGY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"message": "BUY BTCUSDT"}'| Route | What it does |
|---|---|
| POST /v1/alerts | Sends an alert and returns an order_id for each order it creates. |
| GET /v1/positions | Open positions for each of your accounts with a bot on the strategy. |
| GET /v1/orders | Recent orders, newest first. limit takes 1 to 100. |
| GET /v1/orders/{order_id} | One order, with each bot's status and fill. |
The same alert sent twice within two minutes goes out once, and the repeat answers 409. Full reference in the REST API docs.
The MCP server
Claude, Cursor and any MCP client can preview and send alerts to a strategy. The endpoint is https://api.nyria.io/mcp over Streamable HTTP, with the strategy's token as a Bearer header. It is listed in the official MCP registry as io.github.Nyria-LLC/nyria.
Claude Code
claude mcp add --transport http nyria https://api.nyria.io/mcp --header "Authorization: Bearer YOUR_TOKEN"
| Tool | What it does |
|---|---|
| nyria_send_alert | Sends the alert to every bot on the strategy. |
| nyria_preview_alert | Shows how Nyria reads an alert. It places nothing. |
| nyria_strategy_info | Shows the strategy's name, status and active bots. |
| nyria_list_bots | Lists each bot's broker, paper or live, and status. |
| nyria_recent_orders | Lists recent orders on the strategy. |
| nyria_order_status | Looks up one order by its order_id, with each bot's status and fill. |
| nyria_positions | Shows open positions on each of your accounts with a bot on the strategy. |
A live bot turns a sent alert into a real order. Start with a paper bot. Read the MCP page or the MCP docs.
Examples on GitHub
- Nyria-LLC/trading-alert-examplesCopy-paste alerts for TradingView, TrendSpider, Discord, Telegram, Python and webhooks.
- Nyria-LLC/trading-alert-automationAlert formats, Pine Script v6 and webhook examples.
- Nyria-LLC/nyria-mcpThe MCP server for Claude, Cursor and any MCP client.
Test on paper first
Nyria Paper is a free simulated broker with up to 10 paper bots and no card. Deploy a bot on it, send alerts from your code, and read the Logs tab against what you meant before you go live.
Questions
- How do I send an alert to Nyria from code?
- POST JSON with a ticker and an action to the strategy's webhook URL, or to the REST API with the same token as a Bearer header.
- How do I get an order id back?
- Send through POST /v1/alerts. The webhook reply carries no order id, and the REST reply lists one for each order.
- Is there an MCP server for Nyria?
- Yes. It lives at https://api.nyria.io/mcp and is listed in the official MCP registry as io.github.Nyria-LLC/nyria.
- Can code set the position size?
- No. The bot sets the size from its Budget per entry. An alert names the trade only.
- How do I test without risking money?
- Deploy a bot on Nyria Paper. It is free, needs no card and runs up to 10 paper bots.
- What does it cost?
- Paper is free. Live trading from $15 a month.
Guides
Python webhook alerts to your broker
The webhook URL, the documented fields, a minimal requests sender, the response and the Logs tab, paper first.
What is the easiest way to automate trading alerts?
Point the alert at a receiver that places the order, with no broker code.
How do I auto execute trades from a TradingView strategy?
An alert on the strategy, Order fills only, and the strategy placeholders in the message.
How do I automate trading without coding?
Turn the rule into an alert. Nyria places the order. Paper first.
How do I build a trading bot with Claude or Cursor?
The assistant writes the alert logic. Nyria places the orders. Paper first.
Send your first alert
No card required. Paper is free. Live trading from $15 a month.