BinanceTrader class that uses DNN for predictions and making fake/real trades.
- To use BinanceTrader Class, you should download python packages first. You can copy the cell below and run it:
python -m pip install numpy pandas schedule pytz tensorflow stock-indicators scikit-learn
-
You need to fetch and download the data from Binance. Run the
Downloades
file. After that, run thePreprocessing
file to train and save the model and scaler (It is optional, you can use the model and scaler I prepared for you. But it is recommended to do it to have fresh data). -
Open the
BinanceTrader
file and replace theapi_key
andsecret_key
(situated on almost the end of the file) based on your API information which you have already got from Binance (Want more details? Click here). If you want to use Binance Testnet, do not forget to set thetestnet
value toTrue
. You should also replace themodel_path
andscaler_path
with the path of your model and scaler in your local computer or server (Having trouble finding the path? Click here). When you are done, run the file and enjoy!
It connects to your Binance account (through api_key
and secret_key
) and makes trades with leverage based on DNN predictions.
- By using our services, you agree that you are aware of the possible risks of trading in the futures market.
- This class uses all your funds in the futures section for trades, please make sure to withdraw or transfer your funds on time.
I have used these resources to build my project:
- Data Analysis with Pandas and Python (Video, Details)
- Python for Data Science and Machine Learning Bootcamp (Video, Details)
- Algorithmic Trading A-Z with Python, Machine Learning & AWS (Video, Details)
- Cryptocurrency Algorithmic Trading with Python and Binance (Video, Details)
- Performance Optimization and Risk Management for Trading (Video, Details)
- Python-for-Finance_Mastering-Data-Driven-Finance-Book-OReilly-2018 (Book, Available here)