Quick answer
The TradeStation v3 API is a REST and streaming API for US stocks, options and futures, with OAuth 2.0 authentication (20-minute access tokens, refresh tokens via offline_access) and a simulated account. Documented limits include 500 bar/quote requests per 5 minutes and up to 57,600 intraday bars per request.
TradeStation API at a glance
- Pricing
- API free; funded account needed for a key
- Availability
- US residents and some international clients
- Paper trading
- Simulated (SIM) trading account
- Integration type
- OAuth login
- In AlgoGP
- Design and backtest in AlgoGP, connect the exported code
- Base URL
https://api.tradestation.com/v3(SIM:https://sim-api.tradestation.com/v3)- Auth
- OAuth 2.0; access tokens last 20 minutes
- Markets
- US stocks, ETFs, options, futures
- Bars
- Up to 57,600 intraday bars per request
- Limits
- Accounts/orders 320 per 5 min; bars/quotes 500 per 5 min
What the v3 API covers
| Area | Examples |
|---|---|
| Brokerage | Accounts, balances, positions, orders, executions |
| Order execution | Market, limit, stop, OCO/bracket order groups |
| Market data | Quotes, bar charts, tick bars, option chains, market depth |
| Streaming | HTTP chunked streams for quotes, bars and orders |
Rate limits
- Accounts, orders, balances and positions: 320 requests per 5 minutes.
- Quotes, bar charts and tick bars: 500 requests per 5 minutes.
- Option endpoints: 90 per minute; market depth: 30 per minute.
Exceeding a limit returns 429; quotas are per user per resource category.
OAuth and keeping a bot logged in
TradeStation uses the OAuth 2.0 authorization-code flow. Request the offline_access scope to receive a refresh token; access tokens last 20 minutes and are refreshed in the background. Refresh tokens do not expire by default unless rotation is configured for your key.
Build a TradeStation strategy with AlgoGP
AlgoGP does not connect to TradeStation natively yet. TradeStation authenticates with a browser OAuth login and refreshable tokens, so it needs a one-time manual login step that generated code cannot do on its own.
- 1
Design and backtest in AlgoGP
Describe the strategy to the copilot and backtest it on years of normalized history. The result does not depend on any vendor.
- 2
Export the Python project
Every project exports
strategy.py,market_data.py,brokers.pyandlive.py. The strategy only sees bars, cash, positions and orders, never a vendor’s wire format. - 3
Plug in TradeStation
Implement the four adapter methods (
account,positions,submit_market_orderand a candle fetcher) with TradeStation’s SDK, or keep a built-in platform for paper trading and add TradeStation when you go live.
Built-in brokers for the same markets: Alpaca, Tradier, OKX.
TradeStation API: frequently asked questions
How do I get a TradeStation API key?
With a funded TradeStation account, request a WebAPI key from Client Experience; it comes as a client id and secret.
Does TradeStation have paper trading via API?
Yes. The SIM environment at sim-api.tradestation.com mirrors the live API with simulated accounts.
Can I trade futures through the TradeStation API?
Yes, futures and futures options are supported alongside stocks and equity options.
Is the TradeStation API free?
There is no separate API fee; account, commission and market-data costs apply.
Design and backtest your TradeStation strategy first
AlgoGP turns an idea into Python and tests it on years of history before you connect it to TradeStation. The exported code keeps the broker behind four small adapter methods.
- AI copilot writes and revises the rules
- Backtests with realistic costs
- Exported Python ready to wire to TradeStation
Free plan, no card required.
TradeStation alternatives
- Interactive Brokers API GuideThe broadest multi-asset broker API: stocks, options, futures, FX and bonds on 150+ markets, through TWS or IB Gateway.
- Charles Schwab Trader API GuideThe successor to the TD Ameritrade API: stocks, ETFs and options trading plus quotes and history, via OAuth 2.0.
- Tradovate API GuideCloud futures broker with a REST and WebSocket API, a demo host and token-based authentication.
- Alpaca API Built into AlgoGPCommission-free API-first broker for US stocks, ETFs and crypto, with a free paper-trading account.
Independent guide. AlgoGP is not affiliated with TradeStation. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.