A web app to search NSE/BSE stocks, view candlestick charts, and apply trading strategies (Moving Average, RSI) with Buy/Sell signal overlays.
| Layer | Tech |
|---|---|
| Frontend | Next.js + Tailwind CSS + TradingView Lightweight Charts |
| Backend | FastAPI + yfinance + pandas |
| Hosting | Vercel (both frontend & backend) |
cd files
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m uvicorn api.index:app --reload --host 127.0.0.1 --port 8000Backend runs at: http://127.0.0.1:8000
Test it: http://127.0.0.1:8000/market-overview
cd files
npm install
npm run devFrontend runs at: http://localhost:3000
The frontend uses the backend via the /api prefix in production, and you can still use the local backend at http://127.0.0.1:8000 during development.
- Push the
backend/folder to a GitHub repo (can be the same repo) - Go to https://vercel.com → New Project → import that repo
- Set Root Directory to
backend - Deploy. Note the URL — e.g.
https://stock-analyzer-backend.vercel.app
- Go to Vercel → New Project → import the same (or different) repo
- Set Root Directory to
frontend - Add environment variable:
- Key:
NEXT_PUBLIC_API_URL - Value: your backend Vercel URL from Step 1
- Key:
- Deploy.
Returns NIFTY 50, SENSEX values + top 5 gainers/losers from a hardcoded watchlist.
Returns OHLC candle data.
Intervals: 1m | 5m | 15m | 30m | 1h
Returns candles + Buy/Sell signals + summary.
Strategies: ma (Moving Average) | rsi (RSI)
- Data is delayed ~15 minutes (yfinance limitation)
1mdata only goes back 7 days;5m/15mup to 60 days- MA strategy needs at least 50 candles — use 15m, 30m, or 1h timeframes for best results
- The
.NSsuffix is auto-added if you type justRELIANCEinstead ofRELIANCE.NS