# ApexVol API & MCP — Reference for Claude

> Self-contained reference for the ApexVol options-analytics API. Save this file in your project (e.g. as `apexvol-api.md`, or next to your `CLAUDE.md`) so Claude can implement against it.

- **Base URL:** `https://apexvol.com`
- **Auth:** send `Authorization: Bearer avmcp_<token>` on every request (active Pro plan required)
- **Docs version:** 1.10
- **Updated:** 4 August 2026

## Overview

Two ways to reach the same data, both using one Pro API token:

- **REST API** — Bearer-token HTTP endpoints under `/api/mcp/data/*`. Call them from any language.
- **MCP server** — the `apexvol-mcp` client that exposes those endpoints to Claude as natural-language tools. It calls the same REST API under the hood, so anything below you can also just ask Claude for.

## Authentication

- Every request: `Authorization: Bearer avmcp_…`
- Tokens require an active **Pro** subscription — create and manage them yourself under **Account → API Access** on apexvol.com.
- Pasting your token into your local Claude config (or a private setup chat) is the intended, safe way to wire this up. You only need to rotate a token if it is exposed somewhere **public** — a committed file, a shared screenshot, or a public post.
- Create or rotate tokens any time under **Account → API Access**; a revoked token returns `401` immediately, so generate a fresh one and update `APEXVOL_API_TOKEN`.

## Response format & errors

- **Success:** `{ "success": true, "data": { … } }`
- **Error:** `{ "success": false, "error": "message" }` with an HTTP status:

| Status | Meaning |
|--------|---------|
| `401` | Missing, malformed, expired, or revoked token |
| `403` | Valid token but not entitled — `beta_required` (no API access) or `tier_required: pro` (not on Pro) |
| `426` | `upgrade_required` — your `apexvol-mcp` client is below the minimum supported version |
| `429` | Rate limit (60/min or 1000/hr per token), or `budget_exceeded` (monthly API capacity reached) |
| `5xx` | Server error |

**Rate limits:** 60 requests/minute and 1000/hour per token, plus an aggregate monthly usage cap. Back off and retry on `429`.

## Index symbols (SPX, NDX, RUT, VIX, XSP, DJX)

Cash-settled index symbols are supported, but behave differently from equities — two gotchas to handle if you build against them (e.g. an SPX pre-market brief):

- **Price is a forward, not spot.** The price field returned on chain/strike data is the parity-implied **forward** for that expiration, not the index spot. On an index this can sit **20–30 points above spot**. Use the **nearest expiration's** value as your spot/ATM proxy, and don't compare it directly to a live index quote.
- **Use the index root, not an ETF proxy.** Query `SPX` (not `SPY`) when you want the cash index; the two have different levels, multipliers, and settlement.

## Using it in Claude (MCP)

Install the client from PyPI:

```bash
pipx install apexvol-mcp   # or: pip install apexvol-mcp
```

To update later, `pipx upgrade apexvol-mcp` (or `pip install -U apexvol-mcp`). A `426 upgrade_required` response means your client is below the minimum supported version — upgrade to fix.

Add to Claude Code (`.mcp.json`) or Claude Desktop config:

```json
{
  "mcpServers": {
    "apexvol": {
      "command": "apexvol-mcp",
      "env": { "APEXVOL_API_TOKEN": "avmcp_YOUR_TOKEN_HERE" }
    }
  }
}
```

Then ask Claude, e.g. *"What's the IV rank for SPY?"* or *"Build an iron condor on AAPL."*

## Calling the REST API directly (Python)

A minimal client that handles the three conventions every endpoint shares — the `Bearer` header, `429` back-off, and unwrapping `data` / raising on `success: false`. Build your own helpers on top of `get()`.

```python
import os, time, requests


class ApexVolClient:
    """Minimal client for the ApexVol token API."""
    BASE = "https://apexvol.com/api/mcp/data"

    def __init__(self, token):
        self.s = requests.Session()
        self.s.headers["Authorization"] = f"Bearer {token}"

    def get(self, path, **params):
        for attempt in range(4):
            r = self.s.get(f"{self.BASE}{path}", params=params, timeout=30)
            if r.status_code == 429:              # rate limited -> back off and retry
                time.sleep(2 ** attempt)          # 1s, 2s, 4s, 8s
                continue
            r.raise_for_status()                  # 401 / 403 / 5xx -> exception
            body = r.json()
            if not body.get("success"):           # {"success": false, "error": "..."}
                raise RuntimeError(body.get("error", "request failed"))
            return body["data"]                   # hand back just the payload
        raise RuntimeError("rate-limited after retries")


client = ApexVolClient(os.environ["APEXVOL_API_TOKEN"])
gex = client.get("/gex/SPX")            # one endpoint
ivr = client.get("/iv-rank/AAPL")       # another
# now write your own logic (e.g. spx_premarket_brief) on top of client.get()
```

## Claude tools

In Claude, the integration exposes these tools (each maps to an endpoint below):

| Category | Tools |
|----------|-------|
| Options chain | `get_options_chain, get_expirations, get_options_by_delta, get_stock_price, calculate_expected_move, get_historical_chain` |
| Volatility | `get_iv_rank, get_volatility_cone, get_volatility_risk_premium, get_term_structure, find_iv_opportunities, get_vix_snapshot, get_monies_surface` |
| Greeks & GEX | `get_gex, get_charm_exposure, get_third_order_greeks, get_greeks_heatmap, get_cross_index_gex` |
| Options flow | `get_options_flow, get_smart_money_flow, scan_volatility_arb` |
| Strategy | `build_strategy, analyze_strategy, optimize_strategy, simulate_option_chain, calculate_probability_of_profit` |
| Risk | `calculate_portfolio_greeks, run_scenario_analysis, generate_stress_tests, get_hedge_recommendations` |
| Events & screening | `get_earnings_calendar, analyze_earnings_history, screen_market, get_market_overview, get_economic_calendar` |
| Ticker analytics | `get_ticker_analytics (skew, dividends, borrow_rate, correlation, hv_regimes, price_context, relative_value, greeks_exposure), get_earnings_move_analysis (mispricing, historical_moves, expected_vs_actual, verdict, seasonality, post_drift, iv_crush), get_max_pain, get_volume_profile, get_zero_dte, get_orats_cores, search_tickers, scan_relative_value` |

## Endpoints

59 endpoints. All paths are relative to `https://apexvol.com` and require the Bearer header.

### `GET /api/mcp/data/chain/<ticker>`

Formatted options chain(s). {ticker, stock_price, expirations, chains, strike_window}. Defaults to the nearest expiration and a near-the-money strike window; strike_window.truncated tells you when rows were trimmed.

**Parameters:** expiration (optional, YYYY-MM-DD; overrides num_expirations) · num_expirations (optional, default 1, max 10) · strikes_around (optional, default 20 strikes per side of the money; 0 = full chain)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/chain/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "chains": {
      "2026-06-17": [
        {
          "Call Ask": 70.95,
          "Call Bid": 67.5,
          "Delta Call": 1.0,
          "Delta Put": 0.0,
          "Epsilon Call": -0.0082,
          "Epsilon Put": -0.0082,
          "Extrinsic Call": 0.0,
          "Extrinsic Put": 0.32,
          "…": "(+19 more keys)"
        },
        "...(+47 more items)"
      ],
      "2026-06-18": [
        {
          "Call Ask": 295.05,
          "Call Bid": 293.0,
          "Delta Call": 1.0,
          "Delta Put": -0.0,
          "Epsilon Call": -0.0164,
          "Epsilon Put": -0.0164,
          "Extrinsic Call": 0.0,
          "Extrinsic Put": 0.0,
          "…": "(+19 more keys)"
        },
        "...(+115 more items)"
      ],
      "2026-06-22": [
        {
          "Call Ask": 76.3,
          "Call Bid": 72.5,
          "Delta Call": 1.0,
          "Delta Put": -0.0,
          "Epsilon Call": -0.0492,
          "Epsilon Put": -0.0492,
          "Extrinsic Call": 0.13,
          "Extrinsic Put": 0.02,
          "…": "(+19 more keys)"
        },
        "...(+48 more items)"
      ]
    },
    "data_type": "LIVE",
    "expirations": [
      "2026-06-17",
      "...(+2 more items)"
    ],
    "stock_price": 299.27,
    "ticker": "AAPL"
  },
  "success": true
}
```

### `GET /api/mcp/data/chain-at-time/<ticker>`

Historical EOD chain snapshot for a past trade date — how the chain was priced on that day.

**Parameters:** expiration (required, YYYY-MM-DD) · trade_date (required, YYYY-MM-DD)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/chain-at-time/AAPL"
```

Response (sample, arrays trimmed):

```json
{ "data": { "ticker", "trade_date", "expiration", "chain": ["…rows…"] }, "success": true }
```

### `GET /api/mcp/data/cores/<ticker>`

Raw our institutional data feed cores analytics — 340+ pre-computed fields per ticker (IV summary metrics, IV/HV stats, slope/contango, earnings-move components, borrow rates, betas, percentiles). Defaults to the curated ~45-field subset the platform screens on. Note: the row contains a NUMERIC field literally named "error" (an smooth volatility model-fit statistic) — it is not a failure signal.

**Parameters:** fields (optional: comma-separated field names, "all" for the entire row, empty = curated subset)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/cores/AAPL"
```

Response (sample, arrays trimmed):

```json
{ "data": { "ticker": "AAPL", "iv30d": 29.15, "ivPctile1y": 62.0, "contango": 0.021, "…": "(selected fields)", "available_field_count": 347 }, "success": true }
```

### `GET /api/mcp/data/expirations/<ticker>`

Available expiration dates.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/expirations/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "expirations": [
      "2026-06-17",
      "2026-06-18",
      "...(+23 more items)"
    ]
  },
  "success": true
}
```

### `GET /api/mcp/data/search`

Ticker search / validation over the platform's coverage universe — resolve company names to symbols and check support before deeper calls.

**Parameters:** q (required) · limit (default 8, max 20)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/search"
```

Response (sample, arrays trimmed):

```json
{ "data": { "query", "results": [{"symbol", "name", "sector", "market_cap_tier"}], "count", "exact_match", "supported" }, "success": true }
```

### `GET /api/mcp/data/options-by-delta/<ticker>`

The contract closest to a target delta: strike, actual delta, IV, bid/ask/mid.

**Parameters:** delta (default 0.30), option_type ∈ call | put (default call), expiration (optional)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/options-by-delta/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "actual_delta": 0.191,
    "ask": 0.4,
    "bid": 0.37,
    "expiration": "2026-06-17",
    "iv": 0.2318,
    "mid": 0.385,
    "option_type": "call",
    "stock_price": 299.27,
    "strike": 302.5,
    "target_delta": 0.3,
    "ticker": "AAPL"
  },
  "success": true
}
```

### `GET /api/mcp/data/stock/<ticker>`

