Solal9 commited on
Commit
c17800c
·
verified ·
1 Parent(s): bc13bbf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +207 -1
README.md CHANGED
@@ -1,3 +1,209 @@
1
  ---
2
- license: unknown
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ license: cc-by-4.0
5
+ task_categories:
6
+ - time-series-forecasting
7
+ tags:
8
+ - prediction-markets
9
+ - polymarket
10
+ - cryptocurrency
11
+ - bitcoin
12
+ - ethereum
13
+ - binary-options
14
+ - finance
15
+ - market-microstructure
16
+ pretty_name: Polymarket Crypto Up/Down Binary Markets by Kresmion.com
17
+ size_categories:
18
+ - 1M<n<10M
19
  ---
20
+
21
+ # Polymarket Crypto Up/Down Binary Markets
22
+
23
+ Historical orderbook and market snapshot data from Polymarket's short-duration binary "Up or Down" prediction markets for BTC, ETH, SOL, and XRP. Collected continuously over approximately two months at 60-second polling intervals.
24
+
25
+ This dataset captures something genuinely uncommon in publicly available crypto data: minute-resolution implied probabilities for 5-minute, 15-minute, hourly, and daily directional outcomes, with full top-of-book pricing and 5-level orderbook depth.
26
+
27
+ This dataset was collected while building [Kresmion](https://kresmion.com), a financial intelligence platform
28
+ ## What's in this dataset
29
+
30
+ **4 assets:** BTC, ETH, SOL, XRP
31
+ **4 timeframes:** 5m, 15m, 1h, 1d (1h and 1d markets are BTC-only on Polymarket)
32
+ **Total markets covered:** thousands of resolved binary markets
33
+ **Collection cadence:** 60-second polls
34
+ **Time period:** [FILL IN: e.g. 2026-03-14 to 2026-05-20, with documented gaps]
35
+
36
+ Two files per asset-timeframe pair:
37
+
38
+ - **`<asset>_<timeframe>_snapshots.parquet`** — one row per poll: market metadata, top-of-book pricing, implied probability, depth summary, market-wide volume and liquidity
39
+ - **`<asset>_<timeframe>_orderbook.parquet`** — one row per orderbook level per poll: full 5-level depth on both sides with cumulative size and USDC value
40
+
41
+ ## Schema
42
+
43
+ ### Snapshots
44
+
45
+ | Column | Type | Description |
46
+ |---|---|---|
47
+ | `collection_timestamp_utc` | datetime | When this row was collected |
48
+ | `market_id` | string | Polymarket internal market identifier |
49
+ | `event_id` | string | Parent event identifier |
50
+ | `condition_id` | string | Polymarket condition identifier (used on the CLOB) |
51
+ | `slug` | string | Human-readable market slug, e.g. `btc-updown-5m-1773315900` |
52
+ | `asset` | string | `btc`, `eth`, `sol`, `xrp` |
53
+ | `question` | string | Full market question text |
54
+ | `description` | string | Market description from Polymarket |
55
+ | `market_category` | string | Polymarket category tag |
56
+ | `window_start_unix` | int | Unix timestamp of the prediction window start |
57
+ | `window_start_utc` | datetime | Window start in UTC |
58
+ | `window_end_utc` | datetime | Window end in UTC |
59
+ | `end_time` | datetime | Market end as reported by Gamma API |
60
+ | `resolution_time` | datetime | UMA resolution time from Gamma API |
61
+ | `active_status` | bool | Whether the market was active at collection time |
62
+ | `closed_status` | bool | Whether the market was closed at collection time |
63
+ | `market_type` | string | `5m`, `15m`, `1h`, `1d` |
64
+ | `outcomes` | json | Outcome labels, e.g. `["Up","Down"]` |
65
+ | `outcome_prices` | json | Outcome prices, e.g. `["0.54","0.46"]` |
66
+ | `best_bid` | float | Top bid on the Yes/Up token |
67
+ | `best_ask` | float | Top ask on the Yes/Up token |
68
+ | `last_price` | float | Last traded price on the Yes/Up token |
69
+ | `implied_probability` | float | Probability of the Up outcome |
70
+ | `spread` | float | Bid-ask spread on the Yes/Up token |
71
+ | `bid_depth_shares` | float | Total share depth across top-5 bid levels |
72
+ | `ask_depth_shares` | float | Total share depth across top-5 ask levels |
73
+ | `bid_depth_usdc` | float | USDC notional depth across top-5 bid levels |
74
+ | `ask_depth_usdc` | float | USDC notional depth across top-5 ask levels |
75
+ | `bid_levels_count` | int | Bid levels actually present (≤ 5) |
76
+ | `ask_levels_count` | int | Ask levels actually present (≤ 5) |
77
+ | `bid_vwap` | float | VWAP across captured bid depth |
78
+ | `ask_vwap` | float | VWAP across captured ask depth |
79
+ | `volume` | float | All-time market volume from Gamma API |
80
+ | `volume_24h` | float | Trailing 24h market volume from Gamma API |
81
+ | `liquidity` | float | Market liquidity from Gamma API |
82
+
83
+ ### Orderbook
84
+
85
+ | Column | Type | Description |
86
+ |---|---|---|
87
+ | `collection_timestamp_utc` | datetime | When this row was collected |
88
+ | `market_id` | string | Polymarket internal market identifier |
89
+ | `asset` | string | `btc`, `eth`, `sol`, `xrp` |
90
+ | `market_type` | string | `5m`, `15m`, `1h`, `1d` |
91
+ | `slug` | string | Human-readable market slug |
92
+ | `token_id` | string | CLOB token identifier (Up or Down side) |
93
+ | `side` | string | `bid` or `ask` |
94
+ | `level` | int | 1 = best price, increasing toward worse prices |
95
+ | `price` | float | Price at this level |
96
+ | `size` | float | Shares available at this level |
97
+ | `usdc_value` | float | `price × size` |
98
+ | `cumulative_size` | float | Running total of shares from level 1 to this level |
99
+ | `cumulative_usdc` | float | Running total of USDC from level 1 to this level |
100
+
101
+ ## How the data was collected
102
+
103
+ A Python collector polled two of Polymarket's public APIs every 60 seconds:
104
+
105
+ - **Gamma API** (`https://gamma-api.polymarket.com`) — market metadata, volume, liquidity
106
+ - **CLOB API** (`https://clob.polymarket.com`) — live orderbook depth
107
+
108
+ Both endpoints are public and require no authentication. The collector respected standard HTTP retry-after headers and used connection pooling to minimize load.
109
+
110
+ ### Market identification
111
+
112
+ Polymarket uses two different slug formats for Up/Down markets depending on timeframe:
113
+
114
+ **Format A** — unix timestamp suffix (5m and 15m markets):
115
+ btc-updown-5m-1773315900
116
+ btc-updown-15m-1773315900
117
+ The window start is computable as `floor(now / window_seconds) * window_seconds`. No API discovery is needed because slugs are fully deterministic.
118
+
119
+ **Format B** — human-readable date/time suffix (1h and 1d markets):
120
+ bitcoin-up-or-down-march-14-10am-et (1h)
121
+ bitcoin-up-or-down-on-march-14 (1d)
122
+ 1h markets use Eastern Time with 12-hour clock and no leading zero. 1d markets use UTC date of the market end day. Both formats pre-create multiple future windows, so the collector generated current + next N window slugs per cycle to capture the transition when one market resolves and the next becomes active.
123
+
124
+ ### Polling behavior
125
+
126
+ For each market, the collector fetched:
127
+ 1. Market metadata and volume from Gamma
128
+ 2. Live orderbook (5 levels each side) from CLOB
129
+ 3. Computed depth aggregates (total shares, USDC, VWAP per side)
130
+
131
+ Snapshots were appended to per-asset, per-timeframe CSV files. The original CSVs have been converted to Parquet for this release.
132
+
133
+ ## Known limitations and gaps
134
+
135
+ Honest disclosure of what this dataset is and isn't.
136
+
137
+ **Gaps in collection.** The collector was not running continuously. Approximate gap periods:
138
+
139
+ - [FILL IN: e.g. 2026-04-02 to 2026-04-08 (collector downtime)]
140
+ - [FILL IN: e.g. 2026-04-19 to 2026-04-21 (network issue)]
141
+ - [FILL IN: any other gaps]
142
+
143
+ To identify gaps programmatically, look for periods where `collection_timestamp_utc` skips by more than ~120 seconds.
144
+
145
+ **Orderbook depth limited to 5 levels per side.** Microstructure research requiring full book reconstruction will find this dataset insufficient. The depth captures the typical Polymarket orderbook well for short-duration markets but doesn't include deep tails.
146
+
147
+ **Resolution outcomes.** [FILL IN: state whether the dataset includes final resolution outcomes for closed markets. If yes, describe which column holds it. If no, document the gap and suggest pulling from Polymarket's resolution endpoint via the `market_id` column.]
148
+
149
+ **Coverage by asset.** ETH, SOL, and XRP only have 5m and 15m markets on Polymarket as of the collection period. Only BTC has 1h and 1d markets. The dataset reflects this — there are no `eth_1h_*`, `sol_1d_*`, etc. files.
150
+
151
+ **Single collector.** Data was collected from a single source point. There is no cross-validation against an independent collector.
152
+
153
+ **API rate limits.** During brief periods of high market activity, individual polls may have failed and retried. These show up as occasional gaps of 60-180 seconds rather than the standard 60-second cadence.
154
+
155
+ ## Suggested analyses
156
+
157
+ Things this dataset can support:
158
+
159
+ - Information aggregation efficiency in very short-duration prediction markets (5-15 minute windows are particularly novel)
160
+ - Comparing Polymarket implied probabilities against realized BTC/ETH/SOL/XRP returns at matching timeframes
161
+ - Cross-asset correlation of binary market pricing during volatility regimes
162
+ - Microstructure analysis: spread dynamics, depth resilience, response to underlying spot moves
163
+ - Calibration studies: how well do market-implied probabilities match observed frequencies of Up vs Down outcomes
164
+ - Bid-ask spread term structure across 5m, 15m, 1h, 1d horizons
165
+ - Trading bot research and backtesting against historical orderbook state
166
+
167
+ ## Loading the data
168
+
169
+ ```python
170
+ import pandas as pd
171
+
172
+ # Single file
173
+ snapshots = pd.read_parquet("btc_5m_snapshots.parquet")
174
+ orderbook = pd.read_parquet("btc_5m_orderbook.parquet")
175
+
176
+ # Or load via the Hugging Face datasets library
177
+ from datasets import load_dataset
178
+ ds = load_dataset("kresmion/polymarket-crypto-updown-binary")
179
+ ```
180
+
181
+ ## License and use
182
+
183
+ Released under **CC-BY-4.0**. You're free to use, modify, and redistribute this data for any purpose including commercial use, provided you give appropriate credit.
184
+
185
+ The data was collected from Polymarket's public APIs which do not require authentication. Polymarket's Terms of Service apply to any downstream redistribution of the data they originated. If you redistribute this dataset or derivatives of it, please:
186
+
187
+ 1. Credit the original collection ("Dataset collected via Polymarket public APIs")
188
+ 2. Link back to this Hugging Face dataset page
189
+ 3. Review Polymarket's current ToS for your specific use case
190
+
191
+ ## Citation
192
+
193
+ If you use this dataset in research or publication:
194
+
195
+ ```bibtex
196
+ @misc{kresmion2026polymarket,
197
+ title = {Polymarket Crypto Up/Down Binary Markets Dataset},
198
+ author = {Kresmion},
199
+ year = {2026},
200
+ url = {https://huggingface.co/datasets/kresmion/polymarket-crypto-updown-binary}
201
+ }
202
+ ```
203
+
204
+ ## About
205
+
206
+ This dataset was collected while building [Kresmion](https://kresmion.com), a financial intelligence platform that surfaces cross-asset signals from public filings, on-chain activity, derivatives positioning, and prediction markets. The collector ran as part of an experimental arbitrage research project; the dataset is being released because the underlying data is more broadly useful to researchers working on prediction market efficiency, short-duration directional pricing, and crypto microstructure.
207
+
208
+ Kresmion publishes its full methodology at [kresmion.com/about/methodology](https://kresmion.com/about/methodology) and is free during beta.
209
+