1. API
  2. Portfolio risk
  3. Stress tests

Portfolio risk API, POST /stress-tests

How does my book hold up in a crash, a vol spike and a melt-up?

A standard battery of stress scenarios with estimated P&L per scenario. Runs the fixed set of scenarios (crash, correction, vol spike, rally and more) on your positions and returns the estimated P&L and contributions for each.

ProPlan 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 /scenario-analysis.

Same Greeks-based estimate as /scenario-analysis.

curlBearer token from Account, then API Access
curl -X POST "https://apexvol.com/api/mcp/data/stress-tests" \
     -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"positions": [{"ticker": "SPY", "position_type": "STOCK", "quantity": 100, "current_price": 770.25}, {"ticker": "SPY", "position_type": "PUT", "quantity": -1, "strike": 755.0, "expiration": "2026-10-09", "current_price": 6.359999999999999, "delta": -0.3014, "theta": -0.1785, "vega": 0.8379, "iv": 0.1365}]}'
Pythonrequests, nothing else
import requests

headers = {"Authorization": "Bearer avmcp_YOUR_TOKEN"}
body = {"positions": [{"ticker": "SPY", "position_type": "STOCK", "quantity": 100, "current_price": 770.25}, {"ticker": "SPY", "position_type": "PUT", "quantity": -1, "strike": 755.0, "expiration": "2026-10-09", "current_price": 6.359999999999999, "delta": -0.3014, "theta": -0.1785, "vega": 0.8379, "iv": 0.1365}]}
r = requests.post("https://apexvol.com/api/mcp/data/stress-tests", headers=headers, json=body)
r.raise_for_status()
data = r.json()["data"]
print(data["current_value"])
In Claude, Cursor or ChatGPTthrough the MCP server, no code
You

Stress test my positions.

The assistant calls generate_stress_tests 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/stress-tests200, application/json, captured 2026-09-08
{
  "success": true,
  "data": {
    "current_value": 76389.0,
    "scenarios": [
      {
        "days_forward": 1,
        "delta_contribution": -28472.4537,
        "estimated_pnl": -28491.5651,
        "estimated_pnl_pct": -37.298,
        "iv_change_pct": 100,
        "new_portfolio_value": 47897.4349,
        "scenario_name": "Market Crash (-20%)",
        "stock_move_pct": -20,
        "theta_contribution": 13.583,
        "vega_contribution": -1102.4875
      },
      {
        "days_forward": 1,
        "delta_contribution": -13089.1178,
        "estimated_pnl": -13237.0642,
        "estimated_pnl_pct": -17.3285,
        "iv_change_pct": 50,
        "new_portfolio_value": 63151.9358,
        "scenario_name": "Sharp Decline (-10%)",
        "stock_move_pct": -10,
        "theta_contribution": 13.583,
        "vega_contribution": -534.6292
      },
      {
        "days_forward": 1,
        "delta_contribution": -5797.5674,
        "estimated_pnl": -6028.1085,
        "estimated_pnl_pct": -7.8913,
        "iv_change_pct": 25,
        "new_portfolio_value": 70360.8915,
        "scenario_name": "Moderate Decline (-5%)",
        "stock_move_pct": -5,
        "theta_contribution": 13.583,
        "vega_contribution": -260.8316
      }
    ],
    "success": true,
    "timestamp": "2026-09-08T08:07:46.937252"
  }
}

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
positions requiredbodyas /portfolio-greeksThe book.

Field by field

What each
number means.

scenarios[].scenario_name, stock_move_pct, iv_change_pct, days_forward
The scenario.
scenarios[].estimated_pnl, estimated_pnl_pct
The outcome.
current_value
Starting value.

Access, limits, errors

Before the
first call.

Plan
Pro Pro 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; 403 Pro plan required; 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 generate_stress_tests by name. One URL, a sign-in, no token to paste.

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

Stress test my positions.

You

How much would I lose in a 10% crash with a vol spike?

You

Run the standard stress battery on this book.

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 →