# Hyperliquid Spot Order Book (Level-2)

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

Returns the Level-2 aggregated bid/ask order book for a Hyperliquid spot market token, including price levels, sizes, and resting order counts.

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/spot/orderbook/{token}?utm_source=zero.xyz
- Price: $0.01/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Provider: agents.x402stock.xyz
- Website: https://agents.x402stock.xyz
- Canonical page: https://www.zero.xyz/c/agents-x402stock-xyz-hyperliquid-spot-order-book-level-2-70504d78
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fnQbMMhqDskzQ2-wNuhXd

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-spot-order-book-level-2-70504d78
```

Example prompt: Show me the current Level-2 spot order book for HYPE on Hyperliquid — I want to see the bid and ask price levels with sizes and how many orders are resting at each level.

## When to prefer this

Use this endpoint when you need real-time spot market depth and liquidity data for a Hyperliquid-listed token. Choose this over the perp orderbook endpoint specifically for spot tokens. Prefer this when assessing spread, available depth, or resting order density before executing a spot trade on Hyperliquid. It requires no API key — only a per-call USDC payment via x402.

## Known failure modes

- Invalid or unrecognized token symbol returns an error response
- Token exists on perps but not spot — use the perp orderbook endpoint instead
- Hyperliquid API unavailability causes upstream errors
- Rate limiting or payment failure via x402 results in 402 response
- Malformed @index parameter returns an error

## How this service works

Level-2 order book for one Hyperliquid spot market.

## Output

Returns a JSON object containing the trading pair, venue, market type (spot), timestamp, and two arrays — bids and asks — each with price levels, corresponding token sizes, and the number of resting orders at each level.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "token"
 ],
 "properties": {
  "token": {
   "type": "string",
   "description": "Hyperliquid spot token symbol, e.g. PURR."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "source",
  "as_of",
  "venue",
  "market",
  "pair",
  "id",
  "bids",
  "asks"
 ],
 "properties": {
  "id": {
   "type": "string"
  },
  "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
   }
  },
  "pair": {
   "type": "string"
  },
  "as_of": {
   "type": "string"
  },
  "venue": {
   "type": "string"
  },
  "market": {
   "type": "string",
   "const": "spot"
  },
  "source": {
   "type": "string",
   "const": "x402stock"
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agents-x402stock-xyz-hyperliquid-spot-order-book-level-2-70504d78/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)
