Skip to content

Alerts to orders

Webhook alerts to Alpaca orders

Point any script, bot or service at a strategy's own webhook URL. No message template, no code, and a free paper run first.

Stocks and ETFsOptions up to 4 legsCrypto spotLive at AlpacaFree on Nyria Paper

How it works

Your service posts

A script, a cron job, a bot you already run, or anything else that can send an HTTP request fires the strategy's webhook URL.

Nyria reads it

Nyria reads the ticker and the side, and any strike, expiry or price the message names. Anything it leaves out comes from the strategy and the bot: size, order type, duration.

Alpaca gets the order

The bot places the order in your Alpaca account through the official Alpaca API, logs it, and matches every exit alert to the position it closes.

What a webhook alert can say

Each row is an alert in Nyria's own wording, and what it does at Alpaca.

A stock entry

{ "ticker": "NVDA", "action": "buy" }

Buy NVDA. The alert carries no size, so each bot sizes it from its budget per entry.

An options entry

{ "ticker": "SPY", "action": "BTO", "strike": 775, "expiry": "2026-12-18", "type": "call" }

Buy to open the SPY $775 call expiring Dec 18, 2026. Leave the strike and expiry out and the strategy picks them from its own rules.

A crypto entry

{ "ticker": "BTC", "action": "buy" }

Buy BTC spot, sized by the bot.

An exit

{ "ticker": "NVDA", "action": "sell" }

Close the NVDA position, matched against what the bot is holding.

Set it up

  1. 1Connect Alpaca. Paste an API key you create in the Alpaca dashboard into the Integrations page in Nyria.
  2. 2Create a strategy in Nyria and pick Webhook as the alert source. Choose stocks, options or crypto, and set what an entry and an exit do on each side.
  3. 3Copy the strategy's webhook URL from its Integration tab and point your script, bot or service at it.
  4. 4Send a test alert. The strategy stays inactive until Nyria reads one correctly, and the log shows what it read.
  5. 5Deploy a bot on the strategy, pick the Alpaca account and set a budget per entry. The next alert becomes an order.

What Alpaca trades from a webhook alert

Trades

  • US stocks and ETFs, in whole shares
  • Options, single legs and spreads up to 4 legs, sent as one order
  • Crypto spot, in the pairs Alpaca lists
  • Short selling and margin, as the account allows

Not traded

  • Futures, which Alpaca doesn't offer
  • Extended hours
  • Fractional shares

The full table, order types and durations are on the Alpaca page, and more on any-source webhooks on the webhook alert page.

Orders at Alpaca

Each alert becomes a market or a limit order, as the strategy sets it, with a duration of Day, GTC or fill or kill.

Options orders go as Day. Crypto orders go as GTC. Stops and targets are exit alerts.

Questions

Does the alert need a special format?
No. Plain text or JSON, in your own wording. Name the ticker and the side; for options add a strike, expiry and call or put, or let the strategy pick the contract from its own rules.
Does Nyria hold my Alpaca login?
Nyria stores the Alpaca API key encrypted at rest. Create it with trading permission only; placing and cancelling orders is all Nyria needs.
Can I test before trading real money at Alpaca?
An Alpaca paper account connects the same way as a live one, so the same strategy can run on both, each bot in its own size.
Where do stops and targets come from?
From your alerts. No stop or take-profit order waits at Alpaca between alerts; a close alert closes the position, matched to what the bot holds.
Can one alert trade on paper and at Alpaca at the same time?
Yes. One alert reaches every bot on the strategy, so a paper bot and an Alpaca bot can run the same strategy side by side, each with its own budget per entry.
What does it cost?
Paper trading is free with no time limit, up to 10 paper bots. Live trading at Alpaca is $100 a month per $10,000 of total entry allocation, with no per-bot fees.

Send the first webhook alert to Alpaca

Trade and test free on paper, forever. No card required.