- Create a strategy with TrendSpider as its alert source. My strategies, then Create strategy: a strategy name typed in, TrendSpider picked as its alert source, then Next to what it trades, where Stocks is picked.
Alerts to orders
Automate TrendSpider alerts to Alpaca
Nyria lets you auto trade each TrendSpider alert in your Alpaca account.

Setup steps
Point a TrendSpider Alert or Strategy Bot webhook at a Nyria strategy. Then connect your Alpaca account in Nyria with an API key. Each alert becomes an order in your own Alpaca account. Test it free on Nyria Paper or on an Alpaca paper account first.
- 1Connect Alpaca. In the Alpaca dashboard, switch to Paper or Live and select Generate New Keys. Copy the API key ID and the Secret key. Alpaca shows the secret once. In Nyria, open Integrations and select the Alpaca card. Select Connect paper account or Connect live account, then Accept and continue. Paste both values.
- 2Create a strategy. In Nyria, select Create strategy and pick TrendSpider as the alert source. Choose stocks, options or crypto as the asset type. Set what an entry and an exit do on each side.
- 3Add the webhook in TrendSpider. Copy the webhook URL from the strategy's Integration tab. For an Alert, set it as the account webhook URL. That is under Account & Settings in TrendSpider. For a Strategy Bot, put it in the bot's own URL field. Write the body there. Fill the note or body with TrendSpider's %variables%, such as %alert_symbol%.
- 4Fire a test alert. Fire a test alert or bot message. The strategy stays inactive until Nyria reads one correctly. The Logs tab shows what it read. TrendSpider needs a plan that includes webhook alerts.
- 5Deploy a bot. On the strategy, select Deploy bot. Pick the Alpaca account on the Account step and set a Budget per entry. Live bots need a Nyria Pro plan or a Premium strategy you have bought. The next alert becomes an order.
What a TrendSpider alert must say
Nyria needs the ticker, the side, and whether it opens or closes a position. It reads plain text or JSON in your own wording. There is no template to follow. For options, Provided in alert reads the strike, expiry and call or put. From my rules picks the contract.
TrendSpider has no action or quantity variable. Write "action": "buy" into a buy alert and "action": "sell" into a sell alert. Use %alert_symbol% for the ticker.
An alert cannot set the size: each bot's budget per entry does. Exits come from your exit alerts.
A stock entry
{
"symbol": "%alert_symbol%",
"action": "buy",
"price": "%last_price%"
}Buy the alert's symbol at the last price when it fired.
A coin entry
{
"symbol": "%alert_symbol%",
"action": "buy"
}Buy spot at Alpaca in the pairs it lists, sized by the bot. Crypto orders go out as good till canceled.
What Alpaca does with it
Alpaca connects with an API key, not a sign-in. A paper key works only on paper and a live key only on live. The same strategy can run on both.
Options go to Alpaca as single legs or spreads up to 4 legs. A spread is one order. Options trading must be turned on in the Alpaca account. Alpaca paper reaches Options Level 3, which covers four-leg structures.
Alpaca trades crypto spot in the pairs it lists. A crypto alert can open and close a coin position. Crypto orders go to Alpaca as good till canceled.
Each alert becomes a market or a limit order, as the strategy sets it. Duration is Day, GTC or fill or kill. Options orders go as Day. Crypto orders go as GTC. On live accounts, stops and targets are exit alerts. Alpaca paper takes stop, trailing stop, bracket and OCO orders on stocks and ETFs. Trailing stops need a trail of 0.1% or more. Alpaca paper takes stop-limit orders and percent-of-account sizing on spot crypto. An exit alert can flatten a position. A bots list in the alert picks which bots trade.
Questions
- What's the difference between an Alert and a Strategy Bot?
- An Alert posts from one account-level URL and reaches one strategy. Its note can use %alert_symbol%, %last_price%, %alert_name%, %alert_note% or %price_action_event%. A Strategy Bot posts its own URL and body. Each bot can reach a different strategy, with %bot_symbol%, %bot_status%, %bot_name% and %bot_timeframe%.
- Can a TrendSpider Alert buy crypto at Alpaca?
- Yes, in the pairs Alpaca lists. Use %alert_symbol% for the coin. An exit alert closes the position.
- Does a TrendSpider strategy need an Alpaca key?
- Yes. Alpaca connects with an API key, not a sign-in. Paper and live keys are separate, and the same strategy can run on both.
- Does Alpaca take TrendSpider options alerts?
- Yes. Options trading must be turned on in the Alpaca account. Spreads up to 4 legs go as one order.
- How does Nyria store my Alpaca key?
- The key is stored encrypted at rest. It reads the account and places and cancels orders. Revoke it in the Alpaca dashboard any time.
- Can I test before trading real money at Alpaca?
- An Alpaca paper account connects the same way as a live one. The same strategy can run on both, each bot in its own size.
- How fast does an alert become an order?
- Sub-second, alert to order.
From the sources
- Alpaca documents how orders are placed and managed. Alpaca: working with orders
Next
- Paste an alert into the alert tester and see what Nyria reads.
- Write the message with the alert builder.
- Copy-paste formats: TradingView webhook JSON templates.
- Longer walkthrough: How do I send TrendSpider alerts to my broker?.
- Related: Alpaca automated trading from alerts.
- TradingView automation tools compared.
- Alpaca page and TrendSpider page.
TrendSpider alerts, by account
Alpaca orders, by alert source
Send your first TrendSpider alert
Trade and test free on paper. No card required.