--- 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/date=YYYY-MM-DD/.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)”.