47trust / 100

Quote

by Perp Gap API in Markets & finance

x402 APIFailing, checked 12 h ago

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.

GET
https://perp-gap-api.perpgap.workers.dev/quote
Price
$0.01
per call in USDC
Uptime
91.3%
last 30 days
Response time
234 ms
411 ms slowest 5%
Last check
Failed
12 h ago, next in 14 h

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Latest check failed 12 h ago: Timed out

Status and outage history · Atom feed · Watch with other listings

How to call it

GET https://perp-gap-api.perpgap.workers.dev/quote

Each call costs $0.01 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

GET https://perp-gap-api.perpgap.workers.dev/quote?ticker=NVDA

Parameters

ParameterTypeRequiredDescription
tickerstringYesStock ticker, case-insensitive (free list: GET /catalog).
tickersstringNoOptional alternative to ticker: up to 10 comma-separated tickers.

Example response

The provider's example. We can't check it without paying.

Example response, 90 lines
{
  "as_of": "2026-10-22T21:41:01.558Z",
  "last_close": {
    "date": "2026-10-22",
    "price": 212.21,
    "ref_vs_close_pct": 0.316,
    "source": "yahoo"
  },
  "perps": {
    "aster": {
      "ask": 213.19,
      "bid": 213.17,
      "index": 213.1046,
      "mark": 213.1046,
      "mid": 213.18,
      "symbol": "NVDAUSDT"
    },
    "hyperliquid-xyz": {
      "ask": 212.85,
      "bid": 212.837,
      "mark": 212.86,
      "mid": 212.845,
      "oracle": 212.89,
      "symbol": "xyz:NVDA"
    },
    "lighter": {
      "ask": 212.993,
      "bid": 212.972,
      "mark": 212.981,
      "market_id": 110,
      "mid": 212.9825,
      "symbol": "NVDA"
    },
    "okx": {
      "ask": 213.17,
      "bid": 213.16,
      "last": 213.17,
      "mark": 213.16,
      "mid": 213.165,
      "symbol": "NVDA-USDT-SWAP"
    }
  },
  "reference": {
    "age_s": 14,
    "kind": "after-hours_last",
    "price": 212.88,
    "source": "robinhood",
    "ts": 1792705247
  },
  "sources": [
    "hyperliquid"
  ],
  "summary": {
    "best_ask": {
      "px": 212.85,
      "venue": "hyperliquid-xyz"
    },
    "best_bid": {
      "px": 213.17,
      "venue": "aster"
    },
    "cheapest": "hyperliquid-xyz",
    "consensus_mid": 212.9413,
    "consensus_vs_ref_pct": 0.029,
    "cross_venue_arb_bps": 15,
    "perp_mark_spread_pct": 0.141,
    "richest": "okx",
    "venues_quoted": 6
  },
  "ticker": "NVDA",
  "tokens": {
    "ondo-gm": {
      "multiplier": 1.0017152487959897,
      "per_share": 212.9,
      "price": 213.2652,
      "status": "postmarket",
      "symbol": "NVDAon",
      "underlying_price": 212.837895
    },
    "xstocks-solana": {
      "liquidity_usd": 2852537,
      "mint": "Xsc9qvGR1efVDFGLrVsmkzv3qi45LTBjeUKSPmx9qEh",
      "multiplier": 1.0009180758490996,
      "per_share": 212.3166,
      "price": 212.3166,
      "symbol": "NVDAx"
    }
  },
  "us_session": "after-hours"
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.01.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i 'https://perp-gap-api.perpgap.workers.dev/quote?ticker=NVDA'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - 'https://perp-gap-api.perpgap.workers.dev/quote?ticker=NVDA' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.01 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.01" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.01 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fperp-gap-api.perpgap.workers.dev%2Fquote
const res = await pay("https://perp-gap-api.perpgap.workers.dev/quote?ticker=NVDA");
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.01 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.01"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.get("https://perp-gap-api.perpgap.workers.dev/quote?ticker=NVDA")
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
12 h agoTimed out---
4 days agoExpected HTTP 402, got 40440481 ms-
5 days agoExpected HTTP 402, got 404404110 ms-
7 days agoExpected HTTP 402, got 40440497 ms-
8 days agoExpected HTTP 402, got 404404119 ms-
Show 10 older checks
8 days agoExpected HTTP 402, got 404404172 ms-
8 days agoExpected HTTP 402, got 404404106 ms-
9 days agoExpected HTTP 402, got 40440485 ms-
9 days agoPassed402218 ms$0.01
9 days agoPassed402324 ms$0.01
9 days agoPassed402333 ms$0.01
10 days agoPassed402106 ms$0.01
10 days agoPassed402308 ms$0.01
10 days agoPassed402310 ms$0.01
10 days agoPassed402103 ms$0.01