> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lean.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Historical data

> Multi-venue historical prediction market data across Kalshi, Polymarket, Polymarket US and Hyperliquid: L2 orderbooks (full depth on Kalshi/Polymarket, up to 20 levels/side on HIP-4), trades, bars and feed-health telemetry.

Lean archives normalized, institutional-grade historical market data across the major prediction-market venues in one canonical schema.

> [!NOTE]
>
> Historical data access is currently in **early access**. Email [s@lean.xyz](mailto:s@lean.xyz?subject=Lean%20Historical%20Data%20Access) to request sample files, custom date ranges or API access.

## Venues covered

| Venue | L2 book depth | Tick trades | OHLCV & mid-price bars | Feed-health telemetry |
| :- | :-: | :-: | :-: | :-: |
| **Kalshi** | Full depth | Yes | Yes | Yes |
| **Polymarket** | Full depth | Yes | Yes | Yes |
| **Polymarket US** | Full depth | Yes | Yes | Yes |
| **Hyperliquid (HIP-4)** | Up to 20 levels/side | Yes | Yes | Yes |

## Datasets

### L2 orderbooks

Continuous orderbook snapshots and deltas captured directly from each venue's live stream (full depth on Kalshi, Polymarket and Polymarket US; up to 20 levels per side on Hyperliquid HIP-4), normalized across venues so you can reconstruct book depth, spreads and slippage for timestamps with a baseline snapshot and confirmed feed coverage (see [Feed health & gap provenance](#feed-health--gap-provenance) below).

### Tick trades & bars

3.6B+ normalized trade prints alongside pre-aggregated OHLCV and mid-price bars across venues, mapped to Lean's canonical market IDs.

### Canonical market metadata

Cross-venue market and outcome mappings, venue leg identifiers, and resolution metadata so historical series join cleanly across Kalshi, Polymarket, Polymarket US and Hyperliquid.

### Feed health & gap provenance

Explicit venue-side connection and data-quality telemetry (`connection` vs. `data-quality` streams) so backtests can distinguish quiet markets from venue outages or dropped feeds.

## Delivery formats

* **Bulk Parquet flat files**: Partitioned by venue and date for direct querying in DuckDB, Polars, ClickHouse or Spark—no REST pagination or rate limits.
* **REST snapshots & bars** *(early access)*: On-demand historical bars, trades and point-in-time snapshots over HTTPS.

## Contact us

Interested in historical L2 orderbooks, trade archives or custom datasets? Reach out and let us know the **venues**, **date range** and **granularity** (L2 book replay, tick trades, or bars) you need.

> [card] [Request historical data access](mailto:s@lean.xyz?subject=Lean%20Historical%20Data%20Access)
>
> Email **[s@lean.xyz](mailto:s@lean.xyz)** for sample Parquet files, schema docs and early access pricing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.