# 0xArchive - Replayable Market Data API ## What is 0xArchive? 0xArchive provides historical and replayable market data across two venue APIs: Hyperliquid and Lighter.xyz. HIP-3 builder perps live under the Hyperliquid namespace (`/v1/hyperliquid/hip3`), not a third peer venue API. HIP-4 outcome markets (binary, fully-collateralized prediction markets) live under `/v1/hyperliquid/hip4` and follow the same nested-namespace pattern. We offer REST API, WebSocket streaming, SDKs, CLI, MCP, and Claude Code access to venue data, checkpoint history, Pro order-level routes, data-quality monitoring, and wallet-first auth flows. ## API Overview - Base URL: `https://api.0xarchive.io` - Authentication: API key via `X-API-Key` header - Wallet-first flows: `POST /v1/auth/web3/challenge` and `/v1/web3/*` - Health: `GET /health` (unauthenticated liveness check) - Monitoring: `/v1/data-quality/*` - Response format: JSON with `success`, `data`, and `meta.request_id` - Rate limits: 15-150 requests/second depending on plan (3-20 concurrent queries per key) - Legacy compatibility routes: `/v1/*` ## Docs - Docs home: [https://www.0xarchive.io/docs/](https://www.0xarchive.io/docs/) - Quick Start: [https://www.0xarchive.io/docs/quick-start/](https://www.0xarchive.io/docs/quick-start/) - REST API: [https://www.0xarchive.io/docs/rest-api/](https://www.0xarchive.io/docs/rest-api/) - WebSocket API: [https://www.0xarchive.io/docs/websocket/](https://www.0xarchive.io/docs/websocket/) - SDKs: [https://www.0xarchive.io/docs/sdks/](https://www.0xarchive.io/docs/sdks/) - CLI: [https://www.0xarchive.io/docs/cli/](https://www.0xarchive.io/docs/cli/) - Guides: [https://www.0xarchive.io/docs/guides/](https://www.0xarchive.io/docs/guides/) - Wallet Automation: [https://www.0xarchive.io/docs/wallet-automation/](https://www.0xarchive.io/docs/wallet-automation/) - AI Clients: [https://www.0xarchive.io/docs/ai-clients/](https://www.0xarchive.io/docs/ai-clients/) - Response Schemas: [https://www.0xarchive.io/docs/schemas/](https://www.0xarchive.io/docs/schemas/) - Error Handling: [https://www.0xarchive.io/docs/errors/](https://www.0xarchive.io/docs/errors/) ## Markdown docs and public contracts Use these when you want clean markdown, the raw API contract, or a short product map for Claude, ChatGPT, MCP, or your own code. - OpenAPI contract: [https://www.0xarchive.io/openapi.json](https://www.0xarchive.io/openapi.json) - AI guide (llms.txt): [https://www.0xarchive.io/llms.txt](https://www.0xarchive.io/llms.txt) ### Core public markdown - Home: [https://www.0xarchive.io/index.md](https://www.0xarchive.io/index.md) - Pricing: [https://www.0xarchive.io/pricing.md](https://www.0xarchive.io/pricing.md) - Bulk Download / Data Explorer: [https://www.0xarchive.io/data.md](https://www.0xarchive.io/data.md) - Status: [https://www.0xarchive.io/status.md](https://www.0xarchive.io/status.md) - Changelog: [https://www.0xarchive.io/changelog.md](https://www.0xarchive.io/changelog.md) - Blog index: [https://www.0xarchive.io/blog.md](https://www.0xarchive.io/blog.md) - Contact: [https://www.0xarchive.io/contact.md](https://www.0xarchive.io/contact.md) - OpenClaw: [https://www.0xarchive.io/openclaw.md](https://www.0xarchive.io/openclaw.md) - x402 Facilitator: [https://www.0xarchive.io/facilitator.md](https://www.0xarchive.io/facilitator.md) - About: [https://www.0xarchive.io/about.md](https://www.0xarchive.io/about.md) - Privacy: [https://www.0xarchive.io/privacy.md](https://www.0xarchive.io/privacy.md) - Terms: [https://www.0xarchive.io/terms.md](https://www.0xarchive.io/terms.md) ### Docs markdown - Docs Home: [https://www.0xarchive.io/docs.md](https://www.0xarchive.io/docs.md) - Quick Start: [https://www.0xarchive.io/docs/quick-start.md](https://www.0xarchive.io/docs/quick-start.md) - Authentication: [https://www.0xarchive.io/docs/authentication.md](https://www.0xarchive.io/docs/authentication.md) - REST API: [https://www.0xarchive.io/docs/rest-api.md](https://www.0xarchive.io/docs/rest-api.md) - REST Hyperliquid: [https://www.0xarchive.io/docs/rest-api/hyperliquid.md](https://www.0xarchive.io/docs/rest-api/hyperliquid.md) - REST Lighter.xyz: [https://www.0xarchive.io/docs/rest-api/lighter.md](https://www.0xarchive.io/docs/rest-api/lighter.md) - REST HIP-3: [https://www.0xarchive.io/docs/rest-api/hip3.md](https://www.0xarchive.io/docs/rest-api/hip3.md) - REST Data Quality: [https://www.0xarchive.io/docs/rest-api/data-quality.md](https://www.0xarchive.io/docs/rest-api/data-quality.md) - WebSocket: [https://www.0xarchive.io/docs/websocket.md](https://www.0xarchive.io/docs/websocket.md) - WebSocket Connection: [https://www.0xarchive.io/docs/websocket/connection.md](https://www.0xarchive.io/docs/websocket/connection.md) - WebSocket Channels: [https://www.0xarchive.io/docs/websocket/channels.md](https://www.0xarchive.io/docs/websocket/channels.md) - WebSocket Replay: [https://www.0xarchive.io/docs/websocket/replay.md](https://www.0xarchive.io/docs/websocket/replay.md) - WebSocket Limits: [https://www.0xarchive.io/docs/websocket/limits.md](https://www.0xarchive.io/docs/websocket/limits.md) - SDKs: [https://www.0xarchive.io/docs/sdks.md](https://www.0xarchive.io/docs/sdks.md) - SDK Installation: [https://www.0xarchive.io/docs/sdks/installation.md](https://www.0xarchive.io/docs/sdks/installation.md) - SDK REST Usage: [https://www.0xarchive.io/docs/sdks/rest-usage.md](https://www.0xarchive.io/docs/sdks/rest-usage.md) - SDK WebSocket Usage: [https://www.0xarchive.io/docs/sdks/websocket-usage.md](https://www.0xarchive.io/docs/sdks/websocket-usage.md) - SDK Reconstruction: [https://www.0xarchive.io/docs/sdks/reconstruction.md](https://www.0xarchive.io/docs/sdks/reconstruction.md) - Guides: [https://www.0xarchive.io/docs/guides.md](https://www.0xarchive.io/docs/guides.md) - Venue Coverage: [https://www.0xarchive.io/docs/guides/venue-coverage.md](https://www.0xarchive.io/docs/guides/venue-coverage.md) - Limits and Throughput: [https://www.0xarchive.io/docs/guides/limits-and-throughput.md](https://www.0xarchive.io/docs/guides/limits-and-throughput.md) - Reliability and Gaps: [https://www.0xarchive.io/docs/guides/reliability-and-gaps.md](https://www.0xarchive.io/docs/guides/reliability-and-gaps.md) - AI Clients: [https://www.0xarchive.io/docs/ai-clients.md](https://www.0xarchive.io/docs/ai-clients.md) - Wallet Automation: [https://www.0xarchive.io/docs/wallet-automation.md](https://www.0xarchive.io/docs/wallet-automation.md) - CLI: [https://www.0xarchive.io/docs/cli.md](https://www.0xarchive.io/docs/cli.md) - API Playground: [https://www.0xarchive.io/docs/playground.md](https://www.0xarchive.io/docs/playground.md) - Response Schemas: [https://www.0xarchive.io/docs/schemas.md](https://www.0xarchive.io/docs/schemas.md) - Error Handling: [https://www.0xarchive.io/docs/errors.md](https://www.0xarchive.io/docs/errors.md) - Free Crypto Data API: [https://www.0xarchive.io/docs/free-crypto-data-api.md](https://www.0xarchive.io/docs/free-crypto-data-api.md) - Crypto Historical Data API: [https://www.0xarchive.io/docs/crypto-historical-data-api.md](https://www.0xarchive.io/docs/crypto-historical-data-api.md) - Hyperliquid Historical Data API: [https://www.0xarchive.io/docs/hyperliquid-historical-data-api.md](https://www.0xarchive.io/docs/hyperliquid-historical-data-api.md) - Hyperliquid HIP-3 Data API: [https://www.0xarchive.io/docs/hyperliquid-hip3-data-api.md](https://www.0xarchive.io/docs/hyperliquid-hip3-data-api.md) - Lighter API Quickstart: [https://www.0xarchive.io/docs/lighter-api-quickstart.md](https://www.0xarchive.io/docs/lighter-api-quickstart.md) - Native vs Managed Crypto Data API: [https://www.0xarchive.io/docs/native-vs-managed-crypto-data-api.md](https://www.0xarchive.io/docs/native-vs-managed-crypto-data-api.md) ## REST Families - Hyperliquid: `/v1/hyperliquid/*` - Lighter.xyz: `/v1/lighter/*` - Hyperliquid HIP-3: `/v1/hyperliquid/hip3/*` - Hyperliquid HIP-4: `/v1/hyperliquid/hip4/*` (no funding, no liquidations, no candles, by design) - Data quality: `/v1/data-quality/*` ## Hyperliquid Endpoints (/v1/hyperliquid) - GET /v1/hyperliquid/instruments - List all instruments - GET /v1/hyperliquid/instruments/{symbol} - Single instrument details - GET /v1/hyperliquid/orderbook/{symbol} - Current order book - GET /v1/hyperliquid/orderbook/{symbol}/history - Historical order book (Pro+) - GET /v1/hyperliquid/trades/{symbol} - Trade history - GET /v1/hyperliquid/candles/{symbol} - OHLCV candles (1m-1w intervals) - GET /v1/hyperliquid/funding/{symbol} - Funding rate history - GET /v1/hyperliquid/funding/{symbol}/current - Current funding rate - GET /v1/hyperliquid/openinterest/{symbol} - Open interest history - GET /v1/hyperliquid/openinterest/{symbol}/current - Current open interest - GET /v1/hyperliquid/liquidations/{symbol} - Liquidation history - GET /v1/hyperliquid/liquidations/{symbol}/volume - Aggregated liquidation volume - GET /v1/hyperliquid/liquidations/user/{user} - Liquidations for a specific user address - GET /v1/hyperliquid/freshness/{symbol} - Data freshness per type - GET /v1/hyperliquid/summary/{symbol} - Combined market summary - GET /v1/hyperliquid/prices/{symbol} - Mark/oracle price history - GET /v1/hyperliquid/orders/{symbol}/history - Order history with user attribution (Pro+) - GET /v1/hyperliquid/orders/{symbol}/flow - Order flow aggregation (Pro+) - GET /v1/hyperliquid/orders/{symbol}/tpsl - TP/SL order history (Pro+) - GET /v1/hyperliquid/orderbook/{symbol}/l4 - L4 orderbook reconstruction with user attribution (Pro+) - GET /v1/hyperliquid/orderbook/{symbol}/l4/diffs - L4 orderbook diffs (Pro+) - GET /v1/hyperliquid/orderbook/{symbol}/l4/history - L4 orderbook checkpoints (Build+) ## Lighter.xyz Endpoints (/v1/lighter) - GET /v1/lighter/instruments - List all instruments - GET /v1/lighter/instruments/{symbol} - Single instrument details - GET /v1/lighter/orderbook/{symbol} - Current order book - GET /v1/lighter/orderbook/{symbol}/history - Historical order book (Pro+) - GET /v1/lighter/trades/{symbol} - Trade history - GET /v1/lighter/trades/{symbol}/recent - Recent trades - GET /v1/lighter/candles/{symbol} - OHLCV candles - GET /v1/lighter/funding/{symbol} - Funding rate history - GET /v1/lighter/funding/{symbol}/current - Current funding rate - GET /v1/lighter/openinterest/{symbol} - Open interest history - GET /v1/lighter/openinterest/{symbol}/current - Current open interest - GET /v1/lighter/freshness/{symbol} - Data freshness - GET /v1/lighter/summary/{symbol} - Combined market summary - GET /v1/lighter/prices/{symbol} - Price history - GET /v1/lighter/l3orderbook/{symbol} - L3 order-level orderbook (Pro+) - GET /v1/lighter/l3orderbook/{symbol}/history - Historical L3 snapshots (Pro+) ## HIP-3 Builder Perps Endpoints (/v1/hyperliquid/hip3) - GET /v1/hyperliquid/hip3/instruments - List all HIP-3 instruments - GET /v1/hyperliquid/hip3/instruments/{symbol} - Single instrument details - GET /v1/hyperliquid/hip3/orderbook/{symbol} - Current order book - GET /v1/hyperliquid/hip3/orderbook/{symbol}/history - Historical order book (Pro+) - GET /v1/hyperliquid/hip3/trades/{symbol} - Trade history - GET /v1/hyperliquid/hip3/trades/{symbol}/recent - Recent trades - GET /v1/hyperliquid/hip3/candles/{symbol} - OHLCV candles - GET /v1/hyperliquid/hip3/funding/{symbol} - Funding rate history - GET /v1/hyperliquid/hip3/funding/{symbol}/current - Current funding rate - GET /v1/hyperliquid/hip3/openinterest/{symbol} - Open interest history - GET /v1/hyperliquid/hip3/openinterest/{symbol}/current - Current open interest - GET /v1/hyperliquid/hip3/liquidations/{symbol} - Liquidation history - GET /v1/hyperliquid/hip3/liquidations/{symbol}/volume - Aggregated liquidation volume - GET /v1/hyperliquid/hip3/freshness/{symbol} - Data freshness - GET /v1/hyperliquid/hip3/summary/{symbol} - Combined market summary - GET /v1/hyperliquid/hip3/prices/{symbol} - Price history - GET /v1/hyperliquid/hip3/orders/{symbol}/history - Order history (Pro+) - GET /v1/hyperliquid/hip3/orders/{symbol}/flow - Order flow aggregation (Pro+) - GET /v1/hyperliquid/hip3/orders/{symbol}/tpsl - TP/SL order history (Pro+) - GET /v1/hyperliquid/hip3/orderbook/{symbol}/l4 - L4 orderbook reconstruction (Pro+) - GET /v1/hyperliquid/hip3/orderbook/{symbol}/l4/diffs - L4 orderbook diffs (Pro+) - GET /v1/hyperliquid/hip3/orderbook/{symbol}/l4/history - L4 orderbook checkpoints (Build+) ## HIP-4 Outcome Markets Endpoints (/v1/hyperliquid/hip4) HIP-4 caveats for LLMs: - HIP-4 coins are referenced by their numeric id (e.g. `0`, `1`, `10`, `11`) in REST paths (e.g. `/v1/hyperliquid/hip4/orderbook/0`). The `#`-prefixed form (`#0`, `#10`) is also accepted for callers integrating from on-chain SDKs. - HIP-4 has no funding, no liquidations, no candles. Those routes return 404 by design. Do not suggest them. - HIP-4 `mark_price` is an implied probability (0..1), not a USD price. Same field name as perps because Hyperliquid upstream uses `markPx` for both. - HIP-4 markets settle (often within 1 day). After settlement `is_settled` flips true; historical data stays queryable. - All notional values are denominated in USDH (Hyperliquid stablecoin). - GET /v1/hyperliquid/hip4/outcomes - List outcome markets (filter `?is_settled=true|false`, cursor pagination) - GET /v1/hyperliquid/hip4/outcomes/{outcome_id} - Single outcome detail (includes `aggregated_oi`) - GET /v1/hyperliquid/hip4/instruments - List all HIP-4 instruments (one row per side; coin id format `10*outcome_id + side`) - GET /v1/hyperliquid/hip4/instruments/{symbol} - Single instrument details - GET /v1/hyperliquid/hip4/orderbook/{symbol} - Current order book (Pro+) - GET /v1/hyperliquid/hip4/orderbook/{symbol}/history - Historical order book (Pro+) - GET /v1/hyperliquid/hip4/trades/{symbol} - Trade history - GET /v1/hyperliquid/hip4/trades/{symbol}/recent - Recent trades - GET /v1/hyperliquid/hip4/openinterest/{symbol} - Side open interest history - GET /v1/hyperliquid/hip4/openinterest/{symbol}/current - Current side open interest - GET /v1/hyperliquid/hip4/freshness/{symbol} - Data freshness - GET /v1/hyperliquid/hip4/summary/{symbol} - Combined market summary - GET /v1/hyperliquid/hip4/prices/{symbol} - Mid-price history (probability, 0..1) - GET /v1/hyperliquid/hip4/orders/{symbol}/history - Order history (Pro+) - GET /v1/hyperliquid/hip4/orders/{symbol}/flow - Order flow aggregation (Pro+) - GET /v1/hyperliquid/hip4/orders/{symbol}/tpsl - TP/SL order history (Pro+) - GET /v1/hyperliquid/hip4/orderbook/{symbol}/l4 - L4 orderbook reconstruction (Pro+) - GET /v1/hyperliquid/hip4/orderbook/{symbol}/l4/diffs - L4 orderbook diffs (Pro+) - GET /v1/hyperliquid/hip4/orderbook/{symbol}/l4/history - L4 orderbook checkpoints (Build+) ## Data Quality Endpoints - GET /health - Lightweight API liveness check - GET /v1/data-quality/status - System health across all exchanges - GET /v1/data-quality/coverage - Data coverage overview - GET /v1/data-quality/coverage/{exchange} - Per-exchange coverage details - GET /v1/data-quality/coverage/{exchange}/{symbol} - Per-symbol coverage details - GET /v1/data-quality/incidents - Data quality incidents - GET /v1/data-quality/incidents/{id} - Single incident details - GET /v1/data-quality/latency - Latency metrics - GET /v1/data-quality/sla - SLA compliance report ## Route-Level Gates - GET /v1/hyperliquid/orderbook/{symbol}/l4/history - Requires Build tier or higher - GET /v1/hyperliquid/orders/{symbol}/history - Requires Pro tier or higher - GET /v1/hyperliquid/orders/{symbol}/flow - Requires Pro tier or higher - GET /v1/hyperliquid/orderbook/{symbol}/l4/diffs - Requires Pro tier or higher - GET /v1/hyperliquid/hip3/orderbook/{symbol}/l4/history - Requires Build tier or higher - GET /v1/hyperliquid/hip3/orders/{symbol}/history - Requires Pro tier or higher - GET /v1/lighter/l3orderbook/{symbol} - Requires Pro tier or higher - GET /v1/lighter/l3orderbook/{symbol}/history - Requires Pro tier or higher ## Web3 Authentication (Wallet-Based) No API key required for these endpoints. Use SIWE (Sign-In with Ethereum) to get a free API key programmatically. - POST /v1/auth/web3/challenge - Get SIWE challenge message (requires: address) - POST /v1/web3/signup - Create free-tier account and get API key (requires: signed SIWE message) - POST /v1/web3/keys - List all API keys for wallet (requires: signed SIWE message) - POST /v1/web3/keys/revoke - Revoke an API key (requires: signed SIWE message + key_id) - POST /v1/web3/subscribe - Subscribe to a paid tier via x402 USDC payment on Base (requires: tier in body, payment-signature header with EIP-3009 signed transfer) ## Legacy Endpoints (still supported) - GET /v1/orderbook/{symbol}, /v1/trades/{symbol}, /v1/funding/{symbol}, /v1/openinterest/{symbol}, /v1/instruments ## Data Coverage (Hyperliquid) - Order Book: April 2023 - Present (snapshot spacing varies by market activity and query window) - Trades: April 2023 - Present (pre-March 2025 fills are taker-only) - Candles: March 2025 - Present - Funding Rates: May 2023 - Present - Open Interest: May 2023 - Present - Liquidations: December 2025 - Present - 220+ perpetual futures contracts ## Data Coverage (Lighter.xyz) - Trades: August 2025 - Present - L2 Order Book: January 2026 - Present - Candles, OI, Funding: August 2025 - Present - L3 Order Book: March 2026 - Present ## Data Coverage (HIP-3 Builder Perps) - Order Book, Trades, Candles, OI, Funding, Liquidations: February 2026 - Present - 125+ markets across 6 builders: xyz (XYZ), flx (Felix Exchange), hyna (HyENA), km (Kinetiq Markets), vntl (Ventuals), cash (dreamcash) ## Data Coverage (HIP-4 Outcome Markets) - Order Book, Trades, OI, L4 diffs, L4 orders: 2026-05-02 ~07:47 UTC - Present - No funding, no liquidations, no candles (fully-collateralized binary outcomes, by design) - Active market count varies as outcomes settle and new ones open. Poll `/v1/hyperliquid/hip4/outcomes` for the live count. ## WebSocket API - URL: wss://api.0xarchive.io/ws?apiKey=YOUR_API_KEY (also wss://stream.0xarchive.io/ws) - One connection model for live subscriptions and historical replay - Real-time streaming (subscribe to live market data) - Historical replay (replay past data with original timing, configurable speed) - Realtime + historical replay: orderbook, trades, candles, funding, open_interest, liquidations, plus lighter_* and hip3_* variants (lighter_l3_orderbook, hip3_liquidations) and HIP-4 (hip4_orderbook, hip4_trades, hip4_open_interest) - Realtime only: ticker, all_tickers, l4_diffs, l4_orders, hip3_l4_diffs, hip3_l4_orders, hip4_l4_diffs, hip4_l4_orders (L4 channels are Pro+) - liquidations and hip3_liquidations channels are now live: each event is a fill row with `is_liquidation: true`, same wire shape as trades. They also continue to flow on `trades`/`hip3_trades` for backward compatibility — dedupe on `tid` if subscribing to both. - HIP-4 outcome markets: subscribe with raw `#0` form in the JSON (`{"op":"subscribe","channel":"hip4_orderbook","symbol":"#0"}`). REST routes accept the bare numeric form (`/hip4/orderbook/0`). - Base WebSocket access requires Build tier or higher ## Pricing - Free: 10M credits/month, 15 req/sec, 3 concurrent, BTC & km:US500 only - Build ($49/mo): 80M credits/month, 50 req/sec, 10 concurrent, all coins, replay, checkpoint history, WebSocket access - Pro ($199/mo): 400M credits/month, 150 req/sec, 20 concurrent, full L4, order flow, and order-level depth - Enterprise: Custom pricing, custom concurrency, dedicated support ## SDKs, CLI & Automation - Python: pip install oxarchive - TypeScript: npm install @0xarchive/sdk - Rust: cargo add oxarchive - CLI: npm install -g @0xarchive/cli (command: oxa) - MCP Server: 79 typed tools across market data, data quality, and wallet auth for Claude and other MCP clients - Claude Code Skill: curl + jq based Claude Code access without running MCP - MCP and Claude Code setup live under the AI Clients docs page ## Bulk Export - Data Explorer and bulk export: [https://www.0xarchive.io/data/](https://www.0xarchive.io/data/) - S3 Parquet bulk export for large dataset downloads ## Quick Start ### Python ```python from oxarchive import Client client = Client(api_key="0xa_your_key") # Hyperliquid orderbook = client.hyperliquid.orderbook.get("BTC") trades = client.hyperliquid.trades.list("ETH", start="2025-01-01", end="2025-01-02") # Lighter.xyz lighter_ob = client.lighter.orderbook.get("BTC") # HIP-3 hip3_instruments = client.hyperliquid.hip3.instruments.list() # HIP-4 outcome markets (coins are numeric ids: 0, 1, 10, 11, ...) hip4_outcomes = client.hyperliquid.hip4.outcomes.list(is_settled=False) ``` ### Rust ```rust use oxarchive::OxArchive; let client = OxArchive::new("0xa_your_key")?; let orderbook = client.hyperliquid().orderbook().get("BTC", None).await?; let lighter_ob = client.lighter().orderbook().get("BTC", None).await?; ``` ## Account - Sign up: [https://www.0xarchive.io/signup/](https://www.0xarchive.io/signup/) - Dashboard: [https://www.0xarchive.io/dashboard/](https://www.0xarchive.io/dashboard/) ## Links - Website: https://www.0xarchive.io - Documentation: https://www.0xarchive.io/docs/ - Pricing: https://www.0xarchive.io/pricing/ - Bulk Download: https://www.0xarchive.io/data/ ## Contact - Email: support@0xarchive.io - Website: https://www.0xarchive.io/contact/