Backtesting

Polymarket Backtesting Data: Order Books, Fills, and Slippage

Get Polymarket backtesting data with historical order book snapshots, real depth, reference prices, and resolution metadata for strategy research.

Polymarket backtesting data needs to include more than historical prices. Prediction-market strategies are sensitive to spread, queue depth, market resolution, and whether there was enough size available when the signal fired.

Minimum Dataset for a Realistic Backtest

  • Timestamped order book snapshots
  • Bid and ask ladders for both outcomes
  • Reference asset prices for BTC, ETH, or SOL markets
  • Market open, close, resolution, and winner metadata
  • Enough granularity to avoid hiding fast spread and depth changes

Why Midpoint Backtests Fail

A strategy that buys at the midpoint is usually testing a price that was not tradable. With PolyHistorical, your backtester can consume the ask side for buys, the bid side for sells, and account for partial fills when size is thin.

Backtesting Workflow

  1. Choose a market family such as BTC 5m Up/Down.
  2. Fetch all resolved markets in the date range.
  3. Replay snapshots chronologically.
  4. Generate signals from price, spread, depth, or reference-price movement.
  5. Execute against the actual book and record fills.
  6. Evaluate PnL, drawdown, win rate, and slippage.

Metrics You Can Calculate

MetricData required
Realistic entry priceAsk ladder at signal timestamp
Realistic exit priceBid ladder at exit timestamp
SlippageDepth and order size
Liquidity filtersTotal depth near midpoint
Resolution-adjusted PnLWinner and settlement metadata

Related Resources