Api Endpoint

Perp Gap API

One-call research card for a single stock perp: spot quote and US session (pre/regular/after-hours/overnight/closed), perp prices on trade.xyz, Aster and Lighter, gap % vs spot and vs Solana xStock, funding, basis, last 72h gap history and the rule-based long/short/watch/avoid verdict. Use when an agent needs everything about one ticker before trading or answering a user. Data, not advice. Errors: 400 missing ticker, 402, 404 not listed, 502 upstream.

Open interactive test console

Offering

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

Endpoint context

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

Payment pricing

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

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

Observed health

Status
Healthy
Latest latency
85 ms
Average latency
602 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

{
  "additionalProperties": false,
  "properties": {
    "method": {
      "enum": [
        "GET"
      ],
      "type": "string"
    },
    "queryParams": {
      "additionalProperties": false,
      "properties": {
        "ticker": {
          "description": "One US stock ticker listed as a trade.xyz perp (see free GET /tickers), case-insensitive.",
          "examples": [
            "TSLA",
            "NVDA",
            "GME"
          ],
          "pattern": "^[A-Za-z0-9.]{1,10}$",
          "type": "string"
        }
      },
      "required": [
        "ticker"
      ],
      "type": "object"
    },
    "type": {
      "const": "http",
      "type": "string"
    }
  },
  "required": [
    "type",
    "method"
  ],
  "type": "object"
}

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": {
            "ticker": {
              "description": "One US stock ticker listed as a trade.xyz perp (see free GET /tickers), case-insensitive.",
              "examples": [
                "TSLA",
                "NVDA",
                "GME"
              ],
              "pattern": "^[A-Za-z0-9.]{1,10}$",
              "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}: 400 ticker required; 402 payment required; 404 ticker not listed on trade.xyz; 502 upstream error.",
          "properties": {
            "cross_venue": {
              "type": "object"
            },
            "disclaimer": {
              "type": "string"
            },
            "generated_at": {
              "type": "integer"
            },
            "history": {
              "type": "object"
            },
            "label": {
              "type": "string"
            },
            "market": {
              "properties": {
                "holiday": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "session": {
                  "enum": [
                    "pre-market",
                    "regular",
                    "after-hours",
                    "overnight",
                    "closed"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            },
            "perps": {
              "properties": {
                "aster": {
                  "properties": {
                    "basis_mark_vs_index_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "funding_annualized_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "funding_hourly": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "gap_vs_spot_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "gap_vs_trade_xyz_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "gap_vs_xstock_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "index": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "mark": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "open_interest_usd": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "venue": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "lighter": {
                  "properties": {
                    "basis_mark_vs_index_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "funding_annualized_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "funding_hourly": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "gap_vs_spot_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "gap_vs_trade_xyz_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "gap_vs_xstock_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "index": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "mark": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "open_interest_usd": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "venue": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "trade_xyz": {
                  "properties": {
                    "basis_mark_vs_index_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "funding_annualized_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "funding_hourly": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "gap_vs_spot_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "gap_vs_trade_xyz_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "gap_vs_xstock_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "index": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "mark": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "open_interest_usd": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "venue": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            },
            "spot": {
              "properties": {
                "age_seconds": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "change_pct": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "prev_close": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "price_session": {
                  "description": "pre, regular, post, overnight, closed or last_close",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": "object"
            },
            "ticker": {
              "type": "string"
            },
            "verdict": {
              "properties": {
                "confidence": {
                  "type": "number"
                },
                "reasons": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "score": {
                  "type": "number"
                },
                "verdict": {
                  "enum": [
                    "long",
                    "short",
                    "watch",
                    "avoid"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            },
            "xstock": {
              "properties": {
                "gap_trade_xyz_vs_xstock_pct": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "gap_xstock_vs_spot_pct": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            }
          },
          "required": [
            "ticker",
            "market",
            "spot",
            "perps",
            "verdict",
            "disclaimer"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}