GET
/
v1
/
perps
/
hyperliquid
/
markets
/
{symbol}
/
orderbook
Get Orderbook
curl --request GET \
  --url https://api.example.com/v1/perps/hyperliquid/markets/{symbol}/orderbook
{
  "bids": [
    {
      "price": "<string>",
      "size": "<string>"
    }
  ],
  "asks": [
    {
      "price": "<string>",
      "size": "<string>"
    }
  ],
  "timestamp": 123
}

Upstream Mapping

This endpoint maps to Hyperliquid’s POST /info with { "type": "l2Book", "coin": "<symbol>" }.

Request

provider
string
required
Must be hyperliquid
symbol
string
required
Market symbol (e.g., BTC, ETH)
depth
number
Number of price levels per side. Defaults to 20. Max 100.

Response

bids
array
Array of bid levels, sorted best (highest) first
asks
array
Array of ask levels, sorted best (lowest) first
timestamp
number
Server timestamp in milliseconds

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.perps.studio/v1/perps/hyperliquid/markets/BTC/orderbook?depth=5"
Example Response
{
  "bids": [
    { "price": "67542.1", "size": "2.35000" },
    { "price": "67541.0", "size": "5.12000" },
    { "price": "67540.5", "size": "1.80000" },
    { "price": "67539.0", "size": "10.00000" },
    { "price": "67538.5", "size": "3.45000" }
  ],
  "asks": [
    { "price": "67543.0", "size": "1.95000" },
    { "price": "67544.2", "size": "4.20000" },
    { "price": "67545.0", "size": "8.50000" },
    { "price": "67546.1", "size": "2.10000" },
    { "price": "67547.5", "size": "6.75000" }
  ],
  "timestamp": 1712000000000
}

Errors

StatusCodeDescription
400UNSUPPORTED_PROVIDERInvalid provider name
401INVALID_API_KEYMissing or invalid API key
404NOT_FOUNDMarket symbol not found
429RATE_LIMITEDRate limit exceeded
For real-time orderbook updates, use the WebSocket orderbook channel instead of polling this endpoint. See Stream Orderbook.