Guide
BrokerMarket dataStocksETFsOptions API key

E*TRADE API guide

E*TRADE, now part of Morgan Stanley, still runs one of the few full retail trading APIs in the US. It is capable, but the OAuth 1.0a flow shapes how you run a bot.

Last verified · Also known as E*TRADE API, ETRADE API, E-Trade API, Morgan Stanley E*TRADE

Quick answer

E*TRADE’s API is an official REST API for US stocks, ETFs and options: accounts, quotes, option chains and orders. It uses OAuth 1.0a, and access tokens expire at midnight US Eastern and go idle after two hours, so a bot needs a daily browser authorization. Sandbox keys return canned data for development.

E*TRADE API at a glance

Pricing
API free with an account
Availability
US residents with an E*TRADE account
Paper trading
Sandbox keys with canned responses
Integration type
OAuth login
In AlgoGP
Design and backtest in AlgoGP, connect the exported code
Auth
OAuth 1.0a (HMAC-SHA1), daily re-authorization
Token life
Expires midnight ET; idle timeout 2 hours (renewable)
Order flow
Preview, then place with the preview id
Assets
Stocks, ETFs, options (no futures or crypto)

The daily authorization flow

  1. 1

    Request token

    Sign GET /oauth/request_token with your consumer key and secret.

  2. 2

    Authorize

    Open https://us.etrade.com/e/t/etws/authorize?key=…&token=…, log in and copy the verifier code.

  3. 3

    Access token

    Exchange the verifier at /oauth/access_token. Call /oauth/renew_access_token if idle for two hours.

Build an E*TRADE strategy with AlgoGP

AlgoGP does not connect to ETRADE natively yet. ETRADE 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. 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. 2

    Export the Python project

    Every project exports strategy.py, market_data.py, brokers.py and live.py. The strategy only sees bars, cash, positions and orders, never a vendor’s wire format.

  3. 3

    Plug in E*TRADE

    Implement the four adapter methods (account, positions, submit_market_order and a candle fetcher) with ETRADE’s SDK, or keep a built-in platform for paper trading and add ETRADE when you go live.

Built-in brokers for the same markets: Alpaca, Tradier, Interactive Brokers, OKX.

E*TRADE API: frequently asked questions

Is the E*TRADE API free?

Yes, for E*TRADE customers. Real-time quotes require accepting the market data agreements.

Can E*TRADE trade futures through the API?

No. The API covers stocks, ETFs and options.

Why does my E*TRADE token stop working overnight?

Access tokens expire at midnight US Eastern; authorize again each trading day.

Design and backtest your E*TRADE strategy first

AlgoGP turns an idea into Python and tests it on years of history before you connect it to E*TRADE. 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 E*TRADE

Free plan, no card required.

E*TRADE alternatives

Independent guide. AlgoGP is not affiliated with E*TRADE. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.

Build a strategy