Datasets:
You need to agree to share your contact information to access this dataset
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
This dataset contains historical prediction market microstructure data. Access is gated to track usage and ensure compliance with data terms. Provide your contact information to request access.
Log in or Sign Up to review the conditions and access this dataset content.
Sayf Episodes: Prediction Market Microstructure Data for Agent Training
5,583 settled prediction market episodes with entry-time orderbook snapshots, executed trades with CLV (Closing Line Value) labels, and settlement outcomes across Kalshi and Polymarket.
Why this dataset exists
Teams building trading agents for prediction markets need structured historical data. The two options today are PredictionMarketBench (4 episodes) and raw API scraping. Neither provides historical orderbook depth at trade time, which is permanently lost if nobody captured it in real time.
Sayf captured it. Every episode includes the bid/ask/spread/depth at entry, the closing line at settlement, and the CLV grade (how much the entry price beat or missed the close). 468 episodes include actual executed trades with per-fill CLV.
What's in each episode
episode/
meta.json -- event metadata, category, venue, outcome, settlement
orderbook.parquet -- entry-time orderbook snapshot (bid, ask, spread, depth, liquidity bucket)
trades.parquet -- executed trades with CLV labels (may be empty)
meta.json fields
| Field | Type | Description |
|---|---|---|
| schema_version | int | Always 1 |
| event_id | string | Kalshi ticker or Polymarket condition ID |
| category | string | Market category (moneyline, totals, spread, soccer, tennis, etc.) |
| venue | string | kalshi or polymarket |
| timestamp | string | ISO 8601 observation timestamp |
| outcome | string | yes or no |
| settlement_price | float | Final closing mid price |
| closing_locked | bool | Whether the closing line was frozen before event start |
| clv_method | string | How the closing line was captured |
| event_start | string | When the underlying event began |
| entry_depth_dollars | float | Total dollar depth at entry |
| liquidity_bucket | string | thick (>$5K), medium ($500-$5K), thin (<$500), or unknown |
| trade_count | int | Number of executed trades on this ticker |
| has_trades | bool | Whether any trades were executed |
orderbook.parquet columns
| Column | Type | Description |
|---|---|---|
| timestamp | string | Observation time |
| bid | float | Best bid at entry |
| ask | float | Best ask at entry |
| mid | float | Midpoint at entry |
| spread | float | Bid-ask spread |
| depth_dollars | float | Total dollar depth |
| liquidity_bucket | string | thick / medium / thin / unknown |
| yes_depth_5lvl | float | Dollar depth on yes side (5 levels) |
| no_depth_5lvl | float | Dollar depth on no side (5 levels) |
| book_imbalance | float | Order book imbalance ratio |
| closing_bid | float | Bid at close |
| closing_ask | float | Ask at close |
| closing_mid | float | Mid at close (settlement reference) |
| closing_spread | float | Spread at close |
trades.parquet columns
| Column | Type | Description |
|---|---|---|
| timestamp | string | Trade execution time |
| side | string | Buy or sell side |
| price | float | Execution price |
| size | int | Contract count |
| clv_cents | float | CLV in cents (entry price minus closing line) |
| closing_mid_price | float | Closing mid used for CLV |
| outcome | string | Event outcome |
| category | string | Market category |
| entry_bid | float | Bid at trade time |
| entry_ask | float | Ask at trade time |
| entry_spread | float | Spread at trade time |
| entry_depth_dollars | float | Dollar depth at trade time |
| liquidity_bucket | string | Liquidity classification |
| clv_exec | float | Execution-adjusted CLV |
Dataset statistics
| Metric | Value |
|---|---|
| Total episodes | 5,583 |
| Episodes with trades | 468 |
| Venues | Kalshi (4,903), Polymarket (680) |
| Categories | 15 (moneyline, totals, spread, tennis, soccer, props, etc.) |
| Outcomes | yes: 2,444 / no: 3,139 |
| Liquidity | thick: 1,883 / medium: 1,936 / thin: 1,086 / unknown: 680 |
| Total size | ~90 MB |
| Format | Parquet + JSON |
| Collection period | Summer 2026 |
Quick start
import json
import pandas as pd
from pathlib import Path
# Load one episode
episode_dir = Path("episodes/KXMLBGAME-26AUG091610LADAZ-LAD")
meta = json.loads((episode_dir / "meta.json").read_text())
orderbook = pd.read_parquet(episode_dir / "orderbook.parquet")
trades = pd.read_parquet(episode_dir / "trades.parquet")
print(f"Category: {meta['category']}, Outcome: {meta['outcome']}")
print(f"Entry: bid={orderbook['bid'].iloc[0]:.3f}, ask={orderbook['ask'].iloc[0]:.3f}")
print(f"Trades: {len(trades)}")
Honest disclosure
Sayf's own trading track record on this data is negative: -4.3 cents mean CLV across taken trades. We are not selling signals or alpha. We are selling the environment. The CLV labels describe what happened structurally (did the entry beat the close?), not what you should trade.
The irreplaceable value is the historical orderbook depth. Kalshi does not publish historical L2 data. If nobody captured the bid/ask/depth at trade time, it is permanently gone. Sayf captured it continuously during the collection period.
Computed labels (CLV, liquidity buckets) are mechanically reproducible from public tape. The raw orderbook snapshots are not.
Citation
If you use this dataset in research, please cite:
@dataset{sayf_episodes_2026,
title={Sayf Episodes: Prediction Market Microstructure Data for Agent Training},
author={Khan, Sadaf},
year={2026},
url={https://huggingface.co/datasets/sadaftkhan/sayf-episodes}
}
License
This dataset is provided under a custom license. See LICENSE for terms. The data may not be redistributed without permission.
Contact
- Downloads last month
- 6