How we replaced fragile live NSE feeds with a Black-Scholes option-chain simulation that never goes down
When every live option-chain feed we tried was rate-limited, token-expiring, delayed or empty on weekends, we stopped consuming feeds and started generating the chain ourselves — a real-Greeks synthetic chain behind a single swappable data layer.
Visit the live productThe problem
Free options analytics looks easy until you depend on a live option chain. Every public and broker source we evaluated failed in a different way: NSE behind Akamai rate-limits and blocks, broker APIs with tokens that expire mid-session, Yahoo data delayed by 15 minutes, and — worst of all — empty or stale data on weekends and holidays that turned the whole product into a wall of 503s exactly when curious users had time to explore it.
For a free, SEO-driven product the economics do not support a paid market-data vendor, and the user expectation is a tool that always responds. A loading spinner or an error page on a Sunday afternoon is a bounced visitor and a lost referral.
So the requirement inverted: instead of fighting to keep a fragile real feed alive, we needed a data source that is always available, always well-formed, and honest about what it is.
The architecture
- We generate the option chain ourselves with a Black-Scholes pricing engine that produces real Greeks (delta, gamma, theta, vega), a volatility smile/skew, ATM-peaked open interest, and an NSE-style weekly/monthly expiry calendar.
- The synthetic chain is anchored on a live spot price where available, with a per-symbol baseline fallback so the engine never throws and always returns a populated, plausibly-shaped chain — including weekends.
- A single data-access module (marketApi.js) is the only swap point: every consumer in the app routes through it, so the underlying source can change without touching feature code.
- On top of the chain sit paper trading and strategy backtests over 8+ years of data, plus a large programmatic-SEO content engine generating data-driven /strategies, /brokers and /learn pages.
- Next.js 16 + Firebase for app and auth, Razorpay for payments, and a Dhan broker referral as the revenue path — with pricing honestly labeled "simulated."
The AI stack
Engineering challenges
Live feeds that fail in four different ways
Akamai blocks, expiring broker tokens, 15-minute Yahoo delay, and empty weekend data each demanded their own retry, caching and error-handling code, and even then the product was only as reliable as the worst source on any given day. We concluded the dependency itself was the bug, not the integration quality.
Making "synthetic" actually trustworthy
A fake chain is worthless if it is not shaped like a real one. The engine prices every strike with Black-Scholes, applies a volatility smile so wings are priced correctly, peaks open interest around ATM, and respects NSE’s weekly/monthly expiry structure — so strategy P&L and Greeks behave the way a trader expects. We then label it honestly as simulated pricing rather than passing it off as live.
Never throwing, ever
Anchoring on a live spot is best-effort; if the spot lookup fails, the engine falls back to a per-symbol baseline and still returns a complete chain. The contract is that the data layer cannot raise — which is why the product serves traffic 24/7, including weekends and holidays when every real feed is dark.
Keeping the swap reversible
By funneling every consumer through one module (marketApi.js), the choice between synthetic and live is a one-file decision. If a reliable real feed becomes affordable later, we swap the implementation without rewriting features — the abstraction is the insurance policy.
The result
- Zero feed-driven outages: the product responds 24/7, including weekends and holidays.
- Greeks, smile and OI behave like a real chain, so backtests and paper trades are meaningful — and labeled honestly as simulated.
- A single data-layer abstraction keeps the source swappable with one file changed.
- 8+ years of backtest history powers paper trading and a large pSEO content surface.
Lessons we'd bring to your build
- Sometimes the most reliable integration is no integration — model the data yourself when every upstream source is a liability.
- A simulation is only credible if it is shaped correctly; invest in the financial math (Greeks, smile, OI, expiry calendar), not just plausible numbers.
- Put a single swap-point between your app and any external data; it converts a vendor decision into a one-file change.
- Be honest about synthetic data in the UI — transparency is what lets a "simulated" product still earn trust.
Planning something like this?
We bring the same production discipline to client builds. Tell us the problem you're solving and we'll map an approach.
Book a discovery call