Edge GEX Lab
A local live map of modeled option gamma exposure (GEX) by strike for SPY, QQQ, SPX, NDX and any
optionable US stock. It shows the call wall, the put wall, every gamma flip, the regime at spot, how big
net GEX is next to the stock's own daily dollar volume, and a trade guidance panel that turns the map
into levels and scenarios with every number traceable to the map. Built for active traders who want to
see where option gamma sits without paying for a GEX service.
- Runs on your computer. No account, no telemetry, the server listens on
127.0.0.1 only. The
only call home is a once-a-day check for a new release, and you can turn it off.
- Every number is shown with how it was made. OI date and source, feed, valuation time, coverage
and the sign assumption are on the map, not in a footnote.
- AI is optional and fenced. The guidance is a deterministic template. "Explain this map" can ask
your local
claude CLI for a narrative; a validator rejects any number or promise not in the data.
- Market data you control. Your own Alpaca keys (the free plan works). REST only, rate capped.
- Free and MIT licensed. No paid tier.
Nov 20, 2026: Cboe now blocks apps from its free delayed quotes. SPX comes from Alpaca since
v1.3.0 (live, from your keys). NDX has no other free source, so its map is unavailable; QQQ tracks the
same index. The Futures view works for SPX and SPY (/ES) and is unavailable for NDX and QQQ (/NQ).
Open interest now comes straight from OCC, the clearing house (v1.3.1, fixed for SPY and QQQ in v1.3.2).
See SPX on Alpaca.
Quick start · Releases · Privacy
What this is not: Not financial advice. Not a signal service. The trade guidance is the textbook
dealer-gamma reading of a model, untested, and says so on screen. Every screenshot below is synthetic
demo data, not live market data.


I Built a Free Gamma Exposure (GEX) Map You Can Understand: what GEX
is and how traders use it, then the tool itself on demo data.
Privacy and your data
Edge GEX Lab runs on your own computer. It needs no account, sends no telemetry, and the server
listens on 127.0.0.1 only.
What stays local
- Your Alpaca keys, in
.env next to this README. They are read, never copied or logged.
- Small caches (option chains, the exchange calendar, daily volume) in
data/, which is not part of
the repo.
External services
Alpaca (your account, REST only): stock trades and daily bars for the spot price and volume, option
contracts and option quotes, SPX included. It receives your API keys and the tickers you open. It never receives an
order: the app calls no trading endpoint and never opens a websocket.
OCC (the options clearing house, public, no account): open interest by contract for every map,
from marketdata.theocc.com, the script address OCC documents for its reports. It receives the ticker
you open and the app's name and version. Downloaded at most once per ticker per 30 minutes. OCC's terms
allow no commercial use; you download it yourself, for personal research. If OCC is unavailable the
map falls back to Alpaca open interest and says so.
Cboe delayed quotes (public, no account): the NDX option chain, from cdn.cboe.com. It receives the
ticker you open. Since Nov 20, 2026 Cboe answers these requests with a block page, so NDX is
unavailable. The app does not try to get around the block. Cboe's site terms restrict automated use of these pages: you fetch them yourself, for
personal research, at your own risk. Do not redistribute the data.
Your local claude CLI (optional): only when you press "Explain this map". It receives the
guidance object for that map and nothing else, runs with every tool, MCP server and setting disabled,
and gets no API key from this app.
GitHub (update check): when the server starts, at most once a day, it asks api.github.com for
this repo's latest release. GitHub sees your IP address and the app version, nothing else: no keys, no
tickers, no settings. If a newer version exists, a banner on the page and a line in the launch.bat
window link to the release notes; nothing is downloaded or installed. It is silent when you are
offline, demo mode never checks, and set GEXLAB_NO_UPDATE_CHECK=1 before launch.bat turns it off.
API keys
Keys live in .env on your machine, which is never committed. Do not share or commit .env files,
caches or screenshots with your account details.
What's inside
- Live map: net GEX by strike (signed, or unsigned by size), the call and put walls, every gamma
flip within 10% of spot, a hypothetical net GEX curve, an expiry picker (opens on the nearest expiry),
refreshed every 60 seconds and valued at the session close when the market is shut. Tickers you
search stay as one-click chips beside the search box (the last 6, kept in your browser).
- Net GEX size: net and gross GEX per 1% move and per typical day (14-session ATR), as a share of
the ticker's 20-day average dollar volume. Indexes show none: their hedging trades mostly in futures.
- Trade guidance: the environment (trend in negative gamma, mean reversion in positive gamma, mixed
when influence is low), levels to watch with distance from spot, 2 to 4 scenarios with entry, stop
and map-level targets (reward at least equal to risk), what would change the picture, and the
formula behind every computed price. No setups on a stale feed, old open interest, or a chain
missing too much of its gamma.
- Coverage you can see: the share of the estimated |GEX| within 5% of spot held by contracts with
usable open interest and IV, and how many contracts were left out and why.
- Futures view: the same levels as /ES or /MNQ equivalents for SPX, NDX, SPY and QQQ, with the
basis estimated from the option chain. See Futures view.
- Vol drift and DEX: whether at-the-money implied volatility is rising or falling since the session
began, and the size of call and put delta exposure from open interest. Context only, labeled
untested. See Vol drift and DEX.
- Present mode (key P): a larger layout for screen recording.
Screenshots
Live map. GEX by strike around spot, with the walls and the gamma flip marked and the method
drawer one click away. Synthetic demo data.

