An editorial blog on society, technology and ideas — by Kartikey Kumar.
Advertisement

NexTrade: The Indian Stock Market Platform I Built Because Nothing Else Was Good Enough

FINANCE · THE SOCIAL

I Built a Stock Market Platform.Here Is Everything It Can Do.

NexTrade is a full-stack Indian market simulator — live data, a capital gainstax calculator, 5,000+ stocks, and a trading engine built from scratch.

By Kartikey Kumar  ·  The Social  ·  May 2026  ·  12 min read



There is a certain kind of frustration that comes from staring at a broker's interface and realising that the tool you are using to make decisions about your money was designed somewhere between 2009 and an afterthought. The charts are static, the tax implications are invisible, and the words "Please call your relationship manager" appear somewhere in the footer.

That frustration is what NexTrade was built to answer. It is a web-based Indian stock market platform built entirely from scratch — vanilla HTML, CSS, and JavaScript on the front end, a FastAPI proxy on the back — that pulls live data from NSE and BSE and gives you a Bloomberg-quality interface without the Bloomberg subscription. It covers over 5,000 listed stocks, tracks global indices, renders a real-time market heatmap, calculates your SIP and lumpsum returns with capital gains tax and inflation already priced in, and lets you paper-trade against a virtual ₹10,00,000 portfolio.

This is a full technical walkthrough of what it does, how each section works, and why some of the design decisions matter for anyone who takes Indian equity markets seriously.


image.png

The NexTrade live dashboard: NIFTY 50, SENSEX, BANK NIFTY and NIFTY IT cards with sparklines and a Fear & Greed gauge, updating every 10 seconds.

The Dashboard: Four Indices, One Fear & Greed Gauge

The opening view on NexTrade is its live dashboard. The first thing you see are four index cards — NIFTY 50, SENSEX, BANK NIFTY, and NIFTY IT — each showing the last traded price, the day's percentage change, and a mini sparkline chart. Values update every ten seconds via a price simulation engine that applies a small random drift (±0.3%) on top of data fetched from Yahoo Finance.

Below the index cards sits a Fear & Greed Index gauge, rendered as an SVG arc dial. The gauge pulls market data through NexTrade's FastAPI proxy backend, which whitelists only trusted sources (Yahoo Finance, Stooq, Google News RSS) and rate-limits calls to 120 requests per minute. When live data is unavailable, the platform degrades gracefully to simulated values rather than blank boxes.

Top Gainers and Top Losers panels sit directly below, updated from the same price engine. A Sector Performance column shows all ten tracked sectors and their aggregate day change, letting you read the market mood at a glance without clicking anywhere.


image.png

The All Stocks view: 5,000+ NSE and BSE companies with real-time prices, sector filters, sortable columns, and one-click trade buttons.

5,000+ Stocks: NSE and BSE, Sortable and Filterable

The Stocks section is where the breadth of the platform becomes apparent. NexTrade lists over 5,000 companies across NSE and BSE, with real-time last traded prices, day change percentages, 52-week high and low ranges, market capitalisation, P/E ratio, and sector classification on each row.

You can filter by ten sector categories or sort by Market Cap, Price, Percentage Change, or Name. Pagination keeps the interface fast even at scale. Each row has an action button that opens a full stock detail modal: a one-day price chart, key fundamentals, and a trade panel where you can place a virtual BUY or SELL order using CNC, MIS, or NRML product types.

The search bar at the top performs a live autocomplete across the full stock list — searching symbol, company name, and keyword tags simultaneously. Typing "jio" returns Reliance Industries. Typing "ants" returns HDFCBANK. The keyword field in the stock data is one of the less-visible but more useful engineering decisions in the codebase.


image.png

The SIP Calculator with LTCG at 12.5% and CPI inflation at 5.1% applied. The year-by-year projection table shows compounding after tax and real purchasing power are both accounted for.

The Investment Calculator: Where Tax and Inflation Finally Enter the Room

This is the section built most deliberately, because it addresses a gap that almost every SIP calculator in India shares: they show you a corpus value that pretends tax does not exist and that ₹100 ten years from now is worth ₹100 today. NexTrade's Investment Calculator has three modes.

SIP Calculator

Enter your monthly SIP amount, duration in years (1 to 30), expected annual return (1% to 30%), Capital Gains Tax rate, and inflation rate. The calculator defaults to legally correct values: 12.5% LTCG on equity gains held for more than one year (per Budget 2024, Ministry of Finance), and 5.09% CPI inflation (Consumer Price Index, March 2025, Reserve Bank of India).

