Skip to main content
The orderbooks endpoints provide access to historical bid/ask data collected from the Polymarket WebSocket feed since January 1, 2026. Each snapshot contains the full orderbook depth at a specific timestamp.
Orderbook endpoints have stricter rate limits: 30 requests per minute.

Data Structure

Each orderbook snapshot contains bid and ask arrays as [price, size] tuples:

Query Orderbooks

Query orderbook snapshots with filters. Results are ordered by timestamp descending (most recent first).
At least one of market_id or asset_id is required.

Query Parameters

string
Filter by market ID.
string
Filter by asset/token ID.
string
Filter by outcome. Accepts yes, no, 0, or 1.
integer
Start timestamp in milliseconds (inclusive).
integer
End timestamp in milliseconds (inclusive).
integer
default:"100"
Results per page (1–1000).
integer
Timestamp cursor for pagination. Returns rows with ts < cursor_ts.

Examples

Get orderbook history for a market:
Get orderbooks within a specific time range:
Filter by “Yes” outcome:
Response:

Get Latest Orderbook

Get the most recent orderbook snapshot for a market or asset.
At least one filter parameter (market_id, asset_id, or outcome) is required.

Query Parameters

string
Filter by market ID.
string
Filter by asset/token ID.
string
Filter by outcome. Accepts yes, no, 0, or 1.

Examples

Get latest orderbook for a market:
Get latest orderbook for a specific token:
Response:
This endpoint has a 500ms cache TTL for near real-time data access.

Get Orderbooks by Market ID

Convenience endpoint to get orderbook snapshots for a specific market. Results are ordered by timestamp descending.

Path Parameters

string
required
Market ID.

Query Parameters

string
Filter by outcome. Accepts yes, no, 0, or 1.
integer
Start timestamp in milliseconds (inclusive).
integer
End timestamp in milliseconds (inclusive).
integer
default:"100"
Results per page (1–1000).
integer
Timestamp cursor for pagination. Returns rows with ts < cursor_ts.

Example

Response:

Pagination Example

For large historical queries, use cursor-based pagination. Start with a very high cursor_ts value and follow the next cursor:
Add a small delay between requests (e.g., time.sleep(0.1)) to avoid hitting the 30 requests/minute rate limit.

Common Use Cases

Backtesting

Fetch historical orderbooks within a time range to simulate trading strategies.

Spread Analysis

Calculate bid-ask spreads over time to analyze market liquidity.

Event Studies

Study how orderbooks change around major news events.

Market Making

Analyze historical depth to calibrate market making parameters.