Api Endpoint

perp-gap-api.perpgap.workers.dev

Use when an agent needs a full-universe dataset for research, backtests or a warehouse rather than one ticker. One UTC day of 30-minute snapshots for the top 40 stock perps by open interest: trade.xyz vs stock vs xStock gaps, basis, funding, OI, Aster/Lighter/OKX marks and cross-venue gaps, as JSON or CSV. Bad dates return 400/404 before any charge. Errors: 400, 402, 404. 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
Blockchain And Crypto
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://perp-gap-api.perpgap.workers.dev/export
MIME type
application/json
First seen
2026-10-16T01:52:40.118Z
Last seen
Tags
Trading, Data, stocks, perps, dataset

Payment pricing

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

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

Observed health

Status
Healthy
Latest latency
70 ms
Average latency
673 ms
HTTP status
402
Last checked
Reachability
100% over 15 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": {
        "date": {
          "type": "string",
          "description": "Optional UTC day YYYY-MM-DD (default: yesterday).",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "format": {
          "type": "string",
          "description": "Optional: json or csv.",
          "enum": [
            "json",
            "csv"
          ]
        }
      },
      "required": [],
      "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": {
          "properties": {
            "date": {
              "description": "UTC day, YYYY-MM-DD. Default: yesterday.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "type": "string"
            },
            "format": {
              "description": "Default json.",
              "enum": [
                "json",
                "csv"
              ],
              "type": "string"
            }
          },
          "type": "object"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "description": "JSON form; format=csv returns text/csv with the same columns.",
          "properties": {
            "columns": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "count": {
              "type": "integer"
            },
            "date": {
              "type": "string"
            },
            "rows": {
              "items": {
                "properties": {
                  "aster_funding_hourly": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "aster_mark": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "basis_mark_vs_oracle_pct": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "funding_annualized_pct": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "funding_hourly": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "gap_aster_vs_xyz_pct": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "gap_lighter_vs_xyz_pct": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "gap_perp_vs_ref_pct": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "gap_perp_vs_xstock_pct": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "lighter_funding_hourly": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "lighter_mark": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "max_mark_spread_pct": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "open_interest_usd": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "perp_mark": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "perp_oracle": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "ref_price": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "ref_session": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "source": {
                    "enum": [
                      "snapshot",
                      "backfill"
                    ],
                    "type": "string"
                  },
                  "ticker": {
                    "type": "string"
                  },
                  "time": {
                    "type": "string"
                  },
                  "ts": {
                    "type": "integer"
                  },
                  "xstock_price": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "ts",
                  "ticker",
                  "source"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "snapshots": {
              "type": "integer"
            }
          },
          "required": [
            "date",
            "rows"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}