Prediction Market Analysis
Open-source Kalshi and Polymarket dataset, indexers and analysis scripts.
by Jonathan Becker
Last updated
What it is
A Python research framework with a large pre-collected dataset attached. The repository holds three things that are usually separate: indexers that pull market metadata and trade history from Kalshi's API and from Polymarket's API and the Polygon chain, a Parquet store with a documented schema for both venues, and an analysis harness whose scripts write figures and statistics to an output directory as PNG, PDF, CSV and JSON.
The reason it exists is the companion paper, "The Microstructure of Wealth Transfer in Prediction Markets", published on the author's own site on 18 January 2026 with a formalised version on SSRN dated 1 August 2026. That paper's Kalshi dataset runs from June 2021 to November 2025 and is described as 72.1 million trades covering 18.26 billion dollars of volume across 7.68 million markets. The repository's README carries a bibliography of thirteen papers that cite or use the data, which is the most useful liveness signal it has: this is research infrastructure with readers, not a hobby export.
For the kind of question a dashboard cannot answer — how a price moved into a resolution across thousands of markets, who was on the other side, how two venues priced the same event — this is the cheapest available starting point, because somebody else already paid the collection cost.
Availability
Nothing to sign up for, no key, no account, no venue relationship. Python 3.9 or newer, uv for
dependencies, and disk: the archive is about 36 GiB compressed before extraction, which is the
practical gate rather than any jurisdictional one.
The code is MIT-licensed — checked in the repository's LICENSE file on 19 September 2026, which reads "MIT License, Copyright (c) 2026 Jonathan Becker". Note what that does not cover: the research page describing the dataset states no licence for the data itself, and the venues' own terms govern what you may do with material collected from their APIs. If you are redistributing rather than analysing, that is a question to settle before you start.
Pricing
Free, and there is nothing for sale beside it — no hosted tier, no paid dataset, no support contract on offer. Checked against the repository on 19 September 2026.
Markets & resolution
Nothing here resolves anything; the dataset records what Kalshi and Polymarket resolved. The Kalshi
market schema carries a result column of yes, no or empty, together with status as open,
closed or finalized, so a resolved outcome is a field rather than an inference. Prices are
Kalshi's cents, 1 to 99, with the note in the schema documentation that a no_price is always 100
minus the yes_price.
The two venues are in one repository but not in one table. Kalshi's trade rows carry a taker side; Polymarket's are assembled from its API and from Polygon blocks. Joining an event across the two is work the framework leaves to you, and it is where most of the interesting questions live.
Integrations
Not an integration surface: there is no API to call, no WebSocket, no MCP server and no hosted
anything. You import the package, or you run make index and make analyze and pick from an
interactive menu. Outputs land in output/ as files. The documented extension point is a new
analysis script, and the repository ships a guide for writing one.
Limitations
It is a snapshot, and the distribution is not versioned. There are no tagged releases and no tags at all on the repository as of 19 September 2026, so "which vintage of the data do you have" has no answer beyond the day you downloaded it.
The recent commit history is bibliography, not code. The latest commits on the default branch — 10 August, 7 August, 1 August and 25 July 2026 — all add citing papers to the README. The repository is not archived and has 6 open issues, but a reader choosing it should know that what has moved recently is the reading list.
The Kalshi dataset behind the paper ends in November 2025. Anything after that you collect yourself, against APIs that have changed since, and the card cannot tell you whether the indexers still match them.
No order books. Trade executions and market metadata, not depth. Microstructure questions that need the book at a point in time cannot be answered from this data alone.
36 GiB compressed is a real cost. Extracted it is larger, and the packaging step deletes the data directory when it re-archives, which is worth reading twice before running it on the only copy you have.
Alternatives
Polymarket dashboards on Dune answers similar questions in SQL over the Polymarket half only, without a download. For live rather than historical data, the Kalshi API and the Polymarket CLOB API are the first-party sources this framework's indexers call, and Adjacent sells the cross-venue version as a service.
Specs
- Interfaces
- Python
- Export
- Parquet, CSV, JSON, PDF
- Available in
- Global
- KYC required
- No
- Market subjects
- —
- Resolved by
- Resolves nothing
- Maker fee
- None
- Platforms
- Library, CLI
- AI features
- None
- Capabilities
- Charting, Cross venue
- Pricing verified
- Availability verified
Background
How this part of the sector works, rather than which product to pick.
- What wallet tracking shows, and what it cannot — A Polymarket fill is a public transaction and a regulated exchange position is not, so wallet analytics exist on one venue and not the other.
- Where weather data comes from and what you may do with it — Observations, model output and archives are three products with three licences. The forecast is the cheap half; a clean observation history is not.
- Why the same contract costs two different prices on two venues — Two venues quoting one outcome are quoting two contracts. What the gap between the prices is made of - rules, fallbacks, fees, collateral, exits, eligibility.
Also worth comparing
- Artemis prediction-market metrics — Daily volume, open interest and fees across thirteen event venues, with methodology.
- Lychee — No-code queries, charts and backtests over Kalshi and Polymarket history.
- Polymarket Analytics — Third-party Polymarket wallet, trader and market analytics, free to browse.
- Brier.fyi — Brier scores and letter grades for matched questions across four platforms.
- Airavat — Trader scoring, filters and paper-trading pods over Polymarket. Invite-only.
- Convexly — Polymarket wallet diagnostics with published methods, intervals and failed tests.
FAQ
What is actually in the dataset?
Parquet files under data/kalshi and data/polymarket — market metadata and trade executions for both venues, plus Polygon blocks for Polymarket. The documented Kalshi trade schema carries trade id, ticker, contract count, yes price in cents, taker side and timestamp; the market schema carries bids, asks, last price, volume, 24-hour volume, open interest and the settled result.
Do I have to collect the data myself?
No. A make target downloads a pre-collected archive of roughly 36 GiB compressed from the author's own object storage and extracts it. Indexers are included for collecting new data from the Kalshi API and from Polymarket's API and the chain, with progress saved so a run can be interrupted and resumed.
Is this a live feed?
No, and that is the main thing to understand before choosing it. What ships is a snapshot plus the indexers that produced it; keeping it current means running the collectors yourself. If you need prices now rather than history, a data API is the other shape of answer.