{"uid":"cap_W57hrsB6cYBg7trP_JtOU","slug":"perp-gap-api-live-multi-venue-stock-quote-7b45a305","name":"Perp Gap API – Live Multi-Venue Stock Quote","description":"Use when an agent needs the best live price for a stock across venues before trading. For 1-10 tickers: perp mark and mid on trade.xyz (Hyperliquid), Aster, Lighter and OKX, xStocks and Ondo token prices per share, last US close, the session reference price, gap % vs it, cross-venue spread, best bid/ask and freshness. Unpaid calls get 402; bad or unknown tickers get 400/404 before any charge. Errors: 400, 402, 404, 502. Data, not advice.","url":"https://perp-gap-api.perpgap.workers.dev/quote?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":["ticker"],"properties":{"ticker":{"type":"string","pattern":"^[A-Za-z0-9.]{1,12}$","examples":["NVDA"],"description":"Stock ticker, case-insensitive (free list: GET /catalog)."},"tickers":{"type":"string","pattern":"^[A-Za-z0-9.,]{1,130}$","examples":["NVDA,TSLA"],"description":"Optional alternative to ticker: up to 10 comma-separated tickers."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"as_of":{"type":"string"},"perps":{"type":"object"},"ticker":{"type":"string"},"tokens":{"type":"object"},"sources":{"type":"array"},"summary":{"type":"object"},"reference":{"type":"object"},"last_close":{"type":"object"},"us_session":{"type":"string"}},"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":null,"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_in5uwfia1lNLktgOUMV4S","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 best live price, perp mark/mid, gap vs reference, and cross-venue spread for 1–10 stock tickers across Hyperliquid, Aster, Lighter, OKX, xStocks, and Ondo","exampleAgentPrompt":"Before I trade, pull the best live perp price for NVDA across Hyperliquid, Aster, Lighter, and OKX — I want to see the mark and mid, the gap vs last US close, the session reference price, and the best bid/ask right now.","exampleUseCases":[{"title":"Pre-trade price check for single stock","prompt":"I'm about to buy TSLA on trade.xyz — can you grab the current perp mark and mid, the gap vs last US close, and the best bid/ask across all venues so I can see if I'm getting a fair price?"},{"title":"Multi-ticker arbitrage scan","prompt":"Pull live quotes for NVDA, AAPL, and MSFT across Hyperliquid, Aster, Lighter, and OKX — I want to see the cross-venue spread and gap percentage for each so I can spot the best arb opportunity."},{"title":"Tokenized stock price comparison","prompt":"I'm deciding between xStocks and Ondo for an AMZN position — show me both token prices per share, the current perp mark, and how they all compare to the last US close and session reference price."}],"resultDescription":"A JSON object per ticker containing: perp mark price and mid from each listed venue (Hyperliquid/trade.xyz, Aster, Lighter, OKX), xStocks and Ondo token prices per share, last US close, session reference price, gap percentage versus reference, cross-venue spread, best bid and best ask, US session label (pre/regular/after-hours/overnight), and data freshness timestamps. Errors return JSON with an error string and optional hint.","failureModes":["400 – Bad or malformed ticker parameter (never charged)","402 – Payment required; call was unpaid or payment failed","404 – Ticker or market not listed on any tracked venue (checked before settlement, never charged)","502 – Upstream venue data unavailable or error fetching live prices"],"whenToPreferThis":"Use this endpoint when an agent needs a consolidated, real-time best-price view across multiple tokenized stock and perp venues (Hyperliquid, Aster, Lighter, OKX, xStocks, Ondo) for 1–10 tickers before executing a trade. Prefer it over single-venue APIs when cross-venue spread, gap analysis, or venue selection is part of the decision. Not suitable for historical data, order execution, or non-stock assets.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T06:45:59.238Z","isFirstParty":false,"canonicalSlug":"perp-gap-api-live-multi-venue-stock-quote-7b45a305"}