Skip to content
  • Create a strategy with TradingView as its alert source. My strategies, then Create strategy: a strategy name typed in, TradingView picked as its alert source, then Next to what it trades, where Stocks is picked.
Alpaca logo

Alerts to orders

Automate TradingView alerts to Alpaca

Nyria lets you auto trade each TradingView alert in your Alpaca account.

Stocks and ETFsOptions up to 4 legsCrypto spot
My strategies, then Create strategy: a strategy name typed in, TradingView picked as its alert source, then Next to what it trades, where Stocks is picked

Setup steps

Point the TradingView alert's 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.

  1. 1Open an Alpaca account. Sign up at alpaca.markets. Paper accounts start with $100,000 of simulated cash. For options, turn on options trading in Alpaca's account settings first.
  2. 2Generate an API key. In the Alpaca dashboard, switch to Paper or Live. Select Generate New Keys. Copy the API key ID and the Secret key. Alpaca shows the secret only once.
  3. 3Open the Alpaca card. In Nyria, select Integrations, then the Alpaca card in the Brokers grid. Select Connect paper account or Connect live account to match the key. A paper key works only on paper, a live key only on live.
  4. 4Paste the key. Select Accept and continue on Authorize Nyria. Paste the API key ID and the Secret key. Nyria checks them with Alpaca and fills in the account number.
  5. 5Check the account number. Nyria shows Alpaca paper account connected, or Alpaca live account connected. Match the number to your Alpaca dashboard. Paper account numbers start with PA.
  6. 6Point TradingView at a strategy. Create a strategy in Nyria with TradingView as the source. For options, set call or put, strike and expiry in its option rules. Copy the strategy's webhook URL from the Integration tab. In the TradingView alert, tick Webhook URL under Notifications and paste it, then select Apply. TradingView sends webhooks on its paid plans only, with two-factor sign-in on.
  7. 7Deploy on Alpaca paper. Open the strategy and select Deploy bot. Set a small budget per entry. Pick the Alpaca paper account on the Account step. The bot is Active at once and trades the next alert.
  8. 8Go live on the same strategy. Connect a live key the same way, then deploy a bot on that account. A live bot needs a Nyria Pro plan, or a Premium strategy you've bought. The paper bot keeps running.

Watch the setup

How to automate TradingView alerts to Alpaca
Connect Alpaca and build a TradingView strategy. Check the alert format, deploy a bot.
Steps in the video
  1. 0:00Connect Alpaca. Open Integrations and the Alpaca card. Pick Paper or Live and accept. Paste the API key ID and secret from your Alpaca dashboard.
  2. 0:22Create a strategy. Select Create strategy and name it. Then, select your alert source. This example uses TradingView. Pick stocks and a ticker, then create the draft.
  3. 0:50Create the alert in TradingView. Copy the webhook URL and the alert message from the Integration tab. In TradingView, select Message, paste the message and select Apply. Then select Notifications, tick Webhook URL, paste the URL and select Apply.
  4. 2:32Check the format. Select Check format and add an entry and an exit alert. Nyria shows the ticker, side and order it read.
  5. 2:52Deploy a bot. Select Deploy bot, set a budget per entry and pick an account. Nyria Paper is free, so test there first. On your own Alpaca account, pick it on the Account step. Send a sample alert and watch the paper order fill.

What a TradingView 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, the alert says long or short. The strategy's rules pick the contract.

TradingView posts the Message box as written, plain text or JSON. Placeholders such as {{ticker}} and {{strategy.order.action}} fill in when the alert fires. One alert can serve every symbol a chart is on.

An alert cannot set the size: each bot's budget per entry does. Exits come from your exit alerts.

A stock entry

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

Buys AAPL in whole shares at Alpaca. The budget per entry sets how many.

An ETF entry at a limit

{ "action": "OPEN", "instrument": "IWM", "direction": "LONG", "order_type": "limit", "price": 278 }

Rests an IWM buy at a $278 limit, whatever order type the strategy uses. The bot still sets the size.

Re-pricing that limit

{ "action": "MODIFY", "instrument": "IWM", "direction": "LONG", "price": 276 }

Moves the working IWM buy to $276. Nothing new opens. A filled order is a position, so it needs CLOSE instead.

Buying a call

{ "ticker": "SPY", "action": "OPEN", "direction": "LONG" }

Buys a SPY call, the default for LONG. The strategy's option rules pick the contract. The budget per entry sets how many.

Buying a put

{ "ticker": "SPY", "action": "OPEN", "direction": "SHORT" }

Buys a SPY put, the default for SHORT. The strategy's option rules pick the contract. The budget per entry sets how many.

Closing the call

{ "ticker": "SPY", "action": "CLOSE", "direction": "LONG" }

Closes the SPY call that LONG opened. Turn on Close on exit alerts for the long side.

An iron condor from the strategy's rules

{ "ticker": "IWM", "action": "OPEN", "direction": "SHORT" }

Opens an IWM iron condor as one Alpaca order. The strategy's short-entry rules hold all four legs. The budget per entry sets how many. Needs options Level 3 at Alpaca.

A crypto spot entry

{ "ticker": "BTCUSD", "action": "OPEN", "direction": "LONG", "order_type": "limit", "price": 82000 }

Sends Alpaca a BTC/USD buy at an $82,000 limit, good till canceled. The budget per entry buys a fractional amount.

A reversal from a Pine strategy

