Clob Order
CLOB-compatible order endpoint.
Accepts orders using the same schema as Polymarket’s real CLOB API (token_id + price + size), enabling one-URL-swap migration to live.
The order_type field follows PM-CLOB semantics:
GTC/GTD— rests on the book (resting limit order)FOK— fill-or-kill (immediate, all-or-nothing)IOC— NOT YET SUPPORTED. The matching engine only has FOK worst-price enforcement; routing IOC through_execute_market_orderwould silently behave like FOK. Until proper partial-fill + cancel-remainder semantics land, requests withorder_type=IOCget a clean400 UNSUPPORTED_ORDER_TYPEresponse.
Resolves DB-first (markets.clob_token_ids JSONB) then falls back
to the Redis poller cache. The funded-key audit on 2026-05-07
caught a divergence: /v1/midpoint accepted token ids that this
endpoint 404’d, because _resolve_token_to_market only checked
Redis. The DB-first lookup makes both endpoints accept the same
token-id surface.
Authorizations
Issue from /v1/keys (or admin-issued for enterprise tier).
Headers
Your PolySimulator API key
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.
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.
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.
Body
CLOB-compatible order request using token_id instead of condition_id.
Mirrors the real Polymarket CLOB API POST /order schema so clients can switch to live trading with a single URL change.
CLOB token ID
BUY, SELL Limit price as decimal string (0.01-1.00)
Number of shares as decimal string
GTC, FOK, IOC, GTD Fee rate in basis points (ignored in virtual mode)
x >= 0Optional nonce (ignored in virtual mode)
Optional taker address (ignored in virtual mode)
256Unix-seconds expiration for order_type=GTD (PM convention). Honored while ORDER_SEMANTICS_PM_V2_ENABLED is rolling out; otherwise advisory (GTD routes through GTC).
PM's postOnly: reject (don't execute) when marketable at placement; GTC/GTD only. Rolling out behind ORDER_SEMANTICS_PM_V2_ENABLED; advisory until then.
Response
Successful Response