Current price (live quote mid) and company stats.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/stock/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "beta": "0.90",
    "earnings_date": null,
    "industry": "Technology",
    "market_cap": "$4.39T",
    "price": 299.27,
    "sector": "Technology",
    "volume": "1,105,460"
  },
  "success": true
}
```

### `GET /api/mcp/data/expected-move/<ticker>`

Expected move from straddle pricing: $ and %, upper/lower bounds, DTE.

**Parameters:** expiration (optional; skips same-day expiry)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/expected-move/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "dte": 1,
    "expected_move_dollars": 4.46,
    "expected_move_percent": 0.0149,
    "expiration": "2026-06-18",
    "lower_bound": 294.81,
    "stock_price": 299.27,
    "ticker": "AAPL",
    "upper_bound": 303.73
  },
  "success": true
}
```

### `GET /api/mcp/data/iv-rank/<ticker>`

IV rank and percentile.

**Parameters:** lookback_days (default 252)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/iv-rank/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "current_iv": 22.01,
    "data_source": "orats_ivrank",
    "historical_data_points": 252,
    "iv_max_52w": 30.72,
    "iv_mean": 23.5,
    "iv_median": 23.38,
    "iv_min_52w": 18.11,
    "iv_percentile": 20.63,
    "iv_percentile_1m": 14.29,
    "iv_percentile_1y": 19,
    "iv_rank": 30.93,
    "iv_rank_1m": 11.2,
    "iv_rank_1y": 30.93,
    "iv_state": "LOW",
    "iv_std": 2.19,
    "iv_stdv_from_mean": -0.59,
    "lookback_days": 252,
    "ticker": "AAPL",
    "timestamp": "2026-06-17T08:30:12.408276"
  },
  "success": true
}
```

### `GET /api/mcp/data/volatility-cone/<ticker>`

Volatility cone data.

**Parameters:** periods (CSV, default 10,20,30,60,90)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/volatility-cone/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "current_iv": 21.22,
    "realized_vol_30d": 22.844156568754475,
    "ticker": "AAPL",
    "timestamp": "2026-06-17T08:30:13.963716",
    "volatility_cone": {
      "10d": {
        "current_rv": 27.491816710000943,
        "difference": -5.5368167100009416,
        "iv": 21.955000000000002,
        "iv_to_rv_ratio": 0.798601279485951,
        "max": 39.57324481931114,
        "mean_rv": 20.59427715277066,
        "median_rv": 19.810445821827678,
        "min": 6.341325284008219,
        "…": "(+6 more keys)"
      },
      "20d": {
        "current_rv": 24.721498568018507,
        "difference": -3.5064985680185075,
        "iv": 21.215,
        "iv_to_rv_ratio": 0.858159951009007,
        "max": 34.340105272908225,
        "mean_rv": 20.7517403335957,
        "median_rv": 20.058686634782877,
        "min": 9.58596967685563,
        "…": "(+6 more keys)"
      },
      "30d": {
        "current_rv": 22.844156568754475,
        "difference": -1.6241565687544757,
        "iv": 21.22,
        "iv_to_rv_ratio": 0.9289027562096144,
        "max": 31.18350332487711,
        "mean_rv": 21.190821223204015,
        "median_rv": 21.81788847176728,
        "min": 10.230167947056456,
        "…": "(+6 more keys)"
      },
      "60d": {
        "current_rv": 23.383141343299794,
        "difference": 1.0868586567002048,
        "iv": 24.47,
        "iv_to_rv_ratio": 1.0464804382244233,
        "max": 26.40190092929704,
        "mean_rv": 22.135769953589158,
        "median_rv": 23.12276533946738,
        "min": 14.086595809280517,
        "…": "(+6 more keys)"
      },
      "90d": {
        "current_rv": 24.59687136465853,
        "difference": -0.006871364658529444,
        "iv": 24.59,
        "iv_to_rv_ratio": 0.9997206407043945,
        "max": 25.391473930985658,
        "mean_rv": 22.97466309207559,
        "median_rv": 22.77063267092776,
        "min": 20.71425157701495,
        "…": "(+6 more keys)"
      }
    }
  },
  "success": true
}
```

### `GET /api/mcp/data/vrp/<ticker>`

Volatility risk premium (IV − RV).

**Parameters:** lookback_days (default 30)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/vrp/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "assessment": "NORMAL_PREMIUM",
    "implied_volatility": 22.01,
    "lookback_days": 30,
    "realized_volatility": 23.983906213492155,
    "ticker": "AAPL",
    "timestamp": "2026-06-17T08:30:14.586854",
    "volatility_risk_premium": -1.9739062134921532,
    "vrp_percentile": 10.684613789111136,
    "vrp_ratio": 0.917698718635677
  },
  "success": true
}
```

### `GET /api/mcp/data/vrp/<ticker>/timeseries`

IV vs HV time series — the volatility risk premium through time. Values in percentage points (iv_units).

**Parameters:** lookback_days (optional, default 60) · hv_period (optional, default 30)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/vrp/AAPL/timeseries"
```

Response (sample, arrays trimmed):

```json
{ "data": { "series": [ {"date", "iv", "hv", "vrp"}, "…" ], "iv_units": "percentage_points" }, "success": true }
```

### `GET /api/mcp/data/vrp/<ticker>/expirations`

VRP broken down per expiration — where on the curve the premium sits.

**Parameters:** max_expirations (optional, default 10)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/vrp/AAPL/expirations"
```

Response (sample, arrays trimmed):

```json
{ "data": { "expirations": [ {"expiration", "dte", "iv", "hv", "vrp"}, "…" ], "iv_units": "percentage_points" }, "success": true }
```

### `GET /api/mcp/data/vix`

VIX snapshot: level, change, and term-structure state.

**Parameters:** None

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/vix"
```

Response (sample, arrays trimmed):

```json
{ "data": { "vix_level", "change", "…" }, "success": true }
```

### `GET /api/mcp/data/term-structure/<ticker>`

IV term structure across expirations.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/term-structure/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "as_of": "2026-06-17T08:30:15.760576",
    "stock_price": 299.27,
    "term_structure": [
      {
        "atm_iv": 23.52,
        "atm_strike": 300.0,
        "dte": 0,
        "expected_move_dollar": 3.0,
        "expected_move_pct": 1.0,
        "expiration": "2026-06-17",
        "iv_expected_move_dollar": 0.0,
        "iv_expected_move_pct": 0.0,
        "lower_1sigma": 296.27,
        "lower_2sigma": 293.27,
        "straddle_call": 1.13,
        "straddle_price": 3.0,
        "straddle_put": 1.87,
        "upper_1sigma": 302.27,
        "upper_2sigma": 305.27
      },
      {
        "atm_iv": 24.98,
        "atm_strike": 300.0,
        "dte": 1,
        "expected_move_dollar": 4.46,
        "expected_move_pct": 1.49,
        "expiration": "2026-06-18",
        "iv_expected_move_dollar": 3.91,
        "iv_expected_move_pct": 1.31,
        "lower_1sigma": 294.81,
        "lower_2sigma": 290.35,
        "straddle_call": 1.91,
        "straddle_price": 4.46,
        "straddle_put": 2.55,
        "upper_1sigma": 303.73,
        "upper_2sigma": 308.19
      },
      "...(+6 more items)"
    ],
    "ticker": "AAPL"
  },
  "success": true
}
```

### `GET /api/mcp/data/iv-opportunities/<ticker>`

IV mean-reversion opportunities.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/iv-opportunities/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "error": "name 'z_score_threshold' is not defined"
  },
  "success": true
}
```

### `GET /api/mcp/data/gex/<ticker>`

Gamma exposure data.

**Parameters:** expiration (optional), aggregate (default true)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/gex/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "by_expiration": [
      {
        "call_gex": 1758866770.3745956,
        "detailed": [
          {
            "gamma": 9.975277302903177e-15,
            "gex": 5.613936797021876e-09,
            "oi": 1,
            "strike": 500,
            "type": "C"
          },
          "...(+272 more items)"
        ],
        "expiration": "2026-06-17",
        "flip_level": 748.015500928944,
        "gex_by_strike": [
          {
            "cumulative_gex": -1.3052403053075857e-05,
            "gex": -1.3052403053075857e-05,
            "oi": 2327,
            "strike": 500
          },
          "...(+174 more items)"
        ],
        "max_gamma_strike": 751,
        "min_gamma_strike": 735,
        "put_gex": -1055547460.7845404,
        "…": "(+2 more keys)"
      },
      "...(+7 more items)"
    ],
    "call_gex": 9323719674.785145,
    "expirations_included": 8,
    "flip_level": 679.537001468298,
    "gamma_flip": 679.537001468298,
    "gex_by_strike": [
      {
        "gex": 0.0002993528742302929,
        "oi": 42814,
        "strike": 245
      },
      "...(+263 more items)"
    ],
    "gex_profile": [
      {
        "call_gex": -1.820114758427486e-07,
        "net_gex": 0.0002993528742302929,
        "put_gex": 0.0002995348857061356,
        "strike": 245
      },
      "...(+263 more items)"
    ],
    "gex_ratio": 1.245587892402593,
    "…": "(+7 more keys)"
  },
  "success": true
}
```

### `GET /api/mcp/data/charm/<ticker>`

Charm (delta-decay) exposure.

**Parameters:** expiration (optional)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/charm/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "call_charm": -67097320.53412261,
    "charm_by_strike": [
      {
        "charm_exposure": 1346804.8306834595,
        "oi": 2326,
        "strike": 500
      },
      {
        "charm_exposure": 1344449.6930396506,
        "oi": 2298,
        "strike": 505
      },
      "...(+189 more items)"
    ],
    "data_status": "LIVE",
    "detailed": [
      {
        "charm": 0.0,
        "charm_exposure": 0.0,
        "iv": 0.010075718364580544,
        "oi": 48,
        "strike": 712,
        "type": "C"
      },
      {
        "charm": -2.1545520734642936,
        "charm_exposure": -11634.581196707186,
        "iv": 4.6672102926083,
        "oi": 54,
        "strike": 715,
        "type": "C"
      },
      "...(+305 more items)"
    ],
    "dte": 0,
    "expiration": "2026-06-17",
    "put_charm": 106661859.57215637,
    "stock_price": 750.19,
    "ticker": "SPY",
    "total_charm": 39564539.03803376
  },
  "success": true
}
```

### `GET /api/mcp/data/third-order-greeks/<ticker>`

Speed, zomma, color, vomma, ultima.

