Skip to main content
Polymarket is an on-chain CLOB on Polygon, settled in USDC. OpenPX handles EIP-712 signing, CTF interactions, CLOB API auth (Gamma + CLOB), and the WebSocket surface.

Config fields

FieldTypeRequiredDescription
private_keystringfor authEOA private key (hex). Used to sign orders.
funderstringfor proxy/safeFunder/proxy/safe address holding USDC
signature_type"eoa" | "proxy" | "gnosis_safe" (or 0 / 1 / 2)optionalDefaults to gnosis_safe if funder is set, otherwise eoa
api_keystringoptionalL2 CLOB API key (skips init_trading() derivation)
api_secretstringoptionalL2 CLOB API secret
api_passphrasestringoptionalL2 CLOB API passphrase
gamma_urlstringoptionalOverride the Gamma (markets) API base URL
clob_urlstringoptionalOverride the CLOB API base URL
polygon_rpc_urlstringoptionalPolygon RPC URL for on-chain reads
verbosebooloptionalVerbose logging
If api_key / api_secret / api_passphrase are absent, OpenPX derives them on first authenticated call by signing a ClobAuth EIP-712 message.

Environment variables

  • POLYMARKET_PRIVATE_KEY
  • POLYMARKET_FUNDER
  • POLYMARKET_API_KEY
  • POLYMARKET_API_SECRET
  • POLYMARKET_API_PASSPHRASE

Identifiers

  • Market.id is the condition_id hex string (e.g. 0x311d0c4b…). Both ?id= and ?condition_id= accept this on Polymarket REST endpoints.
  • Market.native_numeric_id holds the legacy numeric DB id (e.g. "1031769") for callers that need to build deep-links to the Polymarket UI.
  • WebSocket subscribe target is a CLOB token ID, not the condition ID. Use token_id_yes / token_id_no from Market.
  • Outcomes are "Yes" / "No".

Capabilities

Every method on the unified surface is implemented. Inspect ex.describe() to confirm at runtime.

Rate limits

Defined in engine/core/src/exchange/manifests/polymarket.rs:
  • Default: 150 req/sec, burst 10
  • Write endpoints (orders): 350 req/sec, burst 20
  • Bulk endpoints: 20 req/sec, burst 5