{"uid":"cap__T-PRYwMSlaB2uwyFgZLV","slug":"order-book-depth-slippage-9d2f4203","name":"Order Book Depth & Slippage","description":"Perp funding rates, open interest, futures basis, implied volatility, liquidations, order book depth and a perp screener for crypto perpetual futures across 8 exchanges (Bybit, Hyperliquid, dYdX, Gate, Kraken, Bitfinex, Deribit, OKX), paid per call over x402 with USDC on Base. No account, no API key.","url":"https://derivs.duoleads.com/v1/orderbook?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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":["coin"],"properties":{"coin":{"type":"string","maxLength":32,"minLength":1,"description":"Coin symbol: BTC, ETH, SOL, PEPE ... (also BTCUSDT, BTC-PERP, XBT, 1000PEPE, kPEPE)."},"levels":{"type":"string","default":"0","pattern":"^[0-9]{1,2}$","description":"Also return the top N price levels per side (0-20). Default 0."},"size_usd":{"type":"string","default":"100000","description":"Order size in USD for the slippage estimate (1-1e9). Default 100000."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"coin":"BTC","colo":null,"as_of":"2026-10-14T23:00:00Z","units":{"times":"ISO 8601 UTC","levels":"[price USD, size coins]","prices":"USD per coin","depth_usd":"USD resting within +/- pct % of mid (price x size)","imbalance":"(bid_usd - ask_usd) / (bid_usd + ask_usd), -1..1","spread_bps":"(ask - bid) / mid x 10,000","slippage_bps":"average fill vs mid in basis points (>= 0 is worse than mid)"},"venues":[{"mid":81644.95,"as_of":"2026-10-14T23:00:00Z","depth":[{"pct":0.1,"ask_usd":7913202.056,"bid_usd":8009555.947,"imbalance":0.00605133},{"pct":0.5,"ask_usd":7913202.056,"bid_usd":8009555.947,"imbalance":0.00605133}],"stale":false,"venue":"bybit","walls":{"asks":[{"price":81672,"size_usd":510695.016},{"price":81669.3,"size_usd":452692.9299}],"bids":[{"price":81634.1,"size_usd":642378.7329},{"price":81644.9,"size_usd":483174.5182}]},"symbol":"BTCUSDT","best_ask":81645,"best_bid":81644.9,"slippage":{"buy":{"filled":true,"avg_price":81645,"filled_usd":100000,"slippage_bps":0.00612408},"sell":{"filled":true,"avg_price":81644.9,"filled_usd":100000,"slippage_bps":0.00612408},"size_usd":100000},"book_time":"2026-10-14T22:50:24Z","spread_bps":0.0122482,"levels_held":{"asks":200,"bids":200}},{"mid":81648.5,"as_of":"2026-10-14T23:00:00Z","depth":[{"pct":0.1,"ask_usd":5325002.521,"bid_usd":5932686.945,"imbalance":0.0539795},{"pct":0.5,"ask_usd":5325002.521,"bid_usd":5932686.945,"imbalance":0.0539795}],"stale":false,"venue":"hyperliquid","walls":{"asks":[{"price":81649,"size_usd":735450.918},{"price":81665,"size_usd":702384.332}],"bids":[{"price":81630,"size_usd":1456431.848},{"price":81631,"size_usd":1080598.526}]},"symbol":"BTC","best_ask":81649,"best_bid":81648,"slippage":{"buy":{"filled":true,"avg_price":81649,"filled_usd":100000,"slippage_bps":0.0612381},"sell":{"filled":true,"avg_price":81648,"filled_usd":100000,"slippage_bps":0.0612381},"size_usd":100000},"book_time":"2026-10-14T22:50:37Z","spread_bps":0.122476,"levels_held":{"asks":20,"bids":20}},{"mid":81556.5,"as_of":"2026-10-14T23:00:00Z","depth":[{"pct":0.1,"ask_usd":54982.3292,"bid_usd":432342.3352,"imbalance":0.77435},{"pct":0.5,"ask_usd":19370916.04,"bid_usd":14526180.35,"imbalance":-0.142925}],"stale":false,"venue":"dydx","walls":{"asks":[{"price":83219,"size_usd":10000111},{"price":83178,"size_usd":10000083.37}],"bids":[{"price":80967,"size_usd":8090263.124},{"price":80845,"size_usd":8078072.823}]},"symbol":"BTC-USD","best_ask":81558,"best_bid":81555,"slippage":{"buy":{"filled":true,"avg_price":81629.85356,"filled_usd":100000,"slippage_bps":8.9942},"sell":{"filled":true,"avg_price":81533.36734,"filled_usd":100000,"slippage_bps":2.8364},"size_usd":100000},"book_time":"2026-10-14T23:00:00Z","spread_bps":0.367843,"levels_held":{"asks":100,"bids":100}}],"see_also":{"params":["coin","hours"],"reason":"Recent forced liquidations that hit these books.","endpoint":"https://derivs.duoleads.com/v1/liquidations"},"size_usd":100000,"aggregate":{"depth":[{"pct":0.1,"ask_usd":42793969.58,"bid_usd":41381002.89,"imbalance":-0.0167861},{"pct":0.5,"ask_usd":104580954.7,"bid_usd":109389514.7,"imbalance":0.022473}],"tightest_spread":{"value":0.0122482,"venue":"bybit"},"lowest_buy_slippage":{"value":0.00612408,"venue":"bybit"},"lowest_sell_slippage":{"value":0.00612408,"venue":"bybit"}},"disclaimer":"Data only, not investment advice, not a benchmark; not affiliated with any exchange","request_id":"01KEXAMPLE0000000000000000","venues_missing":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_yzYzpMrwBI-_UZcPmt685","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns real-time order book depth, bid/ask spread, slippage estimates, and wall detection for crypto perpetual futures across 8 major exchanges.","exampleAgentPrompt":"What's the current order book depth and estimated slippage for buying $500,000 of BTC perp — show me the top 5 price levels per side across all exchanges?","exampleUseCases":[{"title":"Pre-trade slippage check for large order","prompt":"I'm about to execute a $2 million buy on ETH perpetuals — can you check the slippage estimate and order book depth across all major perp exchanges so I know where to route it?"},{"title":"Spot order wall on BTC perp","prompt":"Are there any large order walls in the BTC perp order book right now? Show me the top bid and ask walls across Bybit, Hyperliquid, and OKX."},{"title":"Cross-exchange spread comparison","prompt":"Compare the bid/ask spreads for SOL perp across all 8 exchanges and tell me which venue has the tightest market right now — I want to minimize my trading cost."}],"resultDescription":"A JSON object keyed by coin symbol with a list of venue-level order book snapshots. Each venue entry includes: mid price, best bid/ask, spread in basis points, bid/ask depth in USD at configurable percentage bands, bid/ask imbalance ratio, top N price levels per side (if requested), detected order walls with size in USD, slippage estimate (buy and sell) for the specified order size, book timestamp, and a staleness flag. Units metadata is provided for interpretation.","failureModes":["Unknown coin symbol returns empty or error response","Coin traded on fewer than all 8 exchanges returns partial venue list","Stale book data flagged via 'stale: true' per venue if feed is delayed","levels parameter out of range (>20) rejected by schema validation","size_usd outside 1–1e9 range rejected","x402 payment failure blocks request if USDC balance on Base is insufficient","Network timeout if exchange feed is temporarily unavailable"],"whenToPreferThis":"Use this endpoint when you need real-time, cross-exchange order book microstructure data for crypto perpetual futures — specifically for pre-trade slippage estimation, liquidity comparison across venues, order wall detection, or spread analysis. It covers 8 major perp exchanges in a single call with no API key required, making it ideal for trading agents, execution routers, or market monitoring workflows. Prefer this over exchange-native APIs when you need a normalized, multi-venue view without managing separate auth credentials per exchange.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-15T12:33:31.127Z","isFirstParty":false,"canonicalSlug":"order-book-depth-slippage-9d2f4203"}