API Reference
The PolySimulator API is a REST + WebSocket surface. Every endpoint below is generated from a curated in-repo snapshot of the OpenAPI spec (docs-site/openapi.json)
and ships with an interactive playground — paste your ps_live_… key
into the Authorization widget and you can fire requests against the
live production environment from this browser tab.
The published reference is generated from the in-repo curated snapshot,
not from the live
api.polysimulator.com/openapi.json
served by the backend. The live spec may include additional legacy
routes (v0 endpoints, internal helpers) that aren’t part of the
stable public surface — only the endpoints documented here are
considered supported.Authentication
How
X-API-Key, bootstrap, and the WebSocket JWT flow work.Quick Start
From signup to first trade in under two minutes.
Endpoint groups
| Group | Coverage |
|---|---|
| API Keys | Bootstrap, create, list, revoke, tier metadata, WebSocket token mint |
| Account | Balance, equity curve, portfolio, positions, trade history |
| Trading | Place / cancel / batch / list orders, cancel-all, market cancel |
| Market Data | Markets list + lookup, candles, prices, order book |
| CLOB Read (Public) | Polymarket-shape book / midpoint / spread / price endpoints |
| CLOB Compat | Polymarket-shape POST /v1/order, POST /v1/orders, GET /v1/data/orders |
| WebSocket | /v1/ws/prices + /v1/ws/executions subscription endpoints |
| Health | /v1/health, /v1/health/ready, /v1/status, /v1/me |
curl / TypeScript / Python snippet.
Base URL
| Environment | URL |
|---|---|
| Production | https://api.polysimulator.com |
/v1 —
example: GET https://api.polysimulator.com/v1/account/balance.
The one documented exception is /api/beta/cohort-status, a public
read-only endpoint used by the pricing page to surface closed-beta
slot availability.
Authentication at a glance
Most endpoints require anX-API-Key header. Public exceptions
that work without a key: /v1/health, /v1/health/ready,
/api/beta/cohort-status, and the public CLOB-read endpoints under
CLOB Read (Public). Note /v1/keys/bootstrap is not public —
it requires a Supabase Authorization: Bearer <access_token> JWT
(returns 401 MISSING_AUTH without one), it just doesn’t take an
X-API-Key because it mints your first key. Each endpoint’s
individual page lists its own auth requirement at the top — check
there if unsure. The Authentication guide covers
key minting, rotation, revocation, and the short-lived WebSocket JWT
flow.
Polymarket compatibility
PolySimulator is wire-compatible withpy-clob-client and the Polymarket
CLOB JSON shape for the endpoints under the CLOB Read (Public) and
CLOB Compat groups. The
CLOB compatibility guide lists every
identical-vs-deviation contract item — read it before you port a bot.
For the few documented deviations (the X-Polysim-Code machine header,
the 402 UPGRADE_REQUIRED enrichment, paper-trading-only EIP-712 signing),
the Polymarket Raw HTTP guide walks through
each one with side-by-side request/response examples.
Rate limits + tiers
| Tier | Burst (req/s) | Sustained (req/min) | WebSockets | Batch size |
|---|---|---|---|---|
| Free | 2 | 120 | 1 | 1 |
| Pro | 10 | 600 | 3 | 5 |
| Pro+ | 30 | 1,800 | 10 | 10 |
| Enterprise | 100 | 6,000 | 50 | 25 |
X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset
are always present on rate-limited responses. X-RateLimit-Tier is
present on authenticated responses only — unauthenticated requests
metered against IP-only buckets omit it. The authoritative source for
these numbers is GET /v1/keys/tiers. See
Rate Limits for back-off strategy and the
closed-beta cohort exception (admitted cohort keys run at their
granted tier’s rate — admin beta-issued keys are enterprise-tier —
then auto-downgrade to free + read-only at the key’s beta_until
cutoff).
LLM-targeted reference
If you’re driving this API from an AI coding assistant, point it at/llms.txt — a single ~50 KB markdown blob with every
endpoint, schema, and Polymarket parity note in a model-friendly
format. Cursor / Claude Code / Continue / Windsurf can also ingest the
docs via Mintlify MCP or
Context7.