Back to Trending
RepositoryPythonUSUnited States
Jon-Becker

Jon-Becker/prediction-market-analysis

A framework for collecting and analyzing prediction market data, including the largest publicly available dataset of Polymarket and Kalshi market and trade data.

4.0kstars
545forks
4issues
3views

Featured achievements

The project's latest awards

2
TINIX TRENDING·Topic: statistics

#2 Repository of the week

2
TINIX TRENDING·Topic: prediction-markets

#2 Repository of the week

2
TINIX TRENDING·Topic: kalshi

#2 Repository of the week

Prediction Market Analysis

A framework for analyzing prediction market data, including the largest publicly available dataset of Polymarket and Kalshi market and trade data. Provides tools for data collection, storage, and running analysis scripts that generate figures and statistics.

Overview

This project enables research and analysis of prediction markets by providing:

  • Pre-collected datasets from Polymarket and Kalshi
  • Data collection indexers for gathering new data
  • Analysis framework for generating figures and statistics

Currently supported features:

  • Market metadata collection (Kalshi & Polymarket)
  • Trade history collection via API and blockchain
  • Parquet-based storage with automatic progress saving
  • Extensible analysis script framework

Installation & Usage

Requires Python 3.9+. Install dependencies with uv:

uv sync

Download and extract the pre-collected dataset (36GiB compressed):

make setup

This downloads data.tar.zst from Cloudflare R2 Storage and extracts it to data/.

Data Collection

Collect market and trade data from prediction market APIs:

make index

This opens an interactive menu to select which indexer to run. Data is saved to data/kalshi/ and data/polymarket/ directories. Progress is saved automatically, so you can interrupt and resume collection.

Running Analyses

make analyze

This opens an interactive menu to select which analysis to run. You can run all analyses or select a specific one. Output files (PNG, PDF, CSV, JSON) are saved to output/.

Packaging Data

To compress the data directory for storage/distribution:

make package

This creates a zstd-compressed tar archive (data.tar.zst) and removes the data/ directory.

Project Structure

├── src/
│   ├── analysis/           # Analysis scripts
│   │   ├── kalshi/         # Kalshi-specific analyses
│   │   └── polymarket/     # Polymarket-specific analyses
│   ├── indexers/           # Data collection indexers
│   │   ├── kalshi/         # Kalshi API client and indexers
│   │   └── polymarket/     # Polymarket API/blockchain indexers
│   └── common/             # Shared utilities and interfaces
├── data/                   # Data directory (extracted from data.tar.zst)
│   ├── kalshi/
│   │   ├── markets/
│   │   └── trades/
│   └── polymarket/
│       ├── blocks/
│       ├── markets/
│       └── trades/
├── docs/                   # Documentation
└── output/                 # Analysis outputs (figures, CSVs)

Documentation

Contributing

If you'd like to contribute to this project, please open a pull-request with your changes, as well as detailed information on what is changed, added, or improved.

For more information, see the contributing guide.

Issues

If you've found an issue or have a question, please open an issue here.

Research & Citations

If you have used or plan to use this dataset in your research, please reach out via email or Twitter -- i'd love to hear about what you're using the data for! Additionally, feel free to open a PR and update this section with a link to your paper.

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
akfamily/akshare

AKShare is an elegant and simple financial data interface library for Python, built for human beings! 开源财经数据接口库

23.5k
Nov 25, 2026
RepositoryPython
YichengYang-Ethan/oracle3-prediction-market-agent

Oracle3: open-source trading engine and MCP server for prediction markets. Finds fee-adjusted no-arbitrage violations across related event contracts and trades them live on Kalshi, Polymarket and Solana, or on paper, under pre-trade risk limits. 13 MCP tools, JSON CLI, agent skills, 600+ tests.

573
Nov 25, 2026
RepositoryPython
CarlosIbCu/polymarket-kalshi-btc-arbitrage-bot

Real-time arbitrage bot detecting risk-free opportunities in Bitcoin 1-Hour Price markets between Polymarket and Kalshi

259
May 9, 2026
RepositoryPython
Synpath-ai/synpath

One open-source API for prediction markets. Trade Kalshi, Polymarket, Polymarket US and Opinion with one Python SDK: unified market data, smart order routing across venues, and advanced order types. Plus tick-level Kalshi order book history.

230
Nov 9, 2026
RepositoryTypeScript
alsk1992/CloddsBot

Open Source AI trading agent that operates autonomously across 1000+ markets - Polymarket, Kalshi, Binance, Hyperliquid, Solana DEXs, 5 EVM chains. Scans for edge, executes instantly, manages risk while you sleep. Agent commerce protocol for machine-to-machine payments. Self-hosted. Built on Claude.

3.1k
Nov 13, 2026
RepositoryTypeScript
pmxt-dev/pmxt

CCXT for prediction markets. PMXT is a unified API for trading on Polymarket, Kalshi, and more.

2.2k
Sep 30, 2026
Repository
aarora4/Awesome-Prediction-Market-Tools

A curated list of Prediction Market Tools - AI Agents, Analytics, APIs, Dashboards, Copy Trading, Alerting, Tracking and More!!

816
Oct 7, 2026
RepositoryRust
tarpboi/Prediction-Markets-Trading-Bot-Toolkits

Rust trading bots for prediction markets — Predict.fun, Polymarket, Kalshi, Limitless. Copy Trading is production-ready; nine more strategies in development on the same execution core. Dry-run by default, self-custody, MIT. Polymarket trading bot Polymarket copy trading bot Polymarket arbitrage trading bot

539
Nov 24, 2026
RepositoryJupyter Notebook
guzus/dr-manhattan

CCXT for prediction markets · #1 Open Source for Market-making, Trading, Data Analysis on Polymarket & Kalshi & Limitless & Opinion & Predictfun & etc

206
Jul 18, 2026