{"uid":"cap_QWbslpikQFiwvWpFkbp2J","slug":"hyperliquid-orderbook-slippage-4feea241","name":"Hyperliquid Orderbook Slippage","description":"Use when an agent sizes a Hyperliquid market order or compares liquidity. Input: coin (perp or HIP-3 xyz:TSLA), optional sizes_usd (up to 5, default 1000,10000,100000), levels (0-20). Output: JSON best bid/ask, spread bps, depth USD within 0.1/0.5/1/2%, imbalance, per size buy/sell average fill, worst price and slippage bps vs mid, top levels. Cached 3 s. Example: ?coin=BTC&sizes_usd=1000,10000","url":"https://1gateway.dev/v1/crypto/hyperliquid/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","pattern":"^([a-z][a-z0-9]{0,9}:)?[A-Za-z0-9]{1,20}$","description":"Hyperliquid perp symbol (BTC, ETH, kPEPE) or HIP-3 dex:COIN (xyz:TSLA). Not listed or delisted: 400…"},"levels":{"type":"integer","default":10,"maximum":20,"minimum":0,"description":"Book levels per side to return (0-20, default 10)"},"sizes_usd":{"type":"string","pattern":"^[0-9.]+(,[0-9.]+){0,4}$","maxLength":80,"description":"1-5 comma-separated order notionals in USD, 10 to 50,000,000 (default 1000,10000,100000)"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["coin","dex","as_of","top","visibleBook","depth","slippage","levels"],"properties":{"dex":{"type":"string"},"top":{"type":"object","properties":{"ask":{"type":"integer"},"bid":{"type":"integer"},"mid":{"type":"number"},"spreadBps":{"type":"number"}},"additionalProperties":true},"coin":{"type":"string"},"as_of":{"type":"string"},"depth":{"type":"array","items":{"type":"object","additionalProperties":true}},"levels":{"type":"object","properties":{"asks":{"type":"array"},"bids":{"type":"array"}},"additionalProperties":true},"slippage":{"type":"array","items":{"type":"object","additionalProperties":true}},"visibleBook":{"type":"object","properties":{"askUsd":{"type":"integer"},"bidUsd":{"type":"integer"},"rangePct":{"type":"number"},"imbalance":{"type":"number"},"levelsPerSide":{"type":"integer"}},"additionalProperties":true}},"additionalProperties":true}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0036","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.0036/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0036","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0036","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_d-BBPRfLicklhnvAEVTmE","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0036","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns real-time Hyperliquid order book depth, spread, bid/ask imbalance, and per-size slippage estimates for market orders on perp or HIP-3 markets.","exampleAgentPrompt":"Before I place a $10,000 and $100,000 market buy of BTC on Hyperliquid, can you check the current order book and tell me the expected slippage and average fill prices for both sizes?","exampleUseCases":[{"title":"Pre-trade slippage check for large order","prompt":"I'm about to market buy $50,000 worth of ETH on Hyperliquid — can you pull the current order book and tell me what slippage I should expect and what my average fill price will be?"},{"title":"Liquidity comparison across perp sizes","prompt":"For the SOL perp on Hyperliquid, show me the bid/ask spread, depth within 0.5% and 1% of mid, and estimated slippage for order sizes of $1,000, $10,000, and $100,000."},{"title":"HIP-3 token market order sizing","prompt":"I want to trade xyz:TSLA on Hyperliquid — check the order book and give me the spread, imbalance, and expected slippage for a $5,000 buy so I know if there's enough liquidity."}],"resultDescription":"Returns a JSON object with: best bid and ask prices, spread in basis points, mid price, USD depth available within 0.1/0.5/1/2% of mid on each side, bid/ask imbalance ratio, per-requested-size estimates of average fill price, worst fill price, and slippage in bps for both buy and sell directions, plus top N raw order book levels (price, size, order count) for each side. Data is cached for 3 seconds.","failureModes":["400 error (before payment, no charge) if coin symbol is not listed or has been delisted on Hyperliquid","400 error if sizes_usd values are outside the 10–50,000,000 USD range or more than 5 sizes are provided","400 error if levels exceeds 20","Stale data up to 3 seconds old due to caching","Payment failure (402) if x402 payment not completed before request"],"whenToPreferThis":"Use this endpoint when an agent needs to size a Hyperliquid market order and wants a pre-trade liquidity and slippage estimate, or when comparing order book depth and spread across coins on Hyperliquid specifically. It supports both standard perp symbols (BTC, ETH, kPEPE) and HIP-3 dex tokens (e.g. xyz:TSLA), making it the right choice for any Hyperliquid-specific microstructure analysis. Prefer over generic market data APIs when you need actionable per-size fill estimates rather than just top-of-book quotes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-03T18:57:22.011Z","isFirstParty":false,"canonicalSlug":"hyperliquid-orderbook-slippage-4feea241"}