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

# Hyperliquid Historical Data API: Routes & Reference

> Hyperliquid historical data for L2, trades, funding, OI, candles, liquidations, and family-specific L4 routes.

Run Hyperliquid core perp history for research, backtesting, replay prep, dashboards, alerts, exports, or generated clients. Current symbol rows show observed floors of April 15, 2023 for native L2 and trades and May 20, 2023 for funding and open interest. Completed liquidation events on `/v1/hyperliquid/liquidations/{symbol}` are served from 2025-12-22 00:00 UTC; symbols listed later start on their own `coverage_by_type.liquidations` date. Coverage metadata states the selected symbol's exact retained window before you request REST history, WebSocket replay, or Parquet export.

<Note>
  **Answer:** Use Hyperliquid core routes for bounded perp history. Native L2, trades, funding, and open interest have the observed floors documented here, while Spot, HIP-3, HIP-4, and Lighter use separate route families and coverage windows. Check the selected symbol before relying on a date.

  **Evidence:** Start with [Hyperliquid REST](/rest-api/hyperliquid), confirm the route in [OpenAPI](/openapi), and check the selected window in [Venue coverage](/venue-coverage).
</Note>

Use Hyperliquid core routes for standard perp market history. Use [Hyperliquid Spot Data API](/hyperliquid-spot-data-api) for pair symbols such as `HYPE-USDC`, [HIP-3 Data API](/hyperliquid-hip3-data-api) for namespaced builder markets, and [HIP-4 Data API](/hyperliquid-hip4-data-api) for outcome markets. For fill-level trade rows with wallet attribution, start with the [Hyperliquid Fills Data API](/hyperliquid-fills-data-api).

For a family-level view, see [Hyperliquid live and historical data](https://0xarchive.io/hyperliquid), then return here for the core route contract.

For a practical backtesting workflow, use the [Hyperliquid historical data backtesting guide](https://0xarchive.io/resources/market-data-guides/hyperliquid-historical-data-api-for-backtesting), then return here for the exact route contract.

<CardGroup cols={2}>
  <Card title="Hyperliquid REST" icon="chart-candlestick" href="/rest-api/hyperliquid">
    Core perp route family.
  </Card>

  <Card title="Pull historical market data" icon="database" href="/guides/historical-market-data">
    Bounded pull pattern with freshness checks.
  </Card>
</CardGroup>

## Historical Data In One Path

Hyperliquid historical work needs more than the latest quote. 0xArchive gives teams REST history, generated OpenAPI reference pages, WebSocket replay guidance, reconstruction docs, and data-quality checks in one path.

Use 0xArchive when the same symbol and window must be rerun, compared, exported, replayed, or used by downstream code. If the job is official venue behavior, account state, or execution-adjacent control, keep the native Hyperliquid API in the loop.

## What History Is Available

| Route family | Earliest / scope | Detail |
| - | - | - |
| Order books (L2) | April 15, 2023 observed floor | Native 20-level depth snapshots; verify route-specific cadence and gaps |
| Trades | April 15, 2023 observed floor | Per-trade fill rows; verify the selected symbol's exact window |
| Order-level (L4) | Core order events from 2026-03-10; checkpoints and reconstruction from 2026-03-11 01:03 UTC | Individual resting-order rows with `oid` and `user_address`, plus reconstruction |
| Funding and open interest | May 20, 2023 observed floor | Funding rows are roughly 1 minute on core; OI cadence is route-specific |
| Completed liquidation events | 2025-12-22 00:00 UTC; later-listed symbols: per-symbol `coverage_by_type.liquidations` | Real forced executions from `/v1/hyperliquid/liquidations/{symbol}`; see [Liquidation events by symbol](/hyperliquid-liquidations-data-api) |

Spot, [HIP-3](/hyperliquid-hip3-data-api), and [HIP-4](/hyperliquid-hip4-data-api) markets carry their own start dates and routes. [Lighter](/lighter-api-quickstart) is a separate venue with its own history window. Hold one symbol and one UTC window constant on the first pull, then widen.

## Run One Route

Start with one bounded order-book or trade request before widening the window.

```bash theme={"theme":"github-dark"}
curl "https://api.0xarchive.io/v1/hyperliquid/orderbook/BTC?timestamp=1767225600000&depth=20" \
  -H "X-API-Key: $OXARCHIVE_API_KEY"
```

For timestamped order-book snapshots, use Unix milliseconds for `timestamp`. For historical trade windows, use Unix milliseconds for `start` and `end`.

## Core Perp Route Map

| Need | Route family to inspect first |
| - | - |
| Current or timestamped depth | `/v1/hyperliquid/orderbook/{symbol}` |
| Historical depth snapshots | `/v1/hyperliquid/orderbook/{symbol}/history` |
| Trades | `/v1/hyperliquid/trades/{symbol}` |
| Funding and open interest | `/v1/hyperliquid/funding/{symbol}`, `/v1/hyperliquid/openinterest/{symbol}` |
| Candles | `/v1/hyperliquid/candles/{symbol}` |
| Liquidations | `/v1/hyperliquid/liquidations/{symbol}` |
| L4 resting-book history | `/v1/hyperliquid/orderbook/{symbol}/l4/history` |
| Order lifecycle history | `/v1/hyperliquid/orders/{symbol}/history` |
| Order flow | `/v1/hyperliquid/orders/{symbol}/flow` |

## Historical Workflow

<Steps>
  <Step title="Pick the core perp symbol">
    Start with a standard symbol such as `BTC` or `ETH`. Do not use this route family for Spot pairs, HIP-3 prefixes, or HIP-4 outcome identifiers.
  </Step>

  <Step title="Pull a bounded window">
    Hold one symbol, route, and UTC window constant while you inspect pagination, returned span, and request IDs.
  </Step>

  <Step title="Add only the needed families">
    Add candles, funding, open interest, liquidations, L4, replay, or exports only when the downstream job requires them.
  </Step>

  <Step title="Gate downstream use">
    Check [Data quality](/data-quality), freshness, incidents, and request IDs before the output feeds research, alerts, dashboards, exports, or models.
  </Step>
</Steps>

## Selection Checklist

Before comparing 0xArchive to a native venue pull, hold one symbol, one window, and one downstream job constant. Record the route, parameters, returned span, cursor chain, request IDs, data-quality result, and any gap or incident notes. That checklist makes the second run easier to compare than a screenshot or row count.

Ask whether the workflow needs point snapshots, historical records, replay order, or local reconstruction. REST history fits bounded data pulls. WebSocket replay fits workflows where event order matters. SDK reconstruction fits products that maintain a local book. All three should preserve request IDs and data-quality context.

## Next Step

Open [Hyperliquid REST](/rest-api/hyperliquid) for the contract layer, then run [Pull historical market data](/guides/historical-market-data) for one symbol and one window before widening the job.


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