Skip to content

feat: add expiry-impact and strike-dependency - #6

Merged
tomaszdobrowolski1 merged 1 commit into
mainfrom
feat/expiry-impact-strike-dependency
Nov 19, 2026
Merged

tomaszdobrowolski1 merged 1 commit into
mainfrom
feat/expiry-impact-strike-dependency

Conversation

@tomaszdobrowolski1

Copy link
Copy Markdown
Contributor

Adds two SPY/QQQ exposure endpoints (Growth+) to the live SDK.

Added

  • fa.expiry_impact(symbol, *, expiry=None, limit=None) for GET /v1/exposure/expiry-impact/{symbol}. expiry and limit are left out of the query string when not given.
  • fa.strike_dependency(symbol, *, strike) for GET /v1/exposure/strike-dependency/{symbol}. strike is sent as exact decimal text (672.5 -> 672.5, never scientific notation).
  • Typed ExpiryImpactResponse and StrikeDependencyResponse with the response envelope (endpoint_version, data_as_of), plus GammaContextMetadata, GammaContextReason, GammaTotals, GammaExpiryRow, GammaStrikeImpact, GammaRemovalImpact and GammaContextFact. All exported from flashalpha.
  • Docs: README section and method rows, docs/api.md reference and index lines, CHANGELOG 1.5.0, llms.txt, AGENTS.md.
  • Version 1.5.0 in pyproject.toml and __version__.

Tests

  • 14 new unit tests against real production responses (tests/fixtures/): routes and exact query strings (including the 672.5 strike and the omitted-optional case), nested typed values, 403 TierRestrictedError, 422 unsupported_symbol, 404 strike_not_found. The envelope guard also covers the two new response types.
  • Full suite: 189 passed, 94 skipped (integration tests, no key set). Baseline on main: 173 passed, 94 skipped. No failures.

Live check (production, through the new methods)

  • expiry_impact("SPY", limit=3): selected expiry 2026-11-19, removed_gross_share_pct 4.37, net_sign_changed false, 3 reduction rows (first strike 740), 491 strikes, data_as_of.node fa4.
  • strike_dependency("SPY", strike=670): 48 contracts, 29 expiry rows, dominant expiry 2026-12-18 at 22.97%.

🤖 Generated with Claude Code

Adds `fa.expiry_impact(symbol, expiry=None, limit=None)` for
`GET /v1/exposure/expiry-impact/{symbol}` and
`fa.strike_dependency(symbol, strike=...)` for
`GET /v1/exposure/strike-dependency/{symbol}` (SPY and QQQ, Growth+).

Typed `ExpiryImpactResponse` and `StrikeDependencyResponse` carry the
response envelope, with shared `Gamma*` models for totals, strike rows,
expiry rows, the removal impact and facts. `strike` is sent as exact
decimal text (672.5 -> "672.5"); `expiry` and `limit` are omitted when not
given. Unit tests use real production responses as fixtures.

Docs: README section and method rows, docs/api.md reference, CHANGELOG,
llms.txt and AGENTS.md. Version 1.5.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tomaszdobrowolski1
tomaszdobrowolski1 merged commit d23f0df into main Nov 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants