Skip to main content
POST
/
info
l2Book | Hyperliquid Info API
curl --request POST \
  --url https://hypercore.goldrushdata.com/info \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "<string>",
  "coin": "<string>",
  "nSigFigs": 123,
  "mantissa": 123
}
'
{
  "coin": "<string>",
  "time": 123,
  "levels": [
    [
      {
        "px": "<string>",
        "sz": "<string>",
        "n": 123
      }
    ]
  ]
}

Credit Cost

1 per call

Processing

Realtime
The Hyperliquid info endpoint with type: "l2Book" is used to fetch an aggregated Level-2 order book snapshot for a single coin - bids and asks as price, size, and order-count levels.
  • Wire-equal to POST api.hyperliquid.xyz/info with {"type": "l2Book", "coin": "..."}.
  • Returns at most 20 levels per side.
  • For a continuous push stream instead of polling snapshots, subscribe to the WebSocket API l2Book channel (optional wildcard coin) or the GoldRush-native l2BookDiff for incremental updates.
Returns a point-in-time aggregated order book for one coin: two arrays of price levels (bids first, then asks), each level carrying the price, the total resting size at that price, and the number of orders comprising it. Use it for a one-shot depth snapshot, spread checks, or seeding a book before switching to a diff stream.

Endpoint

POST https://hypercore.goldrushdata.com/info
Authorization: Bearer <GOLDRUSH_API_KEY>
Content-Type: application/json

Request

type
string
default:"l2Book"
required
Always "l2Book".
coin
string
required
The asset symbol, e.g. "BTC". For HIP-3 markets use the deployer-prefixed form (e.g. "xyz:GOLD"); for spot use the pair symbol or @<index>.
nSigFigs
int
Number of significant figures to aggregate price levels to (2-5). Omit or pass null for full precision.
mantissa
int
Optional mantissa for price-level bucketing. Only valid when nSigFigs is 5. Omit or pass null for the default.

Example

curl -X POST https://hypercore.goldrushdata.com/info \
  -H "Authorization: Bearer $GOLDRUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "l2Book",
    "coin": "BTC"
  }'

Response

A single JSON object. levels is a two-element array: element 0 is the bid side (descending price), element 1 is the ask side (ascending price). Each level is a {px, sz, n} object.
{
  "coin": "BTC",
  "time": 1780940795265,
  "levels": [
    [
      { "px": "63405.0", "sz": "4.43382", "n": 36 },
      { "px": "63404.0", "sz": "3.38588", "n": 44 }
    ],
    [
      { "px": "63406.0", "sz": "0.00347", "n": 3 },
      { "px": "63407.0", "sz": "0.00017", "n": 1 }
    ]
  ]
}

Field descriptions

px and sz are returned as decimal strings, preserving upstream precision. Do not parse them as floats.
coin
string
The asset the book is for - echoes the request coin.
time
int
Snapshot timestamp in milliseconds since Unix epoch.
levels
array<array<object>>
Two-element array: levels[0] are bids (sorted highest price first), levels[1] are asks (sorted lowest price first). Each side defaults to up to 20 aggregated levels.
Last reviewed: 2026-06-13