{"openapi":"3.1.0","info":{"title":"Perp Gap API","version":"1.2.0","contact":{"name":"Perp Gap API","url":"https://perp-gap-api.perpgap.workers.dev/","email":"webexpert@mail.grokbot.com"},"description":"Price gaps for tokenized-stock perpetual futures. Compares trade.xyz (Hyperliquid HIP-3), Aster and Lighter stock perps with the underlying stock price (pre-market, regular, after-hours or overnight) and the matching Solana xStock. Returns basis, funding (hourly and annualized), open interest, and a rule-based long/short/watch/avoid verdict that uses SEC EDGAR filings. Pay per call with x402 in USDC on Base or Solana mainnet. No account, no API key. Missing data is null. Overnight (20:00-04:00 ET, Sun-Thu nights) the stock reference comes from Alpaca's overnight feed (Blue Ocean ATS; bid/ask mid or 15-min-delayed last trade), falling back to Robinhood 24 Hour Market quotes (ref_session 'overnight'); every row carries ref_source and ref_age_seconds; NYSE holidays and weekends are labelled closed. Data, not financial advice.","x-guidance":"Call GET /gaps?tickers=TSLA,NVDA for perp-vs-stock-vs-xStock gaps, funding and OI; add &venues=all to compare trade.xyz, Aster and Lighter stock perps. Call GET /research?ticker=TSLA for a one-call research card (spot, session, all venues, xStock gap, funding, basis, history, verdict). Call GET /verdict?ticker=GME for a long/short/watch/avoid verdict with reasons. Paid via x402: USDC on Base (eip155:8453) or Solana mainnet (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp), same price. MCP server at /mcp (free get_gap_sample tool). Use GET /health for liveness.","x-category":"FINANCIAL_ANALYSIS","x-example-prompts":["What is the gap between the TSLA perp on Hyperliquid and the TSLA stock price right now?","Compare NVDA perp prices and funding across trade.xyz, Aster and Lighter.","Should I trade the GME perp? Give me a rule-based verdict with reasons."],"x-health-check-url":"https://perp-gap-api.perpgap.workers.dev/health","x-support-url":"https://perp-gap-api.perpgap.workers.dev/","x-payment-networks":[{"network":"eip155:8453","asset":"USDC","payTo":"0x2d82dcB9cC3a168d9Ab25b62C1E33E278A51254F"},{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"USDC","payTo":"5MoL8HNnvZUogGrqiF4T1StmAUpdU7ERA2GUJ7gLrEja"}]},"externalDocs":{"description":"Overview, MCP server and examples","url":"https://perp-gap-api.perpgap.workers.dev/"},"servers":[{"url":"https://perp-gap-api.perpgap.workers.dev"}],"tags":[{"name":"gaps","description":"Cross-venue stock-perp price gaps"},{"name":"verdict","description":"Rule-based trade verdict"},{"name":"history","description":"Historical gap dataset"},{"name":"meta","description":"Free health and discovery"}],"paths":{"/gaps":{"get":{"operationId":"getGaps","tags":["gaps"],"summary":"Gap table for trade.xyz stock perps (optionally vs Aster and Lighter)","description":"Per ticker: perp mark/oracle, basis, gap % vs the reference stock price and vs the Solana xStock, hourly and annualized funding, open interest, and timestamps. Add venues=all for a cross-venue comparison: trade.xyz vs Aster vs Lighter marks, the gaps between them, and each venue's funding. Costs $0.01 USDC per call (x402, Base or Solana).","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"parameters":[{"name":"tickers","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9,]{1,200}$"},"example":"TSLA,NVDA","description":"Comma-separated trade.xyz tickers or 'all' (auto-discovered US stock/ETF perps, see /tickers). Max 60 per call; extra tickers are dropped lowest-open-interest first and listed in omitted_over_cap. Default: 20 large names."},{"name":"venues","in":"query","required":false,"schema":{"type":"string","enum":["all"]},"example":"all","description":"'all' adds rows[].venues: trade.xyz vs Aster vs Lighter mark prices, gap % between venues and vs the stock, each venue's funding (hourly and annualized), plus spread summary."}],"responses":{"200":{"description":"Gap table","content":{"application/json":{"schema":{"type":"object","properties":{"generated_at":{"type":"integer"},"dex":{"type":"string"},"count":{"type":"integer"},"rows":{"type":"array","items":{"type":"object","properties":{"ticker":{"type":"string"},"perp_mark":{"type":["number","null"]},"perp_oracle":{"type":["number","null"]},"ref_price":{"type":["number","null"]},"ref_session":{"type":["string","null"]},"gap_perp_vs_ref_pct":{"type":["number","null"]},"xstock_price":{"type":["number","null"]},"gap_perp_vs_xstock_pct":{"type":["number","null"]},"basis_mark_vs_oracle_pct":{"type":["number","null"]},"funding_hourly":{"type":["number","null"]},"funding_annualized_pct":{"type":["number","null"]},"open_interest":{"type":["number","null"]},"open_interest_usd":{"type":["number","null"]},"perp_ts":{"type":"integer"},"ref_ts":{"type":["integer","null"]},"ref_age_seconds":{"type":["integer","null"]},"ref_source":{"type":["string","null"],"description":"yahoo, alpaca-overnight (bid_ask_mid|last_trade) or robinhood-24h fallback (overnight)"},"market_session":{"type":"string","enum":["pre-market","regular","after-hours","overnight","closed"]},"flags":{"type":"array","items":{"type":"string"}},"venues":{"type":"object","description":"Only with venues=all. xyz/aster/lighter objects {mark,index,funding_hourly,funding_annualized_pct,volume_24h_usd,open_interest_usd} or null, plus gap_aster_vs_xyz_pct, gap_lighter_vs_xyz_pct, gap_lighter_vs_aster_pct, gap_aster_vs_ref_pct, gap_lighter_vs_ref_pct, max_mark_spread_pct, richest, cheapest, funding_spread_annualized_pct."}},"required":["ticker","perp_mark"]}},"disclaimer":{"type":"string"}},"required":["rows"]},"example":{"generated_at":1791998269,"dex":"xyz","count":1,"rows":[{"ticker":"TSLA","perp_mark":366.28,"perp_oracle":366.14,"ref_price":366.13,"ref_session":"regular","gap_perp_vs_ref_pct":0.041,"xstock_price":366.37,"gap_perp_vs_xstock_pct":-0.0246,"basis_mark_vs_oracle_pct":0.0382,"funding_hourly":0.00000625,"funding_annualized_pct":5.475,"open_interest_usd":41383684.29,"flags":[]}],"disclaimer":"Data, not financial advice."}}}},"402":{"description":"Payment Required. x402 v2: the PAYMENT-REQUIRED response header holds base64 JSON with accepts[] with two options, Base (eip155:8453) and Solana mainnet (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp). Each has scheme exact, the USDC asset, amount in atomic units and payTo. Pay with any x402 client and retry with a PAYMENT-SIGNATURE header.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 PaymentRequired JSON","schema":{"type":"string"}}}},"502":{"description":"Upstream data error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"example":{"error":"upstream timeout"}}}}}}},"/verdict":{"get":{"operationId":"getVerdict","tags":["verdict"],"summary":"Rule-based trade verdict for one stock perp","description":"Long/short/watch/avoid verdict, score, confidence (0.1-0.85) and reasons for one trade.xyz stock perp. It uses the gap, basis, funding and OI, plus 14 days of SEC EDGAR filings (Form 4 insider buys and sells, 8-K, 13D/G, dilution). Retail attention is included as context. Includes a news block (up to 5 items in 48h: SEC 8-K filings, Fed/BLS macro releases, press-wire items as our own one-line summary + link) and a heuristic news_context label (likely news-driven / news present, move small / possibly macro-driven / no matching news). Confidence is reduced when the move looks news-driven. Deterministic rules, no LLM. Costs $0.03 USDC per call (x402, Base or Solana). Data, not financial advice.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{}}]},"parameters":[{"name":"ticker","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9]{1,12}$"},"example":"GME","description":"One trade.xyz ticker, e.g. GME"}],"responses":{"200":{"description":"Verdict","content":{"application/json":{"schema":{"type":"object","properties":{"ticker":{"type":"string"},"verdict":{"type":"string","enum":["long","short","watch","avoid"]},"score":{"type":"number"},"confidence":{"type":"number"},"reasons":{"type":"array","items":{"type":"string"}},"missing_signals":{"type":"array","items":{"type":"string"}},"inputs":{"type":"object"},"disclaimer":{"type":"string"}},"required":["ticker","verdict","confidence","disclaimer"]},"example":{"ticker":"GME","verdict":"watch","score":0.5,"confidence":0.4,"reasons":["perp vs reference gap +0.09%: in line, no edge","funding 35.7% APR: crowded longs pay, short-lean","insider open-market buys $40,113,538 vs sells $870,659 (14d): bullish"],"missing_signals":[],"disclaimer":"Data, not financial advice."}}}},"400":{"description":"ticker required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"example":{"error":"ticker required"}}}},"402":{"description":"Payment Required. x402 v2: the PAYMENT-REQUIRED response header holds base64 JSON with accepts[] with two options, Base (eip155:8453) and Solana mainnet (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp). Each has scheme exact, the USDC asset, amount in atomic units and payTo. Pay with any x402 client and retry with a PAYMENT-SIGNATURE header.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 PaymentRequired JSON","schema":{"type":"string"}}}},"404":{"description":"Ticker not listed on trade.xyz","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"example":{"error":"XYZ not listed on trade.xyz (xyz dex)"}}}},"502":{"description":"Upstream data error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"example":{"error":"upstream timeout"}}}}}}},"/research":{"get":{"operationId":"getResearchCard","tags":["verdict"],"summary":"Ticker research card for one stock perp","description":"One JSON card: spot quote and US market session (pre-market, regular, after-hours, overnight or closed), perp prices on trade.xyz (Hyperliquid xyz), Aster and Lighter, gap % per venue vs spot and vs the Solana xStock (where one exists), funding and basis, recent gap history (last 72h from the snapshot store) and the rule-based verdict from /verdict. Includes a news block (up to 5 items in 48h: SEC 8-K filings, Fed/BLS macro releases, press-wire items as our own one-line summary + link) and a heuristic news_context label (likely news-driven / news present, move small / possibly macro-driven / no matching news). Costs $0.03 USDC per call (x402, Base or Solana). Data, not financial advice.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{}}]},"parameters":[{"name":"ticker","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9]{1,12}$"},"example":"TSLA","description":"One trade.xyz ticker, e.g. TSLA"}],"responses":{"200":{"description":"Research card","content":{"application/json":{"schema":{"type":"object","properties":{"ticker":{"type":"string"},"label":{"type":"string"},"generated_at":{"type":"integer"},"market":{"type":"object","properties":{"session":{"type":"string","enum":["pre-market","regular","after-hours","overnight","closed"]},"holiday":{"type":["string","null"]}}},"spot":{"type":"object","properties":{"price":{"type":["number","null"]},"price_session":{"type":["string","null"],"description":"pre, regular, post, overnight, closed or last_close"},"prev_close":{"type":["number","null"]},"change_pct":{"type":["number","null"]},"age_seconds":{"type":["number","null"]},"source":{"type":["string","null"]}}},"xstock":{"type":["object","null"],"properties":{"price":{"type":["number","null"]},"gap_trade_xyz_vs_xstock_pct":{"type":["number","null"]},"gap_xstock_vs_spot_pct":{"type":["number","null"]}}},"perps":{"type":"object","properties":{"trade_xyz":{"type":"object","properties":{"venue":{"type":"string"},"mark":{"type":["number","null"]},"index":{"type":["number","null"]},"gap_vs_spot_pct":{"type":["number","null"]},"gap_vs_xstock_pct":{"type":["number","null"]},"gap_vs_trade_xyz_pct":{"type":["number","null"]},"basis_mark_vs_index_pct":{"type":["number","null"]},"funding_hourly":{"type":["number","null"]},"funding_annualized_pct":{"type":["number","null"]},"open_interest_usd":{"type":["number","null"]}}},"aster":{"type":"object","properties":{"venue":{"type":"string"},"mark":{"type":["number","null"]},"index":{"type":["number","null"]},"gap_vs_spot_pct":{"type":["number","null"]},"gap_vs_xstock_pct":{"type":["number","null"]},"gap_vs_trade_xyz_pct":{"type":["number","null"]},"basis_mark_vs_index_pct":{"type":["number","null"]},"funding_hourly":{"type":["number","null"]},"funding_annualized_pct":{"type":["number","null"]},"open_interest_usd":{"type":["number","null"]}}},"lighter":{"type":"object","properties":{"venue":{"type":"string"},"mark":{"type":["number","null"]},"index":{"type":["number","null"]},"gap_vs_spot_pct":{"type":["number","null"]},"gap_vs_xstock_pct":{"type":["number","null"]},"gap_vs_trade_xyz_pct":{"type":["number","null"]},"basis_mark_vs_index_pct":{"type":["number","null"]},"funding_hourly":{"type":["number","null"]},"funding_annualized_pct":{"type":["number","null"]},"open_interest_usd":{"type":["number","null"]}}}}},"cross_venue":{"type":"object"},"history":{"type":"object"},"verdict":{"type":"object","properties":{"verdict":{"type":"string","enum":["long","short","watch","avoid"]},"score":{"type":"number"},"confidence":{"type":"number"},"reasons":{"type":"array","items":{"type":"string"}}}},"disclaimer":{"type":"string"}},"required":["ticker","market","spot","perps","verdict","disclaimer"]},"example":{"ticker":"TSLA","card":"research","label":"Data, not financial advice.","generated_at":1792010000,"market":{"session":"regular","new_york_time":"Wed 16:00"},"spot":{"symbol":"TSLA","price":365.57,"price_session":"regular","prev_close":361.2,"change_pct":1.2099},"xstock":{"symbol":"TSLAx","chain":"solana","price":365.69,"gap_trade_xyz_vs_xstock_pct":0,"gap_xstock_vs_spot_pct":0.0328},"perps":{"trade_xyz":{"venue":"trade.xyz (Hyperliquid xyz)","mark":365.69,"index":365.58,"gap_vs_spot_pct":0.0328,"funding_annualized_pct":5.475,"basis_mark_vs_oracle_pct":0.0301},"aster":{"venue":"Aster","mark":366.01,"gap_vs_spot_pct":0.1204,"gap_vs_trade_xyz_pct":0.0875,"funding_annualized_pct":0},"lighter":{"venue":"Lighter","mark":365.77,"gap_vs_spot_pct":0.0547,"gap_vs_trade_xyz_pct":0.0219,"funding_annualized_pct":3.504}},"cross_venue":{"max_mark_spread_pct":0.0875,"richest":"Aster","cheapest":"trade.xyz"},"history":{"available":true,"window":"last 72h, 1h buckets","points":72,"gap_perp_vs_ref_pct":{"avg":0.04,"min":-0.12,"max":0.31}},"verdict":{"verdict":"watch","score":0,"confidence":0.3,"reasons":["perp vs reference gap +0.03%: in line, no edge"]},"disclaimer":"Data, not financial advice."}}}},"400":{"description":"ticker required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"example":{"error":"ticker required"}}}},"402":{"description":"Payment Required. x402 v2: the PAYMENT-REQUIRED response header holds base64 JSON with accepts[] with two options, Base (eip155:8453) and Solana mainnet (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp). Each has scheme exact, the USDC asset, amount in atomic units and payTo. Pay with any x402 client and retry with a PAYMENT-SIGNATURE header.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 PaymentRequired JSON","schema":{"type":"string"}}}},"404":{"description":"Ticker not listed on trade.xyz","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"example":{"error":"XYZ not listed on trade.xyz (xyz dex)"}}}},"502":{"description":"Upstream data error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"example":{"error":"upstream timeout"}}}}}}},"/tickers":{"get":{"operationId":"getTickers","tags":["meta"],"security":[],"summary":"Covered tickers (free)","description":"Free. Auto-discovered US stock/ETF perps on trade.xyz plus the XYZ100/SP500 index perps, highest open interest first. Refreshed every 6 hours from the venue market list.","responses":{"200":{"description":"Ticker list","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"tickers":{"type":"array","items":{"type":"string"}},"updated_at":{"type":["string","null"]}}}}}}}}},"/history":{"get":{"operationId":"getHistory","tags":["history"],"summary":"Historical gap time series for one stock perp","description":"Time series for one trade.xyz stock perp: perp vs stock and xStock gaps, basis, funding (hourly and annualized), OI, plus Aster and Lighter marks, funding and cross-venue gaps. Live 30-minute snapshots, plus a backfill of about 60 days (Hyperliquid candles and funding, Yahoo 30m). Max 90 days per query. Costs $0.02 USDC per call (x402, Base or Solana).","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]},"parameters":[{"name":"ticker","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9]{1,12}$"},"example":"TSLA","description":"One trade.xyz ticker"},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"example":"2026-10-07T00:00:00Z","description":"ISO start (UTC). Default: 7 days before 'to'"},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"example":"2026-10-14T00:00:00Z","description":"ISO end (UTC). Default: now"},{"name":"interval","in":"query","required":false,"schema":{"type":"string","enum":["30m","1h","4h","1d"]},"example":"1h","description":"Bucket size; default 1h"}],"responses":{"200":{"description":"Time series","content":{"application/json":{"schema":{"type":"object","properties":{"ticker":{"type":"string"},"interval":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"count":{"type":"integer"},"rows":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"time":{"type":"string"},"source":{"type":"string","enum":["snapshot","backfill"]},"ticker":{"type":"string"},"perp_mark":{"type":["number","null"]},"perp_oracle":{"type":["number","null"]},"ref_price":{"type":["number","null"]},"ref_session":{"type":["string","null"]},"gap_perp_vs_ref_pct":{"type":["number","null"]},"xstock_price":{"type":["number","null"]},"gap_perp_vs_xstock_pct":{"type":["number","null"]},"basis_mark_vs_oracle_pct":{"type":["number","null"]},"funding_hourly":{"type":["number","null"]},"funding_annualized_pct":{"type":["number","null"]},"open_interest_usd":{"type":["number","null"]},"aster_mark":{"type":["number","null"]},"aster_funding_hourly":{"type":["number","null"]},"lighter_mark":{"type":["number","null"]},"lighter_funding_hourly":{"type":["number","null"]},"gap_aster_vs_xyz_pct":{"type":["number","null"]},"gap_lighter_vs_xyz_pct":{"type":["number","null"]},"max_mark_spread_pct":{"type":["number","null"]}},"required":["ts","ticker","source"]}},"disclaimer":{"type":"string"}},"required":["ticker","rows"]},"example":{"ticker":"TSLA","interval":"1h","from":"2026-10-07T00:00:00.000Z","to":"2026-10-14T20:00:00.000Z","count":1,"rows":[{"ts":1792008000,"time":"2026-10-14T20:00:00.000Z","source":"snapshot","ticker":"TSLA","perp_mark":365.69,"perp_oracle":365.58,"ref_price":365.57,"ref_session":"regular","gap_perp_vs_ref_pct":0.0328,"xstock_price":365.69,"gap_perp_vs_xstock_pct":0,"basis_mark_vs_oracle_pct":0.0301,"funding_hourly":0.00000625,"funding_annualized_pct":5.475,"open_interest_usd":42087597,"aster_mark":366.01,"aster_funding_hourly":0,"lighter_mark":365.77,"lighter_funding_hourly":0.000004,"gap_aster_vs_xyz_pct":0.0875,"gap_lighter_vs_xyz_pct":0.0219,"max_mark_spread_pct":0.0875}],"disclaimer":"Data, not financial advice."}}}},"400":{"description":"Bad parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"example":{"error":"ticker required"}}}},"402":{"description":"Payment Required. x402 v2: the PAYMENT-REQUIRED response header holds base64 JSON with accepts[] with two options, Base (eip155:8453) and Solana mainnet (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp). Each has scheme exact, the USDC asset, amount in atomic units and payTo. Pay with any x402 client and retry with a PAYMENT-SIGNATURE header.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 PaymentRequired JSON","schema":{"type":"string"}}}},"502":{"description":"Upstream data error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"example":{"error":"storage error"}}}}}}},"/export":{"get":{"operationId":"getExport","tags":["history"],"summary":"Bulk daily export (CSV or JSON)","description":"Every 30-minute snapshot for one UTC day across the 40 highest-open-interest tracked stock perps, with the same columns as /history. Costs $0.25 USDC per call (x402, Base or Solana).","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.25"},"protocols":[{"x402":{}}]},"parameters":[{"name":"date","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"example":"2026-10-14","description":"UTC day; default yesterday"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","csv"]},"example":"csv","description":"Default json"}],"responses":{"200":{"description":"Daily export","content":{"application/json":{"schema":{"type":"object","description":"JSON form; format=csv returns text/csv with the same columns.","properties":{"date":{"type":"string"},"snapshots":{"type":"integer"},"count":{"type":"integer"},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"time":{"type":"string"},"source":{"type":"string","enum":["snapshot","backfill"]},"ticker":{"type":"string"},"perp_mark":{"type":["number","null"]},"perp_oracle":{"type":["number","null"]},"ref_price":{"type":["number","null"]},"ref_session":{"type":["string","null"]},"gap_perp_vs_ref_pct":{"type":["number","null"]},"xstock_price":{"type":["number","null"]},"gap_perp_vs_xstock_pct":{"type":["number","null"]},"basis_mark_vs_oracle_pct":{"type":["number","null"]},"funding_hourly":{"type":["number","null"]},"funding_annualized_pct":{"type":["number","null"]},"open_interest_usd":{"type":["number","null"]},"aster_mark":{"type":["number","null"]},"aster_funding_hourly":{"type":["number","null"]},"lighter_mark":{"type":["number","null"]},"lighter_funding_hourly":{"type":["number","null"]},"gap_aster_vs_xyz_pct":{"type":["number","null"]},"gap_lighter_vs_xyz_pct":{"type":["number","null"]},"max_mark_spread_pct":{"type":["number","null"]}},"required":["ts","ticker","source"]}}},"required":["date","rows"]},"example":{"date":"2026-10-14","snapshots":1,"count":1,"rows":[{"ts":1792008000,"time":"2026-10-14T20:00:00.000Z","source":"snapshot","ticker":"TSLA","perp_mark":365.69,"perp_oracle":365.58,"ref_price":365.57,"ref_session":"regular","gap_perp_vs_ref_pct":0.0328,"xstock_price":365.69,"gap_perp_vs_xstock_pct":0,"basis_mark_vs_oracle_pct":0.0301,"funding_hourly":0.00000625,"funding_annualized_pct":5.475,"open_interest_usd":42087597,"aster_mark":366.01,"aster_funding_hourly":0,"lighter_mark":365.77,"lighter_funding_hourly":0.000004,"gap_aster_vs_xyz_pct":0.0875,"gap_lighter_vs_xyz_pct":0.0219,"max_mark_spread_pct":0.0875}]}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Bad date","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"example":{"error":"date must be YYYY-MM-DD (UTC)"}}}},"402":{"description":"Payment Required. x402 v2: the PAYMENT-REQUIRED response header holds base64 JSON with accepts[] with two options, Base (eip155:8453) and Solana mainnet (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp). Each has scheme exact, the USDC asset, amount in atomic units and payTo. Pay with any x402 client and retry with a PAYMENT-SIGNATURE header.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 PaymentRequired JSON","schema":{"type":"string"}}}}}}},"/health":{"get":{"operationId":"getHealth","tags":["meta"],"security":[],"summary":"Free liveness check","description":"Free. Returns {ok:true}. Add deep=1 to probe upstream data sources.","parameters":[{"name":"deep","in":"query","required":false,"schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}},"example":{"ok":true}}}}}}}}}