I’d like a Python-based intraday trading bot dedicated to the Indian market. The core requirement is a clean, reliable integration with the latest Upstox API so orders can be placed, modified, and closed automatically throughout the day. Key functions I need: • Real-time data capture from Upstox, including tick-level prices and order-book depth • Strategy engine where I can plug in or swap out my own entry/exit logic without touching the connection code • Risk controls—position sizing, stop-loss, trailing stops, and hard shutdown rules—built in from the start • Detailed logging of every signal, fill, and error, plus an end-of-day P&L summary saved to CSV or a lightweight database Python libraries such as pandas, NumPy, and the official Upstox SDK suit the job best; feel free to suggest additional open-source tools if they streamline development. Back-testing capability is a bonus as long as it uses the same code base that will run live. I’ll consider the project complete once the bot can: 1. Authenticate to my Upstox account with token refresh handled automatically. 2. Execute at least one sample strategy intraday on NSE equities in a paper environment, then live with a small lot size. 3. Generate the logs and daily summary exactly as described above. If you have prior experience automating Upstox or similar Indian broker APIs, that will speed things up, but clean, well-documented code is even more important to me.