Trade guidance. Levels to watch, scenarios with entry, stop and targets, and the regime change
triggers, each price traceable to the map. Synthetic demo data. For education only, not financial
advice.

Quick start
Requirements: Python 3.11 or newer, Node.js LTS,
and an Alpaca account for its free API keys (every map needs them).
Windows, two steps: download or clone the repo, then double-click
setup.bat, once. It installs everything, builds the web page and creates .env for your keys.
Open .env and paste your Alpaca key and secret.
launch.bat, every time. It opens http://127.0.0.1:8240.
Try it first with no keys and no network: launch.bat demo (or set GEXLAB_DEMO=1 before
starting the server) serves synthetic fixtures for SPY, QQQ, SPX, NDX and NVDA. Every screen carries a
"Synthetic fixture" badge, nothing in it is market data, and it writes only to data/gexlab_demo.db,
so your real install stays empty. Close the window and run launch.bat to switch to your own data.
Manual setup (Mac, Linux, or if you prefer):
python -m venv .venv
.venv/bin/python -m pip install -r requirements.txt # Windows: .venv\Scripts\python
cp .env.example .env # then add your Alpaca keys
cd web && npm ci && npm run build && cd ..
.venv/bin/python -m uvicorn gexlab.api:app --host 127.0.0.1 --port 8240
Install with an AI coding assistant: if you use one (Claude Code, Codex, Cursor or similar), open it
in an empty folder and paste this prompt:
Install Edge GEX Lab on this computer from github.com/simonro/Edge-GEX-Lab. Follow the README Quick start
exactly. First check that Python 3.11+ and Node.js LTS are installed, and if one is missing, tell me
instead of installing it. Then run the setup, start the app and confirm http://127.0.0.1:8240 opens.
Do not add any API keys. Show me where the .env file is so I can paste my own Alpaca keys.
Every install starts empty: no saved maps and no history. Open the page, pick a ticker, and the map
loads from your own data feed.
If the web build fails on Windows with "An Application Control policy has blocked this file":
that is Smart App Control blocking a native build helper. The project builds with the WebAssembly
version of Rollup to avoid it, so delete web\node_modules and run setup.bat again.
Updating to a new release
Your keys (.env) and caches (data/) are not part of a release, so an update never touches them.
When a new release is out, the app tells you with a banner at the top of the page (once a day, see
Privacy above), linking to its release notes.
If you cloned with git: git pull, then setup.bat (it rebuilds the page), then launch.bat.
If you downloaded the ZIP: unzip the new version into a new folder, copy .env across, run
setup.bat once, then launch.bat.
Configuration
| Variable |
Enables |
APCA_API_KEY_ID, APCA_API_SECRET_KEY |
Every map: SPY, QQQ, SPX and stocks (Alpaca quotes, spot and volume). |
ALPACA_MODE |
paper (default) or live: which Alpaca account the keys belong to. Market data is the same. |
ALPACA_ENV_FILE (environment variable, not .env) |
Optional path to a .env file somewhere else that already holds your Alpaca keys, used instead of the .env next to this README. Keys set directly as environment variables win over both. |
GEXLAB_PORT (environment variable, not .env) |
Port for launch.bat and the web dev server's proxy, 8240 by default. Example: set GEXLAB_PORT=8250 then launch.bat. For the manual start, pass the same number to --port. |
GEXLAB_NO_BROWSER (environment variable, not .env) |
1 stops launch.bat from opening your browser. |
GEXLAB_NO_UPDATE_CHECK (environment variable, not .env) |
1 turns off the once-a-day check for a new release on GitHub. |
GEXLAB_DEMO (environment variable, not .env) |
1 serves the synthetic demo fixtures, the same as launch.bat demo. |
GEXLAB_RECAP_MODEL (environment variable, not .env) |
Optional model name passed to your claude CLI for "Explain this map". |
How it works
- GEX per contract = sign x gamma x open interest x 100 x spot squared x 0.01: dollars of dealer
delta change per 1% move. Gamma is Black-Scholes with r = q = 0, a stated approximation.
- The sign is an assumption. Calls count as positive gamma and puts as negative (dealers long
calls, short puts). Real positioning is not public; the unsigned view drops the assumption.
- Open interest is daily and one session behind for every tool, because OCC publishes it once a
day. Since v1.3.1 it comes straight from OCC, joined to Alpaca's contracts by OCC symbol (before, from
Cboe's payload, which now blocks apps). OCC prints no date, so the date is inferred: Alpaca's when the
numbers match Alpaca's, otherwise the session before the download day, and one session earlier for a
download before 07:00 ET. If OCC is unavailable the map falls back to Alpaca open interest, which
usually runs one session older still, and says so. The OI date is on the map.
- Feeds. Alpaca OPRA (paid) gives live quotes and the IV is solved from the mid; Alpaca's free
indicative feed gives a modified quote with its own IV. Alpaca computes no IV for contracts that expire
today, so on the free feed the app solves those from the indicative mid the same way it does on OPRA.
Checked side by side against OPRA on SPY and QQQ through a session, the walls matched and the flip
stayed within 0.25% of spot, but net GEX for today's expiry was off by as much as half. Trust the
levels on the free feed more than the bar sizes. SPX works differently, see SPX on Alpaca.
The map labels which feed you are looking at.
- Valuation clock. Time to expiry is measured from the quote time, and from the session close when
the market is shut, so a weekend map is not distorted.
SPX on Alpaca