# Option Strategy API
> Live options-strategy payoff and analysis that options traders run before placing a trade — computed on demand, no key, nothing cached. Get the profit-at-expiry curve of any multi-leg position (calls, puts and stock) plus the net premium, maximum profit, maximum loss and breakeven points; pull just those headline numbers; or build a named strategy (straddle, strangle, bull/bear spread, covered call, protective put, iron condor) from friendly parameters and analyse it. Works for equity, FX or crypto options. A multi-leg payoff engine, distinct from single-option pricing tools: it turns a combination of legs into the profit profile, breakevens and risk a trader acts on.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/optionstrategy-api/..."
```

## Pricing
- **Free** (Free) — 4,750 calls/Mo, 3 req/s
- **Starter** ($7/Mo) — 107,000 calls/Mo, 10 req/s
- **Pro** ($18/Mo) — 525,000 calls/Mo, 25 req/s
- **Business** ($44/Mo) — 3,220,000 calls/Mo, 55 req/s

## Endpoints

### Option Strategy

#### `GET /v1/breakeven` — Net premium, max profit/loss and breakevens only

**Parameters:**
- `legs` (query, required, string) — Legs type:strike:premium:qty, comma-separated Example: `call:100:6:1,call:110:2:-1`
- `multiplier` (query, optional, string) — Contract multiplier (default 1) Example: `1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/optionstrategy-api/v1/breakeven?legs=call%3A100%3A6%3A1%2Ccall%3A110%3A2%3A-1&multiplier=1"
```

**Response:**
```json
{
    "data": {
        "legs": [
            {
                "qty": 1,
                "type": "call",
                "entry": null,
                "strike": 100,
                "premium": 6
            },
            {
                "qty": -1,
                "type": "call",
                "entry": null,
                "strike": 110,
                "premium": 2
            }
        ],
        "source": "OPTIONSTRATEGY",
        "max_loss": -4,
        "position": "net debit",
        "spot_max": 220,
        "spot_min": 0,
        "breakevens": [
            104
        ],
        "max_profit": 6,
        "multiplier": 1,
        "max_loss_at": 0,
        "net_premium": 4,
        "max_profit_at": 110,
        "max_profit_unbounded": false
    },
    "meta": {
        "timestamp": "2026-06-10T22:56:17.799Z",
        "request_id": "25530d84-192a-4dc7-ada8-c6857efa449d"
    },
    "status": "ok",
    "message": "Breakeven computed",
    "success": true
}
```

#### `GET /v1/meta` — Service metadata and endpoint list

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/optionstrategy-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Legs format: type:strike:premium:qty, comma-separated (e.g. legs=call:100:5:1,put:100:5:1). type = call|put|stock; qty signed (negative = short); stock uses entry price as the 'strike' field.",
        "source": "Computed in-process from caller-supplied legs (no upstream)",
        "service": "optionstrategy-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/payoff": "Profit-at-expiry curve + metrics for a multi-leg position (legs=call:100:5:1,put:100:5:1).",
            "GET /v1/strategy": "Build & analyse a named strategy (name=straddle, strike=100, premium_call=5, premium_put=5).",
            "GET /v1/breakeven": "Net premium, max profit/loss and breakevens only (legs=...).",
            "GET /v1/strategies": "List supported named strategies and their parameters."
        },
        "description": "Live options-strategy payoff and analysis computed on demand. The payoff endpoint returns the profit-at-expiry curve of any multi-leg position (calls, puts and stock) plus net premium, maximum profit, maximum loss and breakeven points; the breakeven endpoint returns just those headline numbers; the strategy endpoint builds a named strategy (straddle, strangle, bull/bear spread, covered call, protective put, iron condor) from friendly parameters and analyses it; the strategies endpoint lists the supported strategies. Computed live from your input, nothing stored — works for equity, FX or crypto optio
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/payoff` — Profit-at-expiry curve + metrics for a multi-leg position

