Research
by perp-gap-api.perpgap.workers.dev in Markets & finance
Ticker research card for one stock perp in a single JSON: spot quote and US market session (pre-market/regular/after-hours/closed), perp prices on trade.xyz (Hyperliquid xyz), Aster and Lighter, gap % per venue vs spot and vs the Solana xStock, funding and basis, recent gap history (last 72h) and the rule-based long/short/watch/avoid verdict. Data, not financial advice.
https://perp-gap-api.perpgap.workers.dev/research- Price
- $0.03
- per call in USDC
- Uptime
- 100%
- last 30 days
- Response time
- 612 ms
- 1.1 s slowest 5%
- Last check
- Passed
- 3 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
GET https://perp-gap-api.perpgap.workers.dev/research
Each call costs $0.03 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/research?ticker=TSLAParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ticker | string | Yes | One trade.xyz ticker, e.g. TSLA |
Example response
The provider's example. We can't check it without paying.
Example response, 72 lines
{
"card": "research",
"cross_venue": {
"cheapest": "trade.xyz",
"max_mark_spread_pct": 0.0875,
"richest": "Aster"
},
"disclaimer": "Data, not financial advice.",
"generated_at": 1792010000,
"history": {
"available": true,
"gap_perp_vs_ref_pct": {
"avg": 0.04,
"max": 0.31,
"min": -0.12
},
"points": 72,
"window": "last 72h, 1h buckets"
},
"label": "Data, not financial advice.",
"market": {
"new_york_time": "Wed 16:00",
"session": "regular"
},
"perps": {
"aster": {
"funding_annualized_pct": 0,
"gap_vs_spot_pct": 0.1204,
"gap_vs_trade_xyz_pct": 0.0875,
"mark": 366.01,
"venue": "Aster"
},
"lighter": {
"funding_annualized_pct": 3.504,
"gap_vs_spot_pct": 0.0547,
"gap_vs_trade_xyz_pct": 0.0219,
"mark": 365.77,
"venue": "Lighter"
},
"trade_xyz": {
"basis_mark_vs_oracle_pct": 0.0301,
"funding_annualized_pct": 5.475,
"gap_vs_spot_pct": 0.0328,
"index": 365.58,
"mark": 365.69,
"venue": "trade.xyz (Hyperliquid xyz)"
}
},
"spot": {
"change_pct": 1.2099,
"prev_close": 361.2,
"price": 365.57,
"price_session": "regular",
"symbol": "TSLA"
},
"ticker": "TSLA",
"verdict": {
"confidence": 0.3,
"reasons": [
"perp vs reference gap +0.03%: in line, no edge"
],
"score": 0,
"verdict": "watch"
},
"xstock": {
"chain": "solana",
"gap_trade_xyz_vs_xstock_pct": 0,
"gap_xstock_vs_spot_pct": 0.0328,
"price": 365.69,
"symbol": "TSLAx"
}
}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.03.
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/research?ticker=TSLA'
# 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/research?ticker=TSLA' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: 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.03 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.03" });
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.03 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fperp-gap-api.perpgap.workers.dev%2Fresearch
const res = await pay("https://perp-gap-api.perpgap.workers.dev/research?ticker=TSLA");
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.03 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.03"})
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/research?ticker=TSLA")
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
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 742 ms | $0.03 |
| 7 h ago | Passed | 402 | 470 ms | $0.03 |
| 12 h ago | Passed | 402 | 825 ms | $0.03 |
| 16 h ago | Passed | 402 | 359 ms | $0.03 |
| 21 h ago | Passed | 402 | 403 ms | $0.03 |
Show 4 older checks
| 25 h ago | Passed | 402 | 684 ms | $0.03 |
| 29 h ago | Passed | 402 | 1.1 s | $0.03 |
| 34 h ago | Passed | 402 | 612 ms | $0.03 |
| 44 h ago | Passed | 402 | 71 ms | $0.03 |