# Derivatives Pricer – Implied Volatility Surface

> Derivatives Pricer – Implied Volatility Surface is a paid API for AI agents from derivatives-pricer-production.up.railway.app, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-11).

Computes a full implied volatility surface from a grid of market option quotes using Black-Scholes inversion, returning per-point IVs, Greeks, fit statistics, and a structured vol surface matrix.

## Facts

- Endpoint: POST https://derivatives-pricer-production.up.railway.app/v1/volatility/surface?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/derivatives-pricer-implied-volatility-surface-4d170f9e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BDlwGotJcuffFBoQnsqT3

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 derivatives-pricer-implied-volatility-surface-4d170f9e -d '<json body>'
```

Example prompt: Build me a full implied volatility surface for a set of S&P 500 calls and puts: the underlying is at 5000, strikes are 4800, 5000, and 5200, maturities are 0.25, 0.5, and 1 year, the risk-free rate is 5%, and the observed premiums are roughly 210, 120, 60 for calls and 55, 110, 180 for puts — give me the IV grid, deltas, and fit errors.

## When to prefer this

Choose this endpoint when you need a complete implied volatility surface calibrated from market quotes across multiple strikes and maturities in a single call, rather than inverting one option at a time. It is ideal when you want fit diagnostics (RMSE, per-point errors), per-point Greeks alongside IVs, and a structured vol grid ready for downstream risk or pricing use. Prefer this over single-IV endpoints when building smile/skew visualizations, calibrating term structure, or aggregating risk across a multi-leg options book.

## Known failure modes

- Option with non-positive underlying or strike returns validation error
- Premium below intrinsic value causes IV solver failure (status: 'failed' on that point)
- Duplicate (underlying, strike, maturity, type) keys are averaged silently
- More than 200 options in one request rejected (maxItems constraint)
- Payment failure (x402 USDC transaction rejected or insufficient balance) blocks the call
- Deep in-the-money or zero-time options may fail convergence and appear as null in the surface grid

## How this service works

x402-paid Black-Scholes European option pricing, Greeks, IV surfaces, price/scenario on submitted smiles (TV bilinear), portfolio risk, free demo, and MCP. USDC exact on Solana (PayAI) and/or Base (CDP when configured). Receive wallets appear only in HTTP 402, never on free discovery.

## Output

Returns a structured JSON with: a 'surface' object containing a strikes array, maturities array, and 2D impliedVols grid; a 'points' array with per-option results (implied vol, model price, price error, status, and full analytic Greeks: delta, gamma, vega, theta, rho); a 'fit' object with RMSE, max absolute error, mean absolute error, ok/failed counts; 'stats' with solver info and elapsed time; 'market' echoing rate and dividend yield; and a requestId/computedAt timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rate": {
   "type": "number",
   "examples": [
    0.03,
    0.05
   ],
   "description": "Shared continuous risk-free / discount rate r for the book (e.g. 0.05 = 5%)."
  },
  "options": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "MarketOptionQuote",
    "required": [
     "underlying",
     "strike",
     "timeToExpiry",
     "optionType",
     "premium"
    ],
    "properties": {
     "strike": {
      "type": "number",
      "description": "Strike K (> 0) in same units as underlying.",
      "exclusiveMinimum": 0
     },
     "premium": {
      "type": "number",
      "minimum": 0,
      "description": "Observed market premium (≥ 0) in underlying currency units."
     },
     "optionType": {
      "enum": [
       "call",
       "put"
      ],
      "type": "string",
      "description": "European call or put."
     },
     "underlying": {
      "type": "number",
      "examples": [
       100,
       82.5
      ],
      "description": "Underlying level S for this quote (> 0). May differ by maturity (e.g. monthly power/gas forwards).",
      "exclusiveMinimum": 0
     },
     "timeToExpiry": {
      "type": "number",
      "minimum": 0,
      "examples": [
       0.25,
       0.5,
       1
      ],
      "description": "Year-fraction to expiry T (≥ 0)."
     }
    },
    "additionalProperties": false
   },
   "maxItems": 200,
   "minItems": 1,
   "description": "Market quotes: one object per (underlying, strike, maturity, type) with observed premium. Prefer unique keys per cell; duplicates average into the grid."
  },
  "treeSteps": {
   "type": "integer",
   "maximum": 500,
   "minimum": 50,
   "description": "CRR steps when optionStyle is american."
  },
  "expiration": {
   "type": "string",
   "format": "date-time",
   "description": "Shared ISO-8601 window end for all rows. When set, all rows share derived τ."
  },
  "optionStyle": {
   "enum": [
    "european",
    "american"
   ],
   "type": "string",
   "default": "european",
   "description": "Exercise style for IV solve (default \"european\")."
  },
  "forwardStart": {
   "type": "string",
   "format": "date-time",
   "description": "Shared ISO-8601 window start for all rows (optional)."
  },
  "dividendYield": {
   "type": "number",
   "minimum": 0,
   "examples": [
    0,
    0.01
   ],
   "description": "Shared continuous yield q (default 0): equity dividends, FX foreign rate, or commodity convenience yield as appropriate.
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "fit": {
   "okCount": 3,
   "failedCount": 0,
   "rmsePriceError": 1.2e-8,
   "maxAbsPriceError": 2e-8,
   "meanAbsPriceError": 1e-8
  },
  "stats": {
   "solver": "fastImpliedVol",
   "elapsedMs": 1.2,
   "optionCount": 3,
   "avgIterations": 4
  },
  "market": {
   "rate": 0.05,
   "dividendYield": 0
  },
  "points": [
   {
    "index": 0,
    "greeks": {
     "rho": 10,
     "vega": 15,
     "delta": 0.75,
     "gamma": 0.02,
     "theta": -8
    },
    "status": "ok",
    "strike": 90,
    "premium": 12.5,
    "impliedVol": 0.25,
    "modelPrice": 12.5,
    "optionType": "call",
    "priceError": 0,
    "underlying": 100,
    "timeToExpiry": 0.25
   }
  ],
  "surface": {
   "strikes": [
    90,
    100,
    110
   ],
   "maturities": [
    0.25,
    0.5,
    1
   ],
   "impliedVols": [
    [
     0.25,
     null,
     null
    ],
    [
     null,
     0.22,
     null
    ],
    [
     null,
     null,
     0.2
    ]
   ]
  },
  "requestId": "00000000-0000-4000-8000-000000000002",
  "computedAt": "2026-01-01T00:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/derivatives-pricer-implied-volatility-surface-4d170f9e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from derivatives-pricer-production.up.railway.app](https://www.zero.xyz/host/derivatives-pricer-production.up.railway.app/llms.txt)
