{"uid":"cap_beDQ6Tmhl7wqwVjkxdXZy","slug":"perpgap-api-stock-perp-price-gap-scanner-72fe9221","name":"PerpGap API – Stock Perp Price Gap Scanner","description":"Use when an agent needs current premium/discount or funding signals across many stock perps in one cheap call. trade.xyz (Hyperliquid HIP-3) perp mark/oracle vs the live stock price and Solana xStock, basis, hourly and annualized funding, open interest; venues=all adds Aster, Lighter and OKX marks, funding and cross-venue spreads. Errors: 402, 502. Data, not advice.","url":"https://perp-gap-api.perpgap.workers.dev/gaps?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":{"venues":{"enum":["all"],"type":"string","description":"Optional: 'all' adds Aster and Lighter."},"tickers":{"type":"string","description":"Optional comma-separated tickers or 'all' (default: 20 large names)."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"dex":{"type":"string"},"rows":{"type":"array"},"count":{"type":"number"},"market":{"type":"object"},"disclaimer":{"type":"string"},"not_listed":{"type":"array"},"venues_note":{"type":"string"},"generated_at":{"type":"number"},"ref_source_note":{"type":"string"},"generated_at_iso":{"type":"string"},"subrequest_estimate":{"type":"number"}},"description":"Error responses are JSON {error: string, hint?: string}. 402 payment required; 502 upstream error. Full field docs: /openapi.json."}}}}},"responseSchema":{"type":"json","example":{"dex":"xyz","rows":[{"coin":"xyz:NVDA","ticker":"NVDA","perp_mid":214.045,"ref_kind":"equity","perp_mark":214.04,"perp_oracle":213.97}],"count":1,"market":{"holiday":null,"session":"regular","early_close":false,"new_york_time":"Thu 2026-10-29 11:40"},"disclaimer":"Data, not financial advice.","not_listed":[],"venues_note":"venues: trade.xyz (Hyperliquid HIP-3), Aster (USDT-margined stock perps), Lighter, OKX (USDT-margined stock swaps; ma...","generated_at":1793288404,"ref_source_note":"ref_price = trade.xyz relayer External Price (public Hyperliquid on-chain setOracle data): live while the underlying ...","generated_at_iso":"2026-10-29T15:40:04.000Z","subrequest_estimate":12}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Do0oGQ1ld4iJsOX_KIu4K","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns real-time price gaps, funding rates, basis, open interest, and cross-venue comparisons for US stock perpetual futures across trade.xyz, Aster, and Lighter versus real stock prices and Solana xStocks.","exampleAgentPrompt":"Pull the current price gaps and funding rates for TSLA, NVDA, and AAPL perps across all venues — trade.xyz, Aster, and Lighter — and compare them against the real stock prices and xStock prices so I can spot any arbitrage opportunities.","exampleUseCases":[{"title":"Spot perp arbitrage across DeFi venues","prompt":"Check TSLA and NVDA right now — what are the price gaps between their perps on trade.xyz, Aster, and Lighter versus the actual stock price, and which venue is cheapest?"},{"title":"Monitor funding rates for yield strategy","prompt":"Give me the hourly and annualized funding rates for the top 20 US stock perps on DeFi exchanges so I can figure out which ones are worth farming for funding yield."},{"title":"Cross-venue OI and spread dashboard","prompt":"Fetch open interest, basis, and cross-venue mark spreads for all available US stock perps across trade.xyz, Aster, and Lighter — I want to see which tickers have the widest spreads."}],"resultDescription":"A JSON object with an array of rows per ticker, each containing: perp mark price, reference stock price (from Yahoo, Alpaca, or Robinhood), xStock price on Solana, price gap percentages (perp vs ref, perp vs xStock), oracle price, funding rate (hourly and annualized), open interest in USD, market session, flags, and optionally (with venues=all) per-venue breakdowns for trade.xyz, Aster, and Lighter including cross-venue gap percentages, richest/cheapest venue labels, and funding spread. Also includes a generated_at timestamp and disclaimer.","failureModes":["Invalid ticker returns null or missing row in results","More than 60 tickers requested may be truncated to highest OI subset","Reference price unavailable (ref_price null) when Yahoo/Alpaca/Robinhood all fail","Perp mark null if venue has no active market for that ticker","Payment failure via x402 if USDC balance insufficient on Base or Solana","Rate limiting or worker timeout on very large ticker sets"],"whenToPreferThis":"Use this endpoint when you need real-time, cross-venue price gap data specifically for US stock perpetual futures on DeFi platforms (trade.xyz, Aster, Lighter) compared against real stock prices and Solana xStocks. Prefer this over generic crypto data APIs when the user wants basis, funding arbitrage, or cross-venue spread analysis for tokenized stock perps. Ideal for DeFi arbitrage bots, funding rate yield strategies, or perp market monitoring agents.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-03T18:44:37.382Z","isFirstParty":false,"canonicalSlug":"perpgap-api-stock-perp-price-gap-scanner-72fe9221"}