Api Endpoint

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.

Open interactive test console

Offering

Provider
perp-gap-api.perpgap.workers.dev
Method
GET
Offering type
Api Endpoint
Transport type
http
Category
Other
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://perp-gap-api.perpgap.workers.dev/funding
MIME type
application/json
First seen
2026-10-23T22:13:16.843Z
Last seen
Tags
Trading, Data, funding-rates, perps, stocks

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.02 USDC
Atomic price: 20000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Payment option 2
0.02 USDC
Atomic price: 20000 · Network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "20000",
    "payTo": "0x2d82dcB9cC3a168d9Ab25b62C1E33E278A51254F"
  },
  {
    "scheme": "exact",
    "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
    "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": "20000",
    "payTo": "5MoL8HNnvZUogGrqiF4T1StmAUpdU7ERA2GUJ7gLrEja"
  }
]

Observed health

Status
Healthy
Latest latency
70 ms
Average latency
753 ms
HTTP status
402
Last checked
Reachability
100% over 7 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "http"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET"
      ]
    },
    "queryParams": {
      "type": "object",
      "properties": {
        "ticker": {
          "type": "string",
          "description": "Stock ticker, case-insensitive (free list: GET /catalog).",
          "pattern": "^[A-Za-z0-9.]{1,12}$",
          "examples": [
            "NVDA"
          ]
        },
        "tickers": {
          "type": "string",
          "description": "Optional alternative to ticker: 'all' for the full board.",
          "enum": [
            "all"
          ]
        },
        "history": {
          "type": "string",
          "description": "Optional history window (single ticker).",
          "enum": [
            "24h",
            "7d",
            "30d"
          ]
        },
        "min_spread_apr": {
          "type": "string",
          "description": "Board only: minimum venue APR spread in pp.",
          "pattern": "^[0-9.]+$"
        }
      },
      "required": [
        "ticker"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "type",
    "method"
  ],
  "additionalProperties": false
}

Output schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "method": {
          "enum": [
            "GET"
          ],
          "type": "string"
        },
        "queryParams": {
          "additionalProperties": false,
          "properties": {
            "history": {
              "description": "Optional history window (single ticker).",
              "enum": [
                "24h",
                "7d",
                "30d"
              ],
              "type": "string"
            },
            "min_spread_apr": {
              "description": "Board only: minimum venue APR spread in pp.",
              "pattern": "^[0-9.]+$",
              "type": "string"
            },
            "ticker": {
              "description": "Stock ticker, case-insensitive (free list: GET /catalog).",
              "examples": [
                "NVDA"
              ],
              "pattern": "^[A-Za-z0-9.]{1,12}$",
              "type": "string"
            },
            "tickers": {
              "description": "Optional alternative to ticker: 'all' for the full board.",
              "enum": [
                "all"
              ],
              "type": "string"
            }
          },
          "required": [
            "ticker"
          ],
          "type": "object"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "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.",
          "properties": {
            "as_of": {
              "type": "string"
            },
            "history": {
              "type": "object"
            },
            "sign": {
              "type": "string"
            },
            "summary": {
              "type": "object"
            },
            "ticker": {
              "type": "string"
            },
            "us_session": {
              "type": "string"
            },
            "venues": {
              "type": "object"
            }
          },
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}