# Binance Order Book Depth

> Binance Order Book Depth is a paid API for AI agents from api.chainmarket-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-24).

Fetches the current bid/ask order book depth for a Binance spot trading pair, with configurable depth levels.

## Facts

- Endpoint: GET https://api.chainmarket-api.workers.dev/api/crypto/binance-orderbook-depth?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/binance-order-book-depth-a8129dab
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ueZYM3pJ3kF_9CEXSDcUF

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 binance-order-book-depth-a8129dab
```

Example prompt: Pull the current Binance order book for BTCUSDT and show me the top 20 levels on each side.

## When to prefer this

Use this endpoint when you need real-time order book depth from Binance spot markets without managing API keys or subscriptions. Ideal for AI agents that need instant microstructure data (spread, liquidity, price levels) for a specific spot pair. Pay-per-call via x402 makes it suitable for low-frequency or ad-hoc queries where a monthly subscription would be wasteful.

## Known failure modes

- Invalid symbol returns an error (e.g. unknown or delisted pair)
- Invalid limit value (not one of 5, 10, 20, 50, 100) may be rejected or defaulted
- Payment failure results in no charge and no data returned
- Binance API downtime causes upstream failure
- Rate limits or connectivity issues on the worker may result in timeout

## How this service works

Binance spot order book snapshot for one pair: best bid and ask, spread, USD depth within 1% and 2% of mid price (from the returned levels only), and 24h volume, change and high/low. Up to 100 levels per side. Snapshot only; Binance market data, not a merged multi-exchange book.

## Output

Returns a list of bids and asks for the requested trading pair, each as [price, quantity] pairs, ordered from best to worst, up to the specified depth limit (5, 10, 20, 50, or 100 levels per side).

## 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": [
      "symbol"
     ],
     "properties": {
      "limit": {
       "type": "string",
       "description": "Levels per side: 5, 10, 20, 50 or 100 (default 100)"
      },
      "symbol": {
       "type": "string",
       "description": "Binance spot pair, e.g. BTCUSDT, ETHUSDT"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/binance-order-book-depth-a8129dab/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.chainmarket-api.workers.dev](https://www.zero.xyz/host/api.chainmarket-api.workers.dev/llms.txt)
