{"uid":"cap_mw7XLYoQJgKz0YADQ154Q","slug":"perp-gap-api-prediction-market-implied-probability-24424765","name":"Perp Gap API – Prediction Market Implied Probability","description":"Use when an agent must decide if a Hyperliquid prediction market on a crypto or stock price (e.g. 'BTC above 82k on Oct 19', 'SP500 above 7730') is cheap or expensive. Returns each live outcome's bid, ask and depth, the probability implied by the live perp price and 7d realized vol, edge in pp vs bid and ask, and a liquidity flag. Empty books are filtered. Errors: 400 bad input, 404 no live market (both free, never charged), 402, 502. Data, not advice.","url":"https://perp-gap-api.perpgap.workers.dev/pm/implied?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":[],"properties":{"asset":{"type":"string","description":"Underlying (BTC, ETH, META, xyz:META...). Default BTC. Free list: GET /pm/markets."},"outcome":{"type":"string","pattern":"^[0-9]{1,9}$","description":"Optional outcome id instead of asset."},"min_depth_usd":{"type":"string","pattern":"^[0-9.]+$","description":"Optional minimum book depth in USD."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"spot":{"type":"object"},"asset":{"type":"string"},"count":{"type":"number"},"label":{"type":"string"},"method":{"type":"string"},"source":{"type":"string"},"markets":{"type":"array"},"disclaimer":{"type":"string"},"signal_rule":{"type":"string"},"min_depth_usd":{"type":"number"},"generated_at_iso":{"type":"string"},"filtered_out_empty_or_thin":{"type":"number"}},"description":"Error responses are JSON {error: string, hint?: string}. 400 bad params (never charged); 402 payment required; 404 ticker/market not listed (checked before settlement, never charged); 502 upstream error. Full field docs: /openapi.json."}}}}},"responseSchema":{"type":"json","example":{"spot":{"mid":81578.5,"live":true,"perp":"BTC","vol_as_of":"2026-10-29T14:50:13Z","realized_vol_7d":0.2798},"asset":"BTC","count":6,"label":"data, not advice","method":"P(S_T > K) under a lognormal model with zero drift, S = live Hyperliquid perp mid, sigma = 7-day realized vol from Hy...","source":"Hyperliquid info API (outcomeMeta, l2Book, allMids, candleSnapshot)","markets":[{"kind":"crypto","perp":"BTC","asset":"BTC","strike":81410,"outcome":20270,"question":"BTC above 81410 at 2026-10-29 15:45:00 UTC"}],"disclaimer":"Data, not financial advice. Not an offer or solicitation; Hyperliquid outcome markets are not available to US or othe...","signal_rule":"illiquid if spread > 10 pp or < $50 resting within 5 pp of the touch on either side; else yes_underpriced if model_pr...","min_depth_usd":0,"generated_at_iso":"2026-10-29T15:40:50Z","filtered_out_empty_or_thin":21}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ogJSXtqT-1_c1PLvHEDUU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns bid, ask, depth, perp-implied probability, 7-day realized vol, and edge estimate for live Hyperliquid prediction markets on crypto or stock price outcomes","exampleAgentPrompt":"Check whether the BTC above 82k on Oct 19 prediction market on Hyperliquid is cheap or expensive — show me the bid, ask, perp-implied probability, 7-day realized vol, and any edge vs the market price, and only include markets with at least $50 of resting depth.","exampleUseCases":[{"title":"Evaluate BTC binary market mispricing","prompt":"Is the Hyperliquid prediction market for BTC above 82k by October 19 cheap or expensive right now? Give me the bid, ask, implied probability from the perp price, and how many cents of edge I'm getting on each side."},{"title":"Screen SP500 prediction markets for edge","prompt":"Show me all live Hyperliquid prediction markets on SP500 with at least $100 depth on each side — I want to see the perp-implied probability vs bid/ask and which outcomes have the most edge."},{"title":"Price a specific Hyperliquid outcome by ID","prompt":"I have Hyperliquid outcome ID 11676 — what's the current bid, ask, mid, perp-implied probability, realized vol, and edge for that market?"}],"resultDescription":"A JSON object containing the asset ticker, an array of live prediction market outcomes each with outcome ID, asset, strike, expiry, best Yes bid and ask (as 0–1 probabilities), mid, depth in USD, liquidity flag, edge in percentage points vs bid and ask, the perp-implied probability derived from the live perp price, 7-day realized volatility, and a disclaimer label. Empty-book markets are always filtered out.","failureModes":["400 Bad Request – invalid asset ticker format or malformed query parameter","404 Not Found – no live prediction market exists for the requested asset or outcome ID (free, not charged)","400 Bad Request – bad input format for min_depth_usd","402 Payment Required – x402 payment not provided or insufficient","502 Bad Gateway – upstream Hyperliquid or trade.xyz data unavailable"],"whenToPreferThis":"Use this endpoint when an agent needs to evaluate whether a specific Hyperliquid binary prediction market (crypto or stock) is fairly priced, cheap, or expensive relative to what the live perp price and realized volatility imply. It is purpose-built for quantitative edge detection on Hyperliquid prediction markets, combining order book data with a volatility-based fair value model. Prefer it over generic market data APIs when you need bid/ask/depth alongside a statistically derived edge estimate for a binary outcome.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-01T12:37:04.086Z","isFirstParty":false,"canonicalSlug":"perp-gap-api-prediction-market-implied-probability-24424765"}