# Perp Gap API – Tokenized Stock Premium/Discount Checker

> Perp Gap API – Tokenized Stock Premium/Discount Checker is a paid API for AI agents from perp-gap-api.perpgap.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-30).

Returns the current price premium or discount of tokenized stock tokens (xStocks, Ondo) versus the real underlying share price, with liquidity and freshness data

## Facts

- Endpoint: GET https://perp-gap-api.perpgap.workers.dev/tokens/premium?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/perp-gap-api-tokenized-stock-premium-discount-checker-efb31822
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LHtdjSI_Dq_XxKCXULi7R

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-tokenized-stock-premium-discount-checker-efb31822
```

Example prompt: Before I buy NVDAx, check the Perp Gap premium data for NVDA — is the tokenized xStocks version trading rich or cheap versus the real share, and what's the pool liquidity look like?

## When to prefer this

Use this endpoint when an agent needs to evaluate whether a tokenized stock (xStocks or Ondo Global Markets) is trading at a fair price relative to the real underlying share before executing a trade or pricing a position. It covers both single-ticker and multi-ticker lookups (up to 10 or all), and provides premium %, liquidity, and freshness in one call. Prefer this over generic price feeds when the specific use case is tokenized-stock premium/discount analysis across DeFi venues.

## Known failure modes

- 400 Bad Request: invalid ticker format or unsupported parameters — not charged
- 402 Payment Required: x402 micropayment not settled
- 404 Not Found: ticker or market not listed — checked before settlement, not charged
- 502 Bad Gateway: upstream data source unavailable

## How this service works

Use before buying or pricing a tokenized stock (NVDAx, NVDAon) to see if it trades rich or cheap vs the real share. For one ticker, up to 10, or tickers=all: each xStocks and Ondo Global Markets token's price per share vs the stock reference, premium %, Ondo issuer price, freshness, chain and pool liquidity. Bad params return 400/404 before any charge. Errors: 400, 402, 404, 502. Data, not advice.

## Output

Returns a JSON object with a rows array where each entry contains: token symbol, token price per share, stock reference price, premium percentage, Ondo issuer price (if applicable), data freshness timestamp, blockchain chain, and pool liquidity. Also includes mode, as_of timestamp, count, notes, disclaimer, and US session indicator. Errors return JSON with error string and optional hint.

## 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,12}$",
       "examples": [
        "NVDA"
       ],
       "description": "Stock ticker, case-insensitive (free list: GET /catalog)."
      },
      "tickers": {
       "type": "string",
       "description": "Optional alternative to ticker: up to 10 comma-separated tickers, or 'all'."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "mode": {
       "type": "string"
      },
      "rows": {
       "type": "array"
      },
      "as_of": {
       "type": "string"
      },
      "count": {
       "type": "number"
      },
      "notes": {
       "type": "string"
      },
      "disclaimer": {
       "type": "string"
      },
      "us_session": {
       "type": "string"
      }
     },
     "description": "Error responses are JSON {error: string, hint?: string}. 400 bad params (never charged); 402 payment required; 404 ticker/market not listed (checked before settlement, never charged); 502 upstream error. Full field docs: /openapi.json."
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/perp-gap-api-tokenized-stock-premium-discount-checker-efb31822/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)
