# 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. 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 - Health: GET /health is a lightweight unauthenticated liveness check - Format: JSON responses - Rate limits: 15-150 requests/second depending on plan (3-20 concurrent queries per key) ## 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+) ## 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 ## 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 (~1.2s resolution) - Trades: April 2023 - Present (pre-March 2025 fills are taker-only) - Candles: May 2025 - Present - Funding Rates: May 2023 - Present - Open Interest: May 2023 - Present - Liquidations: May 2025 - Present - 220+ perpetual futures contracts ## Data Coverage (Lighter.xyz) - Trades: August 2025 - Present - Order Book, Candles, OI, Funding: January 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) ## WebSocket API - URL: wss://api.0xarchive.io/ws?apiKey=YOUR_API_KEY - Real-time streaming (subscribe to live market data) - Historical replay (replay past data with original timing, configurable speed) - S3 Parquet bulk export (for large dataset downloads via Data Explorer) - Channels: orderbook, trades, candles, funding, open_interest, liquidations, ticker, all_tickers (plus lighter_* and hip3_* variants including lighter_l3_orderbook, hip3_liquidations) - L4 Channels (real-time only, Pro+): l4_diffs, l4_orders, hip3_l4_diffs, hip3_l4_orders - 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 - Python: pip install oxarchive - TypeScript: npm install @0xarchive/sdk - Rust: cargo add oxarchive - CLI: npm install -g @0xarchive/cli (command: oxa) - MCP Server: 73 typed tools for Claude and other MCP clients - Claude Code Skill: curl + jq based Claude Code access without running MCP ## 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() ``` ### 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?; ``` ## Links - Website: https://www.0xarchive.io - Documentation: https://www.0xarchive.io/docs - Pricing: https://www.0xarchive.io/pricing - Sign Up: https://www.0xarchive.io/signup ## Contact - Email: support@0xarchive.io - Website: https://www.0xarchive.io/contact