{
  "ticker": "NVDA",
  "action": "sell",
  "marketPosition": "short",
  "prevMarketPosition": "long"
}

Closes the NVDA long and opens a short from one alert. Needs a strategy that trades both sides, and an Alpaca margin account.

Every alert field is in the webhook reference.

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.

What Alpaca accepts

Market orders
Entries and exits.
Limit orders
Priced at Bid, Ask, Mid, a custom price or the alert's price.
Stop, trailing stop, bracket and OCO orders
Alpaca paper, stocks and ETFs. Trailing stops need a trail of 0.1% or more.
Stop-limit orders and percent-of-account sizing
Alpaca paper, spot crypto.
Exit alert tools
Flatten or pick bots.
Option spreads, up to 4 legs
One order at a net debit or credit.
Crypto spot
Fractional sizes, in the pairs Alpaca lists.
Changing a working order
MODIFY sets a new limit price, quantity or both. CANCEL pulls an entry.
Short stock
Needs a margin account.
Fractional shares. Not supported
Stocks trade in whole shares.
Crypto perpetuals. Not supported
Alpaca doesn't offer them.

Stock orders go as Day, GTC or FOK, as the strategy sets them. Multi-leg and market option orders go as Day. Crypto orders go as GTC.

  • Stocks trade in whole shares. Crypto trades in fractions.
  • Options trade in whole contracts.
  • Up to 4 legs on one expiration, with the same quantity on each leg.
  • Defined-risk spreads need options Level 3 at Alpaca.
  • US equities only, with no international stocks.
  • A paper key works only on paper, and a live key only on live.
  • On live accounts, exits come from exit alerts.

Nyria and AutoView on Alpaca

Both send TradingView alerts to Alpaca, on paper or live. Nyria sends market and limit orders. Check each tool's order types before you choose.

Nyria and AutoView on Alpaca
Paper firstAlpaca paper account or Nyria Paper, both freeFree Alpaca Paper account"Available through a free Alpaca Paper account, selected in Autoview as "Alpaca Paper."" autoview.com
Connecting AlpacaAPI key ID and Secret key, paper or liveAPI Key ID and Secret Key"Connect with your Alpaca API Key ID and Secret Key; manage credentials securely." autoview.com
Where it runsHosted webhookCloud webhook or Chrome extension"Run Alpaca via the cloud webhook platform, or on-device through the Chrome extension." autoview.com
Markets listedUS stocks, options and crypto spotUS stocks and crypto"Alpaca gives you US stocks and crypto, and Autoview can automate orders across them." autoview.com
Live pricePriced by total entry allocation. $15 a month up to $2,500, $50 up to $5,000, $100 up to $10,000.$39.99 a month per live exchange"$39.99 / month One flat price for each exchange you connect." autoview.com

Checked Nov 2, 2026. Each row links the page it quotes.

Questions

Can I automate TradingView alerts to Alpaca?
Yes, with Nyria. The TradingView alert posts to Nyria's webhook. Nyria then places the order in your Alpaca account, paper or live.
How do I connect TradingView to Alpaca?
Add an Alpaca API key, paper or live, on Nyria's Integrations page. The TradingView webhook for Alpaca is your strategy's own URL. Paste it into the alert under Notifications, then select Apply.
Is there an Alpaca API for TradingView alerts?
Yes, and Nyria connects to Alpaca's Trading API for you. Generate a key in the dashboard and paste it in. You write no code.
Does AutoView work with Alpaca?
Yes, AutoView lists Alpaca. Its broker page names US stocks and crypto. Simulation runs on a free Alpaca Paper account.
Can I test a TradingView to Alpaca auto trade on paper?
Yes. Connect an Alpaca paper key, or use Nyria Paper. Paper bots are free, up to 10 in total.
Can one strategy run on Alpaca paper and live?
Yes. Each account gets its own bot, at its own size. The webhook URL belongs to the strategy, so it doesn't change.
Can it trade crypto on Alpaca?
Yes, crypto spot in the pairs Alpaca lists, in fractional sizes. A BTCUSD alert goes to Alpaca as BTC/USD, good till canceled.
Can it trade options on Alpaca?
Yes, one leg up to 4 on a single expiration, as one order. Multi-leg and market option orders go as Day. Defined-risk spreads need Level 3.
Can a TradingView alert pick the Alpaca option contract?
No. The strategy's option rules pick the call or put, strike and expiry. The alert says open or close, long or short. To name the contract yourself, use Discord, Telegram or your own bot.
How fast is a TradingView alert to an Alpaca order?
Alert to order, sub-second.
Does TradingView Alpaca automation need my computer on?
No. Nyria is hosted. TradingView posts each alert to Nyria's webhook. Nyria's servers then place the order at Alpaca.
What happens to my Alpaca key if I disconnect?
Removing the account deletes Nyria's copy. The key still works at Alpaca until you regenerate it there. Alpaca keys can trade, so never share one.
Do I need to reconnect Alpaca every so often?
No. Alpaca keys don't expire on a schedule. Regenerating a key or resetting the paper account voids it. Connect the new pair, and bot settings and history are kept.
What does Alpaca alert trading cost on Nyria?
Paper is free. Live trading from $15 a month.

From the sources

Next

TradingView alerts, by account

Alpaca orders, by alert source

TradingView alerts to crypto exchanges

Start on Alpaca paper

Paper is free. Go live on Alpaca with Nyria Pro, or a Premium strategy you buy.