x402 · USDC on Base or Solana · no account, no API key

Stock-perp price gaps across trade.xyz, Aster and Lighter, one paid call away

Compare tokenized-stock perps with the real stock and its Solana xStock. You get gaps, funding, basis, open interest, history and a rule-based verdict as clean JSON for AI agents.

Free: get_gap_sample on /mcp · Docs: /openapi.json · /llms.txt

Live gap snapshot (free MCP tool get_gap_sample, loaded in your browser)

Tickertrade.xyz perpStockSessionGap
Loading…
# the same call, from any terminal (free, no payment)
curl -s https://perp-gap-api.perpgap.workers.dev/mcp -H 'content-type: application/json' -H 'accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_gap_sample","arguments":{"ticker":"TSLA"}}}'

How it works

Standard x402. Any x402 client handles steps 2 and 3 automatically.

1

Request

Call a route such as GET /research?ticker=TSLA. You don't need to sign up.

2

402 + pay

You get HTTP 402 with a PAYMENT-REQUIRED header. Sign a USDC payment on Base or Solana and retry.

3

Data

The Coinbase CDP facilitator settles the payment and you get 200 with JSON plus a PAYMENT-RESPONSE receipt.

What you can get

Gaps $0.01

Perp vs stock vs xStock gaps, basis, funding and OI for up to 60 tickers (or tickers=all). Add venues=all to compare trade.xyz, Aster and Lighter.

Verdict $0.03

Rule-based long / short / watch / avoid with score, confidence and reasons, including SEC EDGAR insider and filing signals.

Research card $0.03NEW

Everything about one ticker in one call: spot, session, all venues, xStock, funding, basis, recent history and the verdict.

History & export NEW

Gap time series up to 90 days ($0.02) and full daily CSV/JSON dumps ($0.25).

Ticker Research Card NEW

GET /research?ticker=TSLA · MCP tool get_research_card · $0.03

What it returns

  • Spot quote with previous close and change, plus the US market session: pre-market, regular, after-hours, overnight or closed
  • Perp prices on every venue: trade.xyz (Hyperliquid xyz), Aster and Lighter, with gap % vs the stock and vs trade.xyz
  • Gap to the Solana xStock (e.g. TSLAx) where one exists
  • Funding (hourly and annualized) and basis per venue, plus the widest spread and the richest and cheapest venue
  • Recent history: the last 72h of gaps from the snapshot store
  • A news block: up to 5 items from the last 48h (SEC 8-K filings, Fed/BLS releases, and press-wire items shown as our own one-line summary with a link), plus a heuristic news_context label such as "likely news-driven"
  • The rule-based verdict, using the same logic as /verdict, and a "Data, not financial advice." label

Why agents use it

One paid call gives a trading agent enough context to judge whether a stock-perp gap is unusual, which venue is rich or cheap, whether funding favours longs or shorts, and whether the stock market is even open. It costs the same as a verdict but includes everything behind it. Missing values are null, never guessed.

# unpaid request returns the price
$ curl -i "https://perp-gap-api.perpgap.workers.dev/research?ticker=TSLA"
HTTP/2 402   # $0.03 USDC, Base or Solana

# MCP
tools/call get_research_card { "ticker": "TSLA" }

Real sample response (trimmed; TSLA, Oct 14 2026, after-hours):

{
  "ticker": "TSLA",
  "label": "Data, not financial advice.",
  "market": {
    "session": "after-hours",
    "new_york_time": "Wed 16:39"
  },
  "spot": {
    "price": 367.07,
    "price_session": "post",
    "prev_close": 375.23,
    "change_pct": -2.1747
  },
  "xstock": {
    "symbol": "TSLAx",
    "price": 367.239,
    "gap_trade_xyz_vs_xstock_pct": 0.0166,
    "gap_xstock_vs_spot_pct": 0.0461
  },
  "perps": {
    "trade_xyz": {
      "mark": 367.3,
      "gap_vs_spot_pct": 0.0627,
      "basis_mark_vs_oracle_pct": 0.0545,
      "funding_annualized_pct": 5.475
    },
    "aster": {
      "mark": 367.67,
      "gap_vs_spot_pct": 0.1635,
      "gap_vs_trade_xyz_pct": 0.1007,
      "funding_annualized_pct": 0
    },
    "lighter": {
      "mark": 367.3,
      "gap_vs_spot_pct": 0.0627,
      "gap_vs_trade_xyz_pct": 0,
      "funding_annualized_pct": 3.504
    }
  },
  "cross_venue": {
    "max_mark_spread_pct": 0.1007,
    "richest": "aster",
    "cheapest": "trade.xyz"
  },
  "history": {
    "available": true,
    "window": "last 72h, 1h buckets",
    "gap_perp_vs_ref_pct": {
      "avg": "…",
      "min": "…",
      "max": "…"
    },
    "recent": [
      "…"
    ]
  },
  "verdict": {
    "verdict": "watch",
    "score": 0,
    "confidence": 0.3,
    "reasons": [
      "perp vs reference gap +0.05%: in line, no edge",
      "funding 5.5% APR: neutral",
      "1 8-K(s) in 14d: news/event risk"
    ]
  },
  "disclaimer": "Data, not financial advice."
}

