CLOB API

Polymarket's order-management REST API at clob.polymarket.com, used to place, cancel, and query orders on the Central Limit Order Book.

Definition

The CLOB API is Polymarket's authenticated REST API for interacting with the order book. It accepts signed orders for placement, supports cancellation by order ID, and returns current book state (bids, asks, depth). All write operations require a cryptographic signature from either an L1 or L2 key. Read operations (book state, fee rates) are public.

In practice

Predtools bots initialize a ClobClient from @polymarket/clob-client, passing the wallet private key and API credentials loaded from secrets.json. Order placement calls client.createOrder() with size, price, side, and time-in-force (FOK or GTC), then submits via client.postOrder(). Fee verification uses GET /fee-rate?token_id={id} before each session. The CLOB API also exposes open positions, allowing bots to detect duplicate orders and cancel stale GTCs before re-quoting.

Related