{"uid":"cap_UHuEvx4MJ9X4QghMD4Opi","slug":"hyperliquid-perpetuals-orderbook-via-x402-2758b4bb","name":"Hyperliquid Perpetuals Orderbook via x402","description":"Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.","url":"https://kr-x402-mvp.kgy5612.workers.dev/api/v1/perpetuals/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","properties":{"coin":{"enum":["BTC","ETH","SOL"],"type":"string","examples":["BTC","ETH","SOL"],"description":"Perp coin (default BTC)"},"depth":{"type":"integer","maximum":20,"minimum":1,"description":"Levels per side (default 5)"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"mid":80860.5,"asks":[{"n":3,"px":80861,"sz":0.8}],"bids":[{"n":4,"px":80860,"sz":1.2}],"coin":"BTC","venue":"hyperliquid","sources":["https://api.hyperliquid.xyz/info"],"best_ask":80861,"best_bid":80860,"spread_bps":0.124,"updated_at":"2026-10-28T11:00:00Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LX78bOl-6y7wEG5AYVYlr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the real-time L2 order book (bids, asks, spread, mid price) for BTC, ETH, or SOL perpetual futures on Hyperliquid, paid per-call with USDC on Base.","exampleAgentPrompt":"Pull the current Hyperliquid perpetuals order book for BTC with 10 levels per side — I want to see the best bid, best ask, mid price, and spread in bps.","exampleUseCases":[{"title":"Pre-trade liquidity check for perp bot","prompt":"Before I send a 5 BTC perp market order on Hyperliquid, show me the top 10 levels of the order book so I can estimate slippage."},{"title":"Spread monitoring for arbitrage signal","prompt":"What is the current bid-ask spread in basis points for the ETH perpetual on Hyperliquid? I want to know if conditions are tight enough to arb."},{"title":"SOL perp market depth snapshot","prompt":"Give me a snapshot of the SOL-PERP order book on Hyperliquid — top 5 levels on each side — so I can see where the liquidity is sitting right now."}],"resultDescription":"Returns a JSON object with the coin symbol, venue (hyperliquid), best bid and ask prices, mid price, spread in basis points, an array of bid levels and ask levels each containing price, size, and number of orders, and an updated_at timestamp. Data sourced directly from the Hyperliquid API.","failureModes":["Invalid coin enum value (only BTC, ETH, SOL supported) returns 400 or empty result","Depth out of range (must be 1–20) returns validation error","Payment not included or insufficient USDC triggers 402 Payment Required","Hyperliquid API upstream outage may return stale or error response","Network timeout on the Cloudflare Worker may return 503"],"whenToPreferThis":"Choose this endpoint when your agent needs real-time, tick-level order book data for BTC, ETH, or SOL perpetuals on Hyperliquid specifically — particularly for pre-trade slippage estimation, spread monitoring, or market microstructure analysis. It requires no API key, charges a flat $0.005 USDC per call via x402, and is optimised for autonomous trading agents on Base. Prefer alternatives if you need historical order book data, non-Hyperliquid venues, or coins outside BTC/ETH/SOL.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:40:06.417Z","isFirstParty":false,"canonicalSlug":"hyperliquid-perpetuals-orderbook-via-x402-2758b4bb"}