Skip to content
Signals/Your own bot

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.

No templateAny JSON shapePlain text too
webhook.py
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

Python
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
})
JavaScript
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
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.

FieldTypeWhat it does
tickerstringThe symbol. AAPL, SPY, BTCUSD.
actionstringbuy, sell, BTO, STC, exit, and the plain-English equivalents.
quantitynumberContracts or shares. Omit it and the bot sizes the trade from its own per-signal budget.
strikenumberOptions. Omit it and the strategy picks the strike from its own rules.
expirystringOptions. A date, or omit it and the strategy picks inside its expiry range.
typestringOptions. 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.

Send it your first request

Every strategy carries its own URL and its own token. The simulated account needs no broker.