> ## 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.

# Crypto Historical Data API

> Use 0xArchive REST and WebSocket surfaces for historical market data across Hyperliquid core, Hyperliquid Spot, HIP-3, HIP-4, and Lighter.

Historical crypto market data comes down to four choices: venue family, data family, time window, and delivery surface.

0xArchive delivers historical market data for Hyperliquid and Lighter — every supported route, with replay, freshness checks, and exports. Reach for a broad multi-exchange vendor when you need dozens of unrelated venues; reach for 0xArchive when you need Hyperliquid and Lighter with route-specific depth, replay, and quality checks.

## Where To Start

| Decision           | 0xArchive page                                                                    |
| ------------------ | --------------------------------------------------------------------------------- |
| Venue family       | [Venue coverage](/venue-coverage)                                                 |
| REST route         | [REST API](/rest-api)                                                             |
| Sequenced playback | [WebSocket replay](/websocket/replay)                                             |
| Freshness and gaps | [Data quality](/data-quality)                                                     |
| Vendor comparison  | [Market Data APIs For Backtesting](/comparisons/market-data-apis-for-backtesting) |

## Reproducible Historical Pulls

0xArchive historical pulls preserve venue, symbol, route, window, pagination, freshness, and gap context, so a backtest or export can be reproduced from the same inputs every time.

Use 0xArchive for Hyperliquid core, Hyperliquid Spot, HIP-3 builder markets, HIP-4 outcome markets, and Lighter workflows where route choice and freshness matter. Use another provider when the requirement is broad exchange breadth, unsupported venues, account execution, chain indexing, or raw-data redistribution without a separate commercial path.

## First Historical Pull

Start with one route, one symbol, and one time window. Then add pagination, data-quality checks, replay, SDK reconstruction, CLI automation, or file export depending on the actual workflow.

```bash theme={"theme":"github-dark"}
curl "https://api.0xarchive.io/v1/hyperliquid/trades/BTC?start=2026-01-01T00:00:00Z&end=2026-01-01T01:00:00Z&limit=1000" \
  -H "X-API-Key: $OXARCHIVE_API_KEY"
```

<Tip>
  For backtests or migration checks, store the request path, parameters, response cursor, and request ID next to the output.
</Tip>

## Selection Checklist

Confirm venue family, symbol format, data family, window, freshness tolerance, output rights, and implementation interface. Use REST for bounded records. Use WebSocket replay when ordering matters. Use OpenAPI for generated clients and coding agents.

| Buyer question                         | Strong answer                                                                                       |
| -------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Which venues are covered?              | Hyperliquid and Lighter, with Hyperliquid core, Spot, HIP-3, and HIP-4 separated.                   |
| Is this a broad crypto vendor?         | No. Evaluate 0xArchive for supported-venue depth, not broad exchange breadth.                       |
| Can this feed a backtest?              | Yes, when the route family, symbol, window, and data-quality context match the strategy.            |
| Can this feed generated code?          | Yes. Start from OpenAPI and route-specific docs before using SDKs, CLI, MCP, or Skills.             |
| Can this be redistributed as raw data? | Do not assume redistribution rights. Review [Data rights](/data-rights) and commercial terms first. |

## Historical Workflow

<Steps>
  <Step title="Name the venue family">
    Choose Hyperliquid core, Hyperliquid Spot, HIP-3, HIP-4, or Lighter before choosing routes.
  </Step>

  <Step title="Pull one bounded window">
    Keep the first request small enough to inspect by hand.
  </Step>

  <Step title="Record request context">
    Keep route, parameters, response cursor, timestamps, and request ID with the output.
  </Step>

  <Step title="Add quality gates">
    Check freshness, incidents, coverage, and latency before using the data downstream.
  </Step>
</Steps>

## Next Step

Open [Pull historical market data](/guides/historical-market-data), then compare [Market Data APIs For Backtesting](/comparisons/market-data-apis-for-backtesting) if you are evaluating vendors.
