Api Endpoint

Perp Gap API

Use when an agent must decide if a Hyperliquid prediction market on a crypto or stock price (e.g. 'BTC above 82k on Oct 19', 'SP500 above 7730') is cheap or expensive. Returns each live outcome's bid, ask and depth, the probability implied by the live perp price and 7d realized vol, edge in pp vs bid and ask, and a liquidity flag. Empty books are filtered. Errors: 400 bad input, 404 no live market (both free, never charged), 402, 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/pm/implied
MIME type
application/json
First seen
2026-10-19T02:33:22.426Z
Last seen
Tags
Trading, Data, Prediction Markets, hyperliquid, odds, prediction-markets

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
211 ms
Average latency
393 ms
HTTP status
402
Last checked
Reachability
100% over 12 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": {
        "asset": {
          "description": "Underlying perp: BTC, ETH, HYPE, ZEC or trade.xyz perps like SP500, XYZ100, META, TSLA, CL, GOLD (xyz: prefix optional). Case-insensitive. Default BTC when neither asset nor outcome is given.",
          "examples": [
            "BTC",
            "SP500"
          ],
          "pattern": "^[A-Za-z0-9:]{1,16}$",
          "type": "string"
        },
        "min_depth_usd": {
          "default": "0",
          "description": "Optional. Hide markets with less than this USDC resting within 5 pp of the touch on either side. Default 0 (empty books are always hidden).",
          "examples": [
            "50"
          ],
          "pattern": "^\\d+(\\.\\d+)?$",
          "type": "string"
        },
        "outcome": {
          "description": "Optional Hyperliquid outcome id to price a single market (see free GET /pm/markets).",
          "examples": [
            "11676"
          ],
          "pattern": "^\\d{1,9}$",
          "type": "string"
        }
      },
      "required": [],
      "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": {
            "asset": {
              "description": "Underlying perp: BTC, ETH, HYPE, ZEC or trade.xyz perps like SP500, XYZ100, META, TSLA, CL, GOLD (xyz: prefix optional). Case-insensitive. Default BTC when neither asset nor outcome is given.",
              "examples": [
                "BTC",
                "SP500"
              ],
              "pattern": "^[A-Za-z0-9:]{1,16}$",
              "type": "string"
            },
            "min_depth_usd": {
              "default": "0",
              "description": "Optional. Hide markets with less than this USDC resting within 5 pp of the touch on either side. Default 0 (empty books are always hidden).",
              "examples": [
                "50"
              ],
              "pattern": "^\\d+(\\.\\d+)?$",
              "type": "string"
            },
            "outcome": {
              "description": "Optional Hyperliquid outcome id to price a single market (see free GET /pm/markets).",
              "examples": [
                "11676"
              ],
              "pattern": "^\\d{1,9}$",
              "type": "string"
            }
          },
          "required": [],
          "type": "object"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "description": "Error responses are JSON {error: string}: 400 bad or empty asset, bad outcome or min_depth_usd (free); 404 no live Hyperliquid binary price market for that asset/outcome, or all its books are empty (free, never charged); 402 payment required; 502 upstream error.",
          "properties": {
            "asset": {
              "type": "string"
            },
            "count": {
              "type": "integer"
            },
            "disclaimer": {
              "type": "string"
            },
            "filtered_out_empty_or_thin": {
              "type": "integer"
            },
            "generated_at_iso": {
              "format": "date-time",
              "type": "string"
            },
            "label": {
              "const": "data, not advice",
              "type": "string"
            },
            "markets": {
              "items": {
                "properties": {
                  "ask": {
                    "description": "Best Yes ask (probability, 0-1)",
                    "type": "number"
                  },
                  "ask_size": {
                    "type": "number"
                  },
                  "asset": {
                    "type": "string"
                  },
                  "best_edge_pp": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "bid": {
                    "description": "Best Yes bid (probability, 0-1)",
                    "type": "number"
                  },
                  "bid_size": {
                    "type": "number"
                  },
                  "book_age_s": {
                    "type": "integer"
                  },
                  "book_ts": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "depth_usd": {
                    "description": "USDC notional resting within window_pp of the touch, top 5 levels",
                    "properties": {
                      "ask": {
                        "type": "number"
                      },
                      "bid": {
                        "type": "number"
                      },
                      "levels": {
                        "type": "integer"
                      },
                      "window_pp": {
                        "type": "number"
                      }
                    },
                    "type": "object"
                  },
                  "edge_vs_ask_pp": {
                    "description": "(model_prob - ask) x 100: > 0 means you could buy Yes below model value",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "edge_vs_bid_pp": {
                    "description": "(bid - model_prob) x 100: > 0 means you could sell Yes above model value",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "expiry": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "hours_to_expiry": {
                    "type": "number"
                  },
                  "kind": {
                    "enum": [
                      "crypto",
                      "stocks"
                    ],
                    "type": "string"
                  },
                  "liquid": {
                    "description": "spread <= 10 pp (scan: max_spread_pp) and >= $50 depth on both sides (scan: min_depth_usd)",
                    "type": "boolean"
                  },
                  "mid": {
                    "type": "number"
                  },
                  "model_prob": {
                    "description": "Model P(price > strike at expiry), 0-1",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "outcome": {
                    "description": "Hyperliquid outcome id (Yes token = coin #<id>0)",
                    "type": "integer"
                  },
                  "perp": {
                    "description": "Underlying Hyperliquid perp, e.g. BTC or xyz:META",
                    "type": "string"
                  },
                  "question": {
                    "type": "string"
                  },
                  "realized_vol_7d": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "settlement": {
                    "properties": {
                      "side": {
                        "type": "string"
                      },
                      "source": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "window_seconds": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    },
                    "type": "object"
                  },
                  "signal": {
                    "enum": [
                      "yes_underpriced",
                      "yes_overpriced",
                      "fair",
                      "illiquid",
                      "no_model"
                    ],
                    "type": "string"
                  },
                  "spot_mid": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "spread_pp": {
                    "type": "number"
                  },
                  "strike": {
                    "type": "number"
                  }
                },
                "required": [
                  "outcome",
                  "asset",
                  "strike",
                  "expiry",
                  "bid",
                  "ask",
                  "depth_usd",
                  "liquid"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "method": {
              "type": "string"
            },
            "min_depth_usd": {
              "type": "number"
            },
            "signal_rule": {
              "type": "string"
            },
            "source": {
              "type": "string"
            },
            "spot": {
              "properties": {
                "live": {
                  "type": "boolean"
                },
                "mid": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "perp": {
                  "type": "string"
                },
                "realized_vol_7d": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "vol_as_of": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": "object"
            }
          },
          "required": [
            "asset",
            "markets",
            "label",
            "disclaimer"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}