# Perp Gap API – Prediction Market Mispricing Scanner

> Perp Gap API – Prediction Market Mispricing Scanner is a paid API for AI agents from perp-gap-api.perpgap.workers.dev, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-18).

Returns a ranked list of the most mispriced liquid binary prediction markets on Hyperliquid (crypto and tokenized-stock), showing model probability vs bid/ask, edge, spread, and book depth in a single call.

## Facts

- Endpoint: GET https://perp-gap-api.perpgap.workers.dev/pm/scan?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/perp-gap-api-prediction-market-mispricing-scanner-9859afff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vzrRr-D7VP7UeuKG2v16S

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability perp-gap-api-prediction-market-mispricing-scanner-9859afff
```

Example prompt: Scan all Hyperliquid prediction markets right now and give me the top 10 most mispriced ones — only show markets with at least 3 percentage points of edge and a spread under 8pp, across both crypto and tokenized stocks.

## When to prefer this

Choose this endpoint when you need a real-time ranked scan of mispriced liquid prediction markets across Hyperliquid in one call, with pre-filtered edge, spread, and depth metrics already computed. Prefer it over building your own scanner when you want immediate, actionable mispricings without constructing individual market queries. It covers both crypto binary markets and tokenized-stock binary markets in a single response.

## Known failure modes

- 400 Bad Request – invalid query parameters (e.g. limit out of range, unrecognized kind value)
- 404 Not Found – no liquid books found matching the filter criteria at query time
- 402 Payment Required – x402 payment not completed or insufficient
- 502 Bad Gateway – upstream Hyperliquid data unavailable or timeout

## How this service works

Use when an agent wants a ranked list of the most mispriced liquid prediction markets on Hyperliquid right now, across all crypto and tokenized-stock binary price markets, in one call. Each row has model probability vs bid/ask, edge in pp, spread, depth and book age; empty and illiquid books are filtered out. For scanners, trading agents and daily briefings. Errors: 400 bad params, 404 no books (free, never charged), 402, 502. Data, not advice.

## Output

A ranked array of prediction market rows, each containing the outcome label, asset ticker, strike price, expiry, best Yes bid and ask (as probabilities 0–1), mid probability, model-implied edge in percentage points, bid-ask spread, USDC depth within 5pp of touch on both sides, book age, liquidity flag, market kind (crypto or stocks), and the underlying Hyperliquid perp identifier. Also includes total markets scanned, a label, and a disclaimer.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "kind": {
       "enum": [
        "crypto",
        "stocks",
        "all"
       ],
       "type": "string",
       "default": "all",
       "examples": [
        "all"
       ],
       "description": "Optional: crypto (BTC, ETH, HYPE, ZEC), stocks (trade.xyz stock, index and commodity perps) or all."
      },
      "limit": {
       "type": "string",
       "default": "20",
       "pattern": "^\\d{1,2}$",
       "examples": [
        "10"
       ],
       "description": "Optional max rows, 1-50. Default 20."
      },
      "min_edge_pp": {
       "type": "string",
       "default": "2",
       "pattern": "^-?\\d+(\\.\\d+)?$",
       "examples": [
        "3"
       ],
       "description": "Optional minimum edge in percentage points (model vs executable bid/ask). Default 2."
      },
      "max_spread_pp": {
       "type": "string",
       "default": "10",
       "pattern": "^\\d+(\\.\\d+)?$",
       "examples": [
        "10"
       ],
       "description": "Optional maximum bid-ask spread in percentage points. Default 10."
      },
      "min_depth_usd": {
       "type": "string",
       "default": "50",
       "pattern": "^\\d+(\\.\\d+)?$",
       "examples": [
        "100"
       ],
       "description": "Optional minimum USDC depth within 5 pp of the touch on BOTH sides. Default 50."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "rows",
      "scanned",
      "label",
      "disclaimer"
     ],
     "properties": {
      "note": {
       "type": "string"
      },
      "rows": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "outcome",
         "asset",
         "strike",
         "expiry",
         "bid",
         "ask",
         "depth_usd",
         "liquid"
        ],
        "properties":
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/perp-gap-api-prediction-market-mispricing-scanner-9859afff/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from perp-gap-api.perpgap.workers.dev](https://www.zero.xyz/host/perp-gap-api.perpgap.workers.dev/llms.txt)
