A cutting-edge Binance AI Trading Bot that leverages advanced machine learning models to predict cryptocurrency prices and make smarter trading decisions. This project combines state-of-the-art time series forecasting models (LSTM, CNN-LSTM, Transformer, Prophet) with sentiment analysis from news articles, ensuring enhanced prediction accuracy.
- Features
- Architecture
- Installation
- Configuration
- Usage
- Models Supported
- Sentiment Analysis
- Contributing
- License
- Multiple Models: Supports a variety of machine learning models for time series forecasting.
- Real-Time Data: Fetches live market data from Binance API.
- Sentiment Analysis: Integrates news sentiment analysis to adjust predictions dynamically.
- Web Interface: Features an intuitive Flask-based dashboard for user interaction.
- Customization: Fully configurable parameters for model selection, training, and prediction.
The bot is modular and well-organized, with the following structure:
binance-ai-trading-bot/
│
├── models/ # Machine learning models for predictions
├── data/ # Data loading and preprocessing scripts
├── utils/ # Utility functions for predictions and management
├── app_routes/ # Flask routes for the web dashboard
├── templates/ # HTML templates for web pages
└── config.py # Configuration file for API keys and settings
- Python (3.7 or higher)
- Git
- Virtualenv (recommended)
-
Clone the repository:
git clone https://github.com/yourusername/binance-ai-trading-bot.git cd binance-ai-trading-bot
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
- Sign up on Binance and obtain your API key and Secret key.
- Add them to the
config.py
file or set them as environment variables.
Adjust other settings in the config.py
file as needed to suit your requirements.
To start the application:
python app.py
Open your web browser and navigate to:
http://127.0.0.1:5000/
- Go to the Train Model page in the dashboard.
- Select:
- Model type
- Coin pair (e.g., BTC/USDT)
- Data period
- Epochs and batch size
- Click Train to start training.
- Navigate to the Prediction page.
- Select a trained model from the dropdown.
- (Optional) Enable Sentiment Analysis.
- Click Predict to view the results.
- LSTM: Long Short-Term Memory
- CNN-LSTM: Hybrid Convolutional-LSTM Model
- Transformer: Attention-based Neural Network
- Prophet:High-performance solution for time-series forecasting
- Fetches news articles related to the selected cryptocurrency.
- Uses Natural Language Processing (NLP) models to analyze sentiment.
- Dynamically adjusts price predictions based on market sentiment.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Make your changes and commit them:
git commit -m "Description of your changes"
- Push your branch:
git push origin feature-name
- Submit a Pull Request.
This project is licensed under the MIT License. Feel free to use and modify it as per the terms of the license.
Happy Trading! 🚀