get_consolidated_orderbook
Fetch L2 order books from multiple exchanges in parallel and merge into one virtual book to identify the best bid and ask across the market, with each level attributed to its source exchange for per-venue liquidity analysis.
Instructions
Fetch L2 order books from many exchanges in parallel and merge into one virtual book.
Answers "where is the best bid/ask across the whole market?" — more useful
than per-venue get_orderbook for execution analysis. The merged book does
NOT aggregate by price level; each level retains its source exchange so the
LLM can attribute liquidity per venue.
Args:
symbol: CCXT unified symbol (e.g. "BTC/USDT"). Some exchanges may
reject the symbol (BadSymbol) — those go into exchanges_error.
exchange_ids: Comma-separated CCXT exchange IDs (capped at 10).
depth: Levels per side per exchange, clamped to [1, 50].
Returns: Object with: - symbol, depth_per_exchange - exchanges_ok: list of exchange ids that responded - exchanges_error: list of {exchange, error} for failures - bids: merged bids sorted by price desc, capped at depth*len(ok), each entry {price, amount, exchange} - asks: merged asks sorted by price asc, capped likewise - best_bid, best_ask: top of merged book with attribution - spread_bps: (best_ask - best_bid) / mid * 10000
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | BTC/USDT | |
| exchange_ids | No | binance,okx,bybit,kraken,bitstamp | |
| depth | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||