Quick answer
The TD Ameritrade API was shut down in 2024 when accounts moved to Charles Schwab. Its replacement is the Schwab Trader API (developer.schwab.com), which keeps a similar shape: OAuth 2.0, price history, quotes, option chains and orders. Libraries such as tda-api were superseded by schwab-py.
TD Ameritrade API at a glance
- Pricing
- Discontinued (2024)
- Availability
- Discontinued (accounts moved to Schwab)
- Paper trading
- Not applicable (data only)
- Integration type
- No public API
- In AlgoGP
- Design and backtest in AlgoGP, connect the exported code
- Status
- Retired (2024)
- Replacement
- Schwab Trader API
- Python
tda-api→schwab-py
Build a TD Ameritrade strategy with AlgoGP
AlgoGP does not connect to TD Ameritrade natively yet. TD Ameritrade has no supported public trading or data API.
- 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 TD Ameritrade
Implement the four adapter methods (
account,positions,submit_market_orderand a candle fetcher) with TD Ameritrade’s SDK, or keep a built-in platform for paper trading and add TD Ameritrade when you go live.
Built-in data sources for the same markets: Alpaca, Yahoo Finance, Alpha Vantage, Tradier.
TD Ameritrade API: frequently asked questions
Does the TD Ameritrade API still work?
No. Register an app on developer.schwab.com instead.
Is the Schwab API the same as TD Ameritrade’s?
Similar endpoints and OAuth flow, but new hosts, new app keys and seven-day refresh tokens.
Automate the strategy you would run on TD Ameritrade
Describe your rules, backtest them on years of stock, crypto or forex data, and export Python for a broker that has a real API.
- No API key needed to start
- Built-in Alpaca, Tradier, OANDA, Binance and more
- Free plan, no card
Free plan, no card required.
TD Ameritrade alternatives
- Charles Schwab Trader API GuideThe successor to the TD Ameritrade API: stocks, ETFs and options trading plus quotes and history, via OAuth 2.0.
- Interactive Brokers API Built into AlgoGPThe broadest multi-asset broker API: stocks, options, futures, FX and bonds on 150+ markets, through TWS or IB Gateway.
- TradeStation API GuideUS broker with a v3 REST and streaming API for stocks, options and futures, OAuth 2.0 and a simulated account.
- Tradier API Built into AlgoGPDeveloper-focused US brokerage for stocks and options, with a REST API and a free sandbox token.
Independent guide. AlgoGP is not affiliated with TD Ameritrade. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.