POST request to https://api.hyperliquid.xyz/info with type set to "l2Book" and a required coin field. The endpoint returns at most 20 levels per side, according to the Hyperliquid info endpoint documentation available on 2026-11-18.
Request
Use the Content-Type: application/json header.
| Field | Required | Type | Description |
|---|---|---|---|
type | Yes | String | Must be "l2Book" |
coin | Yes | String | Coin to query |
nSigFigs | No | Number | Optional aggregation to significant figures. Valid values are 2, 3, 4, 5, and null; null means full precision |
mantissa | No | Number | Optional aggregation field. Allowed only when nSigFigs is 5. Accepts 1, 2, or 5 |
{
"type": "l2Book",
"coin": "BTC"
}
Aggregated request example:
{
"type": "l2Book",
"coin": "BTC",
"nSigFigs": 5,
"mantissa": 1
}
Response
The response is an object with coin, time, and levels.
Like what you're reading? Try it yourself โ this link supports ChartedTrader at no cost to you.
Create a Hyperliquid account and get a 4% fee discount on the first $25M of volume; Vaults and sub-accounts are excluded. โ| Field | Description |
|---|---|
coin | Coin returned in the request |
time | Timestamp from the documented response shape |
levels | Array containing two side arrays |
| Field | Description |
|---|---|
px | Price |
sz | Size |
n | Documented as number of levels |
Reference response example from the documentation:
{
"coin": "BTC",
"time": 1754450974231,
"levels": [
[
{
"px": "113377.0",
"sz": "7.6699",
"n": 17
},
{
"px": "113376.0",
"sz": "4.13714",
"n": 8
}
],
[
{
"px": "113397.0",
"sz": "0.11543",
"n": 3
}
]
]
}
Coin naming
For perpetuals, coin is the name returned in the meta response. For spot, use PURR/USDC for PURR, or @{index} for other spot tokens, where the index is the spot-pair index from the universe field of the spotMeta response. See Hyperliquid API Asset IDs for the broader asset-ID mapping. For general order-book context, see Hyperliquid HyperCore order book explained.
Affiliate disclosure
The Hyperliquid account link below is a referral link and may earn a commission.
Create a Hyperliquid accountContinue with Hyperliquid
Browse the Hyperliquid guide hub for the complete user journey.