Perp Gap API
Use when an agent must pick the cheapest venue to hold a stock perp or size funding carry. Funding on trade.xyz, Aster, Lighter and OKX normalized to hourly and annualized APR, interval and next funding time, cheapest venue to be long or short, carry spread, optional 24h/7d/30d history; one ticker or tickers=all. Bad params return 400/404 before any charge. Errors: 400, 402, 404, 502. Data, not advice.
The wallet the 402 directs payment to. Its whole payment record — every payer, every chain — is on the merchant page.
Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
The payTo wallet does not resolve to a registered ERC-8004 agent. That is not a verdict on the service — most of the catalog is unregistered.
Accepts
The payment requirements as published to the catalog. Read the live 402 before paying — a price here is a claim, not a quote.
Pay 0.02 USDC on Base to 0x2d82…1254F. The signed payment is good for 2 minutes.
- Paid to
- 0x2d82…1254F
- USD Coin contract
- 0x8335…02913
- Payment window
- 2 minutes
- As published
- 20000 smallest units
That figure is in the token’s smallest units. Roundhouse does not hold this contract’s decimals, so it is shown as published rather than converted.
- Paid to
- 5MoL8H…LrEja
- Token contract
- EPjFWd…TDt1v
- Payment window
- 2 minutes
The catalog’s raw entry
[
{
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"extra": {
"name": "USD Coin",
"version": "2"
},
"payTo": "0x2d82dcB9cC3a168d9Ab25b62C1E33E278A51254F",
"amount": "20000",
"scheme": "exact",
"network": "eip155:8453",
"maxTimeoutSeconds": 120
},
{
"asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"extra": {
"feePayer": "D6ZhtNQ5nT9ZnTHUbqXZsTx5MH2rPFiBBggX4hY1WePM"
},
"payTo": "5MoL8HNnvZUogGrqiF4T1StmAUpdU7ERA2GUJ7gLrEja",
"amount": "20000",
"scheme": "exact",
"network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"maxTimeoutSeconds": 120
}
]Extensions
{
"bazaar": {
"info": {
"input": {
"type": "http",
"method": "GET",
"queryParams": {
"ticker": "NVDA",
"history": "7d"
}
},
"output": {
"type": "json",
"example": {
"sign": "positive = longs pay shorts; apr_pct = hourly rate x 8760 x 100",
"as_of": "2026-10-22T21:41:01.561Z",
"ticker": "NVDA",
"venues": {
"okx": {
"rate": 0,
"hourly": 0,
"symbol": "NVDA-USDT-SWAP",
"apr_pct": 0,
"interval_h": 8,
"next_funding": "2026-10-23T00:00:00.000Z"
},
"aster": {
"rate": 0,
"hourly": 0,
"symbol": "NVDAUSDT",
"apr_pct": 0,
"interval_h": 8,
"next_funding": "2026-10-23T00:00:00.000Z"
},
"lighter": {
"rate": 0.000004,
"hourly": 0.000004,
"symbol": "NVDA",
"apr_pct": 3.5,
"market_id": 110,
"interval_h": 1
},
"hyperliquid-xyz": {
"rate": 0.00000625,
"hourly": 0.00000625,
"symbol": "xyz:NVDA",
"apr_pct": 5.48,
"interval_h": 1,
"next_funding": "2026-10-22T22:00:00.000Z"
}
},
"history": {
"note": "Aster and OKX settle every interval_h hours (8h for most stock perps); their points are per settlement, annualized.",
"points": {
"okx": 21,
"aster": 21,
"lighter": 168,
"hyperliquid-xyz": 168
},
"window": "7d",
"mean_apr_pct": {
"okx": 4.03,
"aster": 3.43,
"lighter": 5.41,
"hyperliquid-xyz": 5.25
},
"hourly_apr_pct": {
"okx": [
[
"2026-10-16T00:00Z"
]
],
"aster": [
[
"2026-10-16T00:00Z"
]
],
"lighter": [
[
"2026-10-15T22:00Z"
]
],
"hyperliquid-xyz": [
[
"2026-10-15T22:00Z"
]
]
}
},
"summary": {
"carry_trade": "long aster / short hyperliquid-xyz collects ~5.48% APR in funding at current rates (before fees, basis and weekend risk)",
"cheapest_long": "aster",
"cheapest_short": "hyperliquid-xyz",
"max_spread_apr_pct": 5.48
},
"us_session": "after-hours"
}
}
},
"schema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"input"
],
"properties": {
"input": {
"type": "object",
"required": [
"type",
"method"
],
"properties": {
"type": {
"type": "string",
"const": "http"
},
"method": {
"enum": [
"GET"
],
"type": "string"
},
"queryParams": {
"type": "object",
"required": [
"ticker"
],
"properties": {
"ticker": {
"type": "string",
"pattern": "^[A-Za-z0-9.]{1,12}$",
"examples": [
"NVDA"
],
"description": "Stock ticker, case-insensitive (free list: GET /catalog)."
},
"history": {
"enum": [
"24h",
"7d",
"30d"
],
"type": "string",
"description": "Optional history window (single ticker)."
},
"tickers": {
"enum": [
"all"
],
"type": "string",
"description": "Optional alternative to ticker: 'all' for the full board."
},
"min_spread_apr": {
"type": "string",
"pattern": "^[0-9.]+$",
"description": "Board only: minimum venue APR spread in pp."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"output": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string"
},
"example": {
"type": "object",
"properties": {
"sign": {
"type": "string"
},
"as_of": {
"type": "string"
},
"ticker": {
"type": "string"
},
"venues": {
"type": "object"
},
"history": {
"type": "object"
},
"summary": {
"type": "object"
},
"us_session": {
"type": "string"
}
},
"description": "Error responses are JSON {error: string, hint?: string}. 400 bad params (never charged); 402 payment required; 404 ticker/market not listed (checked before settlement, never charged); 502 upstream error. Full field docs: /openapi.json."
}
}
}
}
}
}
}Provenance
- Seen in the source catalog
- 2026-10-22 21:53Z
- Last indexed by Roundhouse
- 2026-10-26 22:40Z
- Last enriched (probe, favicon, geo)
- 2026-10-22 23:16Z
- x402 version
- 2
- Max timeout
- 120s
- Liveness probe
- HTTP 402
Hand this page to an agent
Copy the prompt and paste it into Claude, an MCP client or your own agent — it will vet this service and call it over the free read API. No key, no account.
GET api.roundhouseai.io/v0/endpoints
This endpoint's own trailing-30-day call count, as published by the upstream catalog and snapshotted daily. 4 snapshots so far. Verified volume counts only settlements with an on-chain EIP-3009 marker.
Show the promptHide the prompt
Using Roundhouse, look up the x402 service Perp Gap API and tell me whether it is worth paying: what a call costs, whether the endpoint answered when last probed, and what its payment record actually shows. curl -s 'https://api.roundhouseai.io/v0/endpoints?q=Perp%20Gap%20API' curl -s 'https://api.roundhouseai.io/v0/merchants/<the payTo wallet returned above>' Then call it: read the price from the live 402 at https://perp-gap-api.perpgap.workers.dev/funding, never from a cached figure, and pay with an x402 client. The /v0 API needs an API key (`authorization: Bearer rh_live_…`) on everything except /v0/unified* and /v0/endpoints. Either pay over x402 (mint a personal key for $0.01 at GET https://api.roundhouseai.io/v0/test/x402), or ask me for an organization key, which I create at https://roundhouseai.io/dashboard/connections. If you have neither, ask before going further. If you do not have Roundhouse tools or skills installed, read https://roundhouseai.io/skill.md first — it is the whole procedure.