data as generic objects, keep the envelope and metadata, inspect the current endpoint response, and avoid binding a fixed model from an example.
Most market-data routes use this envelope:
L2 order book snapshot
Request:px is the level price, sz is total size at that price, and n is the number of orders contributing to the level.
Trade list
Request:side uses venue side codes. Preserve direction, maker/taker fields, fees, cursor, and request ID when trades feed a backtest or risk view.
Empty page with cursor exhausted
Some bounded historical requests can succeed with no returned rows. Treat an emptydata array as a valid response when success is true; the job decision should come from the requested window, data-quality state, and meta.has_more. A final page can be empty when the previous page was exactly full; has_more is false on it and next_cursor is absent.
Funding, open interest, and candles
Funding response:Liquidation event
Hyperliquid Spot trade
HYPE-USDC. Keep Spot routes separate from core perp symbols such as HYPE.
HIP-3 builder market trade
km:. Do not strip the prefix when routing, storing rows, or comparing to Hyperliquid core symbols.
HIP-4 outcome book
mid_price and mark_price are probability-like values in [0, 1], not ordinary USD prices.
L4, L3, and lifecycle routes
L4 current snapshot routes return one reconstructed book object indata; their /history routes return arrays of snapshot objects. Lighter L3 follows the same grain: the current route returns one book object, while history returns an array of snapshots. Diff and lifecycle routes are separate array response contracts; use the route’s Endpoint Reference page for their item shape. Do not normalize these route families into one shared array or object model.
Read the route’s Endpoint Reference page before creating typed models for these route families. Do not copy L4 or L3 field names from another venue, export schema, or browser view into API client code.
Lighter L3 order book
Request:data, not an array of books. order_index and owner_account_index are numeric Lighter indexes; price, remaining_size, and original_size are JSON numbers. These fields are not owner addresses, wallet addresses, or raw order IDs. Do not parse it as an aggregated L2 book, and keep the Lighter venue family attached to stored records.
Data freshness
Request:Data-quality coverage response
Request:success, data, or meta.request_id from coverage bodies that do not expose those fields.
Error response
Request without an API key:error_code as the reason. The JSON body explains what failed and carries the request ID needed for logs, support, retries, or agent tasks.