# Hyperliquid Perp Orderbook Depth API

> Hyperliquid Perp Orderbook Depth API is a paid API for AI agents from opportunity-api-production.up.railway.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns real-time perpetual futures orderbook microstructure for a given coin on Hyperliquid: best bid/ask, spread in bps, mid price, bid/ask USD depth, imbalance, and top-15 levels per side.

## Facts

- Endpoint: GET https://opportunity-api-production.up.railway.app/api/orderbook
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hyperliquid-perp-orderbook-depth-api-0f73a2e3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ld-pIxqfzdX_FT4Pq7WvA

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-perp-orderbook-depth-api-0f73a2e3
```

Example prompt: Pull the live orderbook for BTC perps on Hyperliquid and tell me the best bid/ask, spread in bps, and whether there's a notable order imbalance right now.

## When to prefer this

Use this endpoint when you need real-time perpetual futures orderbook microstructure specifically from Hyperliquid — including spread, depth, and imbalance signals — for trading agents, execution algorithms, or market analysis. Prefer this over generic price feeds when you need multi-level depth data (top 15 levels) and order imbalance signals rather than just spot prices.

## Known failure modes

- Invalid or unsupported coin symbol returns an error or empty response
- Hyperliquid API downtime causes upstream failure
- Network timeout if Hyperliquid exchange is slow to respond
- Missing coin parameter defaults to BTC rather than returning an error
- Payment not included or insufficient USDC results in HTTP 402

## How this service works

Live perp orderbook depth (Hyperliquid): best bid/ask, spread in bps, mid, bid/ask depth in USD, imbalance, top-15 levels each side. Microstructure signal for trading agents. Param: coin (e.g. BTC, ETH, SOL, HYPE).

## Output

Returns a structured snapshot of the Hyperliquid perpetual futures orderbook for the requested coin, including: best bid price, best ask price, spread in basis points, mid price, total bid-side and ask-side USD depth, an order imbalance metric, and the top 15 price levels on each side with their sizes.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "coin": {
       "type": "string",
       "description": "Hyperliquid perp symbol, e.g. BTC, ETH, SOL, HYPE. Default BTC"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hyperliquid-perp-orderbook-depth-api-0f73a2e3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from opportunity-api-production.up.railway.app](https://www.zero.xyz/host/opportunity-api-production.up.railway.app/llms.txt)
