BinanceTrader is a Python class that utilizes Deep Neural Networks (DNN) for making predictions and executing demo/real trades on the Binance platform. This project aims to provide a framework for algorithmic trading in the cryptocurrency market.
- Features
- Prerequisites
- Installation
- Setup
- Usage
- How It Works
- Risk Disclaimer
- Resources
- Contributing
- License
- Leverages Deep Neural Networks for price predictions
- Supports both demo (testnet) and real trading environments (mainnet)
- Automated trading with customizable parameters
- Real-time data fetching and preprocessing
- Integration with Binance API
- Python 3.7+
- Binance account (with API access)
- Basic understanding of cryptocurrency trading and Python programming
- Clone this repository:
git clone https://github.com/AlrzA2003/BinanceTrader.git
cd BinanceTrader
- Install the required packages:
pip install -r requirements.txt
For specific versions to ensure compatibility:
pip install -r requirements_specific.txt
- Data Preparation:
- Run
Downloades.py
to fetch historical data from Binance. - Execute
Preprocessing.py
to train and save the model and scaler.
Note: While pre-trained models are provided, it's recommended to train your own for the most up-to-date data.
- Configuration:
- Open
credentials.txt
and replaceAPI_KEY
andSECRET
with your Binance API credentials. How to get Binance API keys - In
BinanceTrader.py
settestnet
toTrue
if you want to use Binance Testnet for demo trading. - Update
model_path
andscaler_path
with the correct paths to your model and scaler files.
After completing the setup, run the BinanceTrader:
python BinanceTrader.py
The script will connect to your Binance account and start trading based on the DNN predictions.
BinanceTrader operates by:
- Connecting to your Binance account using the provided API keys.
- Making trades with leverage based on predictions from the Deep Neural Network model.
- Using all available funds in the futures section for trades.
Trading cryptocurrencies, especially with leverage, carries significant financial risk. By using BinanceTrader, you acknowledge and accept these risks. Please note:
- This software is for educational and experimental purposes only.
- Never trade with funds you cannot afford to lose.
- The author is not responsible for any financial losses incurred while using this software.
- Always monitor your trades and be prepared to intervene manually if necessary.
This project was developed with the help of the following educational resources:
-
Data Analysis with Pandas and Python
- Platform: Udemy
- Course Link
- Description: Comprehensive course on data manipulation and analysis using Pandas.
-
Python for Data Science and Machine Learning Bootcamp
- Platform: Udemy
- Course Link
- Description: Extensive course covering various machine learning algorithms and their implementation in Python.
-
Algorithmic Trading A-Z with Python, Machine Learning & AWS
- Platform: Udemy
- Course Link
- Description: Comprehensive overview of algorithmic trading, from basic concepts to advanced strategies.
-
Cryptocurrency Algorithmic Trading with Python and Binance
- Platform: Udemy
- Course Link
- Description: Focused course on cryptocurrency trading using the Binance API.
-
Performance Optimization and Risk Management for Trading
- Platform: Udemy
- Course Link
- Description: Course on optimizing trading strategies and managing risk in trading systems.
-
Python for Finance: Mastering Data-Driven Finance
- Author: Yves Hilpisch
- Publisher: O'Reilly Media
- Book Link
- Description: Comprehensive book covering various aspects of financial analysis and algorithmic trading using Python.
Contributions to improve BinanceTrader are welcome! Please feel free to submit pull requests or open issues to discuss potential enhancements.
This project is licensed under the MIT License - see the LICENSE file for details.