Alpaca logoAlpaca + TradingView

How to Connect TradingView to Alpaca

Automate TradingView alerts into Alpaca orders with a webhook — US stocks, ETFs, and crypto. Test on paper trading first, then flip to live in a couple of clicks.

No coding requiredFree tier availableSetup in ~10 minutes

Alpaca brings commission-free US stock, ETF, and crypto trading to a clean API — which makes it a natural home for automated TradingView strategies. Connecting TradingView to Alpaca lets your equities and crypto signals execute automatically during (and outside) regular market hours.

OmniTrade24 links your TradingView charts to Alpaca. You paste a strategy webhook URL into a TradingView alert, and we place the order on Alpaca using your API keys. Alpaca offers free paper trading with $100,000 in virtual cash, so you can validate the whole pipeline before risking a cent.

Skip the manual setup — automate this in minutes.

Free tier: 100 executions/month, no card required.

What you can automate on Alpaca

US Stocks (NYSE & NASDAQ)
ETFs
Crypto (BTC, ETH & more)
Commission-free execution
Paper & Live trading
Regular & extended hours

How to connect TradingView to Alpaca

Four steps take you from a chart alert to a live Alpaca order — no code involved.

1

Create your Alpaca API key

  1. 1.Sign up and verify. Create an account at alpaca.markets and complete KYC verification for live trading (paper trading needs no funding).
  2. 2.Choose paper or live. In the dashboard, decide between Paper Trading (free, virtual $100k) and Live Trading, then open API Keys for that environment.
  3. 3.Generate a new key. Click Generate New Key to create your API Key ID and Secret Key.
  4. 4.Copy your keys. Copy the API Key ID and Secret Key and paste them into OmniTrade24. You can switch between paper and live in your settings at any time.
2

Connect Alpaca to OmniTrade24

Sign in to OmniTrade24, open Settings → API credentials, and paste your Alpaca API key and secret key. Run the built-in connection test to confirm the credentials work. Everything is encrypted with AES-256 before it is stored — your secret is never kept in plain text.

3

Create a strategy and copy your webhook URL

In the dashboard, create a strategy, pick your Alpaca market and default order settings, and save it. OmniTrade24 generates a unique webhook URL just for that strategy:

https://omnitrade24.com/webhook/your-strategy-token
4

Paste the webhook into a TradingView alert

Open your strategy or indicator in TradingView, click Alerts → Create Alert, and paste the webhook URL into the Webhook URL field (under Notifications). Set the alert message to JSON that tells OmniTrade24 what to trade:

// Buy stock
{"action":"BUY","symbol":"AAPL","quantity":10}
// Sell stock
{"action":"SELL","symbol":"AAPL","quantity":10}
// Buy crypto
{"action":"BUY","symbol":"BTCUSD","quantity":0.05}
// Sell crypto
{"action":"SELL","symbol":"BTCUSD","quantity":0.05}

Save the alert. From now on, every time your strategy fires, the alert hits your webhook and OmniTrade24 places the matching order on Alpaca automatically — typically within 100–500ms depending on your plan.

Supported alert actions

Each TradingView alert message is a small JSON payload with an action, a symbol, and a quantity. Use dynamic TradingView placeholders (like {{ticker}}) to pass the traded symbol automatically.

Buy stock
{"action":"BUY","symbol":"AAPL","quantity":10}
Sell stock
{"action":"SELL","symbol":"AAPL","quantity":10}
Buy crypto
{"action":"BUY","symbol":"BTCUSD","quantity":0.05}
Sell crypto
{"action":"SELL","symbol":"BTCUSD","quantity":0.05}

Is automated Alpaca trading safe?

Automation is only as safe as the way it is set up. OmniTrade24 is built so that a leaked or misused key still cannot cost you your funds:

Start on Alpaca paper trading to validate your strategy end-to-end with zero risk.
Alpaca Securities LLC is SEC-registered and a FINRA/SIPC member, with SIPC protection up to $500,000.
Your API secret is AES-256 encrypted at rest and never shown in plain text again.
Orders execute only when a valid TradingView alert arrives — you keep full control from the Alpaca dashboard.

Best strategies to automate on Alpaca

Automating equities and crypto strategies from TradingView, and paper-testing a system before going live with real capital.

Skip the manual setup — automate this in minutes.

Free tier: 100 executions/month, no card required.

Ready to connect TradingView to Alpaca?

Create a free account, connect Alpaca, and turn your next TradingView alert into a live trade.

No credit card required • 100 free executions/month

Connect TradingView to Alpaca — FAQ

Common questions about automating Alpaca trades with TradingView and OmniTrade24