# Perp Gap API – Stock Perpetual Arbitrage Verdict

> Perp Gap API – Stock Perpetual Arbitrage Verdict is a paid API for AI agents from perp-gap-api.perpgap.workers.dev, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-19).

Returns a rule-based long/short/watch/avoid verdict for a stock ticker based on perp-vs-spot price gaps, funding rates, basis, open interest, and insider data across DeFi perp venues.

## Facts

- Endpoint: GET https://perp-gap-api.perpgap.workers.dev/verdict?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/perp-gap-api-stock-perpetual-arbitrage-verdict-e32fd137
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JxZiHHxZJ82mWKM5wfo4k

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-stock-perpetual-arbitrage-verdict-e32fd137
```

Example prompt: Give me a verdict on GME right now — check the perp-vs-spot gaps across trade.xyz, Aster and Lighter, funding rates, and insider activity, and tell me whether to long, short, watch, or avoid.

## When to prefer this

Choose this endpoint when you need a fast, structured trading signal that synthesizes DeFi perpetual futures data (price gaps, funding, basis, OI) with traditional equity signals (insider transactions, reference price) for a single stock ticker. It is especially useful for agents operating in the onchain perp arbitrage space across trade.xyz, Aster, and Lighter. It is not suited for pure spot equity analysis, options, or bulk batch screening.

## Known failure modes

- Missing or invalid ticker returns an error — ticker must be a recognized symbol like TSLA or GME
- Venue data unavailable: if trade.xyz, Aster or Lighter data is missing, affected signals appear in missing_signals array
- Low confidence verdicts returned when insufficient signals are available (confidence near 0)
- Payment failure via x402 protocol results in 402 response before data is returned
- Rate or liquidity data may be stale for thinly traded perp markets

## How this service works

Rule-based long/short/watch/avoid verdict with score, confidence and reasons for one trade.xyz stock perp, combining perp-vs-stock gap, basis, funding, SEC EDGAR insider/8-K/13D/dilution filings (14d), news and retail attention. Use when an agent needs a quick directional signal or a sanity check on a single ticker before trading. Data, not financial advice. Errors: 400 missing ticker, 402 payment required, 404 not listed, 502 upstream.

## Output

A JSON object containing: the ticker, a rule-based verdict enum (long/short/watch/avoid), a numeric score (0–1), a confidence value (0–1), an array of human-readable reasons explaining the signal inputs (perp gap %, funding APR, insider activity etc.), a list of any missing signals, and a disclaimer string.

## 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": [
      "ticker"
     ],
     "properties": {
      "ticker": {
       "type": "string",
       "pattern": "^[A-Za-z0-9.]{1,10}$",
       "examples": [
        "TSLA",
        "NVDA",
        "GME"
       ],
       "description": "One US stock ticker listed as a trade.xyz perp (see free GET /tickers), case-insensitive."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "ticker",
      "verdict",
      "confidence",
      "disclaimer"
     ],
     "properties": {
      "score": {
       "type": "number"
      },
      "inputs": {
       "type": "object"
      },
      "ticker": {
       "type": "string"
      },
      "reasons": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "verdict": {
       "enum": [
        "long",
        "short",
        "watch",
        "avoid"
       ],
       "type": "string"
      },
      "confidence": {
       "type": "number"
      },
      "disclaimer": {
       "type": "string"
      },
      "missing_signals": {
       "type": "array",
       "items": {
        "type": "string"
       }
      }
     },
     "description": "Error responses are JSON {error: string}: 400 ticker required; 402 payment required; 404 ticker not listed on trade.xyz; 502 upstream error."
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "score": 0.5,
  "ticker": "GME",
  "reasons": [
   "perp vs reference gap +0.09%: in line, no edge",
   "funding 35.7% APR: crowded longs pay, short-lean",
   "insider open-market buys $40,113,538 vs sells $870,659 (14d): bullish"
  ],
  "verdict": "watch",
  "confidence": 0.4,
  "disclaimer": "Data, not financial advice.",
  "missing_signals": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/perp-gap-api-stock-perpetual-arbitrage-verdict-e32fd137/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)
