{"id":48595254,"url":"https://github.com/FlashAlpha-lab/flashalpha-python","last_synced_at":"2026-04-24T14:01:03.976Z","repository":{"id":344335390,"uuid":"1181046885","full_name":"FlashAlpha-lab/flashalpha-python","owner":"FlashAlpha-lab","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-05T16:49:03.000Z","size":104,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-05T18:23:30.118Z","etag":null,"topics":["0dte","gamma-exposure","greeks","implied-volatility","options","options-analytics","options-api","python","quantitative-finance","sdk","trading","volatility-surface"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FlashAlpha-lab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-13T17:32:52.000Z","updated_at":"2026-04-05T16:49:06.000Z","dependencies_parsed_at":"2026-03-14T17:03:28.123Z","dependency_job_id":null,"html_url":"https://github.com/FlashAlpha-lab/flashalpha-python","commit_stats":null,"previous_names":["flashalpha-lab/flashalpha-python"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/FlashAlpha-lab/flashalpha-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlashAlpha-lab%2Fflashalpha-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlashAlpha-lab%2Fflashalpha-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlashAlpha-lab%2Fflashalpha-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlashAlpha-lab%2Fflashalpha-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FlashAlpha-lab","download_url":"https://codeload.github.com/FlashAlpha-lab/flashalpha-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlashAlpha-lab%2Fflashalpha-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32226408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["0dte","gamma-exposure","greeks","implied-volatility","options","options-analytics","options-api","python","quantitative-finance","sdk","trading","volatility-surface"],"created_at":"2026-04-08T21:00:31.107Z","updated_at":"2026-04-24T14:01:03.967Z","avatar_url":"https://github.com/FlashAlpha-lab.png","language":"Python","funding_links":[],"categories":["Financial Instruments \u0026 Pricing"],"sub_categories":[],"readme":"# FlashAlpha Python SDK\n\n[![PyPI](https://img.shields.io/pypi/v/flashalpha)](https://pypi.org/project/flashalpha/)\n[![Python](https://img.shields.io/pypi/pyversions/flashalpha)](https://pypi.org/project/flashalpha/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![CI](https://github.com/FlashAlpha-lab/flashalpha-python/actions/workflows/ci.yml/badge.svg)](https://github.com/FlashAlpha-lab/flashalpha-python/actions/workflows/ci.yml)\n\n**Python client for the FlashAlpha options analytics API.** Access a **live options screener** (filter/rank symbols by gamma exposure, VRP, IV, greeks, harvest scores, and custom formulas), real-time gamma exposure (GEX), delta exposure (DEX), vanna exposure (VEX), charm exposure (CHEX), 0DTE analytics, Black-Scholes greeks, implied volatility, volatility surfaces, dealer positioning, Kelly criterion sizing, and more — all from Python.\n\n```bash\npip install flashalpha\n```\n\n## Quick Start\n\n```python\nfrom flashalpha import FlashAlpha\n\nfa = FlashAlpha(\"YOUR_API_KEY\")  # Get a free key at flashalpha.com\n\n# Gamma exposure by strike\ngex = fa.gex(\"SPY\")\nprint(f\"Net GEX: ${gex['net_gex']:,.0f}\")\nprint(f\"Gamma flip: {gex['gamma_flip']}\")\n\nfor strike in gex[\"strikes\"][:5]:\n    print(f\"  {strike['strike']}: net ${strike['net_gex']:,.0f}\")\n```\n\nGet your free API key at [flashalpha.com](https://flashalpha.com) — no credit card required.\n\n## Features\n\n### Live Options Screener\n\nFilter and rank symbols in real time across your universe by gamma exposure,\nVRP, implied volatility, greeks, harvest scores, dealer flow risk, and custom\nformulas. Data is live from an in-memory store refreshed every 5-10 seconds.\n\n```python\n# Harvestable VRP setups with low dealer flow risk\nresult = fa.screener(\n    filters={\n        \"op\": \"and\",\n        \"conditions\": [\n            {\"field\": \"regime\", \"operator\": \"eq\", \"value\": \"positive_gamma\"},\n            {\"field\": \"vrp_regime\", \"operator\": \"eq\", \"value\": \"harvestable\"},\n            {\"field\": \"dealer_flow_risk\", \"operator\": \"lte\", \"value\": 40},\n            {\"field\": \"harvest_score\", \"operator\": \"gte\", \"value\": 65},\n        ],\n    },\n    sort=[{\"field\": \"harvest_score\", \"direction\": \"desc\"}],\n    select=[\"symbol\", \"price\", \"harvest_score\", \"dealer_flow_risk\"],\n)\nfor row in result[\"data\"]:\n    print(f\"{row['symbol']}: score={row['harvest_score']} risk={row['dealer_flow_risk']}\")\n\n# Custom formula — rank by IV premium over realized vol\nresult = fa.screener(\n    formulas=[{\"alias\": \"iv_premium\", \"expression\": \"atm_iv - rv_20d\"}],\n    sort=[{\"formula\": \"iv_premium\", \"direction\": \"desc\"}],\n    select=[\"symbol\", \"atm_iv\", \"rv_20d\", \"iv_premium\"],\n    limit=20,\n)\n```\n\nCascading filters on expiries, strikes, and contracts (e.g. `expiries.days_to_expiry`,\n`strikes.call_oi`, `contracts.delta`) trim the tree at each level and return only the\nmatching subtree. See the [Screener spec](https://flashalpha.com/docs/lab-api-screener)\nand [cookbook](https://flashalpha.com/docs/lab-api-screener-cookbook) for all fields,\noperators, and recipes.\n\n### Options Exposure Analytics\n\nGamma exposure, delta exposure, vanna exposure, and charm exposure by strike. See where dealers are positioned and how they need to hedge.\n\n```python\ngex = fa.gex(\"SPY\")                                        # Gamma exposure\ndex = fa.dex(\"AAPL\")                                       # Delta exposure\nvex = fa.vex(\"QQQ\")                                        # Vanna exposure\nchex = fa.chex(\"NVDA\")                                     # Charm exposure\n\nlevels = fa.exposure_levels(\"SPY\")                          # Key levels\nprint(f\"Call wall: {levels['levels']['call_wall']}\")\nprint(f\"Put wall: {levels['levels']['put_wall']}\")\nprint(f\"Gamma flip: {levels['levels']['gamma_flip']}\")\n\nsummary = fa.exposure_summary(\"SPY\")                        # Full summary (Growth+)\nnarrative = fa.narrative(\"SPY\")                              # AI narrative (Growth+)\nprint(narrative[\"narrative\"][\"outlook\"])\n```\n\n### 0DTE Analytics\n\nReal-time zero-days-to-expiration analysis: gamma regime, expected move, pin risk scoring, dealer hedging estimates, theta decay acceleration, and per-strike breakdown.\n\n```python\ndte = fa.zero_dte(\"SPY\")                                    # Growth+\nprint(f\"Pin score: {dte['pin_risk']['pin_score']}/100\")\nprint(f\"Expected move: ±{dte['expected_move']['remaining_1sd_pct']:.2f}%\")\nprint(f\"Theta/hr: ${dte['decay']['theta_per_hour_remaining']:,.0f}\")\nprint(f\"Gamma acceleration: {dte['decay']['gamma_acceleration']}x vs 7DTE\")\n```\n\n### Black-Scholes Greeks and Implied Volatility\n\nFull BSM greeks — first order (delta, gamma, theta, vega, rho), second order (vanna, charm, vomma), and third order (speed, zomma, color, ultima).\n\n```python\ng = fa.greeks(spot=580, strike=580, dte=30, sigma=0.18, type=\"call\")\nprint(f\"Delta: {g['first_order']['delta']}\")\nprint(f\"Vanna: {g['second_order']['vanna']}\")\nprint(f\"Speed: {g['third_order']['speed']}\")\n\niv = fa.iv(spot=580, strike=580, dte=30, price=12.69)\nprint(f\"IV: {iv['implied_volatility_pct']}%\")\n```\n\n### Volatility Analytics\n\nRealized vol, IV-RV spreads, skew profiles, term structure, GEX by DTE, theta decay, put/call breakdowns, OI concentration, hedging scenarios, and liquidity analysis.\n\n```python\nvol = fa.volatility(\"TSLA\")                                 # Growth+\nprint(f\"ATM IV: {vol['atm_iv']}%\")\nprint(f\"RV 20d: {vol['realized_vol']['rv_20d']}%\")\nprint(f\"VRP: {vol['iv_rv_spreads']['assessment']}\")\nprint(f\"Skew 25d: {vol['skew_profiles'][0]['skew_25d']}\")\n```\n\n### Advanced Volatility (SVI, Variance Surfaces, Arbitrage Detection)\n\nRaw SVI parameters per expiry, total variance surface grids, butterfly and calendar arbitrage flags, higher-order greeks surfaces (vanna, charm, volga, speed), and variance swap fair values.\n\n```python\nadv = fa.adv_volatility(\"SPY\")                              # Alpha+\nprint(f\"SVI params: {adv['svi_parameters'][0]}\")\nprint(f\"Arbitrage flags: {len(adv['arbitrage_flags'])}\")\nprint(f\"Var swap fair vol: {adv['variance_swap_fair_values'][0]['fair_vol']}%\")\n```\n\n### Kelly Criterion Position Sizing\n\nOptimal position sizing using numerical integration over the full lognormal distribution — not the simplified gambling formula.\n\n```python\nkelly = fa.kelly(                                            # Growth+\n    spot=580, strike=580, dte=30,\n    sigma=0.18, premium=12.69, mu=0.12,\n)\nprint(kelly[\"recommendation\"])\nprint(f\"Half-Kelly: {kelly['sizing']['half_kelly_pct']}%\")\n```\n\n### Market Data\n\n```python\nquote = fa.stock_quote(\"AAPL\")                              # Live stock quote\nopt = fa.option_quote(\"SPY\", expiry=\"2026-03-21\",           # Option quote (Growth+)\n                       strike=660, type=\"C\")\nsummary = fa.stock_summary(\"SPY\")                           # Comprehensive summary\nsurface = fa.surface(\"SPY\")                                  # Vol surface (public)\n```\n\n### Historical Data (ClickHouse)\n\nMinute-by-minute stock and option quotes from ClickHouse — 3.5 billion rows across 141 tickers.\n\n```python\nhist = fa.historical_stock_quote(\"SPY\", date=\"2026-03-05\", time=\"10:30\")\nhist_opt = fa.historical_option_quote(\n    \"SPY\", date=\"2026-03-05\", expiry=\"2026-03-20\", strike=580, type=\"C\"\n)\n```\n\n### Reference Data and Account\n\n```python\ntickers = fa.tickers()                # All available stock tickers\nchain = fa.options(\"SPY\")             # Option chain metadata\nsymbols = fa.symbols()                # Symbols with live cached data\naccount = fa.account()                # Plan, usage, quota\nhealth = fa.health()                  # API health check (public)\n```\n\n## Error Handling\n\n```python\nfrom flashalpha import (\n    FlashAlpha,\n    AuthenticationError,\n    TierRestrictedError,\n    NotFoundError,\n    RateLimitError,\n)\n\nfa = FlashAlpha(\"YOUR_API_KEY\")\n\ntry:\n    data = fa.exposure_summary(\"SPY\")\nexcept AuthenticationError:\n    print(\"Invalid API key\")\nexcept TierRestrictedError as e:\n    print(f\"Need {e.required_plan} plan (you have {e.current_plan})\")\nexcept NotFoundError:\n    print(\"Symbol not found\")\nexcept RateLimitError as e:\n    print(f\"Rate limited — retry after {e.retry_after}s\")\n```\n\n## API Plans\n\n| Plan | Daily Requests | Access |\n|------|---------------|--------|\n| **Free** | 5 | Stock quotes, GEX/DEX/VEX/CHEX by strike, levels, BSM greeks, IV, historical quotes, tickers, options meta, surface, stock summary |\n| **Basic** | 100 | Everything in Free + index symbols (SPX, VIX, RUT, etc.) |\n| **Growth** | 2,500 | + Exposure summary, narrative, 0DTE analytics, volatility analytics, option quotes, full-chain GEX, Kelly sizing |\n| **Alpha** | Unlimited | + Advanced volatility (SVI, variance surfaces, arbitrage detection, greeks surfaces, variance swap) |\n\nGet your API key at **[flashalpha.com](https://flashalpha.com)**\n\n## All Methods\n\n| Method | Endpoint | Plan |\n|--------|----------|------|\n| `fa.gex(symbol)` | Gamma exposure by strike | Free+ |\n| `fa.dex(symbol)` | Delta exposure by strike | Free+ |\n| `fa.vex(symbol)` | Vanna exposure by strike | Free+ |\n| `fa.chex(symbol)` | Charm exposure by strike | Free+ |\n| `fa.exposure_levels(symbol)` | Key levels (gamma flip, walls, max pain) | Free+ |\n| `fa.exposure_summary(symbol)` | Full exposure summary with hedging | Growth+ |\n| `fa.narrative(symbol)` | AI narrative analysis | Growth+ |\n| `fa.zero_dte(symbol)` | 0DTE analytics (regime, pin risk, decay) | Growth+ |\n| `fa.exposure_history(symbol)` | Daily exposure snapshots | Growth+ |\n| `fa.stock_quote(ticker)` | Live stock quote | Free+ |\n| `fa.option_quote(ticker)` | Option quotes with greeks | Growth+ |\n| `fa.stock_summary(symbol)` | Comprehensive stock summary | Public/Free+ |\n| `fa.surface(symbol)` | Volatility surface grid | Public |\n| `fa.historical_stock_quote(ticker)` | Historical stock quotes | Free+ |\n| `fa.historical_option_quote(ticker)` | Historical option quotes | Free+ |\n| `fa.greeks(...)` | BSM greeks (1st, 2nd, 3rd order) | Free+ |\n| `fa.iv(...)` | Implied volatility solver | Free+ |\n| `fa.kelly(...)` | Kelly criterion sizing | Growth+ |\n| `fa.max_pain(symbol)` | Max pain analysis with dealer alignment, pain curve, pin probability | Growth+ |\n| `fa.screener(...)` | **Live options screener** — filter/rank by GEX, VRP, IV, greeks, formulas | Growth+ |\n| `fa.volatility(symbol)` | Comprehensive volatility analytics | Growth+ |\n| `fa.adv_volatility(symbol)` | SVI, variance surface, arb detection | Alpha+ |\n| `fa.tickers()` | All available stock tickers | Free+ |\n| `fa.options(ticker)` | Option chain metadata | Free+ |\n| `fa.symbols()` | Symbols with live data | Free+ |\n| `fa.account()` | Account info and quota | Free+ |\n| `fa.health()` | Health check | Public |\n\n## Other SDKs\n\n| Language | Package | Repository |\n|----------|---------|------------|\n| JavaScript | `npm i flashalpha` | [flashalpha-js](https://github.com/FlashAlpha-lab/flashalpha-js) |\n| .NET | `dotnet add package FlashAlpha` | [flashalpha-dotnet](https://github.com/FlashAlpha-lab/flashalpha-dotnet) |\n| Java | Maven Central | [flashalpha-java](https://github.com/FlashAlpha-lab/flashalpha-java) |\n| Go | `go get github.com/FlashAlpha-lab/flashalpha-go` | [flashalpha-go](https://github.com/FlashAlpha-lab/flashalpha-go) |\n| MCP | Claude / LLM tool server | [flashalpha-mcp](https://github.com/FlashAlpha-lab/flashalpha-mcp) |\n\n## Links\n\n- [FlashAlpha](https://flashalpha.com) — API keys, docs, pricing\n- [API Documentation](https://flashalpha.com/docs)\n- [Examples](https://github.com/FlashAlpha-lab/flashalpha-examples) — runnable tutorials\n- [GEX Explained](https://github.com/FlashAlpha-lab/gex-explained) — gamma exposure theory and code\n- [0DTE Options Analytics](https://github.com/FlashAlpha-lab/0dte-options-analytics) — 0DTE pin risk, expected move, dealer hedging\n- [Volatility Surface Python](https://github.com/FlashAlpha-lab/volatility-surface-python) — SVI calibration, variance swap, skew analysis\n- [Awesome Options Analytics](https://github.com/FlashAlpha-lab/awesome-options-analytics) — curated resource list\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFlashAlpha-lab%2Fflashalpha-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFlashAlpha-lab%2Fflashalpha-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFlashAlpha-lab%2Fflashalpha-python/lists"}