Order book depth + slippage
orderbook_depthHow much size a market can take: bid/ask depth within ±0.1/0.5/1/2/5%, spread, and the slippage of a $10k/$100k/$1M market order on Kraken, Coinbase or OKX. Pulls the full public L2 book and walks it. Use before sizing an order or comparing venue liquidity. slippage is vs. mid price, in basis points; null means the fetched book was too thin for that size. When to use: For liquidity and slippage; for just prices use cex_ticker. Price: $0.003 per call (10 free/day; after that a payment-required result lists x402 options). Errors: returns isError with a message for invalid input or an upstream failure (not charged).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pair": "<pair>"
},
"name": "orderbook_depth"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pair | Yes | Market pair as BASE/QUOTE, e.g. "BTC/USD" or "ETH/USDT". | |
| venue | No | Exchange whose order book to read. One of "coinbase", "kraken", "okx". Default "coinbase". | coinbase |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mid | No | ||
| pair | No | ||
| venue | No | ||
| levels | No | ||
| best_ask | No | ||
| best_bid | No | ||
| depth_usd | No | ||
| spread_bps | No | ||
| slippage_bps_market_buy | No | ||
| slippage_bps_market_sell | No |