# Hyperliquid Perpetual Futures Level-2 Order Book

> Hyperliquid Perpetual Futures Level-2 Order Book is a paid API for AI agents from agents.x402stock.xyz, paid per call via MPP, $0.01/call, status unknown (last checked 2026-09-10).

Returns the aggregated level-2 order book (bids and asks with price, size, and order count) for a specified Hyperliquid perpetual-futures market.

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/perps/orderbook/{coin}
- Price: $0.01/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-09-10
- Activations on Zero: 0
- Provider: agents.x402stock.xyz
- Website: https://agents.x402stock.xyz
- Canonical page: https://www.zero.xyz/c/agents-x402stock-xyz-hyperliquid-perpetual-futures-level-2-order-book-923f9714
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D6etYYQRXbwM9MdJe6KjD

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 agents-x402stock-xyz-hyperliquid-perpetual-futures-level-2-order-book-923f9714
```

Example prompt: Show me the current level-2 order book for BTC perpetual futures on Hyperliquid — I want to see the bids, asks, sizes, and number of resting orders at each price level.

## When to prefer this

Use this endpoint when you need real-time, granular order book depth data for Hyperliquid perpetual futures markets — specifically when assessing liquidity, bid-ask spread, or the number of resting orders at each price level before executing a trade or conducting market microstructure analysis. Prefer this over spot crypto data endpoints when the target instrument is a perpetual futures contract on Hyperliquid's on-chain DEX.

## Known failure modes

- Invalid or unsupported coin symbol returns an error or empty book arrays
- Coin symbol not listed on Hyperliquid perpetuals results in a 404 or empty response
- Temporary Hyperliquid DEX unavailability may cause stale or missing data
- Malformed path parameter (e.g. lowercase when uppercase required) may yield no results

## How this service works

The level-2 order book for one perpetual-futures market: aggregated bid and ask price levels, each with size and the number of resting orders, as of the book timestamp. Pass the coin in the path (e.g. BTC). Use to gauge liquidity, spread, and depth. Free on-chain DEX data (venue: Hyperliquid), no key. From x402stock, a market & economic data API (x402, USDC).

## Output

Returns a JSON object with the coin symbol, venue name ('Hyperliquid'), a timestamp ('as_of'), and two arrays — 'bids' and 'asks' — each containing price level objects with the price (number or null), aggregated size (number or null), and number of resting orders (number or null) at that level.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "coin"
 ],
 "properties": {
  "coin": {
   "type": "string",
   "description": "Hyperliquid perpetual coin symbol, e.g. BTC or ETH."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "source",
  "as_of",
  "venue",
  "coin",
  "bids",
  "asks"
 ],
 "properties": {
  "asks": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "price",
     "size",
     "orders"
    ],
    "properties": {
     "size": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     },
     "price": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     },
     "orders": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "additionalProperties": false
   }
  },
  "bids": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "price",
     "size",
     "orders"
    ],
    "properties": {
     "size": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     },
     "price": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     },
     "orders": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "additionalProperties": false
   }
  },
  "coin": {
   "type": "string"
  },
  "as_of": {
   "type": "string"
  },
  "venue": {
   "type": "string"
  },
  "source": {
   "type": "string",
   "const": "x402stock"
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agents-x402stock-xyz-hyperliquid-perpetual-futures-level-2-order-book-923f9714/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.x402stock.xyz](https://www.zero.xyz/host/agents.x402stock.xyz/llms.txt)