**Parameters:**
- `legs` (query, required, string) — Legs type:strike:premium:qty, comma-separated (qty signed) Example: `call:100:5:1,put:100:5:1`
- `multiplier` (query, optional, string) — Contract multiplier (default 1) Example: `1`
- `steps` (query, optional, string) — Curve resolution 5-500 (default 50) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/optionstrategy-api/v1/payoff?legs=call%3A100%3A5%3A1%2Cput%3A100%3A5%3A1&multiplier=1&steps=50"
```

**Response:**
```json
{
    "data": {
        "legs": [
            {
                "qty": 1,
                "type": "call",
                "entry": null,
                "strike": 100,
                "premium": 5
            },
            {
                "qty": 1,
                "type": "put",
                "entry": null,
                "strike": 100,
                "premium": 5
            }
        ],
        "curve": [
            {
                "price": 0,
                "profit": 90
            },
            {
                "price": 4,
                "profit": 86
            },
            {
                "price": 8,
                "profit": 82
            },
            {
                "price": 12,
                "profit": 78
            },
            {
                "price": 16,
                "profit": 74
            },
            {
                "price": 20,
                "profit": 70
            },
            {
                "price": 24,
                "profit": 66
            },
            {
                "price": 28,
                "profit": 62
            },
            {
                "price": 32,
                "profit": 58
            },
            {
                "price": 36,
                "profit": 54
            },
            {
                "price": 40,
                "profit": 50
            },
            {
                "price": 44,
                "profit": 46
            },
            {
                "price": 48
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/strategies` — List supported named strategies and their parameters

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/optionstrategy-api/v1/strategies"
```

**Response:**
```json
{
    "data": {
        "note": "Call /v1/strategy?name=<name>&<params> with the parameters listed. Premiums are per-unit option prices.",
        "count": 9,
        "source": "OPTIONSTRATEGY",
        "strategies": [
            {
                "name": "long_call",
                "parameters": "strike, premium"
            },
            {
                "name": "long_put",
                "parameters": "strike, premium"
            },
            {
                "name": "straddle",
                "parameters": "strike, premium_call, premium_put"
            },
            {
                "name": "strangle",
                "parameters": "call_strike, put_strike, premium_call, premium_put"
            },
            {
                "name": "bull_call_spread",
                "parameters": "lower_strike, upper_strike, premium_lower, premium_upper"
            },
            {
                "name": "bear_put_spread",
                "parameters": "upper_strike, lower_strike, premium_upper, premium_lower"
            },
            {
                "name": "covered_call",
                "parameters": "stock_price, strike, premium"
            },
            {
                "name": "protective_put",
                "parameters": "stock_price, strike, premium"
            },
            {
                "name": "iron_condor",
                "parameters": "put_long_strike, put_short_strike, call_short_strike, call_long_strike, premium_put_long, premium_put_shor
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/strategy` — Build & analyse a named strategy

**Parameters:**
- `name` (query, required, string) — Strategy name (see /v1/strategies) Example: `straddle`
- `strike` (query, optional, string) — Strike (for straddle/long_call/long_put) Example: `100`
- `premium_call` (query, optional, string) — Call premium Example: `5`
- `premium_put` (query, optional, string) — Put premium Example: `5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/optionstrategy-api/v1/strategy?name=straddle&strike=100&premium_call=5&premium_put=5"
```

**Response:**
```json
{
    "data": {
        "legs": [
            {
                "qty": 1,
                "type": "call",
                "entry": null,
                "strike": 100,
                "premium": 5
            },
            {
                "qty": 1,
                "type": "put",
                "entry": null,
                "strike": 100,
                "premium": 5
            }
        ],
        "curve": [
            {
                "price": 0,
                "profit": 90
            },
            {
                "price": 4,
                "profit": 86
            },
            {
                "price": 8,
                "profit": 82
            },
            {
                "price": 12,
                "profit": 78
            },
            {
                "price": 16,
                "profit": 74
            },
            {
                "price": 20,
                "profit": 70
            },
            {
                "price": 24,
                "profit": 66
            },
            {
                "price": 28,
                "profit": 62
            },
            {
                "price": 32,
                "profit": 58
            },
            {
                "price": 36,
                "profit": 54
            },
            {
                "price": 40,
                "profit": 50
            },
            {
                "price": 44,
                "profit": 46
            },
            {
                "price": 48
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/optionstrategy-api
OpenAPI spec: https://www.oanor.com/api/optionstrategy-api/openapi.json
