

Data, backtests & research
Reproducible walkthroughs and studies on prediction markets. Every post leads with a query you can run yourself and the real order-book data behind it.
Tutorial
Plain-English walkthroughs, the question, the method, the traps.
- Tutorial9 min read
How to Backtest a Mean-Reversion Strategy on BTC Prediction Markets
A plain-English walkthrough of testing a mid-price reversion idea on BTC Up/Down markets, the signal, the honest fill model, and the traps that quietly inflate returns.
- Tutorial7 min read
Query Polymarket Data From an AI Agent With MCP
Connect Resolved Markets to Claude or any MCP-compatible agent and let it pull from the historical snapshot archive, plus the current book on active markets, on its own, grounded in real data, not guesses.
- Tutorial8 min read
Get Polymarket Order Book Data Into a pandas DataFrame
The fastest path from raw Polymarket snapshots to a clean, analysis-ready DataFrame, whether you pull the REST API directly or bulk-export to CSV with the CLI.
- Tutorial7 min read
Store Polymarket Snapshots Locally in SQLite
Build a local, queryable archive of Polymarket order-book snapshots with the rm-api CLI’s incremental SQLite sync, no database server, no re-downloading what you already have.
- Tutorial8 min read
Build a Discord Bot for Prediction Market Alerts
Wire prediction-market data into a Discord bot that posts spread, depth, and price-move alerts to your channel, a monitoring and notification bot, built on read-only order-book data.
- Tutorial7 min read
Build a Telegram Bot for Prediction Market Updates
Send prediction-market price and spread updates straight to Telegram, on a schedule or on demand, using read-only order-book data and a few simple rules.
- Tutorial8 min read
Stream Live Polymarket Order Books Over WebSocket
Skip the polling loop. Subscribe to the WebSocket feed for active markets and get the current order book pushed to you on a steady cadence, a convenient live layer on top of the historical archive.
- Tutorial7 min read
Get Started With the Polymarket Data API in 5 Minutes
Sign up, generate a key on /api-keys, and make your first authenticated request, a quickstart that gets you reading Polymarket order-book data, historical snapshots plus the current book, in about five minutes.
- Tutorial8 min read
Query Historical Polymarket Snapshots by Time Range
Pull a clean window of order-book history from /v1/markets/:id/snapshots, the from, to, side, limit, offset, include_book and order params explained, with a pagination recipe for long windows.
- Tutorial7 min read
Resolve a Polymarket Slug to a conditionId
Every market has a human slug like btc-updown-5m and a 0x conditionId. Here is how to resolve one to the other, and why the conditionId is the handle every snapshot, orderbook and summary call expects.
- Tutorial8 min read
Point-in-Time Snapshot Lookup on Polymarket
Reconstruct the order book as it looked at one precise timestamp with /api/snapshot, the lookup searches up to an hour before your moment and returns UP and DOWN with derived prices, the spot crypto reference, and the full book on request.
- Tutorial8 min read
Export Polymarket Data for Reproducible Research
Get Polymarket history into a research-ready columnar format with the rm-api CLI, bulk CSV / JSON / JSONL export and incremental SQLite sync, so your backtests run on a local, frozen, reproducible dataset.
- Tutorial9 min read
Backtest a Prediction Market Without Lookahead Bias
Lookahead bias is the silent killer of prediction-market backtests. Build signals on prior values only, time on event_timestamp, fill at the touch, charge the spread, size to resting depth, the discipline that makes a result you can trust.
- Tutorial8 min read
Replay a Resolved Market Snapshot by Snapshot
The Replay Terminal steps you through a closed market one snapshot at a time, watch the book evolve, the spread widen into resolution, depth thin, the probability converge to 0 or 1. What replay teaches that a static chart can’t.
- Tutorial8 min read
Connect Claude Desktop to Prediction-Market Data With MCP
A step-by-step connection walkthrough: point Claude Desktop or Claude Code at the MCP server, choose stdio or HTTP transport, and learn what each of the 12 tools and 2 resources actually does once the agent is live.
Analytics
Turning raw order-book data into signals you can test.
- Analytics8 min read
Order Book Imbalance as a Signal on Polymarket
Polymarket shows the live book but never the history of it. We keep that history, full depth at ~20 Hz, which makes order-book imbalance, a classic microstructure signal, finally testable on prediction markets.
- Analytics8 min read
How Bid-Ask Spreads Move Around Events on Polymarket
The spread is a read on uncertainty. With the high-frequency snapshot archive you can replay how it widened before an event and compressed after, and turn that measured pattern into better limit-order timing.
- Analytics8 min read
Build BTC Order Book Heatmaps From Historical Depth
A heatmap turns the full bid/ask ladder over time into a picture of where liquidity sits, and where it vanishes. Here is how to build one from historical depth snapshots.
- Analytics8 min read
Scoring Liquidity Across Prediction Markets
Not all markets are equally tradable. A simple liquidity score from spread and depth lets you rank markets and time execution for when the book is deepest.
- Analytics8 min read
Detecting Breakouts From the Order Book
A breakout is more believable when the book confirms it. Combine a price range break with depth and spread context to separate real moves from noise on prediction markets.
- Analytics8 min read
Measure the Effective Spread You Actually Pay on Polymarket
The quoted spread is best_ask minus best_bid. The effective spread is what trading really costs once size walks the book. Here is how to measure the second one from the snapshots.
- Analytics8 min read
Build a Liquidity Profile From Depth-at-Price
A liquidity profile shows how much size rests at each price level, where the walls are and how far you can trade before slippage. Here is how to build one from the bid and ask arrays.
- Analytics9 min read
Track the Depth Imbalance Ratio as a Time Series
A single imbalance reading is a snapshot of pressure. Tracking the bid/ask depth ratio as a rolling series turns it into regimes, persistent lean versus momentary spikes. Here is how to build and read it.
- Analytics9 min read
Measure Implied-Probability Volatility on Prediction Markets
The mid price is an implied probability that bounces between 0 and 1. Measuring its realized volatility, across timeframes, through quiet and active regimes, needs high-frequency snapshots and a little care.
- Analytics8 min read
Quote-Update Intensity as a Market-Activity Signal
How often the book changes is itself a signal. Because capture is event-driven, the cadence of updates measures churn, and bursts mark the moments the market woke up. Here is how to read it.
- Analytics7 min read
The 7-Day Market Summary: One Call, One Market’s Shape
The summary endpoint folds a market’s last seven days into a handful of aggregates, snapshot count, mid-price range, spread range, per-side breakdown. Here is when the quick read beats pulling raw snapshots, and what it can’t tell you.
- Analytics8 min read
Build a Spread-Widening Watch on Polymarket Order Books
Spread widening flags events and thinning liquidity before the price moves. Here is how to build a monitor, poll the live orderbook or stream the WebSocket, threshold against each market’s own baseline, and act on the alert yourself.
Research
Reproducible studies on how prediction markets actually behave.
- Research8 min read
How Prediction Markets Price In the Final Minutes Before Resolution
Short-dated BTC Up/Down contracts converge to 0 or 1 as the clock runs out. With millisecond snapshots and the spot price stamped on every record, the exact shape of that convergence becomes measurable.
- Research9 min read
Reading Adverse Selection Around Events Through the Spread
When informed traders show up, market makers defend by widening. Use the spread and depth response around scheduled events as a window into adverse selection on Polymarket.
- Research8 min read
How BTC, ETH, SOL & XRP Prediction Markets Move Together
BTC, ETH, SOL, and XRP Up/Down markets rarely move in isolation. Measuring their rolling correlation, and when it breaks, opens up rotation and relative-value ideas.
- Research8 min read
How Daily-Expiry Crypto Markets Behave Into Settlement
24-hour Up/Down markets carry overnight risk and a hard daily deadline. Studying how their odds and liquidity behave into settlement reveals patterns the 5-minute markets never show.
- Research9 min read
How Fast Prediction Markets Price In New Information
When something happens, how long until the order book agrees? Use high-frequency snapshots around scheduled events to measure the lag between an event and the book repricing.
- Research10 min read
Measuring Price-Discovery Efficiency on Polymarket
Does the market converge smoothly to the right probability, or overshoot and lag? Cross-reference implied probability with the spot reference and study realized outcomes across many resolved markets.
- Research9 min read
Identifying Thin-Liquidity Regimes in Prediction Markets
Overnight and low-activity hours bring wider spreads and shallower books. Here is how to identify those fragile regimes from spread and depth, and why they change how much you trust a signal.
- Research9 min read
How Sports Odds Move Into Kickoff and Through the Game
Watch NBA, NFL, EPL, and FIFA outcome probabilities drift before kickoff and swing during play, using ~2 Hz sports snapshots, pre-game line moves and in-game repricing in one record.
- Research10 min read
How FOMC and Payroll Markets Reprice Around the Release
FOMC rate decisions and nonfarm payrolls hit at a known minute. Watch the book before, at, and after the release, spread blow-out, recovery, and how bracket markets reshuffle, as an event study.
Data
What we capture, how to pull it, and how to join it.
- Data8 min read
Joining Polymarket Odds With Hyperliquid Perp Prices
Two venues price the same BTC move with completely different instruments. Time-aligned history lets you ask which one moves first, a price-discovery question you cannot answer with public data alone.
- Data9 min read
The Best Data for Backtesting Polymarket Trading Bots
A bot is only as good as the data it was tested on. Here is what a credible Polymarket backtest actually needs, full depth, honest timestamps, and resolved markets, and what to be wary of.
- Data8 min read
Multi-Timeframe Analysis on Prediction Markets
The same crypto market exists at four timeframes at once. Reading them together, fast for entries, slow for context, is one of the most reliable ways to filter noise.
- Data8 min read
Cross-Market Rotation: Which Crypto Market Leads
In a co-ordinated crypto move, one market usually moves first. Identifying the leader and the laggards turns a single signal into a rotational edge across BTC, ETH, SOL, and XRP.
- Data8 min read
Joining Hyperliquid Perp Books to the Spot Reference on Snapshots
Every Polymarket snapshot carries a spot price stamp; the Hyperliquid feed carries the perp L2 book. Joined on one UTC clock, you get two price views of the same underlying, here is the data structure of that join.
- Data8 min read
The Shape of the Multi-Asset Crypto Dataset
BTC, ETH, SOL and XRP across 5m, 15m, 1h and 1d markets, all keyed the same way, all the same snapshot fields. Here is how the dataset is structured so one loader can serve every asset and timeframe.
- Data8 min read
Sequence Numbers and Gap Detection in the Order-Book Stream
Every snapshot carries a sequence_number. It is how you verify you hold a complete, ordered series before you trust a backtest, and how you spot a dropped event instead of mistaking it for a quiet market.
- Data7 min read
Event vs Capture Timestamp: Two Clocks on Every Snapshot
Every snapshot carries event_timestamp and capture_timestamp. Their difference measures pipeline latency; the first is the clock you backtest on to avoid lookahead. Here is why preserving both matters.
- Data8 min read
A Tour of the Prediction-Market Categories We Capture
Crypto is one category of many. Sports, economics, weather, social and equities each have their own books and capture rates. Here is what is covered, how to enumerate it, and which tier unlocks what.

