Perp Gap API

dev.workers.perpgap.perp-gap-apiPublished by perp-gap-api.perpgap.workers.devOfficial publisherv1.5.0Updated Oct 29, 2026

Stock perps & tokenized stocks: trade.xyz, Aster, Lighter, OKX, xStocks, Ondo; quotes, funding. x402

VerifiedStreamable HTTPWeb executableFinanceData & Analytics

Overview

AI-generated overview

Remote MCP server giving assistants market data on stock perpetuals and tokenized stocks across trade.xyz, Aster, Lighter, OKX, xStocks and Ondo, with paid…

What you can do
  • List markets and sample gaps: free catalog of stock perps and tokenized stocks, plus a basic perp-vs-stock gap for one trade.xyz perp
  • Fetch quotes and funding: unified live quotes for up to 10 tickers, cross-venue funding normalized to hourly and APR, and tokenized-stock premium and liquidity
  • Compare gaps and history: gap tables across venues, historical gap time series up to 90 days, and bulk daily JSON exports
  • Get verdicts and research: rule-based long/short/watch/avoid verdicts with SEC filing and news signals, and one-call research cards per perp
  • Scan prediction markets: list Hyperliquid HIP-4 binary price markets, compare odds with perp-implied probability, and rank the most mispriced…
When to use it
Useful when an assistant needs to compare stock-perp pricing, funding and tokenized-stock premiums across venues, or to check Hyperliquid prediction-market odds against model-implied probabilities. Most data calls cost money per request, so it suits occasional research rather than high-volume polling.
Requirements
Runs as a remote streamable HTTP endpoint; no local package, account or API key is declared. Paid tools require x402 payment in USDC on Base or Solana, so a funded wallet capable of x402 payments is needed. Network access to the endpoint and the underlying venues is required.
Before you install
Most tools charge per call in USDC via x402, from $0.01 up to $0.25 for the bulk export, so repeated use spends real funds. Outputs are market data and rule-based verdicts explicitly described as data, not financial advice, and should not be treated as recommendations. Payment is made from a crypto wallet, so keep spending limits in mind.

Installation

In SourceWeft

  1. Open Perp Gap API in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/dev.workers.perpgap.perp-gap-api%2Fperp-gap/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "perp-gap-api": {
      "type": "http",
      "url": "https://perp-gap-api.perpgap.workers.dev/mcp"
    }
  }
}

Tools

14

list_markets

FREE. Catalog of every stock perp and tokenized stock agents can trade: Hyperliquid trade.xyz, Aster, Lighter and OKX perps plus Solana xStocks and Ondo Global Markets tokens. Per market: ticker, venue, symbol / Lighter market_id / Solana mint / Ondo contract, type, live and tradable_now. Use first to see where a ticker trades before get_quote or get_funding.

Parametersvenuetickertradableinstrument

get_quote

PAID $0.01 (x402, USDC on Base or Solana). Unified live quote for 1-10 stock tickers: perp mark and bid/ask mid on trade.xyz, Aster, Lighter and OKX, Solana xStock and Ondo per-share prices, last US close and the reference used (pre/regular/after-hours/overnight/closed), gap % vs reference, perp spread, best bid/ask, cross-venue arb bps, freshness.

Parameterstickertickers

get_funding

PAID $0.02 (x402, USDC on Base or Solana). Stock-perp funding on trade.xyz, Aster, Lighter and OKX normalized to hourly and APR, interval, next funding time, cheapest venue to long or short, carry spread, optional history (24h/7d/30d). tickers='all' returns the board for every stock perp.

Parameterstickerhistorytickersmin_spread_apr

get_token_premium

PAID $0.01 (x402, USDC on Base or Solana). Tokenized stocks (xStocks on Solana, Ondo Global Markets): each token's price per share vs the real stock reference, premium/discount %, freshness, chain and liquidity. One ticker, up to 10, or tickers='all'.

Parameterstickertickers

get_token_liquidity

