POST /info/l2Book

Auth X-Hub-Key from API_HUB_KEYExecute POST /run/hyperliquid/info/l2BookCache executed live on every call — a read-only POST answer is never cachedCost free · weight 0 · standard rate classSource billing free

L2 order-book snapshot for one coin: aggregated bid and ask levels with price, size and order count.

Parameters

nameintypedescription
coinbodystrrequiredExchange coin symbol, e.g. BTC or ETH.
example: BTC
nbodyintoptionalNumber of levels per side (1-20; upstream default 20).
default: 20
example: 5

Response

type: object
data key: levels
pagination: none
sample: {
  "coin": "str",
  "time": "int",
  "levels": "array[2]"
}

Safe request

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sX POST "https://openapihub.dev/run/hyperliquid/info/l2Book" \
  -H "X-Hub-Key: $API_HUB_KEY" -H "Content-Type: application/json" \
  -d '{"coin": "BTC", "n": 5}'