# QuantOracle Options Payoff Diagram

> QuantOracle Options Payoff Diagram is a paid API for AI agents from api.quantoracle.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Computes and returns payoff diagram data for options strategies, showing profit/loss curves across a range of underlying prices at expiry.

## Facts

- Endpoint: POST https://api.quantoracle.dev/v1/options/payoff-diagram
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-quantoracle-dev-e4ebecb0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y1xF8Oaouk55qX-Qrp86j

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 api-quantoracle-dev-e4ebecb0 -d '<json body>'
```

Example prompt: Show me the payoff diagram for a long call spread on SPY: buy the $450 strike call and sell the $460 strike call, both expiring in 30 days, with premiums of $3.50 and $1.20 respectively — I want to see the full P&L curve, breakeven, max profit, and max loss.

## When to prefer this

Use this endpoint when you need structured payoff curve data for single or multi-leg options strategies, especially when building visualizations or computing breakeven/max-profit/max-loss analytically. Prefer this over general options pricers when the goal is P&L profile across price scenarios rather than a single fair-value price.

## Known failure modes

- Invalid or missing strike prices returns a 400 error
- Mismatched option legs (e.g. inconsistent expiries) returns a validation error
- Negative or zero premiums may cause unexpected payoff shapes
- Underlying price range too narrow to capture breakeven points returns incomplete curve
- Unsupported option type or strategy combination returns a 422 error

## How this service works

QuantOracle: options/payoff-diagram

## Output

Returns a set of (underlying price, P&L) data points forming the payoff curve, along with calculated breakeven price(s), maximum profit, and maximum loss for the defined options strategy at expiration.

## Example request

```json
{
 "input": {
  "body": {
   "legs": [
    {
     "type": "call",
     "strike": 100,
     "premium": 3.5,
     "quantity": 1,
     "direction": "long"
    },
    {
     "type": "call",
     "strike": 110,
     "premium": 1.2,
     "quantity": 1,
     "direction": "short"
    }
   ],
   "spot": 105,
   "points": 100,
   "price_range_pct": 30
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "legs": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "PayoffLeg",
    "required": [
     "type",
     "strike",
     "premium"
    ],
    "properties": {
     "type": {
      "enum": [
       "call",
       "put"
      ],
      "type": "string",
      "title": "Type",
      "description": "Option type"
     },
     "strike": {
      "type": "number",
      "title": "Strike",
      "description": "Strike price"
     },
     "premium": {
      "type": "number",
      "title": "Premium",
      "description": "Premium per contract"
     },
     "quantity": {
      "type": "integer",
      "title": "Quantity",
      "default": 1,
      "description": "Number of contracts"
     },
     "direction": {
      "enum": [
       "long",
       "short"
      ],
      "type": "string",
      "title": "Direction",
      "default": "long",
      "description": "Long or short the option"
     }
    }
   },
   "title": "Legs",
   "description": "Array of option legs"
  },
  "spot": {
   "type": "number",
   "title": "Spot",
   "description": "Current spot price"
  },
  "points": {
   "type": "integer",
   "title": "Points",
   "default": 100,
   "minimum": 1,
   "description": "Number of evaluation points"
  },
  "price_range_pct": {
   "type": "number",
   "title": "Price Range Pct",
   "default": 30,
   "description": "Price range around spot for payoff calculation (percentage)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-quantoracle-dev-e4ebecb0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.quantoracle.dev](https://www.zero.xyz/host/api.quantoracle.dev/llms.txt)
