ElSancho commited on
Commit
e07cc0f
·
verified ·
1 Parent(s): 3f4059d

Replace synthetic sample with the real 2024 presidential tape (parquet)

Browse files
README.md CHANGED
@@ -2,153 +2,186 @@
2
  language:
3
  - en
4
  license: apache-2.0
 
 
 
 
 
5
  tags:
6
  - polymarket
7
  - prediction-markets
8
  - quantitative-finance
9
- - market-data
10
- - orderbook
11
- - crypto
12
- pretty_name: "CrowdIntel Polymarket Historical Fills & Order Book Data"
 
 
 
 
 
 
13
  ---
14
 
15
- # Polymarket Historical Market Data (Free Research Benchmark)
16
 
17
- [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
18
- [![Data Format: Apache Parquet](https://img.shields.io/badge/Format-Apache%20Parquet-orange.svg)](https://parquet.apache.org/)
19
- [![Database: CrowdIntel](https://img.shields.io/badge/Catalog-crowdintel.xyz%2Fdata-green.svg)](https://crowdintel.xyz/data)
20
- [![Ecosystem: Agent Kit](https://img.shields.io/badge/Tools-polymarket--agent--kit-blueviolet.svg)](https://github.com/crowdintel-xyz/polymarket-agent-kit)
21
 
22
- > ⚠️ **You are viewing the Free Research Benchmark (10k Fills & 5k Order Book Snapshots).**
23
- > Looking for the complete 1.88 Billion fill tape, historical orderbook archives, or automated weekly delta sync?
24
- > 👉 **[Explore the Full Commercial Data Store at crowdintel.xyz/data →](https://crowdintel.xyz/data)**
25
 
26
- ---
27
-
28
- ## 1. Why This Dataset Exists
29
-
30
- In February 2026, Polymarket deprecated its official historical order book API (`/orderbook-history`). Quant researchers, bot builders, and market makers were left without historical tick-level depth or trade execution tapes.
31
-
32
- CrowdIntel indexes every Polygon PoS block and records continuous WebSocket order book feeds into ClickHouse. This repository provides **two verified benchmark samples** in zero-copy Apache Parquet:
33
-
34
- 1. **Trade Execution Fills (`data/sample_fills.parquet` & `.csv`)**: For whale forensics, volume profiling, and flow analytics.
35
- 2. **Continuous L2 Order Book Depth (`data/sample_orderbooks.parquet` & `.csv`)**: For market-making simulation, spread dynamics, and execution slippage modeling.
36
-
37
- ---
38
 
39
- ## 2. Free Benchmark vs. Commercial Data Store
 
 
 
 
 
 
 
 
 
 
40
 
41
- | Capability | Free Benchmark (This Repo) | Commercial Data Store (`crowdintel.xyz/data`) |
42
- | :--- | :--- | :--- |
43
- | **Historical Range** | 1 Closed Market (2024 Presidential Election) | **Complete 2020–Present History (2,130,000+ Markets)** |
44
- | **Total Trade Fills** | 10,000 executed fills | **1,880,000,000+ Fills (Complete Tick-Level Tape)** |
45
- | **Order Book Depth** | 5,000 BTC 5-min snapshots | **Continuous L2 snapshots across all active liquid markets** |
46
- | **Whale Intelligence** | None | **3.06M Scored Wallets (PnL, FDR q-values, Sybil cluster graphs)** |
47
- | **Data Delivery** | Direct Git / Parquet download | **Signed Cloudflare R2 URLs + High-Speed Direct S3** |
48
- | **Data Updates** | None (Static benchmark) | **Automated Weekly Delta Sync via REST API** |
49
- | **AI Agent Tooling** | Manual Python scripts | **Official MCP Server for Claude Desktop & Cursor** |
50
- | **Commercial License** | Personal / Academic Research | **Commercial Redistribution & Algorithmic Trading Allowed** |
51
- | **Pricing** | **$0 (Free)** | **$79 Packs · $99/mo All-Access · $299 Master Buyout** |
52
-
53
- 👉 **[Browse Available Category Slices on the Commercial Data Store →](https://crowdintel.xyz/data)**
54
-
55
- ---
56
 
57
- ## 3. What is Inside the Benchmark Datasets
 
 
 
58
 
59
- ### A. Closed-Event Trade Tape (`data/sample_fills.parquet`)
60
- * **10,000 fills** from market inception to final resolution settlement for the **2024 US Presidential Election (Trump vs. Harris)**.
61
- * **Columns:** `timestamp`, `tx_hash`, `condition_id`, `market_slug`, `category`, `side`, `price`, `size`, `bet_value`, `maker_address`, `taker_address`, `outcome`.
62
- * **Primary Use Cases:**
63
- * **Whale Tracking:** Trace early accumulation patterns and smart-money divergence.
64
- * **Volume Profiling:** Compute volume-weighted average price (VWAP) across outcome tokens.
65
- * **Settlement Backtesting:** Verify trading strategy returns against actual contract payoffs.
66
 
67
- ### B. High-Frequency Order Book Snapshots (`data/sample_orderbooks.parquet`)
68
- * **5,000 continuous snapshots** for **BTC 5-Minute prediction markets**.
69
- * **Columns:** `ts`, `token_id`, `condition_id`, `market_slug`, `best_bid`, `best_ask`, `mid`, `spread`, `bid_depth_usd`, `ask_depth_usd`, `bids_json`, `asks_json`.
70
- * **Primary Use Cases:**
71
- * **Market Making:** Simulate limit-order queue positioning and spread capture.
72
- * **Slippage Modeling:** Quantify expected market impact on large orders during volatility shocks.
73
- * **Latency Arbitrage:** Backtest reaction times to spot CEX price movements.
74
 
75
- ---
76
 
77
- ## 4. Quickstart (< 5 Lines of Code)
78
 
79
- Query billions of rows in memory without configuring a database:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
 
81
- ### Query Trade Tape (VWAP & Outcome Volume) with DuckDB
82
  ```python
83
  import duckdb
84
 
85
  con = duckdb.connect()
86
- df = con.execute("""
87
- SELECT
88
- time_bucket(INTERVAL '1 hour', to_timestamp(timestamp / 1000)) AS window_1h,
89
- outcome,
90
- COUNT(*) AS fills,
91
- ROUND(SUM(bet_value), 2) AS volume_usd,
92
- ROUND(SUM(price * size) / SUM(size), 4) AS vwap
93
- FROM 'data/sample_fills.parquet'
 
 
 
94
  GROUP BY 1, 2
95
- ORDER BY window_1h DESC
96
- """).df()
97
-
98
- print(df)
99
  ```
100
 
101
- ### Query Order Book Spreads & Depth with DuckDB
102
- ```python
103
- import duckdb
104
 
105
- con = duckdb.connect()
106
- books_df = con.execute("""
107
- SELECT
108
- to_timestamp(ts / 1000) AS time_utc,
109
- best_bid,
110
- best_ask,
111
- ROUND(spread, 4) AS spread,
112
- ROUND(bid_depth_usd, 2) AS bid_depth,
113
- ROUND(ask_depth_usd, 2) AS ask_depth
114
- FROM 'data/sample_orderbooks.parquet'
115
- WHERE spread > 0.005
116
- ORDER BY ts DESC
117
- LIMIT 10
118
- """).df()
119
-
120
- print(books_df)
121
- ```
122
 
123
- ---
 
 
 
 
 
 
 
 
124
 
125
- ## 5. Commercial Offerings Ladder
126
 
127
- For teams building production bots or conducting institutional research:
 
 
 
 
 
 
 
 
 
128
 
129
- | Offering | Coverage | Format | Price | Delivery |
130
- | :--- | :--- | :--- | :--- | :--- |
131
- | **US Politics & Policy** | 2020–2026 Presidential, Senate & Policy markets | Parquet (~7.5 GB) | **$79** one-time | Signed R2 link |
132
- | **Crypto & High-Freq** | 5m/15m BTC/ETH markets + TWAP settlement series | Parquet (~11 GB) | **$79** one-time | Signed R2 link |
133
- | **Sports & Culture** | Full resolved soccer, NBA, NFL, and esports markets | Parquet (~14 GB) | **$79** one-time | Signed R2 link |
134
- | **Whale & Bot Intelligence** | 3.06M scored wallets: PnL, FDR q-values, sybils | Parquet (~3 GB) | **$149** one-time | Signed R2 link |
135
- | **⭐ All-Access Terminal** | **1.88B master archive + weekly delta sync + API** | API / Parquet | **$99 / month** | REST / Curl token |
136
- | **Master Archive Buyout** | Complete 1.88B historical database (2020–present) | Parquet (~42 GB) | **$299** one-time | Direct S3 dump |
137
 
138
- 👉 **[Purchase Datasets or Subscriptions at crowdintel.xyz/data →](https://crowdintel.xyz/data)**
 
 
 
 
 
 
 
 
139
 
140
- ---
141
 
142
- ## 6. Bespoke Market Cuts & Lead Inquiries
143
 
144
- Need a custom slice (e.g. French Presidential Election, Fed Interest Rate cuts, or specific DeFi markets)? Don't waste weeks scraping.
 
 
 
 
 
 
 
145
 
146
- * **Email:** `data@crowdintel.xyz` (Custom Parquet extracts delivered within 2 hours)
147
- * **Telegram:** [@CrowdIntel](https://t.me/crowdintel)
148
- * **Official AI Agent Kit:** [`crowdintel-xyz/polymarket-agent-kit`](https://github.com/crowdintel-xyz/polymarket-agent-kit) (Model Context Protocol server for Claude & Cursor)
149
 
150
- ---
 
 
151
 
152
- ## License
153
 
154
- Apache 2.0. Curated by the CrowdIntel Quantitative Engineering Team.
 
 
 
2
  language:
3
  - en
4
  license: apache-2.0
5
+ size_categories:
6
+ - 1M<n<10M
7
+ task_categories:
8
+ - time-series-forecasting
9
+ - tabular-classification
10
  tags:
11
  - polymarket
12
  - prediction-markets
13
  - quantitative-finance
14
+ - backtesting
15
+ - parquet
16
+ - order-flow
17
+ - event-markets
18
+ pretty_name: "Polymarket Fills — 2024 US Presidential Election (complete closed-event tape)"
19
+ configs:
20
+ - config_name: fills
21
+ data_files: fills_2024_us_presidential.parquet
22
+ - config_name: markets
23
+ data_files: markets.parquet
24
  ---
25
 
26
+ # Polymarket Fills — 2024 US Presidential Election
27
 
28
+ The complete on-chain fill tape for the two Polymarket markets that resolved the 2024 US
29
+ Presidential Election, in one Apache Parquet file. Every executed fill from market creation to
30
+ settlement, with the transaction hash, outcome token, wallet, price, and size.
 
31
 
32
+ This is a free research extract from [CrowdIntel](https://crowdintel.xyz/data), which maintains the
33
+ full Polymarket tape (1.9B+ fills) and the reconciled wallet graph behind it.
 
34
 
35
+ ## At a glance
 
 
 
 
 
 
 
 
 
 
 
36
 
37
+ | | |
38
+ | :--- | :--- |
39
+ | **Fills** | 7,655,166 |
40
+ | **Markets** | 2 (both resolved) |
41
+ | **Wallets** | 218,699 distinct proxy wallets |
42
+ | **Outcome tokens** | 4 |
43
+ | **Volume** | $2,388,138,669.46 (sum of `bet_value`) |
44
+ | **Coverage** | 2024-01-04 20:36:24 UTC → 2024-11-06 12:07:20 UTC |
45
+ | **Format** | Parquet, zstd, 1M-row groups |
46
+ | **Size** | ~238 MB |
47
+ | **License** | Apache-2.0 |
48
 
49
+ Markets included:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
+ | Market | Condition ID | Fills | Resolved |
52
+ | :--- | :--- | ---: | :--- |
53
+ | Will Donald Trump win the 2024 US Presidential Election? | `0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917` | 4,963,530 | **Yes** |
54
+ | Will Kamala Harris win the 2024 US Presidential Election? | `0xc6485bb7ea46d7bb89beb9c91e7572ecfc72a6273789496f78bc5e989e4d1638` | 2,691,636 | **No** |
55
 
56
+ ## Files
 
 
 
 
 
 
57
 
58
+ | File | Rows | Description |
59
+ | :--- | ---: | :--- |
60
+ | `fills_2024_us_presidential.parquet` | 7,655,166 | One row per executed fill |
61
+ | `markets.parquet` | 2 | Market metadata + on-chain resolution |
 
 
 
62
 
63
+ ## Schema
64
 
65
+ ### `fills_2024_us_presidential.parquet`
66
 
67
+ | Column | Type | Description |
68
+ | :--- | :--- | :--- |
69
+ | `timestamp_ms` | int64 | Fill time, Unix epoch milliseconds (UTC) |
70
+ | `tx_hash` | string | Polygon transaction hash, with the fill index as `-<n>` suffix |
71
+ | `condition_id` | string | CTF condition id (market key) |
72
+ | `market_slug` | string | Polymarket market slug |
73
+ | `token_id` | string | ERC-1155 outcome token id (uint256, decimal string) |
74
+ | `side` | string | `BUY` or `SELL` |
75
+ | `outcome` | string | Outcome leg the token represents (`Yes` / `No`) |
76
+ | `price` | double | Execution price, 0–1 |
77
+ | `size` | double | Shares traded |
78
+ | `bet_value` | double | USD notional (`price × size`) |
79
+ | `proxy_wallet` | string | Lowercase 0x-address whose position changed |
80
+
81
+ ### `markets.parquet`
82
+
83
+ | Column | Type | Description |
84
+ | :--- | :--- | :--- |
85
+ | `condition_id` | string | CTF condition id |
86
+ | `slug` | string | Polymarket market slug |
87
+ | `title` | string | Market question |
88
+ | `category` | string | Polymarket category |
89
+ | `end_date_ms` | int64 | Scheduled market end, epoch ms |
90
+ | `resolved_outcome` | string | Winning outcome (`Yes` / `No`) |
91
+ | `resolved_at_ms` | int64 | On-chain resolution time, epoch ms |
92
+ | `final_price` | double | Final YES price |
93
+ | `fill_count` | int64 | Fills in this file |
94
+ | `volume_usd` | double | Total `bet_value` |
95
+ | `first_fill_ms` | int64 | First fill in this file |
96
+ | `last_fill_ms` | int64 | Last fill in this file |
97
+
98
+ ## Quickstart
99
+
100
+ ```bash
101
+ pip install duckdb
102
+ ```
103
 
 
104
  ```python
105
  import duckdb
106
 
107
  con = duckdb.connect()
108
+ FILLS = "hf://datasets/Crowdintel/polymarket-historical-data/fills_2024_us_presidential.parquet"
109
+
110
+ # Hourly volume and VWAP around election night
111
+ con.sql(f"""
112
+ SELECT date_trunc('hour', to_timestamp(timestamp_ms / 1000)) AS hour,
113
+ outcome,
114
+ count(*) AS fills,
115
+ round(sum(bet_value), 0) AS volume_usd,
116
+ round(sum(price * size) / sum(size), 4) AS vwap
117
+ FROM read_parquet('{FILLS}')
118
+ WHERE timestamp_ms >= epoch_ms(TIMESTAMP '2024-11-05 00:00:00')
119
  GROUP BY 1, 2
120
+ ORDER BY 1 DESC
121
+ """).show()
 
 
122
  ```
123
 
124
+ `hf://` reads only the row groups the query touches, so this is fast without downloading the file.
125
+ To work offline, download the parquet with `huggingface_hub.hf_hub_download("Crowdintel/polymarket-historical-data", "fills_2024_us_presidential.parquet", repo_type="dataset")`.
 
126
 
127
+ Runnable end-to-end example: [quickstart.py](https://github.com/crowdintel-xyz/polymarket-historical-data/blob/main/quickstart.py).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
 
129
+ ## Provenance
130
+
131
+ - Source: Polymarket CTF `OrderFilled` events on Polygon, indexed by CrowdIntel from the exchange
132
+ contracts and joined to Gamma market metadata and on-chain resolution.
133
+ - `tx_hash` is unique across the file (one row per fill). The file is sorted by `timestamp_ms`.
134
+ - First and last fills, row counts, and volume in the table above were computed from the published
135
+ file, not from an estimate.
136
+ - Resolution rows come from `market_outcomes`, populated from the on-chain condition resolution,
137
+ not from an off-chain leaderboard.
138
 
139
+ Independent checks a reviewer can run:
140
 
141
+ ```python
142
+ # No duplicate fills
143
+ con.sql(f"SELECT count(*) - count(DISTINCT tx_hash) AS dupes FROM read_parquet('{FILLS}')").show()
144
+ # Every fill sits inside the market's trading window
145
+ con.sql(f"""
146
+ SELECT count(*) FROM read_parquet('{FILLS}')
147
+ WHERE timestamp_ms < epoch_ms(TIMESTAMP '2024-01-04 20:36:24')
148
+ OR timestamp_ms > epoch_ms(TIMESTAMP '2024-11-06 12:07:20')
149
+ """).show()
150
+ ```
151
 
152
+ ## Known limitations
 
 
 
 
 
 
 
153
 
154
+ - **Two markets, not the whole exchange.** This is a closed-event extract chosen for end-to-end
155
+ backtesting, not a sample of all Polymarket activity.
156
+ - **No maker/taker split.** Polymarket fills a maker order against a taker; the public tape records
157
+ the wallet whose position changed (`proxy_wallet`). It does not attribute the resting side.
158
+ - **No order book history.** L2 snapshots are not part of this release. Do not infer depth from fills.
159
+ - **`market_slug` repeats per row** so the file is self-contained. Join `markets.parquet` for
160
+ metadata rather than parsing the slug.
161
+ - **Prices are floats.** They come from the CLOB's fixed-point prices; values are exact to the
162
+ tick, not the original integer representation.
163
 
164
+ ## License
165
 
166
+ Apache-2.0. Attribution to CrowdIntel is required for redistribution; a citation is appreciated:
167
 
168
+ ```bibtex
169
+ @dataset{crowdintel_polymarket_2024,
170
+ title = {Polymarket Fills — 2024 US Presidential Election},
171
+ author = {CrowdIntel},
172
+ year = {2026},
173
+ url = {https://huggingface.co/datasets/Crowdintel/polymarket-historical-data}
174
+ }
175
+ ```
176
 
177
+ ## Need more than one election?
 
 
178
 
179
+ CrowdIntel maintains the full tape (1.9B+ fills, 2.2M+ resolved markets) plus the reconciled wallet
180
+ graph: PnL after NegRisk unwrapping, shrinkage-adjusted win rates, and funding-cluster ids.
181
+ API, ClickHouse pipes, and weekly delta drops: [crowdintel.xyz/data](https://crowdintel.xyz/data).
182
 
183
+ ## Changelog
184
 
185
+ - **2026-10-19** — Replaced the synthetic sample with the real closed-event tape (7.65M fills) in
186
+ Parquet, added `markets.parquet`, corrected every claim on this card, removed the synthetic
187
+ order-book subset.
fills_2024_us_presidential.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a639f69f2d9fb4612e028b814985c228659b24b9fc3cdc883d7e860ba1d47941
3
+ size 238372149
markets.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ac06c9d198f75e2b332c6aef28bf54f9c2dab00bb75ebb97f950c12ab5b437a
3
+ size 2731
sample_fills.csv DELETED
The diff for this file is too large to render. See raw diff
 
sample_orderbooks.csv DELETED
The diff for this file is too large to render. See raw diff