Using Binance WebSocket API to get real-time price data for cryptocurrencies. Store the data in a Postgres DB on candle close. Using the TA-Lib library to calculate the RSI and execute buy/sell orders.
Currently supported pairs are ETH/USDT and BTC/USDT.
Table of Contents
Link to accompanying article ✏️
To get started, you'll need to install the following:
This is an example of how to list things you need to use the software and how to install them.
- Python 3.7+
- Postgresql Database.
-
Get a free API Key at Binance.
-
Clone the repo
git clone https://github.com/KenMwaura1/py-crypto-bot.git
-
Create a virtual environment
python -m venv venv
-
Activate the virtual environment
source venv/bin/activate
-
Install the dependencies
pip install -r requirements.txt
-
Add your credentials to a .env file
echo "BINANCE_API_KEY=<your api key>" >> .env echo "BINANCE_API_SECRET=<your api secret>" >> .env
OR Copy the provided example file to your .env file
cp .env.example .env
-
Run the bot
python bot.py
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
@Ken_Mwaura1 - kemwaura@gmail.com
Project Link: https://github.com/KenMwaura1/py-crypto-bot