Route Metadata
| Field | Value |
|---|---|
| Method | GET |
| Path | /v1/hyperliquid/spot/orderbook/{symbol}/l4/diffs |
| operationId | getHyperliquidSpotL4Diffs |
| Tag | Hyperliquid Spot |
| Family | Hyperliquid Spot |
| Deprecated or legacy | no |
Request Parameters
Path Parameters
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "getHyperliquidSpotL4Diffs path parameters",
"type": "object",
"required": [
"symbol"
],
"properties": {
"symbol": {
"description": "Hyperliquid Spot pair symbol, for example HYPE-USDC",
"type": "string",
"example": "HYPE-USDC",
"x-parameter-location": "path"
}
}
}
Query Parameters
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "getHyperliquidSpotL4Diffs query parameters",
"type": "object",
"properties": {
"start": {
"description": "Start timestamp for bounded historical queries.",
"oneOf": [
{
"type": "integer",
"format": "int64",
"example": 1704067200000
},
{
"type": "string",
"format": "date-time",
"example": "2026-01-01T00:00:00Z"
}
],
"x-parameter-location": "query"
},
"end": {
"description": "End timestamp for bounded historical queries.",
"oneOf": [
{
"type": "integer",
"format": "int64",
"example": 1704070800000
},
{
"type": "string",
"format": "date-time",
"example": "2026-01-01T01:00:00Z"
}
],
"x-parameter-location": "query"
},
"cursor": {
"description": "Cursor for pagination. Use the value from the previous response metadata.",
"type": "string",
"x-parameter-location": "query"
},
"limit": {
"description": "Maximum number of records to return.",
"type": "integer",
"default": 100,
"maximum": 10000,
"x-parameter-location": "query"
}
}
}
Response Contracts
Status 200
L4 orderbook diff eventsapplication/json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "getHyperliquidSpotL4Diffs response 200",
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"description": "A single L4 order book diff event.",
"type": "object",
"properties": {
"block_number": {
"description": "Hyperliquid block number of the event.",
"type": "integer",
"format": "int64"
},
"coin": {
"type": "string"
},
"diff_type": {
"description": "new = order joined the book, update = resting size changed, remove = filled or canceled.",
"type": "string",
"enum": [
"new",
"update",
"remove"
]
},
"insert_before": {
"description": "ALO queue priority: the resting order ID this new order is inserted ahead of within its price level. null or absent means the order was appended at the queue tail. Populated on data from 2026-07-21 onward; absent on earlier history.",
"type": "integer",
"format": "int64",
"nullable": true
},
"new_size": {
"description": "Resting size after the event; null on remove.",
"type": "number",
"nullable": true
},
"oid": {
"description": "Order ID.",
"type": "integer",
"format": "int64"
},
"price": {
"type": "number"
},
"seq": {
"description": "Within-block sequence number.",
"type": "integer"
},
"side": {
"description": "B = bid, A = ask.",
"type": "string",
"enum": [
"B",
"A"
]
},
"timestamp": {
"description": "Event time in epoch milliseconds.",
"type": "integer",
"format": "int64"
},
"user_address": {
"description": "Address that owns the order.",
"type": "string"
}
}
}
},
"meta": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next_cursor": {
"type": "string"
},
"request_id": {
"type": "string",
"format": "uuid"
}
}
},
"success": {
"type": "boolean",
"example": true
}
}
}
Status 400
Invalid requestapplication/json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "getHyperliquidSpotL4Diffs response 400",
"description": "Error response",
"type": "object",
"properties": {
"code": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"description": "Error message",
"type": "string"
},
"error_code": {
"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.",
"type": "string"
},
"request_id": {
"description": "Unique request ID for support",
"type": "string",
"format": "uuid"
}
}
}
OpenAPI 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"
}
Status 401
Authentication requiredapplication/json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "getHyperliquidSpotL4Diffs response 401",
"description": "Error response",
"type": "object",
"properties": {
"code": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"description": "Error message",
"type": "string"
},
"error_code": {
"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.",
"type": "string"
},
"request_id": {
"description": "Unique request ID for support",
"type": "string",
"format": "uuid"
}
}
}
OpenAPI example
{
"code": 401,
"error": "Missing or invalid API key. Provide X-API-Key header."
}
Status 429
Rate limit exceededapplication/json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "getHyperliquidSpotL4Diffs response 429",
"description": "Error response",
"type": "object",
"properties": {
"code": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"description": "Error message",
"type": "string"
},
"error_code": {
"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.",
"type": "string"
},
"request_id": {
"description": "Unique request ID for support",
"type": "string",
"format": "uuid"
}
}
}
OpenAPI example
{
"code": 429,
"error": "Rate limit exceeded"
}