Quick answer
Tradier is a developer-focused US broker for stocks, ETFs and options with a REST API authenticated by a bearer access token. The sandbox (sandbox.tradier.com) has its own token and account number and 15-minute delayed data; production is api.tradier.com. JSON is converted from XML, so single-item lists arrive as objects.
Tradier API at a glance
- Pricing
- Free API with a brokerage account
- Availability
- US residents (and some international)
- Paper trading
- Sandbox paper account (15-minute delayed data)
- Integration type
- REST + API key
- In AlgoGP
- Built in: broker and data adapter (Pro)
- Production
https://api.tradier.com/v1- Sandbox
https://sandbox.tradier.com/v1(15-minute delayed data)- Auth
Authorization: Bearer <token>andAccept: application/json- Markets
- US stocks, ETFs and listed options (single and multi-leg)
Placing orders
Orders are form-encoded POST /v1/accounts/{account_id}/orders requests: class=equity&symbol=SPY&side=buy&quantity=10&type=market&duration=day. Sides are buy, sell, sell_short and buy_to_cover; options use class=option with an OCC option symbol and buy_to_open-style sides. Add preview=true to validate without submitting.
| Endpoint | Use |
|---|---|
GET /v1/user/profile | Your account numbers |
GET /v1/accounts/{id}/balances | Total equity and cash |
GET /v1/accounts/{id}/positions | Open positions |
GET /v1/markets/history | Daily, weekly or monthly bars |
GET /v1/markets/timesales | Intraday bars (recent days only) |
JSON quirks worth knowing
Tradier’s JSON is converted from XML, so a list with one element comes back as an object rather than an array, and an empty list as the string "null". Code must normalise positions.position and history.day before looping. AlgoGP’s adapter does this.
Sandbox vs production
The sandbox has its own token and account number, delayed quotes, and simulated fills. It is ideal for testing order flow; production needs a funded brokerage account and its own token. Tokens do not cross between the two hosts.
Use Tradier in AlgoGP
Open a project, go to the APIs & keys tab and, under Platforms, pick Tradier as the market data source (market_data.py) and the broker (brokers.py). The choice is saved to config.json as a new strategy version:
{
"platforms": {
"data": "tradier",
"broker": "tradier"
}
}backtest.py and live.py connect to when you run the exported code.| Key | What it is |
|---|---|
TRADIER_ACCESS_TOKEN | Tradier API access token (sandbox or production) from dash.tradier.com/settings/api. |
TRADIER_ACCOUNT_ID | The Tradier account number to trade (the sandbox has its own). |
.env.TRADING_MODE=paper(default): simulated fills on your machine; the broker is never contacted.TRADING_MODE=sandbox: orders go to Tradier’s sandbox paper account (15-minute delayed data).TRADING_MODE=live: real orders, and only onceLIVE_TRADING_ACKNOWLEDGED=yesis set.
New to Tradier? Follow the step-by-step Tradier API key guide.
Tradier API: frequently asked questions
Is the Tradier API free?
API access is included with a Tradier brokerage account, and the sandbox is free to developers. Commissions depend on your account plan.
Can I trade options through the Tradier API?
Yes; options, including multi-leg orders, are Tradier’s speciality. AlgoGP’s generated adapter trades the underlying equity only.
Does Tradier provide historical data?
/markets/history returns daily, weekly and monthly bars; /markets/timesales returns intraday bars for recent sessions.
Build a Tradier trading bot in minutes
Describe the strategy in plain English, backtest it on years of data, then export Python that already talks to Tradier: paper, sandbox and live modes, keys handled for you.
- Generated adapter for Tradier orders and balances
- Backtests with costs, slippage and walk-forward checks
- Paper first; live trading only after you opt in
Free plan, no card required. Tradier is included with Pro.
Tradier alternatives
- Alpaca API Built into AlgoGPCommission-free API-first broker for US stocks, ETFs and crypto, with a free paper-trading account.
- TradeStation API GuideUS broker with a v3 REST and streaming API for stocks, options and futures, OAuth 2.0 and a simulated account.
- 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 GuideThe broadest multi-asset broker API: stocks, options, futures, FX and bonds on 150+ markets, through TWS or IB Gateway.
Independent guide. AlgoGP is not affiliated with Tradier. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.