{"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","pattern":"^[A-Za-z0-9:]{1,16}$","examples":["BTC","SP500"],"description":"Underlying perp: BTC, ETH, HYPE, ZEC or trade.xyz perps like SP500, XYZ100, META, TSLA, CL, GOLD (xyz: prefix optional). Case-insensitive. Default BTC when neither asset nor outcome is given."},"outcome":{"type":"string","pattern":"^\\d{1,9}$","examples":["11676"],"description":"Optional Hyperliquid outcome id to price a single market (see free GET /pm/markets)."},"min_depth_usd":{"type":"string","default":"0","pattern":"^\\d+(\\.\\d+)?$","examples":["50"],"description":"Optional. Hide markets with less than this USDC resting within 5 pp of the touch on either side. Default 0 (empty books are always hidden)."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["asset","markets","label","disclaimer"],"properties":{"spot":{"type":"object","properties":{"mid":{"type":["number","null"]},"live":{"type":"boolean"},"perp":{"type":"string"},"vol_as_of":{"type":["string","null"]},"realized_vol_7d":{"type":["number","null"]}}},"asset":{"type":"string"},"count":{"type":"integer"},"label":{"type":"string","const":"data, not advice"},"method":{"type":"string"},"source":{"type":"string"},"markets":{"type":"array","items":{"type":"object","required":["outcome","asset","strike","expiry","bid","ask","depth_usd","liquid"],"properties":{"ask":{"type":"number","description":"Best Yes ask (probability, 0-1)"},"bid":{"type":"number","description":"Best Yes bid (probability, 0-1)"},"mid":{"type":"number"},"kind":{"enum":["crypto","stocks"],"type":"string"},"perp":{"type":"string","description":"Underlying Hyperliquid perp, e.g. BTC or xyz:META"},"asset":{"type":"string"},"expiry":{"type":"string","format":"date-time"},"liquid":{"type":"boolean","description":"spread <= 10 pp (scan: max_spread_pp) and >= $50 depth on both sides (scan: min_depth_usd)"},"signal":{"enum":["yes_underpriced","yes_overpriced","fair","illiquid","no_model"],"type":"string"},"strike":{"type":"number"},"book_ts":{"type":"string","format":"date-time"},"outcome":{"type":"integer","description":"Hyperliquid outcome id (Yes token = coin #<id>0)"},"ask_size":{"type":"number"},"bid_size":{"type":"number"},"question":{"type":"string"},"spot_mid":{"type":["number","null"]},"depth_usd":{"type":"object","properties":{"ask":{"type":"number"},"bid":{"type":"number"},"levels":{"type":"integer"},"window_pp":{"type":"number"}},"description":"USDC notional resting within window_pp of the touch, top 5 levels"},"spread_pp":{"type":"number"},"book_age_s":{"type":"integer"},"model_prob":{"type":["number","null"],"description":"Model P(price > strike at expiry), 0-1"},"settlement":{"type":"object","properties":{"side":{"type":"string"},"source":{"type":["string","null"]},"window_seconds":{"type":["number","null"]}}},"best_edge_pp":{"type":["number","null"]},"edge_vs_ask_pp":{"type":["number","null"],"description":"(model_prob - ask) x 100: > 0 means you could buy Yes below model value"},"edge_vs_bid_pp":{"type":["number","null"],"description":"(bid - model_prob) x 100: > 0 means you could sell Yes above model value"},"hours_to_expiry":{"type":"number"},"realized_vol_7d":{"type":["number","null"]}}}},"disclaimer":{"type":"string"},"signal_rule":{"type":"string"},"min_depth_usd":{"type":"number"},"generated_at_iso":{"type":"string","format":"date-time"},"filtered_out_empty_or_thin":{"type":"integer"}},"description":"Error responses are JSON {error: string}: 400 bad or empty asset, bad outcome or min_depth_usd (free); 404 no live Hyperliquid binary price market for that asset/outcome, or all its books are empty (free, never charged); 402 payment required; 502 upstream error."}}}}},"responseSchema":null,"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-10-18T12:39:41.275Z","isFirstParty":false,"canonicalSlug":"perp-gap-api-prediction-market-implied-probability-24424765"}