{"uid":"cap_TgZl_7vPpGfmHCFG3dYVE","slug":"hyperliquid-perp-orderbook-x402-pay-per-call-1758d8da","name":"Hyperliquid Perp Orderbook (x402 Pay-per-call)","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/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","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_J5IGStxUzhxxna322yeVW","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 live Hyperliquid perpetual L2 orderbook for BTC, ETH, or SOL — best bid/ask, mid price, spread in bps, and configurable depth — via pay-per-call x402 (USDC on Base).","exampleAgentPrompt":"Pull the live Hyperliquid BTC perp orderbook — give me the best bid, best ask, mid price, spread in bps, and the top 10 levels on each side.","exampleUseCases":[{"title":"Pre-trade spread check for perp trader","prompt":"Before I enter a BTC perp position on Hyperliquid, check the current orderbook — what's the best bid, best ask, and spread in basis points right now?"},{"title":"ETH liquidity depth scan for algo bot","prompt":"Fetch the top 15 levels of the ETH perp orderbook on Hyperliquid so I can estimate slippage for a large order."},{"title":"SOL market-making reference price","prompt":"What's the current mid price and top-of-book for SOL perps on Hyperliquid? I need bid and ask to set my quotes."}],"resultDescription":"Returns a JSON object with: coin (BTC/ETH/SOL), venue ('hyperliquid'), best_bid, best_ask, mid price, spread_bps, arrays of bid and ask levels each with price (px), size (sz), and order count (n), data sources list, and updated_at ISO timestamp.","failureModes":["Payment not included or invalid x402 USDC payment → 402 Payment Required","Unsupported coin symbol → validation error or default fallback to BTC","Depth out of range (< 1 or > 20) → schema validation error","Hyperliquid upstream API unavailable → 502/503 or stale data","Network timeout from Cloudflare Worker → 524 timeout"],"whenToPreferThis":"Choose this endpoint when your agent needs real-time Hyperliquid perpetual orderbook data (not just a single mid price) and wants configurable depth — especially useful for pre-trade slippage estimation, market-making quote setting, or spread monitoring. It requires no API key setup, just x402 USDC micropayment on Base, making it ideal for autonomous agents that self-pay per call. Prefer this over generic price feeds when you need L2 book structure (multiple levels), not just a spot price.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:42:25.193Z","isFirstParty":false,"canonicalSlug":"hyperliquid-perp-orderbook-x402-pay-per-call-1758d8da"}