Automate TradingView alerts on Tastytrade
Connect Tastytrade once through its OAuth flow, create a bot, and point two TradingView alerts at the bot's buy and sell URLs. Each alert becomes a Tastytrade order in your own account, logged step by step.
Starter $49/mo · Bundle $149/mo · cancel from the dashboard.
How the connection works
Tastytrade uses OAuth. You register an API application with Tastytrade, enter its client ID and secret in Webhook Setup, then approve access on Tastytrade's site. StockAutoTrader stores the resulting tokens and refreshes them automatically when they expire.
Connections can be marked as sandbox, which sends orders to Tastytrade's certification environment. Use it for your first alerts.
Setup, step by step
- Start a trial from pricing and sign in.
- In Tastytrade's developer settings, create an OAuth application. Set its redirect URI to the one shown in Webhook Setup.
- In Webhook Setup, choose Tastytrade, enter the client ID and secret, and click connect. Approve access on Tastytrade.
- Create a bot: choose Tastytrade, the ticker, a max dollar amount, and optional default quantities.
- Copy the Buy Signal URL and Sell Signal URL.
- Create one TradingView alert per side, enable Webhook URL, and paste the matching URL.
- Use the example message below. On Tastytrade, always send a price (see why below).
- Check the first fills in the bot's trade history before moving off sandbox.
Example alert message
The engine does not fetch a Tastytrade quote on its own, so include the bar close as price. Without a price it can only size from an explicit quantity combined with max_amount.
{
"price": {{close}},
"quantity": 5,
"signal_id": "qqq-buy-{{timenow}}"
}A sell 0.3% above the close as a limit order, with the share count taken from the bot default:
{
"price": {{close}},
"default_sell_percent": 0.3
}What is supported on Tastytrade
| Item | Supported |
|---|---|
| Asset class | US stocks and ETFs |
| 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 (required for dollar-cap sizing) |
| Authentication | OAuth with automatic token refresh |
| Environments | Sandbox or live, per connection |
| Not supported via webhook | Options, futures, 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
- If Tastytrade rejects an order (buying power, market hours, symbol), the rejection message is stored with the trade so you can see why.
- If your OAuth approval is revoked, orders fail until you reconnect. Expired access tokens are refreshed automatically.
- Automatic cancel of stale limit orders is available for Tradier and Coinbase bots, not Tastytrade.
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
Why does the Tastytrade alert need a price?
The engine fetches quotes from Tradier and Coinbase but not from Tastytrade. Sending {{close}} as price lets it size from your dollar cap and compute limit offsets.
Can I trade Tastytrade options or futures from TradingView?
Not through webhook bots today. They place stock and ETF orders only.
Do I have to share my Tastytrade password?
No. You approve access on Tastytrade's own site through OAuth. StockAutoTrader receives tokens, never your password, and you can revoke them from Tastytrade.
Can I test without real money?
Yes. Mark the connection as sandbox to send orders to Tastytrade's test environment first.
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 TradierSend TradingView webhook alerts to your own Tradier account as market or limit stock orders. Setup steps, example alert JSON, sizing rules, and sandbox testing.
- 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 PickMyTrade alternative for stocks and cryptoComparing PickMyTrade and StockAutoTrader for TradingView alert automation: pricing, supported brokers and assets, sizing controls, and which fits your setup.
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.