{"uid":"cap_vzrRr-D7VP7UeuKG2v16S","slug":"perp-gap-api-prediction-market-mispricing-scanner-9859afff","name":"Perp Gap API – Prediction Market Mispricing Scanner","description":"Use when an agent wants a ranked list of the most mispriced liquid prediction markets on Hyperliquid right now, across all crypto and tokenized-stock binary price markets, in one call. Each row has model probability vs bid/ask, edge in pp, spread, depth and book age; empty and illiquid books are filtered out. For scanners, trading agents and daily briefings. Errors: 400 bad params, 404 no books (free, never charged), 402, 502. Data, not advice.","url":"https://perp-gap-api.perpgap.workers.dev/pm/scan?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":{"kind":{"enum":["crypto","stocks","all"],"type":"string","default":"all","examples":["all"],"description":"Optional: crypto (BTC, ETH, HYPE, ZEC), stocks (trade.xyz stock, index and commodity perps) or all."},"limit":{"type":"string","default":"20","pattern":"^\\d{1,2}$","examples":["10"],"description":"Optional max rows, 1-50. Default 20."},"min_edge_pp":{"type":"string","default":"2","pattern":"^-?\\d+(\\.\\d+)?$","examples":["3"],"description":"Optional minimum edge in percentage points (model vs executable bid/ask). Default 2."},"max_spread_pp":{"type":"string","default":"10","pattern":"^\\d+(\\.\\d+)?$","examples":["10"],"description":"Optional maximum bid-ask spread in percentage points. Default 10."},"min_depth_usd":{"type":"string","default":"50","pattern":"^\\d+(\\.\\d+)?$","examples":["100"],"description":"Optional minimum USDC depth within 5 pp of the touch on BOTH sides. Default 50."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["rows","scanned","label","disclaimer"],"properties":{"note":{"type":"string"},"rows":{"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"]}}}},"count":{"type":"integer"},"label":{"type":"string","const":"data, not advice"},"method":{"type":"string"},"source":{"type":"string"},"closest":{"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"]}}},"description":"Only when rows is empty: the 3 liquid markets closest to min_edge_pp"},"filters":{"type":"object"},"matched":{"type":"integer"},"scanned":{"type":"integer"},"spot_live":{"type":"boolean"},"disclaimer":{"type":"string"},"generated_at_iso":{"type":"string","format":"date-time"},"cache_updated_iso":{"type":"string"},"median_book_age_s":{"type":["number","null"]},"filtered_out_illiquid":{"type":"integer"},"filtered_out_empty_books":{"type":"integer"}},"description":"Error responses are JSON {error: string}: 400 bad min_edge_pp / max_spread_pp / min_depth_usd / limit / kind (free); 404 order-book cache empty (free, never charged); 402 payment required; 502 upstream error."}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_CaOc-2jHfsaY2WChKMGVB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a ranked list of the most mispriced liquid binary prediction markets on Hyperliquid (crypto and tokenized-stock), showing model probability vs bid/ask, edge, spread, and book depth in a single call.","exampleAgentPrompt":"Scan all Hyperliquid prediction markets right now and give me the top 10 most mispriced ones — only show markets with at least 3 percentage points of edge and a spread under 8pp, across both crypto and tokenized stocks.","exampleUseCases":[{"title":"Daily trading opportunity briefing","prompt":"Every morning, pull me the top 20 most mispriced prediction markets on Hyperliquid across crypto and stocks, filtering for at least 2pp edge and minimum $100 depth on both sides, so I can review them at the start of my trading day."},{"title":"Crypto-only mispricings for automated scanner","prompt":"Scan only the crypto prediction markets on Hyperliquid and return up to 15 results with at least 4pp edge and spread under 6pp — I want to feed this into my trading bot."},{"title":"Tokenized stock market edge detection","prompt":"Are there any mispriced stock prediction markets on Hyperliquid right now? Show me the top opportunities with at least 3pp edge, a spread of 10pp or less, and at least $200 depth on each side."}],"resultDescription":"A ranked array of prediction market rows, each containing the outcome label, asset ticker, strike price, expiry, best Yes bid and ask (as probabilities 0–1), mid probability, model-implied edge in percentage points, bid-ask spread, USDC depth within 5pp of touch on both sides, book age, liquidity flag, market kind (crypto or stocks), and the underlying Hyperliquid perp identifier. Also includes total markets scanned, a label, and a disclaimer.","failureModes":["400 Bad Request – invalid query parameters (e.g. limit out of range, unrecognized kind value)","404 Not Found – no liquid books found matching the filter criteria at query time","402 Payment Required – x402 payment not completed or insufficient","502 Bad Gateway – upstream Hyperliquid data unavailable or timeout"],"whenToPreferThis":"Choose this endpoint when you need a real-time ranked scan of mispriced liquid prediction markets across Hyperliquid in one call, with pre-filtered edge, spread, and depth metrics already computed. Prefer it over building your own scanner when you want immediate, actionable mispricings without constructing individual market queries. It covers both crypto binary markets and tokenized-stock binary markets in a single response.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T12:30:10.683Z","isFirstParty":false,"canonicalSlug":"perp-gap-api-prediction-market-mispricing-scanner-9859afff"}