01In plain English
A central limit order book (CLOB) is a list of every resting buy and sell order for a market, sorted by price and then by the time each order arrived. When a new order can match an existing one, the engine pairs them. Polymarket runs this matching off-chain for speed, then settles the matched trades on-chain on Polygon. The CLOB API is simply the set of endpoints a program calls to see those books and act on them.
For anyone building a bot, the CLOB API is the foundation. Every arbitrage, copy-trading, or market-making strategy ultimately reads a book and posts an order through it. Polymarket exposes three related APIs - Gamma (markets and metadata), Data (positions and history), and the CLOB itself (live books and order placement).
02CLOB vs AMM
The distinction that confuses newcomers most is order book versus automated market maker (AMM). An AMM, like the model Polymarket used in its earliest version, prices outcomes from a liquidity pool using a formula; you always trade against the pool, and the price moves along a curve as you buy. A CLOB has no pool - you trade against other participants' resting orders at the price they set. The practical consequences:
- Price discovery. A CLOB reflects what real counterparties will accept right now, not a formula. Spreads can be tight when traders compete, or wide when they don't.
- Slippage. On an AMM, slippage is deterministic from the curve. On a CLOB, it depends on book depth - how much size is resting near the touch.
- Maker incentives. A CLOB lets you post passive limit orders and earn the spread; an AMM has no maker role for individual traders.
03Maker and taker
Every CLOB trade has two sides. The maker posts a resting order that adds liquidity to the book; the taker submits an order that immediately matches against it, removing liquidity. The roles matter because fee schedules and reward programs typically favour makers - posting liquidity is what keeps the book usable. A market-making bot is, by definition, trying to stay on the maker side as often as possible while managing the inventory risk of holding both YES and NO exposure.
04Order types
The CLOB API accepts the standard limit-order time-in-force flags. Knowing which to use is most of the difference between a bot that fills cleanly and one that leaves orphan exposure:
An arbitrage bot firing both legs of a sum-to-one trade usually prefers FOK or IOC to avoid being left holding one side; a market maker quoting a spread leans on GTC and GTD.
05Authentication: L1 and L2
The CLOB API uses a two-level auth model. L1 is your wallet private key signing an EIP-712 message to prove ownership - required to create or revoke API credentials. L2 is an API key plus secret used to sign individual requests with HMAC, so the bot can trade without exposing the private key on every call. Reads of public book data need no authentication at all.