# Derivatives Pricer – Portfolio Net Greeks

> Derivatives Pricer – Portfolio Net Greeks 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-10-11).

Computes aggregate (net) Black-Scholes Greeks and mark-to-market for a multi-leg options portfolio, with optional dollar-scaled Greeks, paid per-call via USDC on Solana or Base.

## Facts

- Endpoint: POST https://derivatives-pricer-production.up.railway.app/v1/portfolio/greeks?utm_source=zero.xyz
- Price: $0.15/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-portfolio-net-greeks-52a89ca4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WknESTY8hp6IjEliDZWh6

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-portfolio-net-greeks-52a89ca4 -d '<json body>'
```

Example prompt: Can you calculate the net portfolio Greeks for two positions: long 10 calls on a $100 underlying with $100 strike, 1 year to expiry, and 20% vol; plus short 5 puts on the same underlying with $110 strike, 1 year to expiry, and 22% vol? Use a 0% risk-free rate and include dollar Greeks.

## When to prefer this

Choose this endpoint when you need aggregated, portfolio-level Greeks and MtM across multiple option legs simultaneously rather than pricing each leg individually. It handles netting (longs and shorts offset each other correctly via signed quantities) in a single call. Prefer it over the single-premium endpoint when you have 2+ legs and need net risk sensitivities for hedging or margin calculations. The dollar Greeks option makes it especially useful when translating theoretical Greeks into cash exposures for practical risk management.

## Known failure modes

- Missing required per-leg fields (underlying, strike, timeToExpiry, optionType, quantity, volatility) returns 400 validation error
- Zero quantity or zero strike rejected by schema exclusiveMinimum constraints
- Payment failure (insufficient USDC balance or unsupported chain) returns 402 Payment Required
- More than 100 positions in the array returns 400 (maxItems exceeded)
- Very short timeToExpiry (approaching 0) may produce numerically unstable Greeks near expiry
- Non-positive underlying or volatility values rejected by exclusiveMinimum constraints

## 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 net portfolio MtM and net Greeks (delta, gamma, vega, theta, rho), optionally dollar-scaled Greeks (deltaCash, gammaCash, thetaPerDay, vegaPerPoint, rhoPerPoint), plus a per-leg breakdown with each leg's price, Greeks, and portfolio contribution. Includes a requestId and computedAt timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rate": {
   "type": "number"
  },
  "positions": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "underlying",
     "strike",
     "timeToExpiry",
     "optionType",
     "quantity",
     "volatility"
    ],
    "properties": {
     "strike": {
      "type": "number",
      "exclusiveMinimum": 0
     },
     "quantity": {
      "type": "number",
      "description": "Position size; >0 long, <0 short; must be non-zero"
     },
     "optionType": {
      "enum": [
       "call",
       "put"
      ],
      "type": "string"
     },
     "underlying": {
      "type": "number",
      "description": "Underlying S for this leg",
      "exclusiveMinimum": 0
     },
     "volatility": {
      "type": "number",
      "description": "Annualized vol σ for this leg",
      "exclusiveMinimum": 0
     },
     "timeToExpiry": {
      "type": "number",
      "minimum": 0
     }
    },
    "additionalProperties": false
   },
   "maxItems": 100,
   "minItems": 1
  },
  "optionStyle": {
   "enum": [
    "european",
    "american"
   ],
   "type": "string",
   "default": "european",
   "description": "Exercise style (default \"european\")."
  },
  "dividendYield": {
   "type": "number",
   "minimum": 0
  },
  "includeDollarGreeks": {
   "type": "boolean",
   "description": "If true, include cash delta/gamma and per-point vega/theta/rho scalings"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "net": {
   "mtm": 47.16439511,
   "greeks": {
    "rho": 858.77721991,
    "vega": 176.68540458,
    "delta": 9.05941615,
    "gamma": 0.09736793,
    "theta": -58.62185203
   },
   "dollarGreeks": {
    "deltaCash": 905.941615,
    "gammaCash": 486.8396,
    "rhoPerPoint": 8.5877722,
    "thetaPerDay": -0.16060781,
    "vegaPerPoint": 1.76685405
   }
  },
  "legs": [
   {
    "index": 0,
    "price": 10.45057562,
    "greeks": {
     "rho": 532.32483426,
     "vega": 375.24034692,
     "delta": 6.3683059,
     "gamma": 0.18762017,
     "theta": -64.1402764
    },
    "strike": 100,
    "quantity": 10,
    "optionType": "call",
    "underlying": 100,
    "volatility": 0.2,
    "contribution": 104.50575619,
    "timeToExpiry": 1
   },
   {
    "index": 1,
    "price": 11.46827222,
    "greeks": {
     "rho": 326.45238565,
     "vega": -198.55494233,
     "delta": 2.69111025,
     "gamma": -0.09025225,
     "theta": 5.51842437
    },
    "strike": 110,
    "quantity": -5,
    "optionType": "put",
    "underlying": 100,
    "volatility": 0.22,
    "contribution": -57.34136108,
    "timeToExpiry": 1
   }
  ],
  "requestId": "00000000-0000-4000-8000-000000000004",
  "computedAt": "2026-01-01T00:00:00.000Z",
  "positionCount": 2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/derivatives-pricer-portfolio-net-greeks-52a89ca4/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)
