# x402stock Perpetual Futures Order Book

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

Returns the level-2 order book for a named perpetual-futures market on Hyperliquid, with aggregated bid/ask price levels, sizes, and resting order counts.

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/perps/orderbook/:coin?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-perpetual-futures-order-book-4be31b70
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qfkfFYpWN_26kwABZp52y

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 x402stock-perpetual-futures-order-book-4be31b70
```

Example prompt: Pull the current level-2 order book for BTC perpetual futures from Hyperliquid — I want to see the top bid and ask price levels, sizes, and how many resting orders are at each level so I can gauge the spread and depth.

## When to prefer this

Use this endpoint when you need real-time perpetual futures market microstructure data — specifically bid/ask depth, spread, and resting order counts — for coins traded on Hyperliquid. Prefer this over spot order book endpoints when the user is analyzing perp markets. Prefer this over trade history or OHLCV endpoints when the focus is on current liquidity and order queue depth rather than historical price action. No API key required; cost is $0.01 USDC per call via x402.

## Known failure modes

- Invalid or unsupported coin symbol returns an error or empty book
- Coin exists but has very thin liquidity, resulting in a sparse order book with few levels
- Payment failure (insufficient USDC balance) blocks the request
- Network or DEX downtime may cause stale or unavailable book data
- Misspelling the coin path parameter returns no data or an error

## 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 aggregated level-2 order book data for the requested perpetual futures coin, including a list of bid price levels (each with price, size, and number of resting orders) and a list of ask price levels (same fields), plus a book timestamp indicating when the snapshot was taken. Enables calculation of spread, market depth, and liquidity profiles.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "coin": {
      "type": "string"
     },
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-perpetual-futures-order-book-4be31b70/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)
