Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- tabular-classification
|
| 5 |
+
- time-series-forecasting
|
| 6 |
+
tags:
|
| 7 |
+
- prediction-markets
|
| 8 |
+
- kalshi
|
| 9 |
+
- finance
|
| 10 |
+
- trading
|
| 11 |
+
- event-contracts
|
| 12 |
+
size_categories:
|
| 13 |
+
- 100M<n<1B
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# Kalshi Prediction Market Trades & Markets
|
| 17 |
+
|
| 18 |
+
Complete public trade-level and market-level data from [Kalshi](https://kalshi.com), the first CFTC-regulated prediction market exchange in the United States.
|
| 19 |
+
|
| 20 |
+
## Dataset Summary
|
| 21 |
+
|
| 22 |
+
| | Count | Timespan |
|
| 23 |
+
|---|---|---|
|
| 24 |
+
| **Trades** | 154,505,005 | June 2021 – January 2026 |
|
| 25 |
+
| **Markets** | 17,464,713 | June 2021 – January 2026 |
|
| 26 |
+
| **Events** | 4,721,915 | |
|
| 27 |
+
| **Total contracts traded** | 34.6 billion | |
|
| 28 |
+
|
| 29 |
+
## Data Files
|
| 30 |
+
|
| 31 |
+
### `trades/`
|
| 32 |
+
|
| 33 |
+
16 parquet shards (~10M rows each), sorted by `created_time`.
|
| 34 |
+
|
| 35 |
+
| Column | Type | Description |
|
| 36 |
+
|---|---|---|
|
| 37 |
+
| `trade_id` | string | Unique trade identifier |
|
| 38 |
+
| `ticker` | string | Market ticker (joins to `markets.ticker`) |
|
| 39 |
+
| `count` | int64 | Number of contracts in the trade |
|
| 40 |
+
| `yes_price` | int64 | Price of YES contracts (1–99 cents) |
|
| 41 |
+
| `no_price` | int64 | Price of NO contracts (1–99 cents) |
|
| 42 |
+
| `taker_side` | string | Side the taker bought: `yes` or `no` |
|
| 43 |
+
| `created_time` | timestamp[us, UTC] | When the trade occurred |
|
| 44 |
+
|
| 45 |
+
### `markets/`
|
| 46 |
+
|
| 47 |
+
4 parquet shards (~5M rows each).
|
| 48 |
+
|
| 49 |
+
| Column | Type | Description |
|
| 50 |
+
|---|---|---|
|
| 51 |
+
| `ticker` | string | Unique market ticker |
|
| 52 |
+
| `event_ticker` | string | Parent event ticker (groups related markets) |
|
| 53 |
+
| `market_type` | string | Market type (e.g. `binary`) |
|
| 54 |
+
| `title` | string | Human-readable market title |
|
| 55 |
+
| `yes_sub_title` | string | Label for the YES side |
|
| 56 |
+
| `no_sub_title` | string | Label for the NO side |
|
| 57 |
+
| `status` | string | Market status: `settled`, `closed`, `active`, etc. |
|
| 58 |
+
| `yes_bid` | int64 | Best YES bid at time of fetch |
|
| 59 |
+
| `yes_ask` | int64 | Best YES ask at time of fetch |
|
| 60 |
+
| `no_bid` | int64 | Best NO bid at time of fetch |
|
| 61 |
+
| `no_ask` | int64 | Best NO ask at time of fetch |
|
| 62 |
+
| `last_price` | int64 | Last traded price |
|
| 63 |
+
| `volume` | int64 | Lifetime volume (contracts) |
|
| 64 |
+
| `volume_24h` | int64 | 24-hour volume |
|
| 65 |
+
| `open_interest` | int64 | Open interest |
|
| 66 |
+
| `result` | string | Resolution: `yes`, `no`, or empty if unresolved |
|
| 67 |
+
| `created_time` | timestamp | When the market was created |
|
| 68 |
+
| `open_time` | timestamp | When the market opened for trading |
|
| 69 |
+
| `close_time` | timestamp | When the market closed |
|
| 70 |
+
|
| 71 |
+
## Usage
|
| 72 |
+
|
| 73 |
+
```python
|
| 74 |
+
from datasets import load_dataset
|
| 75 |
+
|
| 76 |
+
ds = load_dataset("TrevorJS/kalshi-trades")
|
| 77 |
+
|
| 78 |
+
# or with DuckDB
|
| 79 |
+
import duckdb
|
| 80 |
+
con = duckdb.connect()
|
| 81 |
+
con.execute("SELECT * FROM 'hf://datasets/TrevorJS/kalshi-trades/trades/*.parquet' LIMIT 10")
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
## Data Quality
|
| 85 |
+
|
| 86 |
+
- **0 duplicate trades** (21,950 duplicates removed during cleaning)
|
| 87 |
+
- **0 null trade IDs or prices**
|
| 88 |
+
- **100% trade-to-market join coverage** (64 orphan tickers with no API-available market record were removed; 1,258 trades dropped, <0.001% of dataset)
|
| 89 |
+
- All timestamps are UTC
|
| 90 |
+
|
| 91 |
+
## Provenance
|
| 92 |
+
|
| 93 |
+
Trade data was collected from the [Kalshi public API](https://trading-api.readme.io/reference/getmarkettrades). Market metadata was backfilled using the `/markets` batch ticker endpoint. The dataset combines data originally collected by [Andrew Becker](https://huggingface.co/datasets/andrewbecker/kalshi_trades) (June 2021 – November 2025) with an incremental update through January 2026.
|
| 94 |
+
|
| 95 |
+
## Acknowledgments
|
| 96 |
+
|
| 97 |
+
- [Andrew Becker](https://huggingface.co/andrewbecker) for the original `kalshi_trades` dataset and collection infrastructure
|
| 98 |
+
- [Kalshi](https://kalshi.com) for providing a public API
|
| 99 |
+
|
| 100 |
+
## License
|
| 101 |
+
|
| 102 |
+
CC-BY-4.0
|