API surfaces
Every Polymarket interaction belongs to exactly one of these surfaces. Every input field on every bot declares which surface it consumes. If you find yourself unable to put an input in one of these eleven buckets, file an issue against this page.
The eleven surfaces
| Enum | Endpoint | Auth | What it carries |
|---|---|---|---|
| gamma | https://gamma-api.polymarket.com | None | Markets and events metadata. Includes negRisk and enableNegRisk booleans. |
| data | https://data-api.polymarket.com | None | Historical fills, prices, volumes, median spreads. |
| clob_public | https://clob.polymarket.com (read endpoints) | None | Live order books, recent trades, market status. |
| clob_auth | https://clob.polymarket.com (auth endpoints) | HMAC L1 + EIP-712 L2 | Order placement, cancel, replace; user balances and orders. |
| ws_market | wss://ws-subscriptions-clob.polymarket.com/ws/market | None | book / price_change / tick_size_change / last_trade_price / best_bid_ask / new_market / market_resolved. |
| ws_user | wss://ws-subscriptions-clob.polymarket.com/ws/user | EIP-712 ClobAuth | User-scoped fills, order updates, balance changes. |
| ws_sports | wss://sports-api.polymarket.com/ws | None | Live game state, score updates, period changes. |
| ws_rtds | wss://ws-live-data.polymarket.com | None | Real-time crypto and equity prices, comment streams. |
| bridge | https://bridge.polymarket.com | Wallet signature | Deposits and withdrawals; proxies fun.xyz. |
| onchain | Polygon RPC | Wallet signature for writes | CTFExchangeV2, NegRiskAdapter, pUSD ERC-20, UMA Optimistic Oracle. |
| internal | Polytraders bus | mTLS | Inter-bot messaging: OrderIntent, RiskVote, ExecutionPlan, GovernanceLog. |
Why we declare them
If a Polymarket endpoint moves, we want to find every bot affected by grepping a single field rather than searching for hostnames. Equally, if the operator changes the WS user-channel auth, we want a one-line audit of which bots will need re-auth wiring.
Ownership
| Surface | Who in Polytraders owns the wrapper |
|---|---|
| gamma, data, clob_public | SDK team — pure read wrappers, no state |
| clob_auth | Execution pod — owns signing, retry, idempotency |
| ws_market, ws_user | SDK team — connection manager, last-message-id resume |
| ws_sports, ws_rtds | Intelligence pod — schema validation per topic |
| bridge | User Tools pod — UI-driven only |
| onchain | Security pod — every write goes through ContractAddressGuard |
| internal | Platform pod — bus, schemas, replay |
Forward compatibility
If Polymarket adds a new surface (Solana CLOB, a Layer-2 settlement option, or a new public read-only endpoint), we add one enum value here and the corresponding wrapper to the SDK. Bots opt in by declaring the new value in their api_surface array — no shotgun surgery.