Skip to main content
GET
/
v1
/
balance-allowance
Get USDC + conditional-token balance/allowance (PM keys — paper trading: huge)
curl --request GET \
  --url https://api.polysimulator.com/v1/balance-allowance \
  --header 'X-API-Key: <api-key>'
{
  "balance": "<string>",
  "allowance": "<string>",
  "collateral": "<string>",
  "conditional": "<string>"
}

Authorizations

X-API-Key
string
header
required

Issue from /v1/keys (or admin-issued for enterprise tier).

Headers

X-API-Key
string | null

Your PolySimulator API key

POLY_API_KEY
string | null

Polymarket-CLOB-compat alias for X-API-Key (underscore form). SDK clients ported from Polymarket can authenticate without changing header names. X-API-Key takes precedence when both are provided.

Poly-API-Key
string | null

PM-CLOB-compat dashed-form alias for X-API-Key. Same value semantics as POLY_API_KEY but with HTTP-conventional dash separators. Audit P1 (staging audit 2026-05-16 0817 PR #1296): the per-tier middleware accepts both spellings but the auth dependency originally only matched the underscore form — now both work end-to-end.

authorization
string | null

PM-CLOB-compat: Authorization: Bearer ps_live_... (or ps_test_...) is accepted as an alias for X-API-Key so py-clob-client and other ported SDKs authenticate without header name changes. Bearer JWTs are NOT accepted here — use the dashboard-auth endpoints for those.

Query Parameters

asset_type
string | null

PM SDK param: COLLATERAL (default) or CONDITIONAL. Accepted for call-shape parity; paper trading reports the same unlimited sentinel for both.

token_id
string | null

PM SDK param — the conditional token to query (PM requires it when asset_type=CONDITIONAL). Accepted and unused: paper trading has no per-token allowance.

signature_type
integer | null

PM SDK param. Accepted and unused (no chain here).

Response

Successful Response

GET /v1/balance-allowance response — PM keys + legacy extras.

PM's wire contract (py-clob-client get_balance_allowance / clob-client-v2 BalanceAllowanceResponse) keys the payload as {"balance": "...", "allowance": "..."} — base-unit strings (USDC 6-decimal fixed point). The original polysim emission used {collateral, conditional}, so SDK/user code reading resp["balance"] KeyError'd (eval 2026-06-10, pm-compat finding). PM keys are now primary; the legacy keys stay as polysim extras for pre-P1-batch callers.

balance
string
required
allowance
string
required
collateral
string
required
conditional
string
required