Account Details
Learn about getting started with our account endpoints
Getting Started with the Tradier Brokerage Account API
This guide walks you through the Account endpoints available in the Tradier Brokerage API. These endpoints let you retrieve account balances, positions, orders, history, gain/loss data, and manage position groups — everything you need to build a full account management experience.
Prerequisites
Before making any API calls, you'll need:
- A Tradier Brokerage account (sign up at tradier.com)
- An API access token, available at web.tradier.com/user/api
- Your Account ID (e.g.
6YA000001) — found on web.tradier.com of returned by the User Profile endpoint
All requests require the following headers:
Authorization: Bearer <YOUR_TOKEN>
Accept: application/json
Base URLs:
- Production:
https://api.tradier.com/v1 - Sandbox (paper trading):
https://sandbox.tradier.com/v1
1. Get User Profile
Before querying account-specific endpoints, fetch your user profile to confirm your account ID(s).
GET /v1/user/profile
curl -X GET "https://api.tradier.com/v1/user/profile" \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Accept: application/json"This returns your user ID, name, and a list of account numbers you can use in the endpoints below.
2. Get Account Balance
Retrieve the current balance and margin information for an account, including total equity, buying power, cash, and open/closed P&L.
GET /v1/accounts/{account_id}/balances
curl -X GET "https://api.tradier.com/v1/accounts/6YA000001/balances" \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Accept: application/json"Key response fields include total_equity, total_cash, option_buying_power, stock_buying_power, and open_pl. For margin accounts, a margin object is also returned; cash accounts return a cash object instead.
3. Get Historical Account Balances
Track your account's total value over time with this endpoint. Useful for charting portfolio performance.
GET /v1/accounts/{account_id}/history?period=<PERIOD>
Supported period values: WEEK, MONTH, YEAR, YEAR_5, YEAR_10, YTD, ALL
curl -X GET "https://api.tradier.com/v1/accounts/6YA000001/history?period=MONTH" \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Accept: application/json"Returns a list of { date, value, delta, delta_percent } records for the requested period.
4. Get Account Positions
Retrieve all open positions currently held in an account.
GET /v1/accounts/{account_id}/positions
curl -X GET "https://api.tradier.com/v1/accounts/6YA000001/positions" \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Accept: application/json"Each position includes the symbol, quantity, cost basis, date acquired, and current market value.
5. Get Account Orders
Retrieve orders placed within an account. This API will return orders placed for the market session of the present calendar day.
GET /v1/accounts/{account_id}/orders
curl -X GET "https://api.tradier.com/v1/accounts/6YA000001/orders" \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Accept: application/json"Each order returns the order ID, symbol, side (buy/sell), quantity, price, order type, status, and creation date. Note that a single order is returned as an object, while multiple orders are returned as an array.
To fetch a specific order by ID:
GET /v1/accounts/{account_id}/orders/{order_id}
6. Get Account History
Get detailed historical transaction activity for an account — including trades, dividends, ACH transfers, fees, interest, and more. (Note: not preasently available for sandbox/paper trading accounts)
GET /v1/accounts/{account_id}/history
| Parameter | Description |
|---|---|
page | Page number for pagination (default: 1 and only required if returning several thousand orders +) |
limit | Results per page (default: 25, can be set to 1000 to get all orders at once without pagination) |
type | Filter by type: trade, option, ach, dividend, fee, interest, etc. |
start | Start date in yyyy-mm-dd format |
end | End date in yyyy-mm-dd format |
symbol | Filter by specific security symbol |
exact_match | Use exact symbol match (default: false) |
curl -X GET "https://api.tradier.com/v1/accounts/6YA000001/history?type=trade&start=2025-01-01&limit=50" \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Accept: application/json"7. Get Account Gain/Loss
Retrieve cost basis and realized gain/loss data for all closed positions in the account. This data is updated nightly through a batch reconciliation process.
GET /v1/accounts/{account_id}/gainloss
curl -X GET "https://api.tradier.com/v1/accounts/6YA000001/gainloss" \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Accept: application/json"Supports optional page and limit parameters for pagination when returning a high volume of results. Results include cost basis, proceeds, and realized P&L for each closed position.
8. Manage Position Groups
Position groups let you logically organize related positions together.
Get All Position Groups
GET /v1/accounts/{account_id}/groups
Create a Position Group
POST /v1/accounts/{account_id}/groups
Update a Position Group
PUT /v1/accounts/{account_id}/groups/{group_id}
Delete a Position Group
DELETE /v1/accounts/{account_id}/groups/{group_id}
# Example: Get all position groups
curl -X GET "https://api.tradier.com/v1/accounts/6YA000001/groups" \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Accept: application/json"Error Handling
All account endpoints return standard HTTP status codes:
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request - something in the URL or parameters is wrong |
| 401 | The token is incorrect, you're missing 'Bearer', or you are trying to use a sandbox token with api.tradier.com/v1 or inverse sandbox.tradier.com/v1 with a production token |
| 403 | Access denied to the requested resource |
| 404 | Account or resource not found |
Updated 7 days ago