Alpaca - How to connect TradingView to Alaca Broker
STEP 1. Select Alpaca Symbol on TradingView
STEP 2. Upload your Trading Strategy to the TradginView and Add it to the Chart

STEP 3. Creat Alert for TradingView Strategy
2.1 - Go to "Strategy Tester" tab page to check that your Trading strategy shows some backtesting results.
2.2 - Press "Add Alert" to create Alert for your Buy/Sell signals.

STEP 4. Configure TradingView Alert using "Message" and connection using "WebHook URL" or "Email Alert"
To Configure Alert, you need set Alert Message and Alert Notification.
5.1 - Please compile meessage based on the temmplate provided below or you can use Message Generator
5.2 - Paste "WebHook URL" or Select "Send plain text" option on Notification Tab. Your personal WebHook URL and Email you can find in your Profile Page
Message:
![]() |
Select Webhook URL or "Send plain text" option (Depends on your TradingView plan) ![]() |
TradeAdapter "Message":
{
"alpaca_api_key": "PUT YOUR ALPACA API KEY HERE",
"alpaca_api_secret": "PUT YOUR ALPACA SECRER HERE",
"real_order":"Yes / No",
"order_market":"Spot",
"order_type":"Market / Limit",
"isolated_margin": "Yes / No",
"exchange": "Alpaca",
"ticker": "{{ticker}}",
"time": "{{timenow}}",
"order_contracts": "{{strategy.order.contracts}}",
"order_action": "{{strategy.order.action}}",
"order_price": "{{strategy.order.price}}"
}
Your TradeAdapter KEY you need to get from your Profile Page: https://tradeadapter.com/profile

Alpaca KEY and Alpaca Secret you can get from Alpaca Profile https://app.alpaca.markets/paper/dashboard/overview

Your Alarm Settings "Message" should look like this now:

4) Go to "Notifications" alarm tab-page and update Webhook URL
for Demo account
https://tradeadapter.com/api/alpaca/demo_order
for Real account
https://tradeadapter.com/api/alpaca/real_order
Demo:
![]() |
Real:
![]() |