Polymarket Order Book Dataset: Sample Files and Schema
Explore sample Polymarket order book snapshots, a field dictionary, JSON schema, and a starter workflow for historical analysis.
A useful Polymarket order book dataset preserves more than an outcome price: it records timestamped market state and, when included, bid and ask depth. PolyHistorical publishes sample resources so developers can inspect the format and test an analysis workflow before using the API for larger pulls.
Download the Sample Resources
- CSV order book sample for tabular inspection and data-frame workflows.
- JSON order book sample with a nested API-shaped structure.
- Dataset schema for validating fields and types.
- Field dictionary describing dataset columns.
- Python starter script for loading data and summarizing spread and depth.
Get Historical Data from the API
Use the market-list endpoint to identify a market, then request its snapshots. The include_orderbook option controls whether bid and ask depth is included. Snapshot requests support pagination with limit and offset.
GET /v1/markets?coin=BTC&market_type=5m&resolved=true&limit=100&offset=0
GET /v1/markets/{slug}/snapshots?limit=1000&offset=0&include_orderbook=true
Prepare the Data for Research
- Parse snapshot timestamps into a consistent UTC representation.
- Keep market and outcome identifiers alongside each observation.
- Validate price ranges and bid/ask ordering before calculating features.
- Use depth levels, not just a midpoint, when estimating fills and slippage.
- Keep training and evaluation periods separate when tuning strategies.
The downloadable files are samples and workflow aids; use the API and your plan's market coverage for the full history required by a study. Snapshot data captures observed book states and should not be described as a complete individual-trade tape.