ToolAssay

Use when an agent needs to backtest or chart how a stock perp's premium/discount

Use when an agent needs to backtest or chart how a stock perp's premium/discount and funding evolved, including weekends and holidays when the stock is shut. One ticker: trade.xyz perp mark/oracle vs stock and xStock, basis, funding, OI, Aster/Lighter/OKX cross-venue gaps; 30-minute snapshots plus ~60d backfill, up to 90 days per call. Bad params return 400/404 before any charge. Errors: 400, 402, 404, 502. Data, not advice.

Answeringour last check, 2026-10-24
1 of 1checks answered this week
441 msmedian answer time
$0.02listed price per call
$0.02price it asked us

Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.

Endpoint

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

CategoryMarket data
Provider hostperp-gap-api.perpgap.workers.dev
Networkseip155:8453, solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
Payment schemesexact
Self-reported calls, 30 days4 from 1 payers (the provider's figure, not ours)

Our checks, last 30 days

DayResultHTTPAskedTime
2026-10-24 valid payment request 402$0.02 441 ms

Example input (from the provider)

{
  "method": "GET",
  "queryParams": {
    "interval": "1h",
    "ticker": "NVDA"
  },
  "type": "http"
}

Promised output schema (from the provider)

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "method": {
          "enum": [
            "GET"
          ],
          "type": "string"
        },
        "queryParams": {
          "additionalProperties": false,
          "properties": {
            "from": {
              "description": "Optional ISO 8601 start (default: 7 days before 'to').",
              "format": "date-time",
              "type": "string"
            },
            "interval": {
              "default": "1h",
              "description": "Optional bucket size.",
              "enum": [
                "30m",
                "1h",
                "4h",
                "1d"
              ],
              "type": "string"
            },
            "ticker": {
              "description": "Stock ticker, case-insensitive (free list: GET /catalog).",
              "examples": [
                "NVDA"
              ],
              "pattern": "^[A-Za-z0-9.]{1,12}$",
              "type": "string"
            },
            "to": {
              "description": "Optional ISO 8601 end (default: now).",
              "format": "date-time",
              "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": {
            "count": {
              "type": "number"
            },
            "disclaimer": {
              "type": "string"
            },
            "from": {
              "type": "string"
            },
            "interval": {
              "type": "string"
            },
            "rows": {
              "type": "array"
            },
            "sources": {
              "type": "object"
            },
            "ticker": {
              "type": "string"
            },
            "to": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}

This page as JSON