PAID $0.01 (x402, USDC on Base or Solana). Tokenized stock liquidity for one ticker: each xStocks/Ondo token's Solana pool liquidity, $10k buy/sell price impact, estimated size within 1%, tradable flag, plus Ondo's issuer mint/redeem market.

Parameterstickerrequired

get_gap_sample

FREE. Basic perp-vs-stock gap for ONE trade.xyz stock perp (e.g. NVDA): perp mark, reference stock price, gap %. Use get_gaps for xStock gap, basis, funding and open interest.

Parameterstickerrequired

get_gaps

PAID $0.01 (x402, USDC on Base or Solana). Gap table for up to 60 trade.xyz stock perps (tickers=all for every auto-discovered US stock perp): perp mark/oracle vs reference stock price and Solana xStock, basis, hourly and annualized funding, open interest. Set venues='all' for a cross-venue comparison: trade.xyz vs Aster vs Lighter mark prices, gap % between venues, and each venue's funding (hourly and annualized).

Parametersvenuestickers

get_verdict

PAID $0.03 (x402, USDC on Base or Solana). Rule-based long/short/watch/avoid verdict for one trade.xyz stock perp, using the perp-vs-stock gap, basis, funding and SEC EDGAR insider and filing signals, with reasons and confidence. 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). Data, not financial advice.

Parameterstickerrequired

get_history

PAID $0.02 (x402, USDC on Base or Solana). Historical gap time series for one trade.xyz stock perp (up to 90 days; interval 30m/1h/4h/1d): perp vs stock and xStock gaps, basis, funding, OI, plus Aster, Lighter and OKX marks and cross-venue gaps.

Parameterstofromtickerrequiredinterval

get_export

PAID $0.25 (x402, USDC on Base or Solana). Bulk JSON export of one UTC day of 30-minute snapshots for all 20 tracked stock perps (cross-venue gaps, funding, OI).

Parametersdate

get_research_card

PAID $0.03 (x402, USDC on Base or Solana). One-call research card for a single stock perp: spot quote and market session, perp prices on trade.xyz, Aster, Lighter and OKX, gap % per venue vs spot and vs the Solana xStock, funding and basis, recent 72h gap history, and the rule-based verdict. Also xStocks/Ondo token premiums, the extended-hours/overnight trade, the last 4 weekend gaps vs Monday's open and a plain-text summary block. 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). Data, not financial advice.

Parameterstickerrequired

list_pm_markets

FREE. Live Hyperliquid HIP-4 binary price outcome markets ('BTC above 82,268 at 2026-10-18 08:00 UTC'): outcome id, asset, strike, expiry, settlement source, bid, ask, depth; empty books filtered. Use first to see what get_pm_implied and get_pm_scan cover. Data, not advice.

Parameterskindasset

get_pm_implied

PAID $0.02 (x402, USDC on Base or Solana). Is a Hyperliquid prediction market on a crypto or stock price cheap or expensive? For every live binary price outcome on one asset: bid, ask, depth, the probability implied by the live perp price and 7d realized vol, edge in pp vs bid and ask, liquidity flag and signal. Bad input or no live market is a free error. Data, not advice.

Parametersassetoutcomemin_depth_usd

get_pm_scan

PAID $0.05 (x402, USDC on Base or Solana). Ranked list of the most mispriced liquid Hyperliquid prediction markets right now across crypto and tokenized-stock binary price markets: model probability vs bid/ask, edge in pp, spread, depth and book age; empty and illiquid books filtered. Data, not advice.

Parameterskindlimitmin_edge_ppmax_spread_ppmin_depth_usd

Version history

4
  1. v1.5.0LatestOct 29, 2026
  2. v1.4.0Oct 17, 2026
  3. v1.3.0Oct 15, 2026
  4. v1.2.0Oct 14, 2026

Score

72% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts

    Publish an icon in the registry entry.

  • Documentation15 pts

    Declare a GitHub repository with a README, or serve resource_documentation in the OAuth protected-resource metadata.

  • LicenseNot applicable

    A hosted service is used under its provider's terms, so no license is expected here. This check is left out of the percentage.