Your own bot
Alert source
Point any script, bot or service at a strategy's webhook URL. Send the JSON you already emit, or one line of plain text. There is no schema to match and nothing to rewrite.
import requests
webhook = "https://trades.nyria.io/webhooks/..."
requests.post(webhook, json={
"ticker": "AAPL",
"action": "buy",
"quantity": 10
})Why send your own
Anything that can POST
Python, Node, cURL, a cron job, another bot. If it can make an HTTP request, it can drive a strategy.
No template to match
Send the JSON or the plain text you already emit. Nyria reads the fields it recognises and takes the rest from the strategy.
One URL per strategy
Each strategy gets its own token in its own URL. Treat it as a secret, and rotate it from the strategy at any time.
Code examples
import requests
webhook_url = "https://trades.nyria.io/webhooks/your-strategy-token"
# Simple stock trade
requests.post(webhook_url, json={
"ticker": "AAPL",
"action": "buy",
"quantity": 10
})const webhookUrl = "https://trades.nyria.io/webhooks/your-strategy-token";
// Options trade
await fetch(webhookUrl, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
ticker: "SPY",
action: "BTO",
strike: 450,
expiry: "2026-12-18",
type: "call"
})
});curl -X POST https://trades.nyria.io/webhooks/your-strategy-token \
-H "Content-Type: application/json" \
-d '{"ticker": "BTCUSD", "action": "buy"}'Fields Nyria recognises
None of these are required, and this isn't a schema. Send what you already send, in JSON or as a single line of plain text. Anything the message doesn't carry comes from the strategy: sizing, order type, expiry range and which instruments the strategy is allowed to trade.
| Field | Type | What it does |
|---|---|---|
| ticker | string | The symbol. AAPL, SPY, BTCUSD. |
| action | string | buy, sell, BTO, STC, exit, and the plain-English equivalents. |
| quantity | number | Contracts or shares. Omit it and the bot sizes the trade from its own per-signal budget. |
| strike | number | Options. Omit it and the strategy picks the strike from its own rules. |
| expiry | string | Options. A date, or omit it and the strategy picks inside its expiry range. |
| type | string | Options. call or put. |
A price in the message is read as context, never as the price the order is filled at. Contracts are priced from the live chain at the moment the order is built, and an entry that can't be priced is refused rather than sent with a made-up number.
Other alert sources
Send it your first request
Every strategy carries its own URL and its own token. The simulated account needs no broker.