Balance
Authentication
This endpoint accepts either an API key (X-API-Key: <key>, or the
PM-compat POLY_API_KEY / Authorization: Bearer ps_live_... aliases) or
a Supabase Bearer JWT (Authorization: Bearer <jwt>), so the website’s
API-keys dashboard can render the card via the cookie session. The balance
returned is always the API wallet regardless of which scheme you use.
(Most account endpoints — positions, portfolio, history, equity — are API-key
only; balance and reset-api-balance are the exceptions that also accept the
JWT.)
Request
Response
| Field | Type | Description |
|---|---|---|
balance | string | Current API wallet cash balance (available for trading) |
currency | string | Always USD |
starting_balance | string | Initial API wallet capital — your tier baseline (Pro: 10000.00; Pro+: 25000.00). Falls back to 10000.00 when no API wallet baseline is set. |
unrealized_pnl | string | Total account P&L: total_value − starting_balance. Despite the name, this is total equity vs starting capital (cash + open-position mark-to-market), not the open-position MTM delta alone — it equals true unrealized P&L only when balance == starting_balance. |
total_value | string | Cash balance + market value of open API positions |
Need a clean slate?
POST /v1/account/reset-api-balance resets the API
wallet to your tier baseline (Pro: 25,000) and closes all
open API positions. Resets are free and currently uncapped — the
cooldown is gated by API_RESET_COOLDOWN_DAYS (0 during the beta period,
through 2026-08-31). See Wallets for the full reset
semantics.Python Example
Errors
All errors return a JSON body of the shape{"error": "<CODE>", "message": "<human-readable>"}.
| Status | error code | When |
|---|---|---|
| 401 | MISSING_AUTH | No X-API-Key and no Authorization header supplied |
| 401 | INVALID_KEY | API key (or Bearer-wrapped key) is unknown, deactivated, or expired |
| 404 | ACCOUNT_NOT_FOUND | Authenticated user has no account record |