Main clusters and core pages.
AlgoWay connects TradingView alerts to Alpaca through webhook automation. Instead of writing and hosting your own TradingView Alpaca bot, you create an Alpaca webhook in AlgoWay, paste your Alpaca API credentials, test the connection, and send structured TradingView alert JSON to the AlgoWay webhook URL.
This guide explains how to set up a TradingView to Alpaca webhook for automated stock trading, paper trading tests, and strategy alert execution. The workflow is simple:
TradingView alert → AlgoWay webhook → Alpaca Trading API → Alpaca account
Alpaca already supports API-based trading, and TradingView can send alert data to external systems through webhooks. AlgoWay sits between them and handles the routing layer: it receives the alert, validates the JSON, maps the order fields, and sends the trade command to Alpaca.
This page is for traders who search for terms such as TradingView alerts to Alpaca, Alpaca webhook, TradingView Alpaca bot, Alpaca automated trading, or automated stock trading webhook and want a practical setup without maintaining their own server.
An Alpaca webhook in AlgoWay lets you receive trading signals from TradingView and route them to Alpaca using your own Alpaca API key and secret.
With this setup, AlgoWay can help you:
The purpose is not to replace your trading strategy. AlgoWay does not create profitable signals by itself. It provides the webhook automation layer between the signal and the broker API.
The full automation chain has four parts:
This is different from manually trading an Alpaca account from a chart. Here the goal is automated Alpaca trading from TradingView alerts. Your TradingView script or alert logic decides when to send the signal, while AlgoWay handles the webhook-to-Alpaca execution route.
Before creating an AlgoWay Alpaca webhook, prepare the following:
For safety, start with Alpaca paper trading first. Paper trading lets you test the automation route without placing live orders.
Log in to your Alpaca account and open the API section. Alpaca provides API credentials that AlgoWay needs in order to send orders to your selected Alpaca environment.
For testing, use your Alpaca paper trading credentials. For live trading, use live credentials only after you have tested the workflow, order size, symbols, and alert messages.
After generating new keys, Alpaca shows the API key and API secret. Copy both values carefully.
The secret may not be visible again after you leave the page. If the secret is lost, generate a new key pair and update your AlgoWay webhook settings.
Now create the Alpaca webhook in AlgoWay. This webhook is the endpoint that receives TradingView alerts and routes them to Alpaca.
Fill in the Alpaca connection fields:
After saving, AlgoWay creates an Alpaca webhook URL. This is the URL you will later paste into TradingView.
Before connecting a real TradingView alert, test the webhook from the AlgoWay dashboard. This confirms that your Alpaca API credentials, environment mode, and symbol format are correct.
AAPL or TSLA.Example AlgoWay test JSON for Alpaca:
{
"platform_name": "alpaca",
"ticker": "AAPL",
"order_action": "buy",
"order_contracts": 1
}
If the test fails, check the API mode, API key, API secret, ticker, and order quantity before moving to TradingView.
If you use a TradingView strategy, the alert message can use TradingView placeholders. TradingView replaces these placeholders with real strategy values when the alert fires.
Paste this JSON into the TradingView alert message box:
{
"platform_name": "alpaca",
"ticker": "{{ticker}}",
"order_contracts": "{{strategy.order.contracts}}",
"order_action": "{{strategy.market_position}}",
"price": "{{close}}"
}
This message tells AlgoWay which platform to use, which symbol to trade, how many units to send, and what action the strategy is currently producing.
Common TradingView placeholders in this setup:
{{ticker}} — the chart ticker;{{strategy.order.contracts}} — the strategy order size;{{strategy.market_position}} — the strategy position state;{{close}} — the close price at alert time.
In the TradingView alert window, open the notifications section, enable Webhook URL, and paste your AlgoWay Alpaca webhook URL.
Your webhook URL will use the unique UUID from your AlgoWay webhook:
https://algoway.co/your-webhook-uuid
After adding the URL and JSON message, save the alert. When TradingView triggers the alert, the message is sent to AlgoWay and then routed to Alpaca.
Strategy alerts are not the only option. AlgoWay can also work with indicator alerts and manually prepared alert messages, as long as the final message is valid JSON.
If your indicator does not generate a ready-to-use JSON message, use the tools inside AlgoWay:
This is useful when your indicator sends simple text such as “buy AAPL” but the Alpaca webhook needs structured fields.
For most Alpaca webhook messages, the core fields are:
| Field | Example | Purpose |
|---|---|---|
platform_name |
alpaca |
Tells AlgoWay to route the command to Alpaca. |
ticker |
AAPL |
Defines the stock or supported Alpaca symbol. |
order_action |
buy |
Defines the trade action. |
order_contracts |
1 |
Defines the order quantity. |
Optional fields may depend on your strategy and AlgoWay configuration. Always test new fields in paper mode before using them in live trading.
Do not mix paper credentials with live mode, or live credentials with demo mode. Use paper credentials for testing and live credentials only when you intentionally want live trading.
TradingView webhook automation depends on a clean alert message. Use double quotes for JSON strings and avoid broken commas, comments, or unclosed brackets.
Check that the symbol sent by TradingView is accepted by the selected Alpaca environment. If needed, send a fixed ticker value first, then switch back to {{ticker}} after testing.
If {{strategy.order.contracts}} is empty or zero, AlgoWay may not be able to send a valid order. Check your TradingView strategy settings and order size.
The alert must have the AlgoWay webhook URL enabled. If the webhook URL field is empty, TradingView will not send the alert to AlgoWay.
You can build your own TradingView to Alpaca bot with a server, webhook endpoint, JSON parser, logging system, API client, error handling, and security checks. That approach gives full control, but it also creates maintenance work.
AlgoWay is designed for traders who want the execution bridge without maintaining infrastructure. The dashboard creates the webhook, stores the integration settings, receives the TradingView alert, and routes the command to Alpaca.
This makes AlgoWay useful for traders who want:
After setting up Alpaca, these guides may help you build a more reliable automation workflow:
To automate Alpaca trading from TradingView, you need three things: Alpaca API credentials, an AlgoWay Alpaca webhook, and a valid TradingView alert message. Once these parts are configured, AlgoWay can receive TradingView webhook alerts and route the order command to Alpaca.
AlgoWay turns TradingView alerts into Alpaca automation without forcing you to run your own webhook server.