# Derivatives Pricer — Price from Surface (TV Bilinear)

> Derivatives Pricer — Price from Surface (TV Bilinear) is a paid API for AI agents from derivatives-pricer-production.up.railway.app, paid per call via x402, $0.08/call, status unknown (last checked 2026-09-15).

Prices a portfolio of European options and computes Greeks using Black-Scholes-Merton with a user-submitted implied volatility surface interpolated via total-variance bilinear in log-moneyness-forward space.

## Facts

- Endpoint: POST https://derivatives-pricer-production.up.railway.app/v1/option/price-from-surface
- Price: $0.08/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/derivatives-pricer-price-from-surface-tv-bilinear-e02fb119
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5nfBjVjYmYW41HjlIcFC1

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-price-from-surface-tv-bilinear-e02fb119 -d '<json body>'
```

Example prompt: Price a 1-lot ATM call (strike 100, spot 100, 1 year to expiry) and a 1-lot ATM put using my own vol surface — three expiry pillars at 0.25, 0.5, and 1.0 years, three log-moneyness nodes at -0.1, 0, and 0.1 each with vols of 0.18, 0.20, and 0.22 respectively, flat-vol wing rule, risk-free rate 0.05, zero dividend yield, and give me the full Greeks for the book.

## When to prefer this

Choose this endpoint when you already have your own implied volatility surface (e.g. from a broker, exchange, or internal model) and want Black-Scholes pricing and Greeks that respect that smile — rather than a flat-vol assumption. Prefer it over the basic BSM price+Greeks endpoint when smile dynamics, skew, or term-structure matter. Prefer it over an internal library when you need an auditable, paid, reproducible external computation with portfolio aggregation across up to 50 legs in a single call.

## Known failure modes

- Surface grid too sparse or missing bracketing nodes for requested strike/expiry — interpolation fails with 400 and a surface coverage error
- Options array exceeds 50-item limit — returns 400 validation error
- Surface array exceeds 200-point limit — returns 400 validation error
- Payment not included or insufficient — returns HTTP 402 with USDC wallet address for exact payment
- Invalid interpolation or surfaceConvention values (not matching const) — returns 400 schema validation error
- Negative dividend yield — returns 400 constraint violation
- Surface with flat or inverted total variance causing arbitrage — may return 200 with warnings array populated

## 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 JSON object with per-leg pricing (price, impliedVol, strike, forward, timeToExpiry, optionType), per-leg Greeks (delta, gamma, vega, theta, rho), an aggregated portfolio book (MTM and summed Greeks), units clarification for each Greek, surface metadata (interpolation convention, node counts, wing rule), warnings array, requestId, and computation timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rate": {
   "type": "number"
  },
  "options": {
   "type": "array",
   "maxItems": 50,
   "minItems": 1
  },
  "surface": {
   "type": "array",
   "maxItems": 200,
   "minItems": 1
  },
  "wingRule": {
   "type": "string",
   "const": "flat_vol"
  },
  "dividendYield": {
   "type": "number",
   "minimum": 0
  },
  "interpolation": {
   "type": "string",
   "const": "total_variance_bilinear"
  },
  "surfaceConvention": {
   "type": "string",
   "const": "log_moneyness_forward"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "book": {
   "mtm": 10.45057562,
   "greeks": {
    "rho": 53.23248343,
    "vega": 37.52403469,
    "delta": 0.63683059,
    "gamma": 0.01876202,
    "theta": -6.41402764
   }
  },
  "model": "black-scholes-merton+surface-tv-bilinear",
  "units": {
   "rho": "dV/dr per 1.0 absolute rate (not per 1%)",
   "vega": "dV/dσ per 1.0 absolute volatility (not per 1%)",
   "delta": "dV/dS (share equivalent) at sticky/interpolated σ",
   "gamma": "d²V/dS²",
   "price": "option value in spot currency units",
   "theta": "dV/dT per year (not per day)"
  },
  "results": [
   {
    "k": 0,
    "index": 0,
    "price": 10.45057562,
    "greeks": {
     "rho": 53.23248343,
     "vega": 37.52403469,
     "delta": 0.63683059,
     "gamma": 0.01876202,
     "theta": -6.41402764
    },
    "strike": 100,
    "forward": 100,
    "quantity": 1,
    "impliedVol": 0.2,
    "optionType": "call",
    "underlying": 100,
    "contribution": 10.45057562,
    "timeToExpiry": 1
   }
  ],
  "warnings": [],
  "requestId": "00000000-0000-4000-8000-000000000006",
  "computedAt": "2026-01-01T00:00:00.000Z",
  "optionStyle": "european",
  "surfaceMeta": {
   "kCount": 3,
   "tCount": 3,
   "wingRule": "flat_vol",
   "convention": "log_moneyness_forward",
   "pointCount": 9,
   "interpolation": "total_variance_bilinear"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/derivatives-pricer-price-from-surface-tv-bilinear-e02fb119/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)