**Parameters:** expiration (optional)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/third-order-greeks/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "data_status": "LIVE",
    "definitions": {
      "charm": "dDelta/dTime - Delta decay over time",
      "color": "dGamma/dTime - How gamma changes as time passes",
      "speed": "dGamma/dSpot - Rate of change of gamma with spot price",
      "ultima": "dVomma/dVol - Third derivative wrt volatility",
      "vanna": "dDelta/dVol - Delta sensitivity to volatility",
      "vomma": "dVega/dVol - Convexity of vega (volga)",
      "zomma": "dGamma/dVol - Sensitivity of gamma to volatility changes"
    },
    "detailed": [
      {
        "charm": 11.210369051517821,
        "color": -0.04269419309517194,
        "iv": 3.4261471776395003,
        "speed": -3.889892974357936e-05,
        "strike": 230.0,
        "type": "C",
        "ultima": -0.009310650824818942,
        "vanna": -0.05007257884385139,
        "vomma": 0.013487812871515344,
        "zomma": -0.00018829330347502524
      },
      "...(+95 more items)"
    ],
    "dte": 0,
    "expiration": "2026-06-17",
    "greeks_by_strike": [
      {
        "charm": 11.638536305306111,
        "color": -0.01507149511831175,
        "speed": -4.452702189025835e-05,
        "strike": 230.0,
        "ultima": -0.011367377011885022,
        "vanna": -0.056982719526383285,
        "vomma": 0.01651925408036399,
        "zomma": -5.9549192603664614e-05
      },
      "...(+47 more items)"
    ],
    "stock_price": 299.27,
    "ticker": "AAPL"
  },
  "success": true
}
```

### `GET /api/mcp/data/greeks-heatmap/<ticker>`

Greeks heatmap across strikes and expirations (all Greeks; pick the one you need from the result).

**Parameters:** option_type (default calls)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/greeks-heatmap/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "aggregates": {
      "charm": {
        "by_expiration": [
          508623.9265549422,
          "...(+7 more items)"
        ],
        "by_strike": [
          15487.623701106455,
          "...(+41 more items)"
        ]
      },
      "delta": {
        "by_expiration": [
          21006637.68,
          "...(+7 more items)"
        ],
        "by_strike": [
          716139.99,
          "...(+41 more items)"
        ]
      },
      "gamma": {
        "by_expiration": [
          675604.4700000001,
          "...(+7 more items)"
        ],
        "by_strike": [
          160.94,
          "...(+41 more items)"
        ]
      },
      "rho": {
        "by_expiration": [
          318004.2699999999,
          "...(+7 more items)"
        ],
        "by_strike": [
          36500.21,
          "...(+41 more items)"
        ]
      },
      "theta": {
        "by_expiration": [
          -5542234.55,
          "...(+7 more items)"
        ],
        "by_strike": [
          -6880.089999999999,
          "...(+41 more items)"
        ]
      },
      "vanna": {
        "by_expiration": [
          -651355.857069288,
          "...(+7 more items)"
        ],
        "by_strike": [
          -63692.15232212721,
          "...(+41 more items)"
        ]
      },
      "vega": {
        "by_expiration": [
          840313.4799999999,
          "...(+7 more items)"
        ],
        "by_strike": [
          4667.72,
          "...(+41 more items)"
        ]
      }
    },
    "as_of": "2026-06-17T07:30:22.510485+00:00",
    "data_points": 281,
    "earnings_date": null,
    "expirations": [
      "Jun 18 (1 DTE)",
      "...(+7 more items)"
    ],
    "expirations_raw": [
      "2026-06-18",
      "...(+7 more items)"
    ],
    "greek_matrices": {
      "charm": [
        [
          0.02699154270813025,
          "...(+41 more items)"
        ],
        "...(+7 more items)"
      ],
      "delta": [
        [
          1.0,
          "...(+41 more items)"
        ],
        "...(+7 more items)"
      ],
      "gamma": [
        [
          -0.0,
          "...(+41 more items)"
        ],
        "...(+7 more items)"
      ],
      "iv": [
        [
          1.8114,
          "...(+41 more items)"
        ],
        "...(+7 more items)"
      ],
      "rho": [
        [
          0.0131,
          "...(+41 more items)"
        ],
        "...(+7 more items)"
      ],
      "theta": [
        [
          0.0,
          "...(+41 more items)"
        ],
        "...(+7 more items)"
      ],
      "vanna": [
        [
          -0.029835864249503297,
          "...(+41 more items)"
        ],
        "...(+7 more items)"
      ],
      "vega": [
        [
          0.0,
          "...(+41 more items)"
        ],
        "...(+7 more items)"
      ]
    },
    "greek_matrix": [
      [
        1.0,
        "...(+41 more items)"
      ],
      "...(+7 more items)"
    ],
    "…": "(+6 more keys)"
  },
  "success": true
}
```

### `GET /api/mcp/data/cross-index-gex`

GEX comparison across indices.

**Parameters:** tickers (CSV, default SPY,QQQ,IWM,DIA)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/cross-index-gex?ticker=AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "comparison": {
      "DIA": {
        "flip_level": 215.9191176470588,
        "normalized_gex": 777086.0513299183,
        "stock_price": 521.19,
        "total_gex": 405009479.09264016
      },
      "IWM": {
        "flip_level": 107.10067864286938,
        "normalized_gex": -860993.0536491616,
        "stock_price": 291.67,
        "total_gex": -251125843.95785096
      },
      "QQQ": {
        "flip_level": 519.7800028751548,
        "normalized_gex": 1049086.1086381897,
        "stock_price": 730.04,
        "total_gex": 765874822.750224
      },
      "SPY": {
        "flip_level": 679.537001468298,
        "normalized_gex": 2450474.62078782,
        "stock_price": 750.19,
        "total_gex": 1838321555.7688148
      }
    },
    "indices": {
      "DIA": {
        "by_expiration": [
          {
            "call_gex": 349046879.37617135,
            "detailed": [
              {
                "gamma": 6.262454627288816e-14,
                "gex": 2.381577818658677e-07,
                "oi": 14,
                "strike": 210,
                "type": "C"
              },
              "...(+274 more items)"
            ],
            "expiration": "2026-06-18",
            "flip_level": 215.9191176470588,
            "gex_by_strike": [
              {
                "cumulative_gex": -1.3098678002622726e-06,
                "gex": -1.3098678002622726e-06,
                "oi": 105,
                "strike": 210
              },
              "...(+140 more items)"
            ],
            "max_gamma_strike": 518,
            "min_gamma_strike": 517,
            "put_gex": -70305167.1853804,
            "…": "(+2 more keys)"
          },
          "...(+7 more items)"
        ],
        "call_gex": 563913332.6133265,
        "expirations_included": 8,
        "flip_level": 215.9191176470588,
        "gamma_flip": 215.9191176470588,
        "gex_by_strike": [
          {
            "gex": -1.3098678002622726e-06,
            "oi": 105,
            "strike": 210
          },
          "...(+205 more items)"
        ],
        "gex_profile": [
          {
            "call_gex": 2.381577818658677e-07,
            "net_gex": -1.3098678002622726e-06,
            "put_gex": -1.5480255821281403e-06,
            "strike": 210
          },
          "...(+205 more items)"
        ],
        "gex_ratio": 3.5487706567161093,
        "…": "(+8 more keys)"
      },
      "IWM": {
        "by_expiration": [
          {
            "call_gex": 52533674.45304053,
            "detailed": [
              {
                "gamma": 3.909077800142768e-08,
                "gex": 0.0033255067777630187,
                "oi": 1,
                "strike": 265.0,
                "type": "C"
              },
              "...(+101 more items)"
            ],
            "expiration": "2026-06-17",
            "flip_level": 255.21763851045324,
            "gex_by_strike": [
              {
                "cumulative_gex": 4.426653800867632e-09,
                "gex": 4.426653800867632e-09,
                "oi": 1,
                "strike": 210.0
              },
              "...(+68 more items)"
            ],
            "max_gamma_strike": 298.0,
            "min_gamma_strike": 290.0,
            "put_gex": -86022425.13799104,
            "…": "(+2 more keys)"
          },
          "...(+7 more items)"
        ],
        "call_gex": 1325663389.405563,
        "expirations_included": 8,
        "flip_level": 107.10067864286938,
        "gamma_flip": 107.10067864286938,
        "gex_by_strike": [
          {
            "gex": -2.9116451818985356e-06,
            "oi": 9742,
            "strike": 85
          },
          "...(+168 more items)"
        ],
        "gex_profile": [
          {
            "call_gex": 2.989368769916361e-10,
            "net_gex": -2.9116451818985356e-06,
            "put_gex": -2.9119441187755275e-06,
            "strike": 85
          },
          "...(+168 more items)"
        ],
        "gex_ratio": 0.8407359470471649,
        "…": "(+8 more keys)"
      },
      "QQQ": {
        "by_expiration": [
          {
            "call_gex": 806504130.4537767,
            "detailed": [
              {
                "gamma": -1.7871047850310777e-15,
                "gex": -1.9049050194437495e-09,
                "oi": 2,
                "strike": 495,
                "type": "C"
              },
              "...(+313 more items)"
            ],
            "expiration": "2026-06-17",
            "flip_level": 593.4242787537302,
            "gex_by_strike": [
              {
                "cumulative_gex": 4.783216503823255e-06,
                "gex": 4.783216503823255e-06,
                "oi": 5026,
                "strike": 495
              },
              "...(+193 more items)"
            ],
            "max_gamma_strike": 740,
            "min_gamma_strike": 730,
            "put_gex": -460628580.55855554,
            "…": "(+2 more keys)"
          },
          "...(+7 more items)"
        ],
        "call_gex": 5187580892.767035,
        "expirations_included": 8,
        "flip_level": 519.7800028751548,
        "gamma_flip": 519.7800028751548,
        "gex_by_strike": [
          {
            "gex": 1.366446429310151e-05,
            "oi": 7885,
            "strike": 174.78
          },
          "...(+337 more items)"
        ],
        "gex_profile": [
          {
            "call_gex": -2.403883701293951e-07,
            "net_gex": 1.366446429310151e-05,
            "put_gex": 1.3904852663230906e-05,
            "strike": 174.78
          },
          "...(+337 more items)"
        ],
        "gex_ratio": 1.1732079904504624,
        "…": "(+8 more keys)"
      },
      "SPY": {
        "by_expiration": [
          {
            "call_gex": 1758865492.2032595,
            "detailed": [
              {
                "gamma": 9.975277302903177e-15,
                "gex": 5.613936797021876e-09,
                "oi": 1,
                "strike": 500,
                "type": "C"
              },
              "...(+272 more items)"
            ],
            "expiration": "2026-06-17",
            "flip_level": 748.015500928944,
            "gex_by_strike": [
              {
                "cumulative_gex": -1.3052403053075857e-05,
                "gex": -1.3052403053075857e-05,
                "oi": 2327,
                "strike": 500
              },
              "...(+174 more items)"
            ],
            "max_gamma_strike": 751,
            "min_gamma_strike": 735,
            "put_gex": -1055547460.7845404,
            "…": "(+2 more keys)"
          },
          "...(+7 more items)"
        ],
        "call_gex": 9323718396.61381,
        "expirations_included": 8,
        "flip_level": 679.537001468298,
        "gamma_flip": 679.537001468298,
        "gex_by_strike": [
          {
            "gex": 0.0002993528742302929,
            "oi": 42814,
            "strike": 245
          },
          "...(+263 more items)"
        ],
        "gex_profile": [
          {
            "call_gex": -1.820114758427486e-07,
            "net_gex": 0.0002993528742302929,
            "put_gex": 0.0002995348857061356,
            "strike": 245
          },
          "...(+263 more items)"
        ],
        "gex_ratio": 1.2455877216472726,
        "…": "(+8 more keys)"
      }
    }
  },
  "success": true
}
```

### `GET /api/mcp/data/flow/<ticker>`

Options flow and unusual activity.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/flow/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "all_flow": [
      {
        "ask": 9.8,
        "bid": 9.35,
        "delta": 0.9423,
        "dte": 1,
        "expiration": "2026-06-18",
        "is_unusual": false,
        "mid": 9.575,
        "moneyness": "ITM",
        "…": "(+8 more keys)"
      },
      "...(+99 more items)"
    ],
    "data_freshness": "EOD",
    "is_market_hours": false,
    "largest_flows": [
      {
        "ask": 9.8,
        "bid": 9.35,
        "delta": 0.9423,
        "dte": 1,
        "expiration": "2026-06-18",
        "is_unusual": false,
        "mid": 9.575,
        "moneyness": "ITM",
        "…": "(+8 more keys)"
      },
      "...(+19 more items)"
    ],
    "message": "Market is closed. Showing end-of-day data from the most recent trading session.",
    "stock_price": 299.27,
    "success": true,
    "summary": {
      "call_put_ratio": 2.023598308293142,
      "net_premium": 93850447.0,
      "put_call_ratio": 0.49416922118475026,
      "sentiment": "BULLISH",
      "total_call_premium": 133798605.0,
      "total_call_volume": 524887.0,
      "total_flow_count": 191,
      "total_put_premium": 39948158.0,
      "…": "(+1 more keys)"
    },
    "…": "(+5 more keys)"
  },
  "success": true
}
```

