1. API
  2. Strategies
  3. Optimize strategy

Strategies API, POST /optimize-strategy

Which strikes give the best SPY iron condor for max profit?

Grid-searches strikes for a strategy type and returns the winner with its analysis. Searches strike combinations for iron condors and credit spreads against a target (max profit, min loss, risk-reward or probability) and returns the winning legs with the full analysis.

BasicPlan and above, from $55/mo
1MCP tool that calls it
2026-09-08Sample captured from the live endpoint

The answer, in one call

Units first,
then the request.

As /build-strategy.

Candidates from the live chain; the target picks the objective.

curlBearer token from Account, then API Access
curl -X POST "https://apexvol.com/api/mcp/data/optimize-strategy" \
     -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"ticker": "SPY", "strategy_type": "iron_condor", "target": "max_profit"}'
Pythonrequests, nothing else
import requests

headers = {"Authorization": "Bearer avmcp_YOUR_TOKEN"}
body = {"ticker": "SPY", "strategy_type": "iron_condor", "target": "max_profit"}
r = requests.post("https://apexvol.com/api/mcp/data/optimize-strategy", headers=headers, json=body)
r.raise_for_status()
data = r.json()["data"]
print(data["analysis"])
In Claude, Cursor or ChatGPTthrough the MCP server, no code
You

Find the best-probability iron condor on SPY.

The assistant calls optimize_strategy and answers from the JSON below.

Tokens come with every paid or trial plan. Sign in and create one under Account, then API Access, or start a trial. Your ticker, your budget.

POST /api/mcp/data/optimize-strategy200, application/json, captured 2026-09-08
{
  "success": true,
  "data": {
    "analysis": {
      "breakevens": [
        743.435,
        793.565
      ],
      "legs_summary": [
        {
          "action": "SELL",
          "expiration": "2026-10-09",
          "iv": 0.1433,
          "premium": 5.155,
          "quantity": 1,
          "strike": 749.0,
          "type": "PUT"
        },
        {
          "action": "SELL",
          "expiration": "2026-10-09",
          "iv": 0.1064,
          "premium": 3.805,
          "quantity": 1,
          "strike": 788.0,
          "type": "CALL"
        },
        {
          "action": "BUY",
          "expiration": "2026-10-09",
          "iv": 0.1014,
          "premium": 0.985,
          "quantity": 1,
          "strike": 804.0,
          "type": "CALL"
        }
      ],
      "max_loss": -1943.5,
      "max_profit": 556.5,
      "net_delta": -0.0046,
      "net_premium": -556.5,
      "net_theta": 0.1098,
      "net_vega": -0.6744,
      "pnl_curve": [
        [
          579.2,
          -1943.5
        ],
        [
          583.0949,
          -1943.5
        ],
        [
          586.9899,
          -1943.5
        ]
      ],
      "probability_of_profit": 49.4,
      "risk_reward_ratio": 0.2863,
      "stock_price": 770.25,
      "strategy_name": "Iron Condor",
      "ticker": "SPY"
    },
    "created_at": "2026-09-08T08:07:39.442751",
    "legs": [
      {
        "action": "SELL",
        "delta": -0.2475,
        "expiration": "2026-10-09",
        "iv": 0.1433,
        "premium": 5.155,
        "quantity": 1,
        "strike": 749.0,
        "theta": -0.1721,
        "type": "PUT",
        "vega": 0.7443
      },
      {
        "action": "SELL",
        "delta": 0.2561,
        "expiration": "2026-10-09",
        "iv": 0.1064,
        "premium": 3.805,
        "quantity": 1,
        "strike": 788.0,
        "theta": -0.121,
        "type": "CALL",
        "vega": 0.7869
      },
      {
        "action": "BUY",
        "delta": 0.1014,
        "expiration": "2026-10-09",
        "iv": 0.1014,
        "premium": 0.985,
        "quantity": 1,
        "strike": 804.0,
        "theta": -0.0655,
        "type": "CALL",
        "vega": 0.4502
      }
    ],
    "name": "Iron Condor",
    "optimization_target": "max_profit",
    "stock_price": 770.25,
    "ticker": "SPY"
  }
}

Every response is wrapped as {"success": true, "data": {...}}. Lists in the sample are cut to a few rows so it fits on a page; the shape is exactly what your code receives.

Parameters

Bounded,
and the bounds are stated.

Out-of-range numbers are clamped to the documented range, never silently changed to something else. A missing required field returns 400 with the reason.

NameInDefaultRangeMeaning
ticker requiredbodysymbolThe underlying.
strategy_type requiredbodyiron_condor or credit_spreadWhich structure.
targetbodymax_profitmax_profit, min_loss, risk_reward, probabilityWhat to optimize.

Field by field

What each
number means.

legs[]
The winning legs.
analysis
The economics of the winner.
optimization_target
Echo of the objective.

Access, limits, errors

Before the
first call.

Plan
Basic Basic and above. Tokens are issued to paid and trial accounts from $55 a month; each endpoint follows the tier of its web feature. An endpoint above your plan answers 402 and names the plan it needs.
Auth
Bearer token, prefix avmcp_, created under Account, then API Access. Shown once, hashed at rest, rotates in one click. Always call https://apexvol.com, never www.
Limits
60 requests a minute and 1,000 an hour per token, plus a monthly allowance by plan. Every response carries the remaining counts in X-RateLimit-* headers; a 429 carries Retry-After in seconds.
Errors
401 no or revoked token; 429 Retry-After seconds; 400 missing or malformed body. The full list with payload shapes is on the errors page.
Since
API 1.0. Units, bases and timestamps follow the conventions shared by every endpoint; changes are logged in the API changelog.
Machine-readable
This page as Markdown, the family as one file, the whole API as llms-full.txt or OpenAPI 3.1.

The same data, in plain English

Ask for it
in an MCP client.

Connect the ApexVol MCP server and the assistant calls optimize_strategy by name. One URL, a sign-in, no token to paste.

Prompts that hit this endpointcopy one into Claude, Cursor or ChatGPT
You

Find the best-probability iron condor on SPY.

You

Optimize a credit spread on NVDA for risk-reward.

You

Which strikes maximize credit on a QQQ condor?

More in the prompt library. Set the server up in Claude Desktop, Claude Code, Cursor, ChatGPT, VS Code, Windsurf or Gemini CLI.

Included with
every paid plan.

From $55 a month, tier-matched: your token queries the data your plan includes and Pro unlocks the full surface.

Real market data, not a sandbox. See it live on AAPL.

7 days free, cancel anytime Card required · no charge for 7 days
Start trial →