Binance Trading Bot in Python
In this article we will see how to build a trading bot linked to a cryptomarket. In this example we will make a Binance Trading Bot in Python. It can be reuse your own way on other exchange, for stocks as your convenience. Reminder that it’s not a financial advisement and investing is at your own risks.
Now let’s get into the detail and see what we require to create our little robot.
Python Script Details
After my analysis on last month market and my knowledge on indicators I went up with following action for our trading bot.
I used MACD Trend, RSI variation to forecast Buy/Sell action. In that case I also cancel or put Stop loss according to the action we are doing (Stop Loss if Buying and cancel them if Selling). Feel Free to adjust your quantity, add your own indicators. Above is just an example from my perspective but you can adjust it to yours.
You can have a look at the full code here on my Github.
I hope it can help few people to start understanding Finance, Coding and IT in general. On my side the system is set on a Raspberry Pi. Don’t hesitate to write about possible improvement or your feedback in the commentary section.
I will be waiting for long-term results and see if this is a good bot strategy or not!
- Binance-Python Library :https://python-binance.readthedocs.io/en/latest/ https://algotrading101.com/learn/binance-python-api-guide/
- Pyinstaller for .exe : https://www.youtube.com/watch?v=UZX5kH72Yx4
- Windows Automatic Script Execution: https://www.jcchouinard.com/python-automation-using-task-scheduler/#:~:text=To%20schedule%20a%20Python%20script%20with%20Task%20scheduler%2C%20create%20an,the%20execution%20of%20your%20script
- Raspbian Automatic Script Execution: https://www.raspberrypi.org/documentation/linux/usage/cron.md
- For more sophisticated high frequency bot check: https://github.com/freqtrade/freqtrade
Binance Trading Bot in Python Made by Guillaume Niay