# Crypto Market Data – Order Book & Market Microstructure

> Crypto Market Data – Order Book & Market Microstructure is a paid API for AI agents from crypto-market-data.zafermemon87.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-29).

Returns bid-ask spread, order-book imbalance, buyer share of the last 15 minutes, and volume vs. normal for up to 50 crypto coins.

## Facts

- Endpoint: GET https://crypto-market-data.zafermemon87.workers.dev/v1/orderbook?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crypto-market-data-order-book-market-microstructure-ee076065
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3gXfGRFb_c3rt98TWq53-

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 crypto-market-data-order-book-market-microstructure-ee076065
```

Example prompt: Pull the current bid-ask spread, order-book imbalance, and buyer share for BTC, ETH, and SOL — I want to see if any of them have unusually lopsided books or volume spikes right now.

## When to prefer this

Choose this endpoint when you need real-time order-book microstructure data (spread, imbalance, buy/sell pressure) rather than just price or OHLCV data. Ideal for pre-trade analysis, detecting unusual volume spikes, or assessing liquidity conditions across multiple coins in a single call. Prefer over price-only endpoints when the question involves buyer/seller dominance, book skew, or whether current volume is anomalous relative to recent norms.

## Known failure modes

- Invalid or unrecognized ticker symbols may return empty rows or errors
- Data is refreshed every ~60 seconds so stale data is possible (data_age_s field indicates freshness)
- Requesting more than 50 tokens may be rejected or truncated
- Service may return 402 Payment Required if payment header is missing or invalid
- Network timeout on the Cloudflare Workers edge if upstream exchange data is delayed

## How this service works

Bid-ask spread, order-book imbalance, buyer share of the last 15 minutes and volume versus normal per coin.

## Output

Returns a JSON array of rows per requested coin, each containing: bid-ask spread in basis points (spread_bps), buyer share over last 15 minutes (buyer_share_15m, 0–1), order-book imbalance (-1 sell-heavy to +1 buy-heavy), and volume vs. normal ratio (volume_15m_vs_normal). Also includes a plain-English summary, snapshot timestamp, data age in seconds, and a cryptographic snapshot seal for integrity verification.

## 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",
     "properties": {
      "tokens": {
       "type": "string",
       "description": "Comma-separated tickers, e.g. BTC,ETH,SOL (up to 50). Empty means all top 50."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "Public market data, refreshed every minute. Not financial advice.",
  "rows": [
   {
    "token": "BTC",
    "spread_bps": 0.0012,
    "buyer_share_15m": 0.615,
    "orderbook_imbalance": -0.033,
    "volume_15m_vs_normal": 1.58
   },
   {
    "token": "ETH",
    "spread_bps": 0.0419,
    "buyer_share_15m": 0.588,
    "orderbook_imbalance": 0.023,
    "volume_15m_vs_normal": 1.65
   }
  ],
  "tool": "orderbook",
  "as_of": "2026-10-23T20:03:00+05:30",
  "plain": "2 coins. Most lopsided book: BTC (-0.033).",
  "engine": "data-1.0",
  "charged": true,
  "price_usd": null,
  "data_age_s": 60,
  "snapshot_seal": "eb08dce6d854951431a0fb2732282227e1d954ec072422c9bfc5bee2f3ed695f",
  "imbalance_means": "-1 = the sell side of the order book is far heavier, +1 = the buy side is"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crypto-market-data-order-book-market-microstructure-ee076065/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from crypto-market-data.zafermemon87.workers.dev](https://www.zero.xyz/host/crypto-market-data.zafermemon87.workers.dev/llms.txt)