### `GET /api/mcp/data/smart-money/<ticker>`

Smart-money / institutional flow.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/smart-money/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "smart_money_trades": [
      {
        "ask": 1.53,
        "bid": 1.46,
        "criteria": [
          "Large Premium",
          "Opening Position",
          "...(+2 more items)"
        ],
        "delta": 0.1703,
        "dte": 30,
        "expiration": "2026-07-17",
        "is_unusual": false,
        "mid": 1.495,
        "moneyness": "OTM",
        "oi": 30466,
        "premium": 457021.5,
        "smart_money_score": 7,
        "strike": 320.0,
        "ticker": "AAPL",
        "timestamp": "2026-06-17T08:30:27.326359",
        "type": "CALL",
        "volume": 3057,
        "volume_oi_ratio": 0.10034136414363552
      },
      {
        "ask": 2.45,
        "bid": 2.35,
        "criteria": [
          "Large Premium",
          "Opening Position",
          "...(+2 more items)"
        ],
        "delta": -0.1982,
        "dte": 30,
        "expiration": "2026-07-17",
        "is_unusual": false,
        "mid": 2.4000000000000004,
        "moneyness": "OTM",
        "oi": 6668,
        "premium": 289920.0,
        "smart_money_score": 7,
        "strike": 285.0,
        "ticker": "AAPL",
        "timestamp": "2026-06-17T08:30:27.326237",
        "type": "PUT",
        "volume": 1208,
        "volume_oi_ratio": 0.1811637672465507
      },
      "...(+18 more items)"
    ],
    "ticker": "AAPL",
    "timestamp": "2026-06-17T08:30:27.331925",
    "total_smart_trades": 63
  },
  "success": true
}
```

### `GET /api/mcp/data/vol-arb-scan`

Volatility-arbitrage scan.

**Parameters:** ticker (default SPY)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/vol-arb-scan?ticker=AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "butterfly_mispricings": [],
    "calendar_spreads": [],
    "put_call_parity_violations": [],
    "skew_trades": [
      {
        "atm_iv": 0.17704999999999999,
        "atm_strike": 750.0,
        "edge": "39.5 IV points of skew",
        "expiration": "2026-06-17",
        "otm_iv": 0.5723,
        "otm_strike": 690.0,
        "skew": 0.39525000000000005,
        "skew_pct": 223.24202202767586,
        "strategy": "Sell OTM put skew",
        "ticker": "SPY",
        "type": "PUT_SKEW_TRADE"
      },
      {
        "atm_iv": 0.17704999999999999,
        "atm_strike": 750.0,
        "edge": "31.8 IV points of skew",
        "expiration": "2026-06-17",
        "otm_iv": 0.4949,
        "otm_strike": 810.0,
        "skew": 0.31785,
        "skew_pct": 179.5255577520475,
        "strategy": "Sell OTM call skew",
        "ticker": "SPY",
        "type": "CALL_SKEW_TRADE"
      },
      "...(+3 more items)"
    ],
    "success": true,
    "ticker": "SPY",
    "timestamp": "2026-06-17T08:30:32.618614",
    "total_opportunities": 6
  },
  "success": true
}
```

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

Builds a strategy from live chain data. Returns the legs (strike, premium, Greeks) plus full analysis (net premium/Greeks, max profit/loss, breakevens, POP, P&L curve).

**Parameters:** JSON: ticker, strategy_type (required); expiration, dte (default 30), width (default 5), target_delta (default 0.30)

```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": "AAPL" }'
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "analysis": {
      "breakevens": [
        287.65,
        "...(+1 more items)"
      ],
      "legs_summary": [
        {
          "action": "SELL",
          "expiration": "2026-07-17",
          "iv": 0.2235,
          "premium": 3.55,
          "quantity": 1,
          "strike": 290.0,
          "type": "PUT"
        },
        "...(+3 more items)"
      ],
      "max_loss": -265.0000000000009,
      "max_profit": 235.00000000000003,
      "net_delta": -0.010599999999999998,
      "net_premium": -235.00000000000003,
      "net_theta": 0.0237,
      "net_vega": -0.09319999999999995,
      "pnl_curve": [
        [
          228.0,
          "...(+1 more items)"
        ],
        "...(+99 more items)"
      ],
      "probability_of_profit": 41.4,
      "risk_reward_ratio": 0.8867924528301857,
      "stock_price": 299.27,
      "strategy_name": "Iron Condor",
      "ticker": "AAPL"
    },
    "created_at": "2026-06-17T08:30:33.629914",
    "legs": [
      {
        "action": "SELL",
        "delta": -0.2695,
        "expiration": "2026-07-17",
        "iv": 0.2235,
        "premium": 3.55,
        "quantity": 1,
        "strike": 290.0,
        "theta": -0.126,
        "type": "PUT",
        "vega": 0.2834
      },
      "...(+3 more items)"
    ],
    "name": "Iron Condor",
    "stock_price": 299.27,
    "ticker": "AAPL"
  },
  "success": true
}
```

### `POST /api/mcp/data/analyze-strategy`

Analyzes custom legs: net premium and Greeks, max profit/loss, breakevens, probability of profit, and the P&L curve. Fetches live spot when stock_price is omitted.

**Parameters:** JSON: ticker, legs [{type CALL|PUT, action BUY|SELL, strike, expiration, premium, quantity?, delta?, theta?, vega?, iv?}] — required; stock_price?, name?

```bash
curl -X POST "https://apexvol.com/api/mcp/data/analyze-strategy" \
     -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{ "ticker": "AAPL" }'
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "breakevens": [
      287.65,
      312.35
    ],
    "legs_summary": [
      {
        "action": "SELL",
        "expiration": "2026-07-17",
        "iv": 0.2235,
        "premium": 3.55,
        "quantity": 1,
        "strike": 290.0,
        "type": "PUT"
      },
      {
        "action": "BUY",
        "expiration": "2026-07-17",
        "iv": 0.2298,
        "premium": 2.4000000000000004,
        "quantity": 1,
        "strike": 285.0,
        "type": "PUT"
      },
      "...(+2 more items)"
    ],
    "max_loss": -265.0000000000009,
    "max_profit": 235.00000000000003,
    "net_delta": -0.010599999999999998,
    "net_premium": -235.00000000000003,
    "net_theta": 0.0237,
    "net_vega": -0.09319999999999995,
    "pnl_curve": [
      [
        228.0,
        -265.0
      ],
      [
        229.5151515151515,
        -265.0
      ],
      "...(+98 more items)"
    ],
    "probability_of_profit": 41.4,
    "risk_reward_ratio": 0.8867924528301857,
    "stock_price": 299.27,
    "strategy_name": "Custom Strategy",
    "ticker": "AAPL"
  },
  "success": true
}
```

### `POST /api/mcp/data/optimize-strategy`

Grid-searches strikes (iron_condor and credit_spread) and returns the winning strategy with its analysis.

**Parameters:** JSON: ticker, strategy_type (required); target ∈ max_profit | min_loss | risk_reward | probability (default max_profit; other values optimize net credit)

```bash
curl -X POST "https://apexvol.com/api/mcp/data/optimize-strategy" \
     -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{ "ticker": "AAPL" }'
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "analysis": {
      "breakevens": [
        285.88,
        "...(+1 more items)"
      ],
      "legs_summary": [
        {
          "action": "SELL",
          "expiration": "2026-07-17",
          "iv": 0.2235,
          "premium": 3.55,
          "quantity": 1,
          "strike": 290.0,
          "type": "PUT"
        },
        "...(+3 more items)"
      ],
      "max_loss": -1588.0000000000007,
      "max_profit": 412.0,
      "net_delta": 0.057800000000000046,
      "net_premium": -412.0,
      "net_theta": 0.06500000000000002,
      "net_vega": -0.223,
      "pnl_curve": [
        [
          216.0,
          "...(+1 more items)"
        ],
        "...(+99 more items)"
      ],
      "probability_of_profit": 47.7,
      "risk_reward_ratio": 0.2594458438287153,
      "stock_price": 299.27,
      "strategy_name": "Iron Condor",
      "ticker": "AAPL"
    },
    "created_at": "2026-06-17T08:30:35.027613",
    "legs": [
      {
        "action": "SELL",
        "delta": -0.2695,
        "expiration": "2026-07-17",
        "iv": 0.2235,
        "premium": 3.55,
        "quantity": 1,
        "strike": 290.0,
        "theta": -0.126,
        "type": "PUT",
        "vega": 0.2834
      },
      "...(+3 more items)"
    ],
    "name": "Iron Condor",
    "optimization_target": "max_profit",
    "stock_price": 299.27,
    "ticker": "AAPL"
  },
  "success": true
}
```

### `POST /api/mcp/data/simulate-chain`

Black-Scholes what-if: re-price a chain at a hypothetical stock price, DTE, and IV shift. Pass chain rows from GET /chain, or just ticker (+ optional expiration) and the server fetches the chain.

**Parameters:** JSON body: sim_price (required) · sim_dte (required) · iv_adjustment (percent, default 0) · chain (rows, optional) · ticker/expiration (used when chain omitted) · strikes_around (default 20)

```bash
curl -X POST "https://apexvol.com/api/mcp/data/simulate-chain" \
     -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{ "ticker": "AAPL" }'
```

Response (sample, arrays trimmed):

```json
{ "data": { "sim_price", "sim_dte", "iv_adjustment", "expiration", "chain": ["…re-priced rows with Greeks…"] }, "success": true }
```

### `POST /api/mcp/data/pop`

Probability of profit for a set of option legs (N(d2)-based).

**Parameters:** JSON body: legs (required: option_type, action, strike, iv, premium, quantity) · stock_price (required) · days_to_exp (required)

```bash
curl -X POST "https://apexvol.com/api/mcp/data/pop" \
     -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{ "ticker": "AAPL" }'
```

Response (sample, arrays trimmed):

```json
{ "data": { "probability_of_profit": 68.2, "legs_count": 2 }, "success": true }
```

### `POST /api/mcp/data/portfolio-greeks`

Aggregate portfolio Greeks with summary risk level and per-ticker breakdown.

**Parameters:** JSON: positions [{ticker, position_type STOCK|CALL|PUT, quantity, strike?, expiration?, entry_price?, current_price?, delta?…}] — required

