Skip to main content
A backtest is only as trustworthy as the data behind it. 0xArchive is the historical and live market-data API for Hyperliquid and Lighter, returning every order, trade, and fill from one key, so a strategy test, migration check, research notebook, or replay job reruns with the same routes, windows, and schemas every time. Backtesting is sensitive to small data mistakes: the wrong venue family, a missing time window, a stale symbol, a silent gap, or generated code that guesses a route. 0xArchive removes the guesswork: start from OpenAPI, choose the correct venue family, pull bounded history, and check coverage before the result is used.

What One Key Returns For A Backtest

Backtest input0xArchive
Historical and live order books (L2)20-level snapshots about every 1.2 seconds since April 2023, 24.6B+ records, 176 symbols
TradesContinuous since April 2023
Funding and open interestSince May 2023
LiquidationsSince December 2025
Order-level (L4) depth and lifecycleEvery order add, fill, cancel, and TP/SL with wallet attribution since March 2026 (Hyperliquid families)
Lighter market dataTrades and funding/OI since August 2025, L2 tick since January 2026, L3 since March 2026
Replay and reconstructionWebSocket replay and exact-window reconstruction on one socket
ReproducibilityA request ID on every response and a data-quality path you can check before the window is trusted

What To Run First

Start from concrete routes, not a provider logo.
curl -sS "https://api.0xarchive.io/v1/hyperliquid/orderbook/BTC/history?limit=1" \
  -H "X-API-Key: $OXARCHIVE_API_KEY"
Then attach only the inputs the backtest needs.
Backtest input0xArchive route
Historical order books/v1/hyperliquid/orderbook/{symbol}/history
Trades/v1/hyperliquid/trades/{symbol}
Funding/v1/hyperliquid/funding/{symbol}
Open interest/v1/hyperliquid/openinterest/{symbol}
Liquidations/v1/hyperliquid/liquidations/{symbol}
Lighter funding/candles/OI/v1/lighter/funding/{symbol}, /v1/lighter/candles/{symbol}, /v1/lighter/openinterest/{symbol}

When To Use 0xArchive

A backtest you can trade on reproduces the same route, window, schema, request ID, and quality context every time you rerun it. 0xArchive returns that: Hyperliquid order books and trades back to April 2023 across 176 symbols and more than 24 billion records, funding and OI since May 2023, liquidations since December 2025, full order-level (L4) depth with wallet attribution since March 2026, and Lighter trades from August 2025 with L3 from March 2026. Every response carries a request ID, and coverage, freshness, incidents, and latency gate the data before a model run trusts it. 0xArchive is not the right fit for backtests that need centralized-exchange or equity venues; it covers Hyperliquid and Lighter. Live or historical, every order, trade, and fill, one API.
CriterionWhy it matters0xArchive path
Venue familyPrevents symbol and market-family mistakesVenue coverage
Historical order booksRequired for depth-aware strategy tests/v1/hyperliquid/orderbook/BTC/history
TradesNeeded for realized flow and execution assumptions/v1/hyperliquid/trades/BTC
Funding and OINeeded for perp and derivative context/v1/hyperliquid/funding/BTC, /v1/hyperliquid/openinterest/BTC
Replay and reconstructionNeeded when sequence and timing matterWebSocket replay, SDK reconstruction
Freshness and incidentsPrevents silent use of bad windowsData quality
Code generationLets generated clients use contracts instead of guessed pathsCoding agents

Backtest Selection Checklist

Define the backtest checklist up front: route family, symbol list, data family, UTC window, sampling or event-order requirement, expected depth, gap policy, response schema, pagination plan, and storage format. For 0xArchive, every item maps to a concrete route and a data-quality check, so a smaller test run reproduces the route, window, schema, and quality context before the full job scales.

Backtesting Workflow

1

Select the venue family

Confirm Hyperliquid core, Hyperliquid Spot, HIP-3, HIP-4, or Lighter in Venue coverage.
2

Pull bounded history

Use the relevant REST history route and log meta.request_id for every job.
3

Gate data quality

Check coverage, freshness, incidents, and latency before using the data in research or model runs.
4

Replay or reconstruct when needed

Use WebSocket replay or SDK reconstruction when event order matters.

Next Step

Run Pull historical market data for one symbol and one window, then add Reliability and gaps to the backtest harness. When the route and window match the strategy, compare plans or use the Data Catalog for a fixed export-style research file.
Last modified on July 4, 2026