8-k-scanner
Scan SEC 8-K disclosures across a single ticker or a watchlist using Massive's pre-parsed disclosure taxonomy. Groups the underlying rows by filing (one 8-K…
Foundation skill for any REST workflow hitting api.massive.com. Use when calling any /v1, /v2, /v3 endpoint. Covers auth header, rate limit handling, pagination, and the best-price fallback chain. Every other REST-using skill depends on this.
$ npx -y skills add rgourley/quant-garage --skill massive-api-patterns --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/massive-api-patternsContext preview
The summary Claude sees to decide when to auto-load this skill.
Foundation skill for any REST workflow hitting api.massive.com. Use when calling any /v1, /v2, /v3 endpoint. Covers auth header, rate limit handling, pagination, and the best-price fallback chain. Every other REST-using skill depends on this.
name: massive-api-patterns description: Foundation skill for any REST workflow hitting api.massive.com. Use when calling any /v1, /v2, /v3 endpoint. Covers auth header, rate limit handling, pagination, and the best-price fallback chain. Every other REST-using skill depends on this.
The REST foundation. Every skill that calls `api.massive.com` reads these rules first.
API key goes in the `Authorization` header as a bearer token:
Authorization: Bearer ${MASSIVE_API_KEY}Query-string auth (`?apiKey=...`) also works but logs the key in URLs. Use the header.
requests per second to avoid throttling.
The skills in this repo declare their rate assumptions in `requires.yml`. A skill that fans out parallel calls will warn the user if it detects a free key.
Always handle 429 explicitly: back off with exponential delay, retry once, then surface the error.
List endpoints return a `next_url` field when more results exist:
{
"results": [...],
"next_url": "https://api.massive.com/v3/reference/tickers?cursor=..."
}Follow `next_url` directly, don't reconstruct it. The cursor is opaque and includes auth context.
Never quote a price from a single field. The v2 snapshot response nests everything under `ticker`, so all reads start there. Walk this 4-step chain and stop at the first non-null value:
1. `snapshot.ticker.lastTrade.p` (most recent trade across exchanges) 2. `snapshot.ticker.min.c` (current minute bar close, intraday only) 3. `snapshot.ticker.day.c` (today's session close) 4. `snapshot.ticker.prevDay.c` (previous session close, off-hours or quiet names)
Always emit the timestamp of whichever field won so the caller knows how stale the price is. `lastTrade.t` and `min.t` are nanosecond epochs; the daily fields don't always carry a timestamp.
`lib/quant_garage/snapshot.py::resolve_price` is the canonical implementation. Every skill in this repo that needs a current price imports it rather than rewriting the walk.
This is the generic REST pattern. Massive's proprietary **FMV** metric is a different thing (Business plan, stream-only on the WebSocket FMV channel) and not what these skills mean by "fair value." It is not a field on the v2 snapshot response.
| Code | Meaning | What to do | |---|---|---| | 401 | Bad or missing API key | Surface immediately, don't retry | | 403 | Endpoint not available on user's plan | Surface with plan upgrade hint | | 404 | Ticker or contract not found | Skip, don't retry | | 429 | Rate limited | Back off, retry once | | 5xx | Server error | Retry with exponential backoff, max 3 attempts |
Stocks REST is 15-minute delayed on Basic, Starter, and Developer tiers. Real-time stocks need Advanced. Options REST is real-time on Developer and above. Crypto REST is real-time on Developer.
If a skill needs real-time, declare `realtime: yes` in `requires.yml` and fail fast if the user's tier doesn't support it.
curl -sS --max-time 15 \
-H "Authorization: Bearer ${MASSIVE_API_KEY}" \
"https://api.massive.com/v2/snapshot/locale/us/markets/stocks/tickers/AAPL"The response includes the full snapshot. Walk the fallback chain to pick the price field, then emit `{ticker, price, source_field, timestamp}`.
WebSocket streaming patterns (see [`massive-websockets`](../massive-websockets)) and bulk flat-file downloads (see [`massive-flat-files`](../massive-flat-files)).
Trade like a pro. Without the terminal. View the full landing page → Quant and equity research tools that run inside Claude, or behind your own UI.
Scan SEC 8-K disclosures across a single ticker or a watchlist using Massive's pre-parsed disclosure taxonomy. Groups the underlying rows by filing (one 8-K…
Track sell-side analyst positioning on a name via Benzinga Analyst Ratings. Pulls every rating event over the lookback window, classifies each as upgrade /…
Build a clean, point-in-time, ready-to-backtest OHLCV dataset for a US equity universe across an arbitrary date window. Emits parquet plus a manifest plus an…
Bayesian Online Change-Point Detection (BOCPD) on a ticker's daily log returns. Detects points in time where the return-generating distribution changed (regime…
Single-commodity macro read. Answers "is this commodity in a winning or losing macro setup right now" and names the macro driver that dominates it. Pulls one…
Reconcile a position file against splits, dividends, and spinoffs to catch breaks before they hit P&L or T+1 settlement. Use when an operator hands over a CSV…