CryptoBot 2.1 is a high-performance, self-evolving cryptocurrency trading bot designed for both paper trading and live execution. It features an advanced ensemble ML architecture (LSTM + Transformer + XGBoost), robust risk management, and a real-time WebSocket-based dashboard.
- Ensemble ML Models: Combines LSTM (Temporal), Transformer (Attention-based), and XGBoost (Tabular) for superior prediction accuracy.
- Real-Time Streaming: Uses WebSockets for sub-second market data updates and UI responsiveness.
- Enterprise Risk Management:
- Dynamic position sizing (ATR-based).
- Portfolio correlation checks.
- Volatility halts and daily loss limits.
- "Go Live" safety gates.
- Modern Dashboard: Dark-mode, responsive UI with TradingView-style charts.
- Dockerized: Ready for deployment with
docker-compose.
- Backend: Python 3.9+, FastAPI, TensorFlow, XGBoost, Pandas, AIOHTTP.
- Frontend: HTML5, Vanilla JS, Lightweight Charts (TradingView).
- Database: SQLite (WAL mode).
- Infrastructure: Docker.
docker-compose up --buildAccess the dashboard at http://localhost:8000.
Prerequisites: Python 3.9+
# Install dependencies
pip install -r requirements.txt
# Run the bot
python backend/main.py- API Keys: Protected endpoints require
X-API-Keyheader. - Safety Gates: Strict validation required before enabling real trading.
- Environment Variables: Sensitive keys should be stored in
.env.
Run the unit test suite to verify core logic:
python -m unittest discover testsThe bot uses a multi-timeframe approach (1h, 4h, 1d) to identify trends and mean-reversion opportunities. The Regime Classifier detects market conditions (Trending vs. Choppy) to adapt strategy parameters dynamically.
Disclaimer: Trading cryptocurrencies involves risk. This software is for educational purposes. Use at your own risk.