Automate TradingView alerts on Tradier
StockAutoTrader gives each bot a buy URL and a sell URL. Paste them into two TradingView alerts and each alert becomes an equity order in your own Tradier account, sized by rules you set, with every step written to an audit trail.
Starter $49/mo · Bundle $149/mo · cancel from the dashboard.
How the connection works
You connect Tradier with your account ID and an API token from Tradier (Settings, then API Access). The token is used only to place, check, and cancel orders for your bots. Money stays in your Tradier account; StockAutoTrader never holds a balance.
The connection has a sandbox switch, and it is on by default. With it on, orders go to Tradier's sandbox environment instead of your live account. Leave it on until the audit trail shows the bot doing what you expect.
Setup, step by step
- Start a trial from pricing and sign in to the dashboard.
- Open Webhook Setup, choose Tradier, and enter your account ID and API token. Keep "sandbox" checked for now.
- Create a bot: pick Tradier, the ticker (for example
SPY), a max dollar amount per trade, and optional default buy and sell quantities. - Copy the bot's Buy Signal URL and Sell Signal URL.
- In TradingView, create an alert for your entry condition. Under Notifications, enable Webhook URL and paste the Buy URL.
- Create a second alert for your exit condition with the Sell URL.
- Paste the example message below into each alert's Message box, or leave it empty to use the bot defaults.
- Let a few alerts fire, then review each one in the bot's trade history before switching the connection off sandbox.
Example alert message
The side (buy or sell) comes from which URL the alert calls, and the ticker comes from the bot, so the message only needs sizing hints. This one sends the bar close as the reference price and buys 10 shares:
{
"price": {{close}},
"quantity": 10,
"signal_id": "spy-buy-{{timenow}}"
}To buy with a limit order 0.5% below the close instead of at market, and let the dollar cap decide the share count:
{
"price": {{close}},
"max_amount": 2500,
"default_buy_percent": 0.5
}An empty message also works. The bot then uses its default quantity, or its max amount divided by a live Tradier quote.
What is supported on Tradier
| Item | Supported |
|---|---|
| Asset class | US stocks and ETFs (Tradier equity class) |
| Order types | Market, or limit at a % offset from price |
| Time in force | Day |
| Sides | Buy and sell (separate URLs) |
| Share quantity | Whole shares, up to 10,000 per order |
| Price source | Alert price, or a live Tradier quote if none is sent |
| Cancel stale limits | Optional: cancel this bot's unfilled limit orders before a new one |
| Environments | Tradier sandbox or live, per connection |
| Not supported via webhook | Options, multi-leg orders, short selling, stop orders, GTC |
Fields the bot reads
| Field | Type | What it does |
|---|---|---|
| price | number or numeric string | Reference price. Used for sizing and as the base for limit offsets. TradingView: {{close}}. |
| quantity | number | Shares or coins for this order. Overrides the bot default. |
| max_amount | number (USD) | Dollar cap for this order. Overrides the bot setting. |
| default_buy_quantity | number | Overrides the bot default buy quantity. |
| default_sell_quantity | number | Overrides the bot default sell quantity. |
| default_buy_percent | number | Places a limit buy this % below price. 0 means market. |
| default_sell_percent | number | Places a limit sell this % above price. 0 means market. |
| signal_id | string | Idempotency key. A repeated signal_id is ignored instead of trading twice. |
How quantity is decided
quantityfrom the alert, if present.- Otherwise the bot default buy or sell quantity.
- Otherwise
max_amountdivided by price (whole shares for stocks, up to 8 decimals for crypto). - If no price was sent, the engine asks the broker for a quote where it can (Tradier and Coinbase).
- The order is rejected if the result is zero, above 10,000 units, or more than 1% over the dollar cap.
Things to know before going live
- Day orders sent outside market hours are handled by Tradier's own rules. Alerts on extended-hours bars may not fill when you expect.
- If the share price is above your max amount, the order is rejected with a clear message rather than rounded up.
- A failed broker call is retried once after a short wait. If both attempts fail, the broker error is recorded in the audit trail.
- If you send the same
signal_idtwice, the second request is ignored. Use{{timenow}}or a strategy order ID to keep IDs unique.
Automated trading can lose money. Not investment advice. A webhook runs whatever your alert says, including a bad alert. Test in a sandbox or at small size first, and watch the audit trail.
Frequently asked questions
Do I need a Tradier live account to try this?
No. The Tradier connection defaults to sandbox, so you can run alerts against Tradier's sandbox environment first and switch to live only when you choose.
Can I trade options on Tradier with TradingView alerts?
Not today. Webhook bots place equity orders only (US stocks and ETFs). Options and multi-leg orders are not supported through the bot URLs.
Where do I put the ticker in the alert?
You set the ticker on the bot when you create it. The alert message does not need a symbol field, and any symbol in the message is ignored for bot URLs.
What happens if TradingView sends plain text instead of JSON?
The request is acknowledged and ignored, so a malformed message never places a guessed order. Send an empty message or valid JSON.
Does StockAutoTrader hold my money?
No. Orders are placed in your own Tradier account through Tradier's API. You can revoke the API token in Tradier at any time.
Related guides
- TradingView webhook automation, explainedHow TradingView webhook alerts work, how to write the alert message, how to size and route orders to a broker, and how to avoid duplicate or runaway trades.
- Automate TradingView alerts on TastytradeRoute TradingView webhook alerts to your Tastytrade account as market or limit stock orders. OAuth setup, example alert JSON, sizing rules, and sandbox notes.
- Automate TradingView alerts on CoinbaseTurn TradingView webhook alerts into Coinbase Advanced Trade orders for BTC, ETH, SOL and other USD pairs. API key setup, example alert JSON, and balance-aware sizing.
- A TradersPost alternative for TradingView alertsAn honest comparison of TradersPost and StockAutoTrader for TradingView webhook automation: pricing, brokers, sizing, testing, and where each one fits better.
Connect a broker and test your first alert
Orders run in your own account. Start on a broker sandbox, read the audit trail, and go live when you decide to.
Automated trading can lose money. Not investment advice.