Built into AlgoGP Pro
BrokerMarket dataStocksETFsOptions API key

Tradier API guide

Tradier is a US brokerage built for developers and the trading apps they build, with particularly strong options support. Its REST API uses a single bearer token, and a free sandbox lets you paper trade against delayed data before you open a funded account.

Last verified

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> and Accept: 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.

EndpointUse
GET /v1/user/profileYour account numbers
GET /v1/accounts/{id}/balancesTotal equity and cash
GET /v1/accounts/{id}/positionsOpen positions
GET /v1/markets/historyDaily, weekly or monthly bars
GET /v1/markets/timesalesIntraday 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"
  }
}
In-app backtests always use AlgoGP’s normalized history so results stay comparable; this choice decides what backtest.py and live.py connect to when you run the exported code.
KeyWhat it is
TRADIER_ACCESS_TOKENTradier API access token (sandbox or production) from dash.tradier.com/settings/api.
TRADIER_ACCOUNT_IDThe Tradier account number to trade (the sandbox has its own).
Names the generated code reads. Add values under Keys & secrets or in a local .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 once LIVE_TRADING_ACKNOWLEDGED=yes is 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

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