The output shows six figures simultaneously: Total Invested, Gross Returns, Gross Value, Real Net Gain after tax and inflation, After-Tax Value, and Real Value (inflation-adjusted). A stacked bar chart visualises the ratio between invested capital, gross returns, after-tax value, and real value. Below that, a year-by-year projection table breaks down invested corpus, gross value, returns, and cumulative gain percentage for every year of the investment.

The capital gains tax calculation is applied to the return component only, not the invested principal — consistent with how Section 112A of the Income Tax Act works. Short-term capital gains (holdings under one year) are taxed at 20%. Both rates are noted clearly in the interface.

Lumpsum Calculator

The same tax and inflation logic applies to a one-time investment. Enter a lump sum amount, duration, expected return, and the same two adjustment sliders. The output gives you the full picture of what a single deployment of capital actually produces after the government and inflation take their cuts.

What-If Machine

Pick any stock from the NexTrade database, enter a hypothetical one-time investment, and specify how many years ago you would have made it (1 to 15 years). The calculator fetches the historical price for that stock and computes what your investment would be worth today — a way to run historical hypotheticals on Indian equities without a separate spreadsheet.


image.png

The Market Heatmap: a treemap where cell size represents market cap and colour represents day change. Green is up, red is down, organised by sector.

Market Heatmap: The Whole Market on One Screen

The Market Heatmap renders a treemap of the Indian equity universe. Each cell represents a stock: its size is proportional to market capitalisation, and its colour indicates day percentage change on a gradient from deep red (down 3%+) through neutral to deep green (up 3%+). The layout is organised by sector, with sector labels and average sector change shown as group headers.

You can filter by sector tab — Technology, Finance, Energy, Consumer, Healthcare, Auto, Infrastructure, Metals, Telecom — or view all stocks simultaneously. The live ticker bar across the top scrolls NSE and BSE prices alongside BTC, ETH, SOL, and BNB, colour-coded in real time, giving you macro context regardless of which section you are in.


image.png

Screener Pro: filter by sector, price range, P/E range, and day change simultaneously, with real-time stock data and one-click Buy buttons.

Screener Pro: Multi-Criteria Stock Filtering

The Advanced Screener Pro allows you to filter the full stock list by multiple criteria simultaneously: sector, minimum and maximum price, minimum and maximum P/E ratio, minimum day change percentage, and sort order. The results run directly against NexTrade's own price engine, so they reflect the same live-updated prices visible everywhere else on the platform.

The Technical Screener, accessible separately from the sidebar, layers RSI signals (RSI < 30 for oversold, RSI > 70 for overbought) and momentum indicators on top of the same dataset, auto-computing Strong Buy, Buy, Neutral, Sell, and Strong Sell signals for every tracked stock.


image.png

Global Markets: live prices for international indices, commodities, major forex pairs, and cryptocurrencies via Yahoo Finance.

Global Markets: Indices, Commodities, Forex, and Crypto

The Global Markets section pulls live prices from Yahoo Finance across four asset classes:

  • Indices: S&P 500, NASDAQ, Dow Jones, FTSE 100, DAX, Nikkei 225, Hang Seng, Shanghai Composite.

  • Commodities: Brent Crude, WTI Crude, Gold, Silver, Natural Gas, Copper.

  • Forex: USD/INR, EUR/INR, GBP/INR, JPY/INR, and other major pairs.

  • Crypto: BTC, ETH, SOL, BNB — updating on the same cycle as equity prices.


image.png

The IPO Centre: upcoming, open, and recently listed IPOs with subscription dates, lot sizes, issue prices, and sector tags.

IPO Centre and Mutual Funds

The IPO Centre lists upcoming, currently open, and recently listed IPOs with subscription open and close dates, lot sizes, issue price bands, minimum investment amounts, and sector tags. It is filterable by status so you can focus on what is open now or prepare for what is coming.


image.png

Top Mutual Funds: SEBI-registered direct plans with 1Y and 3Y returns, AUM, risk rating, and an integrated SIP/lumpsum investment flow.

The Mutual Funds section covers SEBI-registered direct plans across nine categories: Large Cap, Mid Cap, Small Cap, Flexi Cap, ELSS (Tax Saver), Hybrid, Debt, Index Fund, and Sectoral/Thematic. Each fund shows NAV, 1-year and 3-year annualised returns, AUM in crores, risk level, and a star rating. The SIP and lumpsum investment flow inside each fund card connects to the same virtual portfolio engine that handles equity trades.