```bash
curl -X POST "https://apexvol.com/api/mcp/data/portfolio-greeks" \
     -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{ "ticker": "AAPL" }'
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "portfolio_summary": {
      "daily_decay_pct": 0.008064516129032258,
      "delta_exposure_pct": 887.0967741935484,
      "risk_level": "MEDIUM",
      "total_cost_basis": 500.0,
      "total_delta": 55.00000000000001,
      "total_pnl": 120.0,
      "total_pnl_pct": 24.0,
      "total_positions": 1,
      "total_theta": -0.05,
      "total_value": 620.0,
      "total_vega": 0.12,
      "vega_risk_pct": 0.01935483870967742
    },
    "positions_by_ticker": {
      "AAPL": {
        "delta": 55.00000000000001,
        "positions": [
          {
            "charm": 0,
            "current_price": 6.2,
            "delta": 0.55,
            "entry_price": 5.0,
            "expiration": "2026-01-16",
            "gamma": 0.02,
            "iv": 0.28,
            "position_type": "CALL",
            "quantity": 1,
            "rho": 0,
            "stock_price": 195,
            "strike": 190,
            "theta": -0.05,
            "ticker": "AAPL",
            "vanna": 0,
            "vega": 0.12,
            "vomma": 0
          }
        ],
        "theta": -0.05,
        "value": 620.0,
        "vega": 0.12
      }
    },
    "success": true,
    "timestamp": "2026-06-17T08:30:35.400105"
  },
  "success": true
}
```

### `POST /api/mcp/data/scenario-analysis`

What-if scenario analysis across supplied price/vol scenarios.

**Parameters:** JSON: positions (required), scenarios []

```bash
curl -X POST "https://apexvol.com/api/mcp/data/scenario-analysis" \
     -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{ "ticker": "AAPL" }'
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "current_value": 620.0,
    "scenarios": [],
    "success": true,
    "timestamp": "2026-06-17T08:30:35.777443"
  },
  "success": true
}
```

### `POST /api/mcp/data/stress-tests`

Standardized stress-test battery (crash, vol spike, …) with estimated P&L per scenario.

**Parameters:** JSON: positions (required)

```bash
curl -X POST "https://apexvol.com/api/mcp/data/stress-tests" \
     -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{ "ticker": "AAPL" }'
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "current_value": 620.0,
    "scenarios": [
      {
        "days_forward": 1,
        "delta_contribution": -1100.0000000000002,
        "estimated_pnl": -1099.9300000000003,
        "estimated_pnl_pct": -177.40806451612906,
        "iv_change_pct": 100,
        "new_portfolio_value": -479.9300000000003,
        "scenario_name": "Market Crash (-20%)",
        "stock_move_pct": -20,
        "theta_contribution": -0.05,
        "vega_contribution": 0.12
      },
      {
        "days_forward": 1,
        "delta_contribution": -550.0000000000001,
        "estimated_pnl": -549.9900000000001,
        "estimated_pnl_pct": -88.70806451612904,
        "iv_change_pct": 50,
        "new_portfolio_value": 70.00999999999988,
        "scenario_name": "Sharp Decline (-10%)",
        "stock_move_pct": -10,
        "theta_contribution": -0.05,
        "vega_contribution": 0.06
      },
      "...(+6 more items)"
    ],
    "success": true,
    "timestamp": "2026-06-17T08:30:36.141431"
  },
  "success": true
}
```

### `POST /api/mcp/data/hedge-recommendations`

Delta-hedge recommendations. Computes net portfolio delta and returns a stock hedge plus an option-based alternative on the hedge ticker to reach the target delta. Share-equivalent (not beta-weighted).

**Parameters:** JSON body: positions (required, same schema as /portfolio-greeks), hedge_ticker (optional, default SPY), target_delta (optional, default 0)

```bash
curl -X POST "https://apexvol.com/api/mcp/data/hedge-recommendations" \
     -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{ "ticker": "AAPL" }'
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "current_delta": 5000.0,
    "target_delta": 0.0,
    "delta_gap": -5000.0,
    "hedge_ticker": "SPY",
    "note": "Hedges close a -5000 share-equivalent delta gap using SPY. Deltas are NOT beta-weighted: hedging single names with an index proxy needs your own beta scaling.",
    "hedges": [
      {
        "type": "stock",
        "action": "SELL SHORT",
        "ticker": "SPY",
        "quantity": 5000,
        "description": "SELL SHORT 5,000 shares of SPY",
        "details": "Adds -5,000 delta at 1 delta per share, bringing net delta to ~0."
      },
      {
        "type": "option",
        "action": "BUY",
        "ticker": "SPY",
        "option_type": "put",
        "strike": 610.0,
        "expiration": "2026-08-21",
        "contracts": 100,
        "delta_per_contract": -50.0,
        "est_cost": 85000.0,
        "description": "BUY 100 SPY 2026-08-21 610 puts",
        "details": "~-50 delta per contract at 8.50 mid (est. cost $85,000)."
      }
    ],
    "portfolio_greeks": { "total_delta": 5000.0, "…": "(portfolio summary)" },
    "projected_greeks": { "…": "(current vs projected comparison)" }
  },
  "success": true
}
```

### `GET /api/mcp/data/earnings-calendar`

Upcoming earnings announcements, each annotated with the implied earnings move vs the average absolute move over the last 12 earnings (implied_move, hist_avg_move, move_ratio).

**Parameters:** days_ahead (default 7)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/earnings-calendar"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "calendar": [
      {
        "amc": [],
        "bmo": [
          {
            "company_name": "CarMax Inc.",
            "date": "2026-06-17",
            "datetime": "Wed, 17 Jun 2026 00:00:00 GMT",
            "days_until": 0,
            "eps_actual": null,
            "eps_estimate": 0.94,
            "fiscal_quarter": null,
            "revenue_actual": null,
            "…": "(+5 more keys)"
          }
        ],
        "date": "2026-06-17",
        "day_num": 17,
        "month_short": "Jun",
        "tbd": [
          {
            "company_name": "",
            "date": "2026-06-17",
            "datetime": "Wed, 17 Jun 2026 00:00:00 GMT",
            "days_until": 0,
            "eps_actual": null,
            "eps_estimate": 3.12,
            "fiscal_quarter": null,
            "revenue_actual": null,
            "…": "(+5 more keys)"
          }
        ],
        "weekday": 2,
        "weekday_name": "Wednesday"
      },
      "...(+3 more items)"
    ],
    "earnings": [
      {
        "company_name": "Kroger Co.",
        "date": "2026-06-18",
        "datetime": "Thu, 18 Jun 2026 00:00:00 GMT",
        "days_until": 1,
        "eps_actual": null,
        "eps_estimate": 1.59,
        "fiscal_quarter": null,
        "revenue_actual": null,
        "…": "(+5 more keys)"
      },
      "...(+12 more items)"
    ],
    "from_date": "2026-06-17",
    "success": true,
    "timestamp": "2026-06-17T08:30:37.026392",
    "to_date": "2026-06-24",
    "total_count": 13,
    "week_grid": [
      [
        {
          "amc": [],
          "bmo": [],
          "date": "2026-06-15",
          "day_num": 15,
          "empty": true,
          "month_short": "Jun",
          "tbd": [],
          "weekday": 0,
          "…": "(+1 more keys)"
        },
        "...(+4 more items)"
      ],
      "...(+1 more items)"
    ]
  },
  "success": true
}
```

### `GET /api/mcp/data/economic-calendar`

Macro economic-event calendar (CPI, FOMC, jobs reports...).

**Parameters:** from_date (optional, YYYY-MM-DD) · to_date (optional) · country (default US)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/economic-calendar"
```

Response (sample, arrays trimmed):

```json
{ "data": { "events": [ {"date", "event", "importance"}, "…" ] }, "success": true }
```

### `GET /api/mcp/data/earnings-history/<ticker>`

Historical earnings move analysis.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/earnings-history/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "earnings_moves": [
      {
        "direction": "up",
        "earnings_date": "2026-04-30",
        "eps_actual": 2.01,
        "eps_estimate": 1.95,
        "gap_move_dollar": 7.5,
        "gap_move_pct": 2.7665068240501656,
        "iv_after": null,
        "iv_before": null,
        "iv_crush": null,
        "iv_crush_pct": null,
        "next_open": 278.6,
        "prev_close": 271.1,
        "surprise_direction": "beat",
        "surprise_pct": 3.076923076923068,
        "timing": "AMC"
      },
      {
        "direction": "down",
        "earnings_date": "2026-01-29",
        "eps_actual": 2.85,
        "eps_estimate": 2.67,
        "gap_move_dollar": -3.1100000000000136,
        "gap_move_pct": -1.2063615205585778,
        "iv_after": null,
        "iv_before": null,
        "iv_crush": null,
        "iv_crush_pct": null,
        "next_open": 254.69,
        "prev_close": 257.8,
        "surprise_direction": "beat",
        "surprise_pct": 6.741573033707872,
        "timing": "AMC"
      },
      "...(+6 more items)"
    ],
    "statistics": {
      "avg_abs_move_pct": 2.201247439044784,
      "avg_beat_move_pct": 0.505149851645259,
      "avg_down_move_pct": -2.2614634498660333,
      "avg_iv_crush_pct": null,
      "avg_miss_move_pct": null,
      "avg_move_pct": 0.505149851645259,
      "avg_up_move_pct": 2.165117832552034,
      "beat_count": 8,
      "down_count": 3,
      "max_down_pct": -3.3883129123468416,
      "max_up_pct": 4.041003049813619,
      "median_iv_crush_pct": null,
      "miss_count": 0,
      "total_earnings": 8,
      "up_count": 5
    },
    "success": true,
    "ticker": "AAPL",
    "timestamp": "2026-06-17T08:30:38.581795"
  },
  "success": true
}
```

### `GET /api/mcp/data/earnings-verdict/<ticker>`

Combined buy/sell-the-straddle verdict for the next earnings: expected-move pricing vs realized history, IV crush, and drift rolled into one call.

**Parameters:** None

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/earnings-verdict/AAPL"
```

Response (sample, arrays trimmed):

```json
{ "data": { "verdict", "confidence", "reasons": ["…"], "…": "components" }, "success": true }
```

### `GET /api/mcp/data/seasonality/<ticker>`

Monthly/quarterly seasonality of returns and volatility.

**Parameters:** years (optional, default 3)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/seasonality/AAPL"
```

Response (sample, arrays trimmed):

```json
{ "data": { "monthly": ["…"], "quarterly": ["…"] }, "success": true }
```

### `GET /api/mcp/data/post-earnings-drift/<ticker>`

Post-earnings drift statistics over recent quarters (does the move continue or fade).

**Parameters:** quarters (optional, default 12)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/post-earnings-drift/AAPL"
```

Response (sample, arrays trimmed):

```json
{ "data": { "quarters": ["…"], "avg_drift": "…" }, "success": true }
```

### `GET /api/mcp/data/iv-crush/<ticker>`

IV build-up into earnings and crush after, averaged over past events. Values in percentage points.