Data, not financial advice. The verdict is a mechanical rule, not a recommendation.

History & bulk export NEW

Every 30 minutes, a snapshot of all tracked stock perps (trade.xyz, Aster, Lighter, stock and xStock) is stored. There is also about 60 days of backfill from Hyperliquid and Yahoo.

GET /history $0.02

Time series for one ticker, up to 90 days per query at 30m, 1h, 4h or 1d. Covers gaps vs stock and xStock, basis, funding, OI, and Aster/Lighter marks and cross-venue gaps. Use it to backtest gap mean reversion or to check whether today's gap is unusual. MCP: get_history.

GET /history?ticker=TSLA&interval=1h&from=2026-10-07T00:00:00Z

GET /export $0.25

Every snapshot for one UTC day across the 40 highest-open-interest tracked tickers, as CSV or JSON. Good for loading into a notebook or database. MCP: get_export.

GET /export?date=2026-10-14&format=csv

Cross-venue gaps

GET /gaps?tickers=TSLA&venues=all: sample row (trimmed)

{
  "ticker": "TSLA",
  "perp_mark": 365.69,
  "ref_price": 365.57,
  "ref_session": "regular",
  "gap_perp_vs_ref_pct": 0.0328,
  "xstock_price": 365.69,
  "gap_perp_vs_xstock_pct": 0,
  "funding_annualized_pct": 5.475,
  "open_interest_usd": 42087597,
  "venues": {
    "xyz": {
      "mark": 365.69,
      "funding_annualized_pct": 5.475,
      "open_interest_usd": 42087597
    },
    "aster": {
      "symbol": "TSLAUSDT",
      "mark": 366.01,
      "funding_annualized_pct": 0,
      "volume_24h_usd": 526115
    },
    "lighter": {
      "symbol": "TSLA",
      "mark": 365.77,
      "funding_annualized_pct": 3.504,
      "open_interest_usd": 1415356
    },
    "gap_aster_vs_xyz_pct": 0.0875,
    "gap_lighter_vs_xyz_pct": 0.0219,
    "gap_lighter_vs_aster_pct": -0.0656,
    "max_mark_spread_pct": 0.0875,
    "richest": "aster",
    "cheapest": "trade.xyz",
    "funding_spread_annualized_pct": 5.475
  }
}

Pricing

Pay per call in USDC on Base (eip155:8453) or Solana mainnet. The price is the same on either chain, and there is no subscription.

RouteMCP toolPriceReturns
noneget_gap_sampleFreePerp mark, stock price and gap % for one ticker
GET /gapsget_gaps$0.01Gap table for up to 60 tickers (tickers=all for every US stock perp); venues=all adds trade.xyz vs Aster vs Lighter
GET /verdictget_verdict$0.03Rule-based verdict with reasons and inputs (gap, funding, SEC EDGAR)
GET /researchget_research_card$0.03Full research card for one ticker
GET /historyget_history$0.02Gap time series, up to 90 days
GET /exportget_export$0.25All snapshots for one UTC day, CSV or JSON

Who it's for

For developers

For traders

  • See whether a stock perp trades rich or cheap vs the real stock, including pre-market, after-hours and the overnight session
  • Compare the same stock perp on trade.xyz, Aster and Lighter, along with the Solana xStock
  • Check funding and basis before you hold a position, and look at how gaps behaved over past days
  • Pay only for what you use, a few cents per call, with no account

Covered tickers

The list is auto-discovered from the trade.xyz market list every 6 hours. It includes US stock and ETF perps (checked against a US quote feed) plus the XYZ100 and SP500 index perps, sorted by open interest. Aster and Lighter prices are added wherever they list the same symbol. Full list: /tickers (free).

Loading…

Data sources

Hyperliquid info API (dex xyz), Aster futures API, Lighter API, Yahoo Finance (stock reference, trending), DexScreener / Jupiter (xStocks), SEC EDGAR and ApeWisdom (Reddit mentions). All are public and need no keys. Funding is normalized to hourly and annualized (×24×365). Overnight (20:00-04:00 ET, Sun-Thu nights), the stock price comes from Alpaca's overnight feed (Blue Ocean ATS), with Robinhood's 24 Hour Market quotes as a fallback, so it keeps moving instead of freezing at the after-hours close. Every response labels the session, source and price age (ref_session, ref_source, ref_age_seconds). Weekends and NYSE holidays are labelled closed.