# Derivatives Pricer – Scenario from Surface

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

Prices a portfolio of European options and computes Black-Scholes Greeks across base and user-defined scenario states using a submitted implied-vol smile surface with total-variance bilinear interpolation.

## Facts

- Endpoint: POST https://derivatives-pricer-production.up.railway.app/v1/option/scenario-from-surface
- Price: $0.15/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-scenario-from-surface-7b23010c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TbZWM76YsDFhzr9SmfBSF

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-scenario-from-surface-7b23010c -d '<json body>'
```

Example prompt: I have a portfolio with a long 100-strike call (qty 1, 1-year expiry) on a spot-100 underlying at 5% rate. I've got a 3×3 log-moneyness-forward vol surface. Run a scenario where spot goes up 10% with moneyness-sticky convention and give me the base and scenario prices plus all the Greeks.

## When to prefer this

Use this endpoint when you have your own implied volatility surface (as a grid of log-moneyness-forward points) and want to price a portfolio of European options under both current market conditions and a user-defined scenario shock (spot, vol, rate, time). It is the right choice when you need scenario P&L, full Black-Scholes Greeks in base and stressed states, and per-leg attribution — all in a single call. Prefer sibling endpoints for simpler single-option pricing with direct sigma input (no surface needed) or for implied volatility extraction only.

## Known failure modes

- Invalid or insufficient surface points (fewer than minItems, or non-monotone tenors/strikes) cause a 400 validation error
- Options or positions arrays outside 1–50 item bounds return a 422 schema rejection
- Missing required surface convention or interpolation fields cause a 400 error
- Payment not provided or insufficient USDC triggers an HTTP 402 with wallet address for payment
- Scenario producing extreme extrapolation beyond surface boundary may yield warnings array entries but still return a result
- Malformed option definitions (missing expiry, strike, type) cause a 400 parse error

## 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 a 'book' summary (base value, scenario value, base and scenario aggregate Greeks, delta P&L) and an array of 'legs' detailing per-option base and scenario prices, implied vols, forwards, Greeks, and contributions. Also includes model identifier, sticky convention used, the applied scenario parameters, any warnings, a requestId, timestamp, and surface metadata (point count, tenor count, moneyness count, convention).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rate": {
   "type": "number"
  },
  "sticky": {
   "enum": [
    "moneyness",
    "strike",
    "fixed_vol"
   ],
   "type": "string"
  },
  "options": {
   "type": "array",
   "maxItems": 50,
   "minItems": 1
  },
  "surface": {
   "type": "array",
   "maxItems": 200,
   "minItems": 1
  },
  "scenario": {
   "type": "object"
  },
  "wingRule": {
   "type": "string",
   "const": "flat_vol"
  },
  "positions": {
   "type": "array",
   "maxItems": 50,
   "minItems": 1
  },
  "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": {
   "valueBase": 10.45057562,
   "deltaValue": 7.36197848,
   "greeksBase": {
    "rho": 53.23248343,
    "vega": 37.52403469,
    "delta": 0.63683059,
    "gamma": 0.01876202,
    "theta": -6.41402764
   },
   "greeksNote": "Greeks are analytic BS Greeks at sticky/scenario σ — NOT full smile-recalibrated bump deltas",
   "valueScenario": 17.8125541,
   "greeksScenario": {
    "rho": 69.26443492,
    "vega": 31.55892407,
    "delta": 0.79160899,
    "gamma": 0.01273721,
    "theta": -6.69435438
   }
  },
  "legs": [
   {
    "base": {
     "k": 0,
     "price": 10.45057562,
     "greeks": {
      "rho": 53.23248343,
      "vega": 37.52403469,
      "delta": 0.63683059,
      "gamma": 0.01876202,
      "theta": -6.41402764
     },
     "forward": 100,
     "impliedVol": 0.2,
     "underlying": 100,
     "contribution": 10.45057562,
     "timeToExpiry": 1
    },
    "index": 0,
    "strike": 100,
    "quantity": 1,
    "scenario": {
     "k": -0.09531018,
     "price": 17.8125541,
     "greeks": {
      "rho": 69.26443492,
      "vega": 31.55892407,
      "delta": 0.79160899,
      "gamma": 0.01273721,
      "theta": -6.69435438
     },
     "forward": 110,
     "impliedVol": 0.20476824,
     "underlying": 110,
     "contribution": 17.8125541,
     "timeToExpiry": 1
    },
    "deltaValue": 7.36197848,
    "optionType": "call"
   }
  ],
  "model": "black-scholes-merton+surface-tv-bilinear",
  "sticky": "moneyness",
  "scenario": {
   "rateBp": 0,
   "volAbs": 0,
   "volRel": 0,
   "timeDays": 0,
   "smileTwist": 0,
   "rateScenario": 0.05,
   "underlyingRel": 0.1
  },
  "warnings": [],
  "requestId": "00000000-0000-4000-8000-000000000007",
  "computedAt": "2026-01-01T00:00:00.000Z",
  "optionStyle": "european",
  "surfaceMeta": {
   "kCount": 3,
   "tCount": 3,
   "convention": "log_moneyness_forward",
   "pointCount": 9
  }
 }
}
```

## More

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