Python Trading Bot Fixes

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

I have a Python-based trading bot running a scalping strategy on a less-common exchange API. It’s placing orders, but three areas need immediate attention: • Error handling – unexpected exceptions occasionally halt the script instead of logging and retrying. • Trading strategy logic – a few edge-case conditions trigger premature exits and duplicate entries; the entry/exit maths must be tightened. • API integration – the current wrapper misses some authenticated endpoints and order-status callbacks, so fills are not always confirmed. What I expect from you: 1. Audit the existing code, pinpoint the root causes, and patch them cleanly. 2. Refactor the strategy module so position sizing, risk caps, and cooldowns work reliably with live market data. 3. Extend or rewrite the exchange connector to cover all required REST/WebSocket calls, with robust reconnection logic. 4. Provide an updated, well-commented codebase plus a short README describing setup, config, and any new environment variables. 5. Prove stability via a short live test or a detailed log replay showing correct order flow. The stack is pure Python (asyncio, websockets, pandas, TA-Lib). Please be comfortable reading existing code, working with private APIs, and debugging live trading scenarios. Quick turnaround and clear communication are essential, as the bot is already in production.