Skip to main content
Model the response shapes every REST route shares, then take each route’s own types from its operation schema. Responses covers parser behavior and Example responses shows real payloads.

Schema source

OpenAPI, the Endpoint Reference, and the operation schemas define REST requests and responses. The schema pages are refreshed from openapi.json, so you can browse component schemas, operation schemas, and route families directly. Examples help with parser expectations, but client types should come from the schema pages. The shared envelope, as JSON Schema:

Browse schemas by family

Envelope

boolean
true for successful responses. Error responses use success: false.
object | array
Route payload. Historical list routes usually return arrays, while market-state routes often return objects.
integer
Number of returned items.
boolean
On cursor-paged routes, true when another page exists. Keep paging while it is true.
string
Opaque cursor for the next page. Present exactly when meta.has_more is true; send it back unchanged as cursor.
string
On per-symbol routes, the canonical public symbol for the venue.
string
On per-symbol routes, the venue key: hyperliquid, hip3, hip4, spot, lighter, or rh-lighter.
string
Identifier to log for debugging and support.

Error

Every error response uses one shape. Branch on error_code; the full list with HTTP statuses is on Errors.
boolean
Always false.
integer
The HTTP status.
string
Stable snake_case reason, for example invalid_parameter, unsupported_for_venue, or rate_limited.
string
Human-readable message. Do not parse it.
string
Identifier for the failed request, at the top level of error bodies.
string
The parameter that caused the error, when one did. valid_values lists the accepted values when the set is small.

Pagination

Cursor-paged routes set meta.has_more. While it is true, repeat the request with cursor set to meta.next_cursor and every other parameter unchanged; stop when it is false. A final page can be empty. The largest limit per route family is page_limit in capabilities. See Pagination. The generated Error and ApiMeta component pages follow the published OpenAPI document and are refreshed with it.

What each data family holds

Model client types

Apply these rules when you generate types, warehouse tables, or parser instructions. Keep numeric-looking market fields as strings unless the route schema or generated type states otherwise. Prices, sizes, spreads, rates, and open-interest values often need decimal-safe handling; convert them at the application edge with a decimal library instead of floating-point defaults in strategy, accounting, or model code.

Market fields

Order-book payloads include bids, asks, timestamps, mid price, spread, and venue-specific depth fields. L3 and L4 records should be stored separately from ordinary L2 snapshots.
Trade payloads include side, price, size, timestamp, and route-specific fields such as wallet/account identifiers when the source returns them.
Funding and OI payloads include timestamped rate, premium, mark, mid, and open-interest fields depending on venue family.
HIP-4 mark_price and mid_price represent implied probability in [0, 1], not USD.
Coverage, latency, freshness, incident, and SLA payloads are trust signals. A client should compare them to the job tolerance before downstream systems use market data.

Export schemas versus API schemas

API schemas describe JSON responses from REST and WebSocket surfaces. Export schemas describe file-style Parquet datasets from the Data Catalog. Keep those models separate. An API order-book response, an L2 export, an L3 export, an L4 order-book export, and an order-events export can all represent order-book-adjacent data, but they should not share one warehouse schema without preserving source and schema key. Use Export schemas for schema keys such as l2_orderbook, l3_orderbook, l4_orderbook, l4_orders, trades, funding, oi, and liquidations.

Next step

Open a route’s request and response JSON Schema in Operation schemas.
Last modified on October 6, 2026