# POST /api/mcp/data/build-strategy

> What does a 30-delta SPY iron condor look like right now, legs and all?

Given a ticker and strategy type, selects strikes from the live chain around the target delta and width, and returns the legs with premium and Greeks plus net premium, max profit and loss, breakevens, probability of profit and the P&L curve.

- **Family:** Strategies (https://apexvol.com/developers/strategies-api)
- **Plan:** Basic and above. Every call needs `Authorization: Bearer avmcp_<token>`; tokens are issued to paid and trial accounts under Account, then API Access.
- **Units:** Premiums in dollars per share; max_profit and max_loss in dollars per one-lot; probability_of_profit in percent; leg iv as a decimal.
- **Basis:** Strikes are chosen from the live chain by delta; premiums are mid quotes.
- **MCP tools:** `build_strategy`
- **Background:** https://apexvol.com/learn/iron-condor-guide

## Parameters

| Name | In | Default | Range | Meaning |
|---|---|---|---|---|
| `ticker` (required) | body |  | symbol | The underlying. |
| `strategy_type` (required) | body |  | iron_condor, credit_spread, straddle, strangle and others | Which structure. |
| `expiration` | body |  | YYYY-MM-DD | Expiration; dte is used when absent. |
| `dte` | body | 30 | days | Target days to expiration. |
| `width` | body | 5 | dollars | Wing width. |
| `target_delta` | body | 0.3 | 0.05 to 0.50 | Short-strike delta. |

## Request

```bash
curl -X POST "https://apexvol.com/api/mcp/data/build-strategy" \
     -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"ticker": "SPY", "strategy_type": "iron_condor", "dte": 30}'
```

## Response (captured 2026-09-08)

Real response, lists cut to the rows nearest the money. The envelope is `{"success": true, "data": ...}`.

```json
{
  "success": true,
  "data": {
    "analysis": {
      "breakevens": [
        752.48,
        787.52
      ],
      "legs_summary": [
        {
          "action": "SELL",
          "expiration": "2026-10-09",
          "iv": 0.1365,
          "premium": 6.36,
          "quantity": 1,
          "strike": 755.0,
          "type": "PUT"
        },
        {
          "action": "SELL",
          "expiration": "2026-10-09",
          "iv": 0.1084,
          "premium": 4.785,
          "quantity": 1,
          "strike": 785.0,
          "type": "CALL"
        },
        {
          "action": "BUY",
          "expiration": "2026-10-09",
          "iv": 0.1062,
          "premium": 3.275,
          "quantity": 1,
          "strike": 790.0,
          "type": "CALL"
        }
      ],
      "max_loss": -248.0,
      "max_profit": 252.0,
      "net_delta": -0.0256,
      "net_premium": -252.0,
      "net_theta": 0.0232,
      "net_vega": -0.1904,
      "pnl_curve": [
        [
          600.0,
          -248.0
        ],
        [
          603.5152,
          -248.0
        ],
        [
          607.0303,
          -248.0
        ]
      ],
      "probability_of_profit": 41.7,
      "risk_reward_ratio": 1.0161,
      "stock_price": 770.25,
      "strategy_name": "Iron Condor",
      "ticker": "SPY"
    },
    "created_at": "2026-09-08T08:06:42.457860",
    "legs": [
      {
        "action": "SELL",
        "delta": -0.3014,
        "expiration": "2026-10-09",
        "iv": 0.1365,
        "premium": 6.36,
        "quantity": 1,
        "strike": 755.0,
        "theta": -0.1785,
        "type": "PUT",
        "vega": 0.8379
      },
      {
        "action": "SELL",
        "delta": 0.297,
        "expiration": "2026-10-09",
        "iv": 0.1084,
        "premium": 4.785,
        "quantity": 1,
        "strike": 785.0,
        "theta": -0.1318,
        "type": "CALL",
        "vega": 0.8329
      },
      {
        "action": "BUY",
        "delta": 0.2281,
        "expiration": "2026-10-09",
        "iv": 0.1062,
        "premium": 3.275,
        "quantity": 1,
        "strike": 790.0,
        "theta": -0.1136,
        "type": "CALL",
        "vega": 0.735
      }
    ],
    "name": "Iron Condor",
    "stock_price": 770.25,
    "ticker": "SPY"
  }
}
```

## Fields

- `legs[].type, action, strike, expiration, premium, delta, theta, vega, iv`: The legs.
- `analysis.net_premium, max_profit, max_loss, breakevens`: The economics.
- `analysis.probability_of_profit, pnl_curve`: The odds and the curve.
- `name, stock_price`: Context.

## Errors

- `401`: no or revoked token
- `429`: Retry-After seconds
- `400`: missing or malformed body
- Full list: https://apexvol.com/developers/errors

## Ask it in an MCP client

- Build a 30-delta iron condor on SPY expiring in about 30 days.
- Set up a credit put spread on NVDA 5 wide.
- Build a strangle on AAPL for the October expiration.

Conventions for units, bases and timestamps: https://apexvol.com/developers/conventions
