Python Script for Demat Auto-Trading

Замовник: AI | Опубліковано: 18.12.2025

I want a lightweight, well-documented Python module that plugs directly into my Indian demat account and places intraday orders automatically on BSE/NSE. The idea is simple: I already follow a day-trading strategy, but I need the execution to be code-driven so I no longer sit in front of the terminal clicking buttons. The script must: • Authenticate to my broker’s API (Kite Connect, Upstox, or any REST/WebSocket interface my account provides). • Pull live market data in real time, evaluate my defined entry/exit rules, and fire market/limit orders instantly. • Handle position sizing, intraday square-off, and basic risk limits (max loss per trade and per day). • Log every signal, order response, and exception to a CSV or SQLite file so I can audit performance later. Acceptance criteria 1. I run a single command and the script connects, streams data, and starts trading. 2. All dependencies are listed in a requirements.txt and there is a clear README explaining setup and environment variables for API keys. 3. A dry-run mode places mock orders so I can test without capital risk before going live. 4. Code passes a brief review session over Zoom/Teams where you walk me through the functions. If you have prior experience with BSE/NSE algo-trading, especially via Zerodha or similar APIs, that will speed things up. Please keep the solution modular; I may add new strategies later and would like to drop them into the same framework without rewriting everything.