Skip to content

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"}'
FieldWhat it does
ticker, instrument or symbolThe ticker, such as SPY or BTCUSD. All three keys mean the same thing.
actionOPEN or CLOSE for entries and exits. MODIFY and CANCEL manage a working order. buy, sell, entry and exit also work.
directionLONG or SHORT, sent with OPEN and CLOSE.
price and order_typeA limit price, and market or limit for this one alert.
marketPosition and prevMarketPositionTradingView'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"}'
RouteWhat it does
POST /v1/alertsSends an alert and returns an order_id for each order it creates.
GET /v1/positionsOpen positions for each of your accounts with a bot on the strategy.
GET /v1/ordersRecent 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"
ToolWhat it does
nyria_send_alertSends the alert to every bot on the strategy.
nyria_preview_alertShows how Nyria reads an alert. It places nothing.
nyria_strategy_infoShows the strategy's name, status and active bots.
nyria_list_botsLists each bot's broker, paper or live, and status.
nyria_recent_ordersLists recent orders on the strategy.
nyria_order_statusLooks up one order by its order_id, with each bot's status and fill.
nyria_positionsShows 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

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.

Send your first alert

No card required. Paper is free. Live trading from $15 a month.