File size: 13,601 Bytes
7403b40 4e9128f 8a21bd6 4e9128f ca885aa 8a21bd6 672ba05 7403b40 4e9128f 8a21bd6 672ba05 4e9128f 8a21bd6 4e9128f 8a21bd6 4e9128f 8a21bd6 4e9128f 8a21bd6 4e9128f 8a21bd6 4e9128f 8a21bd6 4e9128f ca885aa 8a21bd6 ca885aa 8a21bd6 ca885aa 8a21bd6 ca885aa 8a21bd6 672ba05 8a21bd6 672ba05 8a21bd6 672ba05 8a21bd6 4e9128f 8a21bd6 4e9128f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | ---
license: cc-by-4.0
pretty_name: Various crypto market data (Polymarket Up/Down order books, …)
language:
- en
tags:
- finance
- prediction-markets
- polymarket
- order-book
- market-microstructure
- crypto
- time-series
size_categories:
- 100M<n<1B
configs:
- config_name: polymarket_updown_orderbook
data_files: "polymarket_updown_orderbook/data/*/*.parquet"
default: true
- config_name: hyperliquid_trades
data_files: "hyperliquid_trades/data/*/*.parquet"
- config_name: hl_archive_l2book
data_files: "hyperliquid_mainnet_archive/l2book/*/*.parquet"
- config_name: hl_archive_trades
data_files: "hyperliquid_mainnet_archive/trades/*/*.parquet"
- config_name: hl_archive_asset_ctx
data_files: "hyperliquid_mainnet_archive/asset_ctx/*/*.parquet"
- config_name: hl_archive_bbo
data_files: "hyperliquid_mainnet_archive/bbo/*/*.parquet"
- config_name: hl_archive_mark
data_files: "hyperliquid_mainnet_archive/mark/*/*.parquet"
- config_name: hl_archive_funding
data_files: "hyperliquid_mainnet_archive/funding/*/*.parquet"
- config_name: hl_archive_candles_5m
data_files: "hyperliquid_mainnet_archive/candles/*/*.parquet"
- config_name: hl_archive_bbo_stream
data_files: "hyperliquid_mainnet_archive/bbo_stream/*/*.parquet"
---
# variouscryptodata
Crypto market datasets collected as a by-product of our own research and
published so they are not lost. One sub-folder per dataset; each appended
nightly where collection is still running.
| folder | what | coverage | cadence |
|---|---|---|---|
| `polymarket_updown_orderbook/` | Polymarket Up/Down (5m/15m) order books, 10 levels, BTC/ETH/SOL/XRP/DOGE/HYPE/BNB, with Binance spot reference | 2026-05-24 → present | appended nightly (previous UTC day) |
| `hyperliquid_trades/` | Hyperliquid perp trade prints (every fill) for BTC/ETH/SOL/HYPE/AVAX + 25 HIP-3 tradfi markets (`xyz:*` equities/commodities/FX, `cash:*`, `km:*`) | 2026-07-23 → present | appended nightly (previous UTC day) |
| `hyperliquid_mainnet_archive/` | Hyperliquid WebSocket capture for 16 perps (15 until 2026-07-20): **L2 order book snapshots (20 levels/side)**, trades, asset context (funding/OI/premium/oracle/mark/mid/impact), top-of-book+depth summary, mark/oracle, funding, 5m candles | part 1: 2026-07-18 (~14:03 UTC) → 2026-08-04 (~13:25 UTC), 16 perps (legacy bot); part 2: from 2026-08-22 ~19:49 UTC (first day partial), **all ~320 perp + HIP-3 markets** (dedicated collector) | part 2 appended nightly (previous UTC day) |
---
## polymarket_updown_orderbook
Continuous top-10-level order book snapshots for Polymarket's short-dated
**crypto Up/Down markets** (5-minute and 15-minute, BTC/ETH/SOL/XRP/DOGE/HYPE/BNB),
captured every ~6 seconds per market (≈2–3 s in the last minute before a market closes), with the Binance spot price, the market's
strike and the time left to resolution on every row.
- **Granularity:** one row per (market, snapshot); ~250 000 rows/day.
- **Both outcomes:** the `Up` and `Down` books are recorded side by side.
- **Layout:** `polymarket_updown_orderbook/data/date=YYYY-MM-DD/book_depth.parquet`
(Hive-style day partitions).
Polymarket's CLOB API is live-only; to our knowledge no public archive of the
order books of these short-dated markets exists.
### Schema
| column | type | meaning |
|---|---|---|
| `ts` | int64 | snapshot time, Unix seconds (UTC) |
| `ts_ms` | float64 | snapshot time, Unix milliseconds (v2 rows; absent before 2026-06-12) |
| `market` | string | market slug, e.g. `btc-updown-5m-1779622200` (asset-period-windowStart) |
| `asset` | string | `btc`, `eth`, `sol`, `xrp`, `doge`, `hype`, `bnb` (all seven present on every day) |
| `period_min` | int64 | market length in minutes: 5 or 15 |
| `condition_id` | string | Polymarket condition id (public market identifier, 0x…) |
| `win_start_ts` | int64 | window start, Unix seconds (v2) |
| `secs_left` | int64 | seconds until the window closes / market resolves |
| `in_window` | bool | `true` only inside the collector's own entry window, 8–35 s before the market closes (not an 'is the market open' flag — every market is captured for its whole 5/15-minute life) |
| `favored` | string | which side has the higher mid-price (`Up`/`Down`); null when tied or when either book lacks a two-sided quote (common in the final minute; ~15–25 % of rows) |
| `spot` | float64 | Binance spot price of the underlying (REST ticker) fetched with the snapshot |
| `spot_ts_ms` | float64 | timestamp of that spot observation, Unix ms (v2) |
| `strike_spot` | float64 | first spot at/after window start = the market's strike (v2) |
| `Up` | string (JSON) | `{"bids":[[price,size],…],"asks":[[price,size],…]}` — up to 10 levels each, best first |
| `Down` | string (JSON) | same for the Down outcome |
Prices in `Up`/`Down` are outcome-token prices in USDC (0–1); sizes are in
shares. Parse with `json.loads` (Python) or `json_extract` (DuckDB).
Schema v1 (19 days, 2026-05-24 → 2026-06-11) has 11 columns; v2 (from 2026-06-12) has 15. Reading
with `union_by_name`/`diagonal` concat handles both.
### Quick start
```python
import polars as pl, json
df = pl.read_parquet(
"hf://datasets/Barthel/variouscryptodata/polymarket_updown_orderbook/data/date=2026-08-21/book_depth.parquet")
row = df.filter(pl.col("asset") == "btc").row(0, named=True)
book = json.loads(row["Up"])
print(book["bids"][0], book["asks"][0], row["spot"], row["secs_left"])
```
```sql
-- DuckDB
SELECT asset, period_min, count(*)
FROM read_parquet('hf://datasets/Barthel/variouscryptodata/polymarket_updown_orderbook/data/*/*.parquet', union_by_name=true)
GROUP BY 1,2 ORDER BY 1,2;
```
### Collection notes (read before modelling)
- Best-effort single-host capture: short gaps (seconds to minutes) occur around
reconnects and host maintenance; treat `ts` spacing as irregular.
- Snapshot cadence is adaptive: ~6 s per market normally, ~2–3 s during the last minute before a market closes; all live markets (7 assets × 2 periods) are polled in the same cycle.
- `spot` is the Binance spot price fetched by the collector at snapshot time,
not Polymarket's resolution oracle; use it for analysis, not as ground truth
for settlement.
- Nothing here is investment advice; no trading strategy is included.
- Every upload is scanned automatically for credentials before publishing.
---
## hyperliquid_trades
Every public trade print streamed from Hyperliquid's WebSocket `trades`
channel for 30 markets: the perps **BTC, ETH, SOL, HYPE, AVAX** and 25
**HIP-3** markets (tokenised equities, indices, commodities and FX such as
`xyz:NVDA`, `xyz:TSLA`, `xyz:GOLD`, `xyz:SP500`, `xyz:EUR`, `cash:USA500`,
`km:US500` — the `coin` column uses Hyperliquid's `dex:NAME` form). One Parquet
per UTC day, all markets in one file. Roughly 100 rows per day carry exchange
timestamps far outside the file's day: on every (re)subscription Hyperliquid replays a market's most recent trades, and for the three dormant markets `cash:SILVER`, `cash:USA500`, `km:US500` (no trades at all during the collection period so far) those ~30 replayed trades date from June/July 2026 and recur in every daily file; filter on
`time_ms` if that matters to you.
- **Layout:** `hyperliquid_trades/data/date=YYYY-MM-DD/trades.parquet`
- **Rows:** ~0.6–3.6 million/day (median ≈2 M; weekends lowest); sorted by `time_ms`; de-duplicated on (`coin`,`tid`).
| column | type | meaning |
|---|---|---|
| `coin` | string | Hyperliquid market name (`BTC`, `xyz:NVDA`, …) |
| `side` | string | aggressor side as reported by Hyperliquid: `B` = buyer, `A` = seller |
| `px` | float64 | trade price (USDC) |
| `sz` | float64 | trade size (base units of the market) |
| `time_ms` | int64 | exchange trade time, Unix milliseconds (UTC) |
| `tid` | int64 | Hyperliquid trade id |
Deliberately **not** included: counterparty wallet addresses (`users`) and
transaction hashes — this dataset is about prices and flow, not about who
traded. Collection is best-effort from a single WebSocket client; brief gaps
(reconnects) can occur. HIP-3 markets follow their own trading hours, so
zero-trade stretches there are normal, not gaps.
```python
import polars as pl
t = pl.read_parquet("hf://datasets/Barthel/variouscryptodata/hyperliquid_trades/data/date=2026-08-21/trades.parquet")
print(t.group_by("coin").agg(pl.len(), (pl.col("px")*pl.col("sz")).sum().alias("notional")).sort("notional", descending=True).head(10))
```
---
## hyperliquid_mainnet_archive (part 1 static 2026-07-18 → 2026-08-04; part 2 from 2026-08-22, appended nightly)
An 18-day capture (2026-07-18 ~14:03 UTC → 2026-08-04 ~13:25 UTC; first and last day partial) of Hyperliquid's public WebSocket feed by a shadow-trading
research bot (no orders were sent from this data). Coins were the bot's
watch-list at the time — 16 liquid perps: BTC, ETH, SOL,
HYPE, XRP, AVAX, NEAR, ONDO, UNI, WLD, ZEC, PUMP, TRUMP, FARTCOIN, LIT, VVV
(15 coins on 2026-07-18 → 07-20; AVAX was added 2026-07-21, 16 from then on). One Parquet per table
per UTC day: `hyperliquid_mainnet_archive/<table>/date=YYYY-MM-DD/<table>.parquet`.
| table | rows/day (≈) | columns |
|---|---:|---|
| `l2book` | 100–300 k | `coin`, `time_ms` (exchange), `recv_ms` (local receive), `bids`, `asks` — JSON `[[px, sz, n_orders], …]`, 20 levels per side in part 1 (up to 20 in part 2), best first, full precision (`nSigFigs=null`); one snapshot per coin every ~5.4 s (the exchange's push cadence, not every book update) |
| `trades` | 0.3–1.3 M | `coin`, `side` (`B` buyer-aggressor / `A` seller-aggressor), `px`, `sz`, `time_ms`, `tid` — de-duplicated on (`coin`,`tid`); wallet addresses and tx hashes removed |
| `asset_ctx` | 0.5–1.5 M | `coin`, `recv_ms`, `funding` (hourly rate), `open_interest`, `prev_day_px`, `day_ntl_vlm`, `day_base_vlm`, `premium`, `oracle_px`, `mark_px`, `mid_px`, `impact_bid`, `impact_ask` — streamed `activeAssetCtx` updates |
| `bbo` | 100–300 k | `coin`, `recv_ms`, `bid_px`, `bid_sz`, `ask_px`, `ask_sz`, `spread`, `spread_bps`, `bid_depth_sz`, `bid_depth_usd`, `ask_depth_sz`, `ask_depth_usd`, `bid_levels`, `ask_levels` — top of book plus summed depth over the 20 captured levels, computed by the collector for each captured `l2book` snapshot (same row count and ~5 s cadence as `l2book`) |
| `mark` | ~250 k | `coin`, `recv_ms`, `mark_px`, `oracle_px` |
| `funding` | ~22 k | `coin`, `recv_ms`, `funding_rate` |
| `candles` | 2–5 k | `coin`, `interval` (`5m`), `open_ms`, `close_ms`, `open`, `high`, `low`, `close`, `volume`, `trade_count` — final state of each 5m candle |
| `bbo_stream` (part 2 only) | ~5–10 M | `coin`, `time_ms`, `recv_ms`, `bid_px`, `bid_sz`, `bid_n`, `ask_px`, `ask_sz`, `ask_n` — Hyperliquid's high-frequency `bbo` WebSocket channel (every top-of-book change) for the ~40 highest-volume markets |
**Part 2 (from 2026-08-22 ~19:49 UTC, first day partial; appended nightly):**
a dedicated read-only collector subscribes `l2Book` + `trades` for **every**
perp on the main exchange and every HIP-3 market (≈320 markets, re-discovered
every 6 h, so newly listed markets appear automatically), and `bbo` for the
~40 highest-volume markets (ranked at collector start; new high-volume entrants
are added at discovery, none removed). Same table layout and column names as
part 1, with these differences:
- `asset_ctx`, `mark` and `funding` come from the REST `metaAndAssetCtxs`
endpoint once per minute (part 1: streamed, ~5 s).
- `bbo` is derived from each `l2book` snapshot (identical definition to part 1).
- `l2book`: up to 20 levels per side — thin HIP-3 markets can have fewer (see
`bid_levels`/`ask_levels`); the ~5.4 s cadence is the exchange's push rate.
- `candles` are 5-minute bars built from `trades` captured live (receive
latency ≤ 60 s), only buckets with ≥ 1 trade (part 1: exchange candle stream
incl. empty buckets); buckets around collector (re)starts may be partial.
- `trades`: on every (re)subscription Hyperliquid replays the last ~30 trades
of a market, so each daily file can contain a few older trades per market —
filter on `time_ms` if that matters.
- Part-2 volumes: `l2book`/`bbo` ≈ 5 M rows/day, `trades` ≈ 5–8 M,
`bbo_stream` ≈ 9–11 M, `asset_ctx`/`mark`/`funding` ≈ 0.46 M, `candles` ≤ 92 k.
- Receive latency (recv_ms − time_ms): l2book ≈ 0.6 s median / ≈ 1–2 s p99;
trades/bbo ≈ 0.35 s median; bursts up to ~10 s at (re)subscribe.
Gap between part 1 and part 2: 2026-08-04 13:25 → 2026-08-22 19:49 UTC.
Notes: `time_ms`/`open_ms` are exchange timestamps; `recv_ms` is the
collector's receive time (single host, best-effort; latency typically
≈0.45 s median and ≈1 s p99, with occasional bursts up to ~10–30 s). Hyperliquid's own
complete history is available from the exchange's requester-pays S3 archive;
this is a free, partial mirror for convenience.
```python
import polars as pl, json
b = pl.read_parquet("hf://datasets/Barthel/variouscryptodata/hyperliquid_mainnet_archive/l2book/date=2026-07-27/l2book.parquet")
snap = b.filter(pl.col("coin") == "ETH").row(0, named=True)
bids, asks = json.loads(snap["bids"]), json.loads(snap["asks"])
print(bids[0], asks[0]) # [px, sz, n_orders]
```
## License & citation
Data © the collector, released under **CC-BY-4.0**. Underlying quotes originate
from Polymarket's public CLOB API, Binance's public REST API and Hyperliquid's public WebSocket API. If you use
this data, please cite “Barthel/variouscryptodata (Hugging Face dataset)”.
|