An advanced, AI-driven cryptocurrency trading bot with a comprehensive web interface for automated trading on Coinbase. This bot supports multiple trading strategies, real-time market analysis, and sophisticated risk management features.
- 50+ Cryptocurrency Pairs: Support for major cryptocurrencies including BTC, ETH, ADA, SOL, and many more
- AI-Assisted Trading: Machine learning algorithms for market prediction and trend analysis
- Multiple Trading Strategies: 9 predefined trading series with different risk profiles
- Real-time Market Data: Live price feeds and market analysis
- Automated Portfolio Management: Dynamic position sizing and portfolio rebalancing
- Serie 1 - SΓ©curisΓ©e: Conservative strategy with low risk
- Serie 2 - IA dynamique: AI-driven dynamic trading
- Serie 3 - Scalping: High-frequency scalping strategy
- Serie 4 - Tendance IA: AI-powered trend following
- Serie 5 - Swing Trading: Medium-term swing trading
- Serie 6 - Scalping Volatile: Volatile market scalping
- Serie 7 - Stablecoin Hedging: Hedging with stablecoins
- Serie 8 - Hold Moyen-Terme: Medium-term holding strategy
- Serie 9 - Anti-Volatility: Anti-volatility protection
- Stop Loss & Take Profit: Configurable profit targets and loss limits
- Trailing Stop Loss: Dynamic stop-loss adjustment
- Position Sizing: Intelligent capital allocation
- Drawdown Protection: Maximum loss thresholds
- Simulation Mode: Paper trading for strategy testing
- Real-time Dashboard: Live performance monitoring and charts
- Strategy Configuration: Easy setup of trading parameters
- Portfolio Tracking: Account balance and profit/loss tracking
- Trade History: Detailed order and execution logs
- Performance Analytics: Charts and KPI visualization
- Python 3.8 or higher
- Coinbase Advanced Trading API access
- Git
- Clone the repository
git clone https://github.com/nashthecoder/trading-bot.git
cd trading-bot- Install dependencies
pip install -r requirements.txt- Configure API credentials
Create a
.envfile with your Coinbase API credentials:
COINBASE_API_KEY=your_api_key
COINBASE_API_SECRET=your_api_secret
COINBASE_PASSPHRASE=your_passphrase- Run the application
python trading_bot.pytrading_bot.py- Main application file (formerly LUTESSIA_FINAL_PRODUCTION_EXEC_REBUILT_WITH_IA_CONNECTED_FINAL_v2_20250805_164551.py)config.py- Configuration settings and constantsutils.py- Common utility functionsindex.html- Web interfacerequirements.txt- Python dependencies
- β Removed duplicate function definitions
- β Fixed AI scoring logic issues
- β Improved error handling for volatility calculations
- β Standardized logging functions
- β Added proper .gitignore for version control
- β Fixed deprecated sklearn dependency
Access the trading bot interface at http://localhost:5000 after starting the application.
- Bot Control: Start/stop trading operations
- Strategy Selection: Choose from 9 predefined strategies
- Crypto Pair Selection: Select which cryptocurrencies to trade
- Risk Parameters: Configure stop-loss, take-profit, and position sizing
- Performance Monitoring: Real-time charts and profit tracking
- Buy Percentage: Percentage of capital to use per trade
- Profit Target: Target profit percentage for trades
- Stop Loss: Maximum acceptable loss per trade
- Trade Frequency: How often to execute trades (in seconds)
- Order Types: Market, limit, or auto order execution
- Simulation Mode: Enable paper trading for testing
buy_percentage_of_capital: Percentage of available capital to use per trade (default: 0.08)sell_profit_target: Target profit percentage (default: 0.016)sell_stop_loss_target: Stop loss percentage (default: 0.008)trade_frequency: Trading frequency in seconds (default: varies by strategy)
trailing_start_threshold: When to start trailing stop-losstrailing_sl_step: Step size for trailing stop-lossmin_hold_duration: Minimum time to hold positionsmax_hold_duration: Maximum time to hold positionscompound_enabled: Enable profit compounding
- Flask: Web application framework
- TensorFlow/Keras: Machine learning and AI predictions
- pandas/numpy: Data analysis and manipulation
- scikit-learn: Additional ML algorithms
- matplotlib/seaborn: Data visualization
- coinbase: Coinbase API integration
- yfinance: Yahoo Finance data
- pandas-ta/ta: Technical analysis indicators
- Flask-SocketIO: Real-time web communication
- Chart.js: Interactive charts and graphs
- Bootstrap: UI framework
See requirements.txt for the complete list of dependencies.
The bot supports 50+ cryptocurrency trading pairs, including:
Major Cryptocurrencies:
- BTC-USDC, ETH-USDC, ADA-USDC, SOL-USDC
- AVAX-USDC, DOT-USDC, LINK-USDC, UNI-USDC
DeFi Tokens:
- AAVE-USDC, CRV-USDC, SUSHI-USDC, YFI-USDC
Meme Tokens:
- DOGE-USDC, PEPE-USDC, SHIB-USDC
Layer 1/2 Tokens:
- ARB-USDC, MATIC-USDC, FIL-USDC, NEAR-USDC
Note: Some pairs may have limited AI trading support (marked in red in the interface)
IMPORTANT DISCLAIMER:
- Cryptocurrency trading involves substantial risk of loss
- Past performance does not guarantee future results
- Only trade with funds you can afford to lose
- This bot is provided for educational purposes
- Always test strategies in simulation mode first
- Consider consulting with financial advisors
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
The bot generates comprehensive logs including:
- Trade execution details
- Market analysis results
- Profit/loss tracking
- Error handling and debugging information
Logs are stored in logs.txt and displayed in real-time through the web interface.
For support, issues, or feature requests:
- Check existing GitHub Issues
- Create a new issue with detailed information
- Include logs and configuration details when reporting bugs
β‘ Happy Trading! Remember to always trade responsibly and never invest more than you can afford to lose.