**Parameters:** days_before (optional, default 30) · days_after (optional, default 30)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/iv-crush/AAPL"
```

Response (sample, arrays trimmed):

```json
{ "data": { "pattern": ["…"], "avg_crush_pct": "…", "iv_units": "percentage_points" }, "success": true }
```

### `GET /api/mcp/data/screen`

Market screener over the full universe via bulk data (1-2 upstream calls). Preset catalog: high_iv_rank, low_iv_rank, high_vrp, earnings_this_week, high_skew, steep_contango, mean_reversion, vol_pairs, decorrelation, unusual_volume, pin_risk. screen_type=list returns the catalog with descriptions.

**Parameters:** screen_type (default high_iv_rank; "list" for catalog) · limit (default 20) · min_market_cap (dollars, default 1e9) · exclude_earnings_days (default 0)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/screen"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "errors": [
      {
        "error": "No expirations found",
        "ticker": "BRK.B"
      }
    ],
    "filters": {
      "max_iv": null,
      "min_iv": null
    },
    "results": [
      {
        "current_iv": 83.57,
        "data_status": "LIVE",
        "expiration_used": "2026-07-17",
        "iv_percentile": null,
        "iv_rank": null,
        "note": "IV Rank requires historical IV data caching",
        "stock_price": 117.1,
        "ticker": "INTC"
      },
      {
        "current_iv": 77.37,
        "data_status": "LIVE",
        "expiration_used": "2026-07-17",
        "iv_percentile": null,
        "iv_rank": null,
        "note": "IV Rank requires historical IV data caching",
        "stock_price": 214.13,
        "ticker": "QCOM"
      },
      "...(+18 more items)"
    ],
    "results_count": 49,
    "scan_time": "2026-06-17T08:30:47",
    "tickers_scanned": 50
  },
  "success": true
}
```

### `GET /api/mcp/data/market-overview`

Market-wide volatility overview.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/market-overview"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "earnings_this_week": [
      {
        "capGroup": "large",
        "days_to_earnings": 0,
        "hv20d": 46.5,
        "iv30d": 65.1,
        "iv_percentile": 82.0,
        "market_cap": "$39.6B",
        "next_earnings": "2026-06-17",
        "price": 375.76,
        "…": "(+3 more keys)"
      },
      "...(+10 more items)"
    ],
    "etf_heatmap": [
      {
        "chg1m": -8.87,
        "chg1w": -3.8,
        "constituents": [
          {
            "capGroup": "mega",
            "chg1m": -11.22,
            "chg1w": -4.31,
            "iv30d": 27.2,
            "ivRank": 67.0,
            "mktCap": 590430381.0,
            "optVol": 55282.0,
            "price": 141.7,
            "…": "(+2 more keys)"
          },
          "...(+16 more items)"
        ],
        "iv30d": 23.5,
        "ivRank": 62.0,
        "mktCap": 37580213.0,
        "name": "Energy",
        "optVol": 169861.0,
        "…": "(+3 more keys)"
      },
      "...(+10 more items)"
    ],
    "index_prices": {
      "DJX": {
        "chg1m": 4.56,
        "chg1w": 2.12,
        "chg_today": 0,
        "iv30d": 13.3,
        "name": "Dow Jones",
        "price": 51671.0
      },
      "NDX": {
        "chg1m": 3.47,
        "chg1w": 3.15,
        "chg_today": 0,
        "iv30d": 23.1,
        "name": "Nasdaq 100",
        "price": 30543.92
      },
      "SPX": {
        "chg1m": 1.58,
        "chg1w": 1.81,
        "chg_today": 0,
        "iv30d": 12.9,
        "name": "S&P 500",
        "price": 7554.29
      },
      "VIX": {
        "chg1m": -8.98,
        "chg1w": -18.37,
        "chg_today": 0,
        "iv30d": 79.5,
        "name": "VIX",
        "price": 16.2
      }
    },
    "iv_hv_overpriced": [
      {
        "capGroup": "small",
        "contango": -30.3,
        "hv20d": 61.1,
        "iv30d": 310.0,
        "iv_percentile": 99.0,
        "market_cap": "$583M",
        "price": 7.97,
        "sector": "Healthcare",
        "…": "(+3 more keys)"
      },
      "...(+29 more items)"
    ],
    "iv_hv_underpriced": [
      {
        "capGroup": "mega",
        "contango": -0.13,
        "hv20d": 3072.2,
        "iv30d": 32.5,
        "iv_percentile": 37.0,
        "market_cap": "$1.0T",
        "price": 1122.27,
        "sector": "Healthcare",
        "…": "(+3 more keys)"
      },
      "...(+29 more items)"
    ],
    "market_stats": {
      "avg_contango": -0.15,
      "avg_iv30d": 52.0,
      "avg_iv_percentile": 56.0,
      "avg_put_call_ratio": 0.75,
      "avg_vrp": 3.6,
      "market_regime": "Elevated",
      "median_iv_percentile": 60.0,
      "pct_high_iv": 36.9,
      "…": "(+4 more keys)"
    },
    "put_skew": {
      "avg_skew_pctile": 41.4,
      "avg_slope": 1.04,
      "avg_slope_1y": 1.36,
      "sectors": [
        {
          "avg_skew_pctile": 55.4,
          "avg_slope": 1.58,
          "sector": "Volatility",
          "ticker_count": 3
        },
        "...(+12 more items)"
      ]
    },
    "scan_time": "2026-06-17T08:30:57",
    "…": "(+6 more keys)"
  },
  "success": true
}
```

### `GET /api/mcp/data/historical-moves/<ticker>`

Historical price-move distribution.

**Parameters:** periods (CSV, default 7,14,21,30)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/historical-moves/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "current_price": 299.24,
    "move_analysis": {
      "14d": {
        "avg_move_pct": 5.460654166142421,
        "max_down_move_pct": -5.706615146384165,
        "max_up_move_pct": 11.738149279574095,
        "median_move_pct": 6.34700353327966,
        "p10": -2.746558192259416,
        "p25": 4.136666987122128,
        "p75": 8.462997002936723,
        "p90": 9.959272583173219,
        "…": "(+2 more keys)"
      },
      "21d": {
        "avg_move_pct": 8.983453570532497,
        "max_down_move_pct": -2.4073167167206533,
        "max_up_move_pct": 15.239542157843655,
        "median_move_pct": 9.45067944285608,
        "p10": -0.0954494391009697,
        "p25": 7.316391478568541,
        "p75": 12.389979949232178,
        "p90": 13.438183431307893,
        "…": "(+2 more keys)"
      },
      "30d": {
        "avg_move_pct": 13.784484713867984,
        "max_down_move_pct": 6.055697641050339,
        "max_up_move_pct": 18.74015402251373,
        "median_move_pct": 14.615760531262456,
        "p10": 8.23281228894737,
        "p25": 11.872727117323267,
        "p75": 16.500919729454303,
        "p90": 17.435065192241144,
        "…": "(+2 more keys)"
      },
      "7d": {
        "avg_move_pct": 2.171606636064761,
        "max_down_move_pct": -6.976588285700114,
        "max_up_move_pct": 8.34310130186261,
        "median_move_pct": 2.589399640543666,
        "p10": -3.1024009791845537,
        "p25": 1.0989520767016592,
        "p75": 4.41157793600958,
        "p90": 5.611353172267599,
        "…": "(+2 more keys)"
      }
    },
    "success": true,
    "ticker": "AAPL",
    "timestamp": "2026-06-17T08:30:59.016317"
  },
  "success": true
}
```

### `GET /api/mcp/data/expected-vs-actual/<ticker>`

Options-implied expected move vs historical actual moves.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/expected-vs-actual/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "error": "Could not retrieve historical data"
  },
  "success": true
}
```

### `GET /api/mcp/data/mispricing-assessment/<ticker>`

Composite assessment combining IV rank, VRP, and expected-vs-actual: returns a BUY_PREMIUM / SELL_PREMIUM / NEUTRAL signal with a −100…+100 score, confidence, and all components.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/mispricing-assessment/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "components": {
      "current_iv": 22.01,
      "expected_move_pct": 0,
      "historical_avg_move_pct": 0,
      "iv_percentile": 20.6,
      "iv_rank": 30.9,
      "options_assessment": "UNKNOWN",
      "realized_vol": 0,
      "vrp": 0
    },
    "confidence": 100.0,
    "historical_moves": {
      "14d": {
        "avg_move_pct": 5.460654166142421,
        "max_down_move_pct": -5.706615146384165,
        "max_up_move_pct": 11.738149279574095,
        "median_move_pct": 6.34700353327966,
        "p10": -2.746558192259416,
        "p25": 4.136666987122128,
        "p75": 8.462997002936723,
        "p90": 9.959272583173219,
        "…": "(+2 more keys)"
      },
      "21d": {
        "avg_move_pct": 8.983453570532497,
        "max_down_move_pct": -2.4073167167206533,
        "max_up_move_pct": 15.239542157843655,
        "median_move_pct": 9.45067944285608,
        "p10": -0.0954494391009697,
        "p25": 7.316391478568541,
        "p75": 12.389979949232178,
        "p90": 13.438183431307893,
        "…": "(+2 more keys)"
      },
      "30d": {
        "avg_move_pct": 13.784484713867984,
        "max_down_move_pct": 6.055697641050339,
        "max_up_move_pct": 18.74015402251373,
        "median_move_pct": 14.615760531262456,
        "p10": 8.23281228894737,
        "p25": 11.872727117323267,
        "p75": 16.500919729454303,
        "p90": 17.435065192241144,
        "…": "(+2 more keys)"
      },
      "7d": {
        "avg_move_pct": 2.171606636064761,
        "max_down_move_pct": -6.976588285700114,
        "max_up_move_pct": 8.34310130186261,
        "median_move_pct": 2.589399640543666,
        "p10": -3.1024009791845537,
        "p25": 1.0989520767016592,
        "p75": 4.41157793600958,
        "p90": 5.611353172267599,
        "…": "(+2 more keys)"
      }
    },
    "mispricing_score": 0,
    "signal": "NEUTRAL",
    "ticker": "AAPL",
    "timestamp": "2026-06-17T07:31:00.201147+00:00"
  },
  "success": true
}
```

### `GET /api/mcp/data/skew/<ticker>`

Volatility skew decomposition: put/call skew, curvature, and regime bands.

**Parameters:** view (optional: 'analysis' default, 'history', 'curvature') · days (history view, default 252)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/skew/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "current": {
      "slope": 1.5441,
      "slope_forecast": 1.8744,
      "slope_forecast_inf": 2.1555,
      "slope_inf": 2.2334
    },
    "curvature": {
      "deriv": 0.0904,
      "deriv_forecast": 0.0914,
      "deriv_forecast_inf": 0.0868,
      "deriv_inf": 0.1027,
      "interpretation": "smile",
      "mispricing": 0.0128
    },
    "market_width": {
      "vol": 1.09,
      "vol_inf": 0.68
    },
    "percentile": {
      "avg_1m": 1.6204,
      "avg_1y": 2.7352,
      "current": 8.33,
      "stdv_1y": 1.19
    },
    "price": 299.27,
    "sector": "Technology",
    "sector_relative": {
      "etf_slope_ratio": 0.4
    },
    "ticker": "AAPL"
  },
  "success": true
}
```

### `GET /api/mcp/data/relative-value/<ticker>`

IV percentile vs SPY and sector, plus ratio mean-reversion signal.

**Parameters:** days (default 252)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/relative-value/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "avg_opt_volume": 1167698.0,
    "best_etf": "XLK",
    "correlation": {
      "beta": 0.9,
      "etf_1m": 0.61,
      "etf_1y": 0.44,
      "spy_1m": 0.7,
      "spy_1y": 0.73
    },
    "earnings": {
      "days_to_next": null,
      "implied_move": 4.77
    },
    "hv20d": 24.02,
    "iv30d": 20.93,
    "market_cap": 4393624768000.0,
    "momentum": {
      "chg_1m": 0.48,
      "chg_1w": 3.0
    },
    "percentiles": {
      "own": 19.0,
      "vs_etf": 1.0,
      "vs_spy": 45.0
    },
    "price": 296.42,
    "ratios": {
      "iv_etf_ratio": 1.5936,
      "iv_etf_ratio_avg_1m": 0.95,
      "iv_etf_ratio_avg_1y": 0.95,
      "iv_hv_ratio": 0.8,
      "iv_hv_ratio_1m": 1.02,
      "iv_hv_ratio_1y": 0.94,
      "iv_spy_ratio": 1.5936,
      "iv_spy_ratio_avg_1m": 1.5,
      "iv_spy_ratio_avg_1y": 1.57
    },
    "sector": "Technology",
    "sigma_bands": {
      "mean": 1.6245,
      "sigma_1_lower": 1.4511,
      "sigma_1_upper": 1.7979,
      "sigma_2_lower": 1.2777,
      "sigma_2_upper": 1.9714
    },
    "signal": "CHEAP",
    "skew": {
      "slope_pctile": null
    },
    "ticker": "AAPL",
    "timeseries": [
      {
        "date": "2025-06-16",
        "iv_etf_ratio": 1.28,
        "iv_hv_ratio": 1.12,
        "iv_spy_ratio": 1.77
      },
      {
        "date": "2025-06-17",
        "iv_etf_ratio": 1.25,
        "iv_hv_ratio": 1.15,
        "iv_spy_ratio": 1.66
      },
      "...(+250 more items)"
    ],
    "vrp": -6.54,
    "z_scores": {
      "etf_ratio_z": 3.6905,
      "spy_ratio_z": -0.1783
    }
  },
  "success": true
}
```

### `GET /api/mcp/data/relative-value-scan`

Market-wide relative-value scans: IV/SPY mean-reversion stretches or rich-vs-cheap pairs.

**Parameters:** view (optional: 'mean_reversion' default, 'pairs') · limit (default 20, max 50) · threshold (mean_reversion z-score, default 1.5)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/relative-value-scan"
```

Response (sample, arrays trimmed):

```json
{ "data": { "results": ["…"] }, "success": true }
```

### `GET /api/mcp/data/zero-dte/<ticker>`

0DTE analytics: gamma flip, max pain, by-strike gamma, and theta decay.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/zero-dte/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "by_strike": [
      {
        "call_delta": 1.0,
        "call_gamma": 0.002,
        "call_iv": 0.0,
        "call_mid": 250.25,
        "call_oi": 1,
        "call_theta": 0.0,
        "call_volume": 0,
        "moneyness": "ITM",
        "…": "(+9 more keys)"
      },
      "...(+195 more items)"
    ],
    "chain_table": [
      {
        "call_ask": 30.44,
        "call_bid": 30.17,
        "call_delta": 0.995,
        "call_gamma": 0.001,
        "call_iv": 0.0,
        "call_mid": 30.3,
        "call_oi": 328,
        "call_spread": 0.27,
        "…": "(+17 more keys)"
      },
      "...(+60 more items)"
    ],
    "data_status": "PRE-MARKET",
    "edge_score": {
      "components": {
        "em_hit_rate": {
          "score": 8,
          "value": 78.4,
          "weight": 0.2
        },
        "em_rv": {
          "score": 2,
          "value": 0.59,
          "weight": 0.25
        },
        "gamma_regime": {
          "score": 7,
          "value": "positive",
          "weight": 0.1
        },
        "iv_forecast": {
          "score": 1,
          "value": -7.5,
          "weight": 0.15
        },
        "vrp": {
          "score": 2,
          "value": -1.8,
          "weight": 0.3
        }
      },
      "edge_label": "No Clear Edge",
      "edge_type": "neutral",
      "total": 3.6
    },
    "em_hit_rate": {
      "assessment": "reliable",
      "avg_actual_pct": 0.7,
      "avg_em_pct": 1.02,
      "current_em_pct": 0.74,
      "em_vs_avg": "below",
      "hit_rate": 78.4,
      "hits": 80,
      "total_days": 102
    },
    "error": 0.0,
    "expiration": "2026-06-17",
    "gamma_regime": {
      "regime": "positive",
      "total_net_gex": 75.01
    },
    "…": "(+15 more keys)"
  },
  "success": true
}
```

### `GET /api/mcp/data/dividend/<ticker>`

Dividend history, implied vs actual, and ex-date behavior.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/dividend/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "cagr": null,
    "current": {
      "annual_actual": 1.08,
      "annual_implied": -0.9268,
      "div_amount": 0.27,
      "div_freq": "Quarterly",
      "div_growth": 0.0,
      "div_yield": 0.4,
      "implied_vs_actual": -2.0068,
      "next_div_date": "2026-08-11",
      "next_div_implied": 0,
      "price": 299.27
    },
    "history": [],
    "pays_dividends": true,
    "sector": "Technology",
    "ticker": "AAPL"
  },
  "success": true
}
```

### `GET /api/mcp/data/borrow-rate/<ticker>`

Borrow-rate time series and hard-to-borrow signal.

**Parameters:** days (default 252)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/borrow-rate/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "current": {
      "avg_opt_volume": 1167698.0,
      "best_etf": "XLK",
      "borrow2yr": 3.24,
      "borrow30": 2.58,
      "borrow_class": "MODERATE",
      "borrow_pctile": 10.7,
      "chg_1m": 0.48,
      "chg_1w": 3.0,
      "iv_percentile": 19.0,
      "market_cap": 4393624768000.0,
      "open_interest": 5225094.0,
      "options_volume": 873079,
      "price": 299.27,
      "put_call_ratio": null,
      "residualRate": null,
      "sector": "Technology",
      "stock_loan_revenue": 772.12,
      "stock_volume": 1105460.0,
      "synthetic_short_cost": 6.77,
      "term_spread": -0.66,
      "vrp": -3.09
    },
    "earnings_dates": [
      "2025-07-31",
      "2025-10-30",
      "...(+2 more items)"
    ],
    "next_earnings": null,
    "sector_comparison": {
      "sector_avg": -0.7955,
      "sector_count": 492,
      "sector_rank": 195,
      "vs_sector_ratio": null
    },
    "spike_detected": false,
    "spike_ratio": 0.8674,
    "spike_severity": "NORMAL",
    "spike_z_score": -0.42,
    "squeeze_score": 8,
    "ticker": "AAPL",
    "timeseries": [
      {
        "borrow2yr": 3.4659,
        "borrow30": 3.4991,
        "borrow30_ma20": null,
        "date": "2025-06-16",
        "is_spike": false,
        "residualRate": null,
        "term_spread": 0.0332
      },
      {
        "borrow2yr": 3.502,
        "borrow30": 3.4856,
        "borrow30_ma20": null,
        "date": "2025-06-17",
        "is_spike": false,
        "residualRate": null,
        "term_spread": -0.0164
      },
      "...(+250 more items)"
    ],
    "velocity": {
      "borrow_chg_1m": -0.49,
      "borrow_chg_1w": 0.45
    }
  },
  "success": true
}
```

### `GET /api/mcp/data/greeks-exposure/<ticker>`

Unified dealer Greek exposure — DEX, gamma, vega, theta, vanna, charm — by strike or aggregated.

**Parameters:** expiration (optional), aggregate (default true)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/greeks-exposure/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "expirations": [
      "2026-06-17",
      "...(+7 more items)"
    ],
    "expirations_included": 8,
    "exposures": {
      "charm": {
        "call_total": 39115642.69470947,
        "profile": [
          {
            "call": 0.0,
            "net": 0.0,
            "put": 0.0,
            "strike": 245.0
          },
          "...(+263 more items)"
        ],
        "put_total": -1065297109.269453,
        "total": -1026181466.5747436
      },
      "color": {
        "call_total": 9057686.022964306,
        "profile": [
          {
            "call": 0.0,
            "net": 0.0,
            "put": 0.0,
            "strike": 245.0
          },
          "...(+263 more items)"
        ],
        "put_total": -26864455.364830274,
        "total": -17806769.341865968
      },
      "delta": {
        "call_total": 67996821.58185212,
        "profile": [
          {
            "call": 2600.0,
            "net": 2600.0,
            "put": 0.0,
            "strike": 245.0
          },
          "...(+263 more items)"
        ],
        "put_total": 14782928.195324313,
        "total": 82779749.77717644
      },
      "gamma": {
        "call_total": 9311467271.250305,
        "delta_adj_call_total": 4011780284.162427,
        "delta_adj_flip_level": 684.0710981925972,
        "delta_adj_profile": [
          {
            "call": -1.820114758427486e-07,
            "net": -1.820114758427486e-07,
            "put": 0.0,
            "strike": 245.0
          },
          "...(+263 more items)"
        ],
        "delta_adj_put_total": -2688470129.459985,
        "delta_adj_total": 1323310154.7024422,
        "flip_level": 679.537001468298,
        "gex_billions": 1.826074386421358,
        "…": "(+6 more keys)"
      },
      "speed": {
        "call_total": 43026.30677453732,
        "profile": [
          {
            "call": 0.0,
            "net": 0.0,
            "put": 0.0,
            "strike": 245.0
          },
          "...(+263 more items)"
        ],
        "put_total": 68867.37933926749,
        "total": 111893.68611380481
      },
      "theta": {
        "call_total": -23740137.392367635,
        "profile": [
          {
            "call": 0.0,
            "net": 0.0,
            "put": 0.0,
            "strike": 245.0
          },
          "...(+263 more items)"
        ],
        "put_total": 18644069.59992911,
        "total": -5096067.792438526
      },
      "ultima": {
        "call_total": -153156716.04614145,
        "profile": [
          {
            "call": 0.0,
            "net": 0.0,
            "put": 0.0,
            "strike": 245.0
          },
          "...(+263 more items)"
        ],
        "put_total": 180816806.91597304,
        "total": 27660090.86983159
      },
      "vanna": {
        "call_total": 19679208.245740566,
        "profile": [
          {
            "call": 0.0,
            "net": 0.0,
            "put": 0.0,
            "strike": 245.0
          },
          "...(+263 more items)"
        ],
        "put_total": 45252164.47388406,
        "total": 64931372.71962462
      },
      "…": "(+3 more keys)"
    },
    "greek_levels": {
      "charm": {
        "key_strike": {
          "distance_pct": -2.691318199389495,
          "exposure": 96149775.46226907,
          "strike": 730.0
        },
        "max_call": {
          "distance_pct": 0.6411709033711387,
          "exposure": 119048981.61268967,
          "strike": 755.0
        },
        "max_put": {
          "distance_pct": -2.691318199389495,
          "exposure": 175066549.35435,
          "strike": 730.0
        },
        "ratio": 0.036718059548226635
      },
      "color": {
        "key_strike": {
          "distance_pct": -2.691318199389495,
          "exposure": 21909177.698069394,
          "strike": 730.0
        },
        "max_call": {
          "distance_pct": 1.7075674162545413,
          "exposure": 14282354.644565877,
          "strike": 763.0
        },
        "max_put": {
          "distance_pct": -2.691318199389495,
          "exposure": 26967763.47783144,
          "strike": 730.0
        },
        "ratio": 0.33716246616420215
      },
      "delta": {
        "key_strike": {
          "distance_pct": -0.6918247377331149,
          "exposure": 3935492.645779802,
          "strike": 745.0
        },
        "max_call": {
          "distance_pct": 0.6411709033711387,
          "exposure": 1108914.8917098197,
          "strike": 755.0
        },
        "max_put": {
          "distance_pct": -0.6918247377331149,
          "exposure": 1726495.1880129338,
          "strike": 745.0
        },
        "ratio": 4.599685575375981
      },
      "speed": {
        "key_strike": {
          "distance_pct": 1.3076687239232654,
          "exposure": 13808.87824061112,
          "strike": 760.0
        },
        "max_call": {
          "distance_pct": 0.6411709033711387,
          "exposure": 16154.182606759678,
          "strike": 755.0
        },
        "max_put": {
          "distance_pct": -0.6918247377331149,
          "exposure": 18366.89920665287,
          "strike": 745.0
        },
        "ratio": 0.6247704963851318
      },
      "theta": {
        "flip_level": {
          "distance_pct": -19.91160586386116,
          "strike": 600.8151239699
        },
        "key_strike": {
          "distance_pct": 0.6411709033711387,
          "exposure": 1323456.8577001996,
          "strike": 755.0
        },
        "max_call": {
          "distance_pct": 0.6411709033711387,
          "exposure": 2443563.2836108427,
          "strike": 755.0
        },
        "max_put": {
          "distance_pct": -0.6918247377331149,
          "exposure": 3165740.62698207,
          "strike": 745.0
        },
        "ratio": 1.2733345187929304
      },
      "ultima": {
        "flip_level": {
          "distance_pct": -2.053778110177294,
          "strike": 734.782761995261
        },
        "key_strike": {
          "distance_pct": 1.3076687239232654,
          "exposure": 45963249.761216864,
          "strike": 760.0
        },
        "max_call": {
          "distance_pct": 1.3076687239232654,
          "exposure": 51252381.94960803,
          "strike": 760.0
        },
        "max_put": {
          "distance_pct": -2.2914195070582193,
          "exposure": 35146068.42045294,
          "strike": 733.0
        },
        "ratio": 0.8470269918952531
      },
      "vanna": {
        "key_strike": {
          "distance_pct": 1.3076687239232654,
          "exposure": 5455935.242080478,
          "strike": 760.0
        },
        "max_call": {
          "distance_pct": 1.3076687239232654,
          "exposure": 6102422.442606365,
          "strike": 760.0
        },
        "max_put": {
          "distance_pct": -0.6918247377331149,
          "exposure": 5920936.839590971,
          "strike": 745.0
        },
        "ratio": 0.43487882788673754
      },
      "vega": {
        "flip_level": {
          "distance_pct": 1.5933811827951703,
          "strike": 762.1433862952111
        },
        "key_strike": {
          "distance_pct": 1.3076687239232654,
          "exposure": 684973.732406838,
          "strike": 760.0
        },
        "max_call": {
          "distance_pct": 0.6411709033711387,
          "exposure": 970808.3530005451,
          "strike": 755.0
        },
        "max_put": {
          "distance_pct": -0.6918247377331149,
          "exposure": 1151466.4979329612,
          "strike": 745.0
        },
        "ratio": 1.136830755281228
      },
      "…": "(+2 more keys)"
    },
    "key_levels": {
      "call_wall": {
        "distance_pct": 0.6411709033711387,
        "gex": 926673057.5448072,
        "strike": 755.0
      },
      "charm_pressure": {
        "exposure": 96149775.46226907,
        "strike": 730.0
      },
      "key_gamma_strike": {
        "gex": 503497934.8444122,
        "strike": 760.0
      },
      "put_wall": {
        "distance_pct": -0.6918247377331149,
        "gex": 1051823713.2986056,
        "strike": 745.0
      },
      "vanna_resistance": {
        "exposure": -119805.84297888738,
        "strike": 734.0
      },
      "vanna_support": {
        "exposure": 5455935.242080478,
        "strike": 760.0
      },
      "vol_trigger": {
        "distance_pct": -9.418013907370414,
        "strike": 679.537001468298
      }
    },
    "stock_price": 750.19,
    "strikes": [
      245.0,
      "...(+263 more items)"
    ],
    "ticker": "SPY"
  },
  "success": true
}
```

### `GET /api/mcp/data/volume-profile/<ticker>`

Option volume profile by strike (call vs put volume).

**Parameters:** expiration (optional)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/volume-profile/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "expiration": "2026-06-17",
    "put_call_ratio": 0.5379030730704751,
    "stock_price": 299.27,
    "success": true,
    "ticker": "AAPL",
    "timestamp": "2026-06-17T08:31:30.720433",
    "top_oi_strikes": [
      {
        "call_oi": 7045.0,
        "call_volume": 114145.0,
        "distance_from_spot_pct": 0.2439268887626619,
        "moneyness": "ATM",
        "pcr_oi": 0.2887154009936125,
        "pcr_volume": 0.15657278023566518,
        "put_oi": 2034.0,
        "put_volume": 17872.0,
        "strike": 300.0,
        "total_oi": 9079.0,
        "total_volume": 132017.0
      },
      "...(+4 more items)"
    ],
    "top_volume_strikes": [
      {
        "call_oi": 7045.0,
        "call_volume": 114145.0,
        "distance_from_spot_pct": 0.2439268887626619,
        "moneyness": "ATM",
        "pcr_oi": 0.2887154009936125,
        "pcr_volume": 0.15657278023566518,
        "put_oi": 2034.0,
        "put_volume": 17872.0,
        "strike": 300.0,
        "total_oi": 9079.0,
        "total_volume": 132017.0
      },
      "...(+4 more items)"
    ],
    "total_call_volume": 285122.0,
    "total_put_volume": 153368.0,
    "volume_profile": [
      {
        "call_oi": 0,
        "call_volume": 1.0,
        "distance_from_spot_pct": -23.14632271861529,
        "moneyness": "ITM",
        "pcr_oi": 52.0,
        "pcr_volume": 0.0,
        "put_oi": 52.0,
        "put_volume": 0,
        "strike": 230.0,
        "total_oi": 52.0,
        "total_volume": 1.0
      },
      "...(+47 more items)"
    ]
  },
  "success": true
}
```

### `GET /api/mcp/data/max-pain/<ticker>`

Max-pain strike and the pain distribution across strikes.

**Parameters:** expiration (optional)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/max-pain/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "all_strikes": [
      {
        "strike": 230.0,
        "total_pain": 128121000.0
      },
      {
        "strike": 235.0,
        "total_pain": 116903000.0
      },
      "...(+46 more items)"
    ],
    "distance_from_spot": -4.269999999999982,
    "distance_pct": -1.426805226050049,
    "expiration": "2026-06-17",
    "likely_direction": "NEUTRAL",
    "magnet_strength": "WEAK",
    "max_pain_strike": 295.0,
    "max_pain_value": 4242750.0,
    "stock_price": 299.27,
    "success": true,
    "ticker": "AAPL",
    "timestamp": "2026-06-17T08:31:31.146254"
  },
  "success": true
}
```

### `GET /api/mcp/data/monies/<ticker>`

our institutional data feed monies vol surface: the market's smoothed implied surface, the provider's forecast surface, or the comparison of the two (model-vs-market rich/cheap spots).

**Parameters:** surface (optional: 'implied' default, 'forecast', 'comparison')

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/monies/AAPL"
```

Response (sample, arrays trimmed):

```json
{ "data": { "monies": [ {"expirDate", "…delta-smile columns…"}, "…" ] }, "success": true }
```

### `GET /api/mcp/data/correlation/<ticker>`

Rolling correlation and beta vs SPY and the sector ETF.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/correlation/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "best_etf": "XLK",
    "beta": {
      "beta_1m": 0.5,
      "beta_1y": 0.9
    },
    "correlations": {
      "etf_1m": 0.61,
      "etf_1y": 0.44,
      "spy_1m": 0.7,
      "spy_1y": 0.73
    },
    "iv_spy_ratio": 1.5936,
    "price": 299.27,
    "sector": "Technology",
    "ticker": "AAPL"
  },
  "success": true
}
```

### `GET /api/mcp/data/correlation/<ticker>/compare/<ticker2>`

Pairwise correlation/beta between two tickers.

**Parameters:** days (optional, default 400)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/correlation/AAPL/compare/example"
```

Response (sample, arrays trimmed):

```json
{ "data": { "correlation", "beta", "series": ["…"] }, "success": true }
```

### `GET /api/mcp/data/hv-regimes/<ticker>`

Historical-volatility windows, HV term structure, and regime crossovers.

**Parameters:** view (optional: 'dashboard' default, 'signals', 'decomposition', 'ex_earnings') · days (default 252)

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/hv-regimes/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "days": 252,
    "forecast": {
      "orFcst20d": null,
      "orFcstInf": null
    },
    "term_structure": [
      {
        "cls_hv": 18.5,
        "or_hv": 25.91,
        "window": "5d"
      },
      {
        "cls_hv": 26.08,
        "or_hv": 33.08,
        "window": "10d"
      },
      "...(+8 more items)"
    ],
    "ticker": "AAPL",
    "timeseries": [
      {
        "clsHv10d": 17.91,
        "clsHv120d": 41.04,
        "clsHv20d": 20.94,
        "clsHv252d": 32.13,
        "clsHv30d": 27.41,
        "clsHv5d": 18.2,
        "clsHv60d": 50.93,
        "clsHv90d": 44.48,
        "date": "2025-06-16"
      },
      {
        "clsHv10d": 18.05,
        "clsHv120d": 40.98,
        "clsHv20d": 21.07,
        "clsHv252d": 32.16,
        "clsHv30d": 26.2,
        "clsHv5d": 17.64,
        "clsHv60d": 50.83,
        "clsHv90d": 44.53,
        "date": "2025-06-17"
      },
      "...(+250 more items)"
    ]
  },
  "success": true
}
```

### `GET /api/mcp/data/price-context/<ticker>`

Multi-timeframe performance and momentum-vs-IV context.

```bash
curl -H "Authorization: Bearer avmcp_YOUR_TOKEN" \
     "https://apexvol.com/api/mcp/data/price-context/AAPL"
```

Response (sample, arrays trimmed):

```json
{
  "data": {
    "avg_opt_volume_20d": 1167697,
    "best_etf": "XLK",
    "beta_1m": 0.5,
    "beta_1y": 0.9,
    "borrow_30d": 2.58,
    "call_oi": 3040705,
    "call_volume": 579608,
    "contango": 0.34,
    "correl_etf_1y": 0.44,
    "correl_spy_1y": 0.73,
    "daily_change": 0.03,
    "daily_change_pct": 0.01,
    "days_since_hi_52w": 9,
    "days_since_lo_52w": 364,
    "days_to_earnings": 43,
    "…": "(+43 more keys)"
  },
  "success": true
}
```
