API Reference
Trading & Account
Read your account state, positions, orders, and trade history. All endpoints require a bearer token and are scoped to the authenticated user and their selected trading mode (paper or live).
Account
/api/v1/trading/accountCurrent account snapshot: cash, equity, buying power, and connection status.
{
"user_id": "8f14e45f-...",
"cash": "87214.55",
"portfolio_value": "12785.45",
"equity": "100000.00",
"buying_power": "87214.55",
"currency": "USD",
"account_type": "PAPER",
"trading_blocked": false,
"exchange_connected": false,
"active_exchange": null,
"trading_mode": "paper"
}/api/v1/trading/account/historyHistorical account snapshots (equity, cash, P&L over time) — the data behind the Portfolio Performance chart.
[
{
"snapshot_time": "2026-06-10T00:00:00Z",
"equity": "101240.00",
"cash": "88110.20",
"portfolio_value": "13129.80",
"daily_pnl": "412.15",
"total_pnl": "1240.00"
}
]/api/v1/trading/dashboard-statsAggregated dashboard numbers — win rate, totals, and P&L — exactly as the app's dashboard computes them.
Positions
/api/v1/trading/positionsAll open positions with live valuation, plus portfolio-level totals.
{
"data": [
{
"symbol": "BTC/USD",
"quantity": "0.05",
"average_entry_price": "104250.00",
"current_price": "105910.00",
"market_value": "5295.50",
"unrealized_pnl": "83.00",
"unrealized_pnl_percent": "1.59",
"side": "LONG",
"opened_at": "2026-06-11T14:03:22Z"
}
],
"total_value": "12785.45",
"total_unrealized_pnl": "201.40",
"total_realized_pnl": "1038.60"
}/api/v1/trading/positions/{symbol}A single position by symbol. 404 if no open position exists for it.
Orders
/api/v1/trading/ordersPlace a manual order (the AI places its own through the same pipeline). Subject to the same risk gates as AI trades.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | required | Asset symbol, e.g. BTC/USD |
side | string | required | BUY or SELL |
order_type | string | required | MARKET or LIMIT |
quantity | decimal | required | Order quantity in base asset |
limit_price | decimal | optional | Required for LIMIT orders |
/api/v1/trading/ordersPaginated order history.
| Parameter | Type | Required | Description |
|---|---|---|---|
page | int | optional | Page number (default 1) |
page_size | int | optional | Items per page (default 50, max 1000) |
/api/v1/trading/orders/{order_id}A single order with fill state.
/api/v1/trading/orders/{order_id}Cancel an open order.
Trades
/api/v1/trading/tradesPaginated executed-trade history — the data behind the Recent Trades panel and full history modal.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | optional | Filter by asset symbol |
page | int | optional | Page number (default 1) |
page_size | int | optional | Items per page (default 50, max 1000) |
{
"total": 142,
"page": 1,
"page_size": 50,
"pages": 3,
"data": [
{
"symbol": "ETH/USD",
"side": "SELL",
"order_type": "MARKET",
"quantity": "0.85",
"price": "2604.10",
"commission": "2.21",
"total_value": "2213.49",
"strategy_id": "ai-auto",
"executed_at": "2026-06-11T16:42:08Z"
}
]
}Exchange-aware routing
Account, position, and trade endpoints automatically read from your active trading mode: the paper engine for paper accounts, your connected exchange for live. The response shape is the same either way — trading_mode on the account tells you which you're looking at.