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
get_gap_sample, loaded in your browser)| Ticker | trade.xyz perp | Stock | Session | Gap |
|---|---|---|---|---|
| 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"}}}'
Standard x402. Any x402 client handles steps 2 and 3 automatically.
Call a route such as GET /research?ticker=TSLA. You don't need to sign up.
You get HTTP 402 with a PAYMENT-REQUIRED header. Sign a USDC payment on Base or Solana and retry.
The Coinbase CDP facilitator settles the payment and you get 200 with JSON plus a PAYMENT-RESPONSE receipt.
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.
Rule-based long / short / watch / avoid with score, confidence and reasons, including SEC EDGAR insider and filing signals.
Everything about one ticker in one call: spot, session, all venues, xStock, funding, basis, recent history and the verdict.
Gap time series up to 90 days ($0.02) and full daily CSV/JSON dumps ($0.25).
GET /research?ticker=TSLA · MCP tool get_research_card · $0.03
news_context label such as "likely news-driven"/verdict, and a "Data, not financial advice." labelOne 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.
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.02Time 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.25Every 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
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
}
}
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.
| Route | MCP tool | Price | Returns |
|---|---|---|---|
| none | get_gap_sample | Free | Perp mark, stock price and gap % for one ticker |
GET /gaps | get_gaps | $0.01 | Gap table for up to 60 tickers (tickers=all for every US stock perp); venues=all adds trade.xyz vs Aster vs Lighter |
GET /verdict | get_verdict | $0.03 | Rule-based verdict with reasons and inputs (gap, funding, SEC EDGAR) |
GET /research | get_research_card | $0.03 | Full research card for one ticker |
GET /history | get_history | $0.02 | Gap time series, up to 90 days |
GET /export | get_export | $0.25 | All snapshots for one UTC day, CSV or JSON |
https://perp-gap-api.perpgap.workers.dev/mcp (Streamable HTTP) into any MCP client, or call the REST routes from an x402 client such as @x402/fetchnull for missing dataThe 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).
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.