Skip to content
  • Create a strategy with a custom webhook as its alert source. My strategies, then Create strategy: a strategy name typed in, Custom webhook picked as its alert source, then Next to what it trades, where Stocks is picked.
  • Set up a crypto spot strategy. A crypto spot strategy: the long entry set to enter a position at market, the short side set to exit the long, with the note that spot crypto can't be shorted, then the review of what each alert does.

Alert source · Custom webhook

Automate any webhook alert

Point any script, bot or service at a strategy's webhook URL. Send the JSON you already emit, or one line of plain text.

Any HTTP clientJSON or textToken per strategyPaper is free
My strategies, then Create strategy: a strategy name typed in, Custom webhook picked as its alert source, then Next to what it trades, where Stocks is picked
A crypto spot strategy: the long entry set to enter a position at market, the short side set to exit the long, with the note that spot crypto can't be shorted, then the review of what each alert does
Alert sources/Custom webhook

What a webhook gets you

Any HTTP client

Send it from a Python script, Node service, cron job or another bot. Each request is one alert.

No template to match

Nyria reads the fields it recognizes. The strategy and bot supply the rest.

One URL per strategy

Each strategy has its own URL with its own token in it. Keep it private. Rotate it from the strategy's Integration tab if it leaks.

Code examples

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: 775,
    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"}'
Python
import requests

webhook = "https://trades.nyria.io/webhooks/..."

requests.post(webhook, json={
    "ticker": "AAPL",
    "action": "buy"
})

Fields Nyria recognizes

You don't have to use these names. Anything the message leaves out comes from the strategy, like order type and allowed instruments.

FieldTypeWhat it does
tickerstringThe symbol. AAPL, SPY, BTCUSD.
actionstringbuy, sell, BTO, STC, exit, and the plain-English equivalents.
quantitynumberNot used for size. Each bot sizes the trade from its own settings.
strikenumberOptions. The strike to trade.
expirystringOptions. The expiry date.
typestringOptions. call or put.

With Provided in alert, the strategy trades the strike, expiry and type the alert sends. It refuses an entry missing one. With From my rules, it picks the contract itself.

With the limit set to Alert price, the alert's price is the limit. Otherwise Nyria prices from the live chain. An entry it can't price isn't placed.

Wired to a live broker: Alpaca, Charles Schwab, tastytrade and Tradier. Or run it free on Nyria Paper.

Every response code, and where Logs shows the reason: the Python script to broker guide.

Questions

How do I send webhook alerts to my broker?

Create a strategy, copy its webhook URL and POST your alert to it from any script or service. It stays inactive until a test request reads correctly. Steps per broker: Webhook to Schwab, Webhook to Tradier, Webhook to tastytrade and Webhook to Alpaca.

Post your first alert

Nyria Paper needs no broker. No card required.