Get the Orderbook
Fetch the full orderbook for a token, including all resting bid and ask levels:Response
Prices
Get the best available price for buying or selling a token:Midpoints
The midpoint is the average of the best bid and best ask. This is the price displayed on Polymarket as the market’s implied probability.If the bid-ask spread is wider than $0.10, Polymarket displays the last traded
price instead of the midpoint.
Spreads
The spread is the difference between the best ask and the best bid. Tighter spreads indicate more liquid markets.Price History
Fetch historical price data for a token over various time intervals:interval is relative to the current time. Use startTs / endTs for
absolute time ranges. They are mutually exclusive — don’t combine them.Estimate Fill Price
Calculate the effective price you’d pay for a market order of a given size, accounting for orderbook depth:Batch Requests
All orderbook queries have batch variants for fetching data across multiple tokens in a single request (up to 500 tokens):BookParams for batch orderbook requests accepts a token_id and an optional
side parameter to filter by bid or ask side.Last Trade Price
Get the price and side of the most recent trade for a token:Real-Time Updates
For live orderbook data, use the WebSocket API instead of polling. Themarket channel streams orderbook changes, price updates, and trade events in real time.
Connecting
Dynamic Subscribe and Unsubscribe
After connecting, you can change your subscriptions without reconnecting:Event Types
best_bid_ask, new_market, and market_resolved require
custom_feature_enabled: true in your subscription message.Next Steps
Place Orders
Create and submit orders using the orderbook data
Fetching Markets
Find token IDs for markets you want to trade