# CryptoMacro Order Book Depth & Execution Cost Analyzer

> CryptoMacro Order Book Depth & Execution Cost Analyzer is a paid API for AI agents from asistent-crypto.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns live order book depth, average fill price, slippage in bps and dollars, spread, and venue comparison (Bybit vs OKX) for a given notional size before a trade is placed.

## Facts

- Endpoint: POST https://asistent-crypto.vercel.app/api/x402/data/orderbook-depth
- 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/cryptomacro-order-book-depth-execution-cost-analyzer-4d6f675e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xV4es3pK16dtlhlDSOThN

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 cryptomacro-order-book-depth-execution-cost-analyzer-4d6f675e -d '<json body>'
```

Example prompt: Before I buy $75,000 worth of BTC, walk the live order books on Bybit and OKX and tell me the average fill price, how much slippage I'd take in basis points and dollars, the spread, and which venue is cheaper for that exact size.

## When to prefer this

Use this endpoint when you need pre-trade execution cost transparency at a specific dollar size across Bybit and OKX — particularly for large orders where slippage and liquidity depth matter. Prefer this over generic price feeds when you need walked average fill prices rather than just the best bid/ask, and when venue comparison is needed to route the order optimally.

## Known failure modes

- Order book cannot absorb the requested notional — returns 'unfilled' status rather than a price
- Exchange API temporarily unavailable — one or both venues may return no data
- Invalid or unsupported trading pair — request returns an error
- Notional size of zero or negative — request rejected
- Stale order book snapshot due to latency — fill price may differ slightly from actual execution

## How this service works

What a trade actually costs before it is placed: live order book depth on Bybit and OKX, walked at your size. Give it a notional in dollars and it returns the average fill price, slippage against mid in basis points and dollars, the spread, the depth within 1% of mid, and which venue is cheaper for that exact size — separately for buying and selling. A size the book cannot absorb is reported as unfilled, never priced by extrapolation.

## Output

Returns for both buy and sell sides on Bybit and OKX: the average fill price at the specified notional, slippage versus mid in basis points and dollars, bid-ask spread, depth within 1% of mid, and a venue recommendation indicating which exchange is cheaper for that exact size. If the order book cannot absorb the requested size, the trade is reported as unfilled rather than extrapolated.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [],
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object"
    }
   },
   "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/cryptomacro-order-book-depth-execution-cost-analyzer-4d6f675e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from asistent-crypto.vercel.app](https://www.zero.xyz/host/asistent-crypto.vercel.app/llms.txt)
