Guides
Polymarket data and backtesting guides
Practical walkthroughs for working with Polymarket order book data, from reading your first book to stress testing a backtest. Each one is self contained and links into the docs and the data catalog where you need detail.
What is a prediction market order book?
Start here if order books are new to you. Binary shares priced 0 to 1, bids and asks as probability quotes, spread, depth, YES/NO complementarity, and a worked example of reading a real L2 book.
Get the Polymarket order book in Python
The live book with Polymarket's official py-clob-client, then historical books with the Marketlens SDK, including spread and midpoint analysis.
Execution backtesting: order level replay
The execution engine workflow: pick a series, write a Strategy subclass, run it against real order books, read the metrics, then add latency, slippage, queue position, and platform fees.
Alpha research: signal backtesting
Test whether a signal is profitable across thousands of markets and long windows: AlphaStrategy, on_bar, target weights, and the resolution, price, and fill options.
Reading backtest results
What both engines return: the summary metrics from win rate to fee drag, the DataFrames underneath, the dashboard, racing strategies, and saving runs.
Try it
Put a guide into practice
The free tier includes 5M events per day with full API and full archive access, no card required.
$ pip install marketlens