Overview
This is a fully automated algorithmic trading system built entirely in Python, integrated with the AngelOne SmartAPI for live NSE/BSE market data and order execution.
Users configure their trading strategy through a clean web interface — selecting stocks, setting entry price, target price, stop-loss, and quantity. The bot then runs continuously during market hours, monitoring real-time tick data via WebSocket, and executes buy/sell orders automatically when the configured conditions are met.
The system supports multiple concurrent strategies across different scrips. Each strategy runs in its own Python thread, and a central order manager ensures position limits and capital allocation rules are respected across all simultaneous strategies.
Risk management is built in: maximum loss per day (auto-shuts trading for the day if hit), position sizing based on available capital, and automatic square-off of all open positions at 3:20 PM. A detailed trade log with P&L calculation is maintained and exportable as CSV/Excel.
The backend is a FastAPI server with a React dashboard showing live portfolio value, open positions, today's P&L, trade history, and bot status per strategy.
Key features
- Live NSE/BSE ticks via AngelOne SmartAPI WebSocket
- Entry, target, stop-loss and quantity per strategy
- Multiple strategies running in parallel with capital limits
- Daily max-loss cut-off and auto square-off at 3:20 PM
- Live P&L dashboard and exportable trade log
The challenge
WebSocket tick data arrives at extremely high frequency during volatile markets. Python's GIL was a constraint — we solved this using asyncio for the data ingestion layer and multiprocessing for strategy execution, keeping the delay from market tick to order very low.
The result
Traders set their rules once and the bot executes them during market hours without manual order entry. Built-in risk limits and the auto square-off remove the most common costly mistakes, and every trade is logged for review.
Planning a project like Algo Trading Bot for NSE/BSE?
I'm Vraj Pandya, a full stack developer based in Surat, Gujarat. I build algo trading bot and other stock market & trading solutions for businesses in Surat, across India and for clients worldwide — working remotely with clear updates and a fixed quote before work starts.


