Mission 01
ChainDeck
A live NIFTY 50 options analytics dashboard: OI buildup, Max Pain, Gamma Exposure, volatility panels and alerts, computed from live NSE data.
- Status
- Deployed
- Stack
- JavaScript · Node.js · Express.js · Upstash Redis · Vercel

- 01
Composite market regime. Combines the individual signals into one plain-language regime, with a signal-agreement score.
- 02
Live trade setup. Bias, key target, invalidation level and strategy, synthesised from CPR, gamma zero-gamma level, PCR rate of change and straddle bounds.
- 03
Smart money flow. Flags unusual open-interest moves as they happen, for example a rapid put unwinding at a strike.
- 04
Open interest and velocity. Total call and put open interest with the 5-minute and 15-minute rate of change.
- 05
Key levels. Max Pain, the largest call and put walls and how strong each is.
Overview
ChainDeck (formerly Nifty OI Tracker) is a live, auto-refreshing dashboard for NIFTY 50 options traders. It pulls the option chain from NSE and turns it into signals: Open Interest buildup, Put-Call Ratio, Max Pain, Central Pivot Range, Gamma Exposure with the zero-gamma level, 25-delta risk reversal and a composite market regime that feeds a plain-language trade setup.
Recent work added a rolling ATM straddle panel, an IV vs realised volatility view on a trading-time basis (with IV percentile against saved sessions), a strike-wise OI structure chart, and configurable browser alerts. Under the hood, Max Pain uses prefix sums instead of a brute-force O(n²) scan, unusual OI flow is flagged with Welford's online algorithm, and cosine similarity over session feature vectors surfaces days that looked like today.
Intraday snapshots (about one a minute) are stored on Upstash Redis over REST, which powers the timeline chart, the 5m/15m rate-of-change figures and end-of-day session summaries, with an in-memory fallback when no database is configured. A caching Express proxy with request coalescing handles NSE's cookie and header requirements. The app is hardened with a strict Content-Security-Policy, no third-party assets, input validation, rate limiting and authenticated cron endpoints, and ships with a verification test suite.
Highlights
- Live NSE option chain through a caching Express proxy
- Max Pain via prefix sums, plus Gamma Exposure and zero-gamma level
- Composite market regime and auto-generated trade setup
- Rolling ATM straddle and IV vs realised volatility panels
- Welford's algorithm for unusual-flow detection, cosine similarity for session matching
- Intraday history on Upstash Redis with in-memory fallback
- Configurable browser alerts and strike-wise OI structure chart
- Strict CSP, input validation, rate limiting and a test suite
Flight log
- 01
Welford's algorithm: mean and variance in one pass
How to keep a running mean and variance without storing history, why the textbook shortcut fails, and how I use it to flag unusual option flow.
- 02
ChainDeck: turning an option chain into signals
How a raw NSE option chain becomes Max Pain, gamma exposure, volatility panels and a market regime, and why prefix sums, Welford's algorithm and a boring storage layer do the heavy lifting.