openapi: 3.2.0 info: title: 0xArchive Hyperliquid - Full-Depth L2 Order Book API description: REST API for current and historical market data from Hyperliquid and Lighter. Hyperliquid coverage includes core perpetuals, Spot, HIP-3 builder perpetuals, and HIP-4 outcome markets. Coverage and access requirements vary by route. See https://docs.0xarchive.io/ for authentication, limits, and examples. version: 1.6.1 termsOfService: https://0xarchive.io/terms contact: name: 0xArchive Support url: https://0xarchive.io email: support@0xarchive.io license: name: Proprietary url: https://0xarchive.io/terms servers: - url: https://api.0xarchive.io description: Production API security: - ApiKeyAuth: [] tags: - name: Hyperliquid - Full-Depth L2 Order Book description: Full-depth aggregated L2 order book snapshots, checkpoint history, and diffs for Hyperliquid perpetuals derived from L4 data. Full-depth checkpoints and diffs where available. paths: /v1/hyperliquid/orderbook/{symbol}/l2: get: tags: - Hyperliquid - Full-Depth L2 Order Book summary: Get Hyperliquid full-depth L2 order book description: Get a full-depth aggregated L2 order book snapshot derived from L4 data for Hyperliquid. Use this route when you need full-depth aggregated L2 from March 10, 2026 onward. The native /orderbook route remains capped at 20 venue-native levels. operationId: getHyperliquidFullDepthL2Orderbook parameters: - name: symbol in: path required: true description: Trading pair symbol (e.g., BTC, ETH, SOL) schema: type: string example: BTC example: BTC - name: timestamp in: query description: Unix timestamp in milliseconds. If not provided, returns the latest full-depth L2 snapshot. schema: type: integer format: int64 example: 1767225600000 - name: depth in: query description: Requested aggregated L2 levels per side. This dedicated route returns all available aggregated levels for the selected symbol and checkpoint. schema: type: integer example: 200 responses: '200': description: Full-depth L2 order book snapshot content: application/json: schema: $ref: '#/components/schemas/ApiResponseFullDepthL2OrderBook' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' /v1/hyperliquid/orderbook/{symbol}/l2/history: get: tags: - Hyperliquid - Full-Depth L2 Order Book summary: Get Hyperliquid full-depth L2 order book history description: Get paginated full-depth L2 checkpoint snapshots derived from L4 data for Hyperliquid from March 10, 2026 onward. The route returns full checkpoint depth; it does not currently accept a per-request depth override. operationId: getHyperliquidFullDepthL2History parameters: - name: symbol in: path required: true description: Trading pair symbol (e.g., BTC, ETH, SOL) schema: type: string example: BTC example: BTC - name: start in: query description: Start timestamp in Unix milliseconds. Defaults to 24h ago. schema: type: integer format: int64 example: 1767225600000 - name: end in: query description: End timestamp in Unix milliseconds. Defaults to now. schema: type: integer format: int64 example: 1767229200000 - name: cursor in: query description: Cursor for pagination (timestamp from previous response's `next_cursor`) schema: type: integer format: int64 - name: limit in: query description: 'Maximum number of checkpoint snapshots (default: 100, max: 1000)' schema: type: integer default: 100 maximum: 1000 responses: '200': description: Full-depth L2 checkpoint snapshots content: application/json: schema: $ref: '#/components/schemas/ApiResponseFullDepthL2OrderBookArray' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' /v1/hyperliquid/orderbook/{symbol}/l2/diffs: get: tags: - Hyperliquid - Full-Depth L2 Order Book summary: Get Hyperliquid full-depth L2 order book diffs description: Get tick-level aggregate L2 diffs derived from L4 deltas for Hyperliquid. operationId: getHyperliquidFullDepthL2Diffs parameters: - name: symbol in: path required: true description: Trading pair symbol (e.g., BTC, ETH, SOL) schema: type: string example: BTC example: BTC - name: start in: query description: Start timestamp in Unix milliseconds. Defaults to 24h ago. schema: type: integer format: int64 example: 1767225600000 - name: end in: query description: End timestamp in Unix milliseconds. Defaults to now. schema: type: integer format: int64 example: 1767229200000 - name: cursor in: query description: Cursor for pagination in `timestamp_ms_block_number` form from the previous response's `next_cursor`. schema: type: string example: '1767225600000_1023882395' - name: limit in: query description: 'Maximum number of diff events (default: 100, max: 1000)' schema: type: integer default: 100 maximum: 1000 responses: '200': description: Full-depth L2 diff events content: application/json: schema: $ref: '#/components/schemas/ApiResponseL2OrderBookDiffArray' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' components: schemas: ApiMeta: type: object description: Response metadata properties: count: type: integer description: Number of records returned next_cursor: type: - string - 'null' description: Cursor for pagination (timestamp). Use this value as the `cursor` parameter to fetch the next page of results. request_id: type: string format: uuid description: Unique request ID for support coverage_from: type: string format: date-time description: Earliest coverage for the requested symbol and data type. Present only when the requested window ends before coverage begins. notice: type: string description: Human-readable advisory about the response. Currently used when the requested window ends before coverage begins for the symbol; may carry other advisories in future. OrderBook: type: object description: L2 order book snapshot required: - symbol - coin - timestamp - bids - asks properties: symbol: type: string description: Trading pair symbol example: BTC coin: type: string description: Trading pair symbol (deprecated, use symbol instead) example: BTC deprecated: true timestamp: type: string format: date-time description: Snapshot timestamp (UTC) example: '2025-01-21T10:30:45.123Z' bids: type: array description: Bid price levels (best bid first) items: $ref: '#/components/schemas/PriceLevel' asks: type: array description: Ask price levels (best ask first) items: $ref: '#/components/schemas/PriceLevel' mid_price: type: string description: Mid price (best bid + best ask) / 2 example: '42150.50' spread: type: string description: Spread in absolute terms (best ask - best bid) example: '1.00' spread_bps: type: string description: Spread in basis points example: '2.37' FullDepthL2OrderBook: allOf: - $ref: '#/components/schemas/OrderBook' - type: object description: 0xArchive full-depth aggregated L2 order book snapshot derived from L4 data properties: bid_levels: type: integer description: Total bid price levels available before any depth truncation example: 9842 ask_levels: type: integer description: Total ask price levels available before any depth truncation example: 10318 total_bid_size: type: number description: Aggregate bid size across the available full-depth L2 book example: 10234.56 total_ask_size: type: number description: Aggregate ask size across the available full-depth L2 book example: 9876.54 L2OrderBookDiff: type: object description: Full-depth L2 aggregate diff event derived from L4 deltas required: - timestamp - block_number - side - price - size - count properties: timestamp: type: string format: date-time description: Diff timestamp (UTC) example: '2026-06-05T13:53:33.971Z' block_number: type: integer format: int64 description: Hyperliquid block number for the diff event example: 1023882395 side: type: string enum: - B - A description: 'Book side: B for bid, A for ask' example: B price: type: number description: Price level changed by this diff example: 61088 size: type: number description: Aggregate size at the price level after the diff example: 0.40603 count: type: integer description: Number of orders at the price level after the diff example: 3 PriceLevel: type: object description: Single price level in the order book required: - px - sz - n properties: px: type: string description: Price example: '42150.00' sz: type: string description: Total size at this price level example: '1.5' n: type: integer description: Number of orders at this level example: 15 Error: type: object description: Error response properties: code: type: integer description: HTTP status code error: type: string description: Error message error_code: type: string description: 'Machine-readable error code. Common values: `invalid_query_params` (a query parameter failed to parse or validate) and `invalid_path_params` (a path parameter failed to parse). Other endpoint-specific codes exist; treat unknown codes as generic errors of the given HTTP status.' request_id: type: string format: uuid description: Unique request ID for support ApiResponseL2OrderBookDiffArray: type: object properties: success: type: boolean example: true data: type: array items: $ref: '#/components/schemas/L2OrderBookDiff' meta: $ref: '#/components/schemas/ApiMeta' ApiResponseFullDepthL2OrderBookArray: type: object properties: success: type: boolean example: true data: type: array items: $ref: '#/components/schemas/FullDepthL2OrderBook' meta: $ref: '#/components/schemas/ApiMeta' ApiResponseFullDepthL2OrderBook: type: object properties: success: type: boolean example: true data: $ref: '#/components/schemas/FullDepthL2OrderBook' meta: $ref: '#/components/schemas/ApiMeta' responses: Unauthorized: description: Authentication required content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 401 error: Missing or invalid API key. Provide X-API-Key header. BadRequest: description: Invalid request content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 400 error: 'Failed to deserialize query string: limit: invalid digit found in string' error_code: invalid_query_params request_id: 3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05 RateLimited: description: Rate limit exceeded headers: X-RateLimit-Limit: schema: type: integer description: Requests per second limit X-RateLimit-Remaining: schema: type: integer description: Remaining requests this second X-RateLimit-Reset: schema: type: integer description: Unix timestamp when limit resets content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 429 error: Rate limit exceeded NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 404 error: Resource not found securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-API-Key description: API key for authentication. Get yours at https://0xarchive.io/dashboard externalDocs: description: 0xArchive Developer Docs url: https://docs.0xarchive.io/ x-0xarchive-docs-language-overlay: name: data-quality-supported-venue-language reason: Public OpenAPI language must describe supported venue-family coverage instead of broad exchange coverage. updated_at: '2026-05-24' remove_when: Public source OpenAPI uses supported venue-family wording for data-quality coverage and latency descriptions. x-0xarchive-docs-overlay: name: hyperliquid-spot reason: Hyperliquid Spot routes are included in the local REST contract. source: live endpoint behavior and public CLI/MCP/Skill surface truth updated_at: '2026-05-08' remove_when: Public source contract includes the same Spot route family.