# Hyperliquid Perpetuals Order Book Depth

> Hyperliquid Perpetuals Order Book Depth is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-13).

Returns the real-time order book for a Hyperliquid perpetual asset, including best bid/ask, spread in basis points, mid price, top N levels per side, and USD liquidity depth at ±0.5%, ±1%, and ±2% of mid price.

## Facts

- Endpoint: POST https://api.vextorium.com/hyperliquid-libro-pago?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hyperliquid-perpetuals-order-book-depth-c359b594
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qUFTPQsYTYWTAJqsczNSY

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability hyperliquid-perpetuals-order-book-depth-c359b594 -d '<json body>'
```

Example prompt: What does the ETH perpetual order book look like on Hyperliquid right now — give me the top 10 levels per side, the spread in basis points, and how much USD liquidity sits within 1% of mid?

## When to prefer this

Use this endpoint when you need real-time Hyperliquid perpetual order book data specifically — including granular depth, spread in basis points, and USD liquidity bands for slippage estimation. It is purpose-built for Hyperliquid perps and returns pre-computed depth metrics that would otherwise require multiple raw API calls and local aggregation. Prefer this over generic exchange APIs when the target market is Hyperliquid and you need actionable microstructure data for trade sizing or timing decisions.

## Known failure modes

- Unsupported or misspelled asset symbol returns null or error response
- Levels parameter outside 1-20 range may be clamped or rejected
- Hyperliquid API downtime causes stale or missing data
- Network latency may cause slightly outdated order book snapshots
- Payment failure (x402) results in 402 response before data is returned

## How this service works

Order book of a Hyperliquid perpetual: best bid/ask, spread in basis points, mid price, top levels and USD liquidity within ±0.5%, ±1% and ±2% of mid. Use it to estimate slippage before trading.

## Output

Returns a JSON object with: the asset ticker, best bid (mejor_compra) and best ask (mejor_venta), spread in price units and in basis points (spread_pb), mid price (precio_medio), arrays of bid and ask levels each containing price, size, and order count, USD liquidity depth buckets at ±0.5%, ±1%, and ±2% from mid (split by buys and sells), a timestamp, and a data source note.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "moneda"
     ],
     "properties": {
      "moneda": {
       "type": "string",
       "description": "Asset, e.g. BTC, ETH, SOL, HYPE"
      },
      "niveles": {
       "type": "integer",
       "description": "Levels per side (1-20, default 10)"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": [
      "object",
      "null"
     ],
     "properties": {
      "nota": {
       "type": [
        "string",
        "null"
       ]
      },
      "activo": {
       "type": [
        "string",
        "null"
       ]
      },
      "fuente": {
       "type": [
        "string",
        "null"
       ]
      },
      "spread": {
       "type": [
        "number",
        "null"
       ]
      },
      "ventas": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": [
         "null",
         "object"
        ],
        "properties": {
         "precio": {
          "type": [
           "null",
           "number"
          ]
         },
         "tamano": {
          "type": [
           "null",
           "number"
          ]
         },
         "ordenes": {
          "type": [
           "null",
           "number"
          ]
         }
        }
       }
      },
      "compras": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": [
         "null",
         "object"
        ],
        "properties": {
         "precio": {
          "type": [
           "null",
           "number"
          ]
         },
         "tamano": {
          "type": [
           "null",
           "number"
          ]
         },
         "ordenes": {
          "type": [
           "null",
           "number"
          ]
         }
        }
       }
      },
      "momento": {
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "nota": "Profundidad aproximada, con el libro agregado de Hyperliquid (20 niveles por lado).",
  "activo": "ETH",
  "fuente": "Hyperliquid (datos abiertos)",
  "spread": 0.1,
  "ventas": [
   {
    "precio": 2721.3,
    "tamano": 9.8106,
    "ordenes": 3
   },
   {
    "precio": 2721.4,
    "tamano": 19.6975,
    "ordenes": 3
   },
   {
    "precio": 2721.5,
    "tamano": 36.9922,
    "ordenes": 11
   },
   {
    "precio": 2721.6,
    "tamano": 62.0813,
    "ordenes": 9
   },
   {
    "precio": 2721.7,
    "tamano": 111.5755,
    "ordenes": 17
   }
  ],
  "compras": [
   {
    "precio": 2721.2,
    "tamano": 10.6164,
    "ordenes": 6
   },
   {
    "precio": 2721.1,
    "tamano": 1.2147,
    "ordenes": 5
   },
   {
    "precio": 2721,
    "tamano": 1.2147,
    "ordenes": 5
   },
   {
    "precio": 2720.9,
    "tamano": 15.5023,
    "ordenes": 6
   },
   {
    "precio": 2720.8,
    "tamano": 29.7899,
    "ordenes": 7
   }
  ],
  "momento": "2026-10-02T14:53:27+00:00",
  "spread_pb": 0.367,
  "mejor_venta": 2721.3,
  "mejor_compra": 2721.2,
  "precio_medio": 2721.25,
  "profundidad_usd": {
   "1%": {
    "ventas": 46808022,
    "compras": 59229054
   },
   "2%": {
    "ventas": 86066756,
    "compras": 102648588
   },
   "0.5%": {
    "ventas": 42536775,
    "compras": 46015761
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hyperliquid-perpetuals-order-book-depth-c359b594/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