image.png

The Brokerage Calculator: every NSE/BSE transaction charge broken out individually — brokerage, STT, GST, SEBI fees, and stamp duty — for all four segments.

Brokerage Calculator and Options Strategy Builder

The Brokerage Calculator computes the actual cost of a trade. Enter the transaction value for Equity (Delivery or Intraday), F&O (Futures or Options), Currency, or Commodity, and the calculator breaks down every charge individually: brokerage, Securities Transaction Tax, exchange transaction fee, GST at 18%, SEBI charges, and state-specific stamp duty. Total buy cost, total sell cost, and net P&L after all charges are shown together.

This matters because the spread between gross P&L and net P&L on intraday equity trades is frequently the difference between a profitable and an unprofitable session, and most traders calculate it only retrospectively. Having it in the platform before you place an order closes that information gap.

The Options Strategy Builder allows you to construct multi-leg options positions — bull call spreads, bear put spreads, straddles, strangles, iron condors — and renders a payoff diagram showing your maximum profit, maximum loss, and breakeven points visually. Greeks (Delta, Gamma, Theta, Vega) are computed for each leg and displayed in a table below the chart.


image.png

The Trade Journal: an equity curve, P&L analytics, and a full trade history for the virtual account, entries colour-coded by profit or loss.

Trade Journal and Portfolio Mechanics

Every trade placed on NexTrade — against a starting virtual balance of ₹10,00,000 — is logged to a Trade Journal. The journal renders an equity curve showing how your virtual portfolio value has moved over time, alongside aggregate P&L analytics (total trades, win rate, average gain, average loss) and a line-by-line trade history table showing symbol, side, quantity, execution price, estimated P&L, and order type.

The Portfolio section shows current holdings with average cost, last traded price, total invested value, current value, and absolute and percentage P&L for each position, plus a portfolio donut chart breaking allocation by sector. The virtual balance mechanics are straightforward: BUY deducts from the available balance, SELL adds back. Position sizing and margin requirements are computed in real time on the order modal before you confirm.


Additional Tools: Calendar, Dividends, Earnings, and Market Pulse

Several sections of NexTrade are designed for research and context rather than active trading.

  • Economic Calendar: RBI MPC meetings, SEBI notices, IPO events, earnings release dates, index rebalancing, and major global macro events (Fed, ECB) sorted by date.

  • Dividend Tracker: Upcoming ex-dividend dates, dividend per share, yield, frequency, and payout type for NSE-listed stocks, sortable by ex-date, yield, or amount.

  • Earnings Calendar: Q4 FY26 results for listed companies, divided into Upcoming, This Week, Reported, and All views.

  • Market Pulse: Live market breadth (advance/decline ratio), sector fund flows, sentiment indicators, and FII/DII activity data across four switchable panels.

  • Technical Screener: RSI-based signals auto-computed from live prices for every tracked stock, filterable by signal and sector.

  • Stock Comparator: Pick a sector and compare all stocks in it side-by-side by price, day change, 52-week range, market cap, and P/E ratio.

  • Watchlist: Add any stock from anywhere in the platform. The count badge in the sidebar updates in real time.


Technical Architecture

NexTrade is built on a deliberately minimal stack. The front end is pure HTML5, CSS3, and ES5 JavaScript with no front-end framework. All charting uses custom SVG and canvas elements — there is no Highcharts, no Chart.js, no D3 dependency. This was a deliberate design decision: a single page application with no build step, deployable from a single HTML file.

The back end is a FastAPI application in Python that serves as a proxy. It exposes a single endpoint and whitelists domains including query1.finance.yahoo.com, query2.finance.yahoo.com, stooq.com, and news.google.com. A rate limiter caps requests at 120 per minute. The front end uses a fallback chain — trying the Vercel deployment first, then a local development server — so the UI degrades gracefully to simulated price data when the proxy is unreachable.

Price simulation runs client-side every ten seconds: equities drift ±0.5%, indices ±0.3%, and cryptocurrencies ±1.5%, creating a live-feeling market even between fetch cycles. The platform is deployed on Vercel (front end) and Render (back end), with a GitHub Actions CI/CD pipeline handling continuous deployment.




The platform is live at nextrade-brown.vercel.app   ·   Source code: github.com/kartikeyjaiswal42-sudo/Nextrade

Published in Finance · The Social · May 2026 · by Kartikey Kumar


Comments