Skip to main content
GET
Balances per token

Authorizations

X-Api-Key
string
header
required

Partner / integrator key — format ps_live_<keyId>_<secret>. Partner keys are issued by PredictStreet; a user can also create keys bound to their own wallet from their account settings in the web app. Never ship to a browser. multi_wallet partners must additionally send X-User-Wallet: 0x<40-hex> on every authenticated request to declare the acting wallet. See the API keys guide for scope taxonomy, partner kinds, rate limits, and rotation procedure.

Scopes

portfolio:read

Headers

X-User-Wallet
string

Required for multi_wallet partners on every authenticated request; ignored for single_wallet. Declares the acting end-user wallet for this request — drives KYC checks, balances/positions/orders attribution, rate-limit buckets, and audit. Lower-cased server-side. Missing on a multi_wallet key → 401 api_key_user_wallet_required; malformed → 401 api_key_user_wallet_invalid. The on-chain CTFExchange/Vault contracts still verify EIP-712 signer ↔ vault binding, so loosening API-layer attribution is safe by construction.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb3"

Query Parameters

cashOnly
enum<string>

When 1/true, return only the cash balance rows and skip the portfolio analytics build entirely — portfolioValue comes back unavailable. Intended for high-frequency automated callers (e.g. MM bots) and surfaces that do not render portfolioValue.

Available options:
1,
true
vault
string

Vault roadmap part 2: one of the caller's vaults from GET /me/vault vaults[]. balances are then THAT vault's (a non-active vault reads balanceSource=projection, ownerState=inactive-vault); the response carries vault: {vaultAddress, generation, active}. Default: the active vault, as before. 400 invalid_vault / 404 vault_not_found for a vault that is not the caller's. portfolioValue stays wallet-wide (the cash of every vault + every vault's positions).

vaults
enum<string>

Vault roadmap part 2: add vaults: [{vaultAddress, generation, active, balances, usdc?, balanceSource, ownerState?}] — the balance rows of EVERY vault of the caller (active first). Omitted: no vaults field (the response is exactly the pre-generation-2 one). RND-1869: without cashOnly each entry also carries usdc: {available, locked, pendingWithdrawal, inTransit} and the response positionsValue, from the same reads as portfolioValue, so that portfolioValue.value = Σ usdc.available + Σ usdc.locked + Σ usdc.inTransit + positionsValue.value (to the micro-USDC; portfolioValue is clamped at 0 on accounting drift). RND-2082: while a gen-1 -> gen-2 atomic move settles, usdc is omitted on every vault and portfolioValue is unavailable while positionsValue stays as read. RND-2083: the list, each vault's cash and portfolioValue come from one read of the caller's vaults.

Available options:
1,
true

Response

200 - application/json

OK

walletAddress
string
required
balances
object[]
required
portfolioValue
object
required

Wallet-wide portfolio value (cash + open mark). Mirrors the /me/overview stats.portfolioValue field so the FE Portfolio chip can render from this single endpoint.

balanceSource
enum<string>
required

owner_state: every figure on the response was read from the owner state admission decides on, on the owner pod. projection: at least one is the PostgreSQL row; ownerState says why.

Available options:
owner_state,
projection
ownerState
string

Present only on a projection answer: why the owner state was not read. No owner state exists: pipeline-off, write-path-held, and on balance surfaces routing-disabled. The owner was asked and could not answer: routed-elsewhere, routing-unsettled, term-superseded, term-unclaimed, shard-unread, owner-unreachable. Balance surfaces only: no-open-position (nothing on the page is held in the owner state), chain-total-absent (a position the owner state holds no chain total for), inactive-vault (a vault of the caller that is not the active one — /me/balances?vault= / vaults[]).

vault
object

Vault roadmap part 2: present with ?vault= — the vault balances belong to. active is the flag of the one read of the caller's vaults every figure of the response is taken from (RND-2083): a vault upgrade committing during the request is wholly before or wholly after it.

positionsValue
object

RND-1869: present with ?vaults=1 (not with cashOnly) — the position part of portfolioValue (open and still-redeemable positions of EVERY vault, mark-to-market or cost basis), the same figure it sums. unavailable exactly when portfolioValue is, except while a gen-1 -> gen-2 atomic move settles (RND-2082): portfolioValue is then unavailable and this figure stays as read.

vaults
object[]

Vault roadmap part 2: present with ?vaults=1 — the balance rows of every vault of the caller, as listed by the one read of the caller's vaults every figure of the response is taken from (RND-2083).