Alerts to orders
TrendSpider alerts to Alpaca orders
Point a TrendSpider Alert or Strategy Bot's webhook at a Nyria strategy. When it fires, TrendSpider posts the note or body, Nyria reads it, and each bot on the strategy places the order in its own Alpaca account. No message template, no code, and a free paper run first.
How it works
TrendSpider fires
An Alert or Strategy Bot fires in TrendSpider with its webhook pointed at Nyria. The note or body can be plain text or JSON, written in TrendSpider's own %variables%.
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
Each bot on the strategy places the order in its own Alpaca account through the official Alpaca API, logs it, and matches every exit alert to the position it closes.
What a TrendSpider alert can say
Each row is an alert as TrendSpider sends it, and what Nyria does with it at Alpaca.
A stock entry
{ "symbol": "%alert_symbol%", "action": "buy", "price": "%last_price%" }Buy the alert's symbol at the last price when it fired.
An options entry
{ "symbol": "%alert_symbol%", "action": "BTO", "strike": 775, "expiry": "2026-12-18", "type": "call" }Buy to open the alert's symbol as the $775 call expiring Dec 18, 2026. Leave the strike and expiry out and the strategy picks them from its own rules.
A crypto entry
{ "symbol": "%alert_symbol%", "action": "buy" }Buy spot, sized by the bot.
A bot exit
{ "symbol": "%bot_symbol%", "action": "sell", "status": "%bot_status%" }Close the position matched against what the bot is holding.
Set it up
- 1Connect Alpaca. Paste an API key you create in the Alpaca dashboard into the Integrations page in Nyria.
- 2Create a strategy in Nyria and pick TrendSpider as the alert source. Choose stocks, options or crypto, and set what an entry and an exit do on each side.
- 3Copy the strategy's webhook URL from its Integration tab. In TrendSpider, paste it into an Alert's webhook field or a Strategy Bot's own URL, and write the note or body with TrendSpider's %variables%.
- 4Fire a test alert or bot signal. The strategy stays inactive until Nyria reads one correctly, and the log shows what it read.
- 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 TrendSpider alerts
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 the rules for TrendSpider alerts on the TrendSpider 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
- What's the difference between an Alert and a Strategy Bot?
- An Alert posts from one account-level URL and reaches one strategy, with %alert_symbol%, %last_price%, %alert_name%, %alert_note% or %price_action_event% in its note. A Strategy Bot posts its own URL and body, so each bot can reach a different strategy, with %bot_symbol%, %bot_status%, %bot_name% and %bot_timeframe%.
- Does the alert message need a special format?
- No. Plain text or JSON, in your own wording, with TrendSpider's %variables% in place of the parts that change. Name the symbol 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.
TrendSpider alerts, by broker
Alpaca orders, by alert source
Send the first TrendSpider alert to Alpaca
Trade and test free on paper, forever. No card required.