massive-options-data ยท v1.2.1 ยท 2026-05-20 ยท sha256 261e920e747eadc3

massive-options-data v1.2.1A

Immutable. This exact content is served forever at /api/v1/blob/261e920e747eadc3.

---
name: massive-options-data
version: 1.2.1
description: "Massive (formerly Polygon) US options market data โ€” option chain snapshots, contract snapshots, trades, quotes, aggregates, contract reference, greeks/IV/OI passthrough"
delivery: script
metadata:
  starchild:
    emoji: "๐Ÿงฉ"
    skillKey: massive-options-data
    requires:
      env:
        - MASSIVE_API_KEY

user-invocable: false
disable-model-invocation: false
---

# Massive Options Data

Data supply layer for US options market data. Wraps the Massive (Polygon)
options REST endpoints with a thin, predictable Python interface.

This skill does NOT generate strategies, signals, rankings, or trading
advice โ€” it only exposes options data.

## Plan: Starter โ€” REAL field availability

We are on **Massive Options Starter ($29/mo)**. The official docs list more
fields than this plan actually returns. Build your callers against what's
actually present, not what the docs imply:

| Field | Starter returns? | Notes |
|---|---|---|
| `details.*` (ticker, strike, expiration, type) | โœ… | Always present. |
| `implied_volatility` | โœ… | Per contract. |
| `greeks` (delta, gamma, theta, vega) | โœ… | Per contract. |
| `open_interest` | โœ… | Per contract. |
| `day.{open,high,low,close,volume,vwap}` | โœ… | **Option prices** (previous session OHLC), 15-min delayed. |
| `underlying_asset.ticker` | โœ… | Just the ticker string. |
| `underlying_asset.price` | โŒ | **Not returned**. |
| `last_quote` (bid/ask) | โŒ | **Not returned**. Cannot calculate real-time bid-ask spread. |
| `last_trade` | โŒ | **Not returned**. |
| Historical IV / IV Rank / IV Percentile | โŒ | Not exposed on any plan; you must build your own historical IV series. |

**Recommended workaround for missing underlying price:**
```python
# Combine with twelvedata skill for precise ATM filtering
chain = massive_option_chain_snapshot("AAPL")
ticker = chain["results"][0]["underlying_asset"]["ticker"]
spot_data = twelvedata_price(symbol=ticker)  # from twelvedata skill
spot_price = float(spot_data["price"])
# Now filter by actual strike vs. spot range instead of delta approximation
```

If you need real-time bid/ask quotes or trade ticks, upgrade to **Developer ($79/mo)** or **Advanced ($199/mo)**.

## Pagination โ€” required for any DTE-range scan

Chain snapshots paginate by `ticker` sort order. A 250-row first page often
covers just one expiration. To get all contracts in a DTE window you MUST
walk `next_url` (see `massive_paginate` in `exports.py`). Skipping this is
the #1 reason a "0 results" scan looks broken.

Typical chain sizes for a single underlying with one expiration window can
exceed 450 contracts. Allow at least 4 pages.

## Script Usage

```bash
python3 - <<'EOF'
import sys, json
sys.path.insert(0, "/data/workspace/skills/massive-options-data")
from exports import (
    massive_option_chain_snapshot,
    massive_option_contract_snapshot,
    massive_option_trades,
    massive_option_quotes,
    massive_option_aggregates,
    massive_list_contracts,
    massive_paginate,
)

snap = massive_option_chain_snapshot(underlying="SPY", limit=10)
print(json.dumps(snap.get("results", [])[:2], indent=2))
EOF
```

## Functions (`exports.py`)

| Function | Endpoint | Purpose |
|---|---|---|
| `massive_option_chain_snapshot(underlying, **filters)` | `GET /v3/snapshot/options/{underlying}` | Full chain snapshot (price/greeks/IV/OI; quote+trade missing on Starter). |
| `massive_option_contract_snapshot(underlying, option_ticker)` | `GET /v3/snapshot/options/{underlying}/{contract}` | Single contract snapshot. |
| `massive_list_contracts(underlying_ticker=None, **filters)` | `GET /v3/reference/options/contracts` | Reference list of option contracts (active or expired). |
| `massive_option_trades(option_ticker, **range)` | `GET /v3/trades/{option_ticker}` | Historical trade ticks. **Returns 403 on Starter.** |
| `massive_option_quotes(option_ticker, **range)` | `GET /v3/quotes/{option_ticker}` | Historical NBBO quotes. **Returns 403 on Starter.** |
| `massive_option_aggregates(option_ticker, multiplier, timespan, from_, to, **opts)` | `GET /v2/aggs/ticker/{ticker}/range/...` | OHLCV bars for an option contract. Minute bars on Starter, all bars on Developer+. |
| `massive_paginate(url, params=None, max_pages=20)` | โ€” | Walk `next_url` cursor pagination. |

All functions return the raw JSON from upstream. HTTP errors raise via
`Response.raise_for_status()`.

## Hardening notes

- **Probe first, code second.** Before writing a filter pipeline against a
  new endpoint, dump one full record and inspect actual fields. Saves hours
  of "why is everything filtered out?" debugging.
- **Null handling.** `greeks`, `last_quote`, `last_trade` may be absent;
  keep as `None`, never fabricate.
- **Caller-id.** Every call should include a `caller_id` so transparent-proxy
  can attribute usage.

## Credentials

Set `MASSIVE_API_KEY` via the agent's secure input flow. The key is injected
by sc-proxy when present; the local script also reads it from the
environment so it works in BYOK setups.

## Source of truth
- Massive options docs: https://massive.com/docs/rest/options/overview
- Follow official field names; when upstream changes the contract, update
  this skill rather than papering over it in callers.