Skip to content

simple python crypto bot to trade crypto on Binance based on RSI. Utilizing web sockets to get real-time prices. Store the data in a Redis instance then a Postgres DB on candle close

License

Notifications You must be signed in to change notification settings

KenMwaura1/py-crypto-bot

Repository files navigation

Python application Contributors Forks Stargazers Issues MIT License LinkedIn


Py Crypto Bot

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
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Link to accompanying article ✏️

Py Crypto Bot

Sample image of data stored in DB

Data Screenshot

(back to top)

Built With

(back to top)

Getting Started

To get started, you'll need to install the following:

Prerequisites

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.
    • This could either be installed locally or via docker. This article is an awesome resource on how to get Postgresql and pgadmin4 installed as containers.

      Create a database price_data. Either using SQL or 3-party client like pgadmin4 or dbeaver

Installation

  1. Get a free API Key at Binance.

  2. Clone the repo

    git clone https://github.com/KenMwaura1/py-crypto-bot.git
  3. Create a virtual environment

    python -m venv venv
  4. Activate the virtual environment

    source venv/bin/activate
  5. Install the dependencies

    pip install -r requirements.txt
  6. 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
  7. Run the bot

    python bot.py

(back to top)

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

@Ken_Mwaura1 - kemwaura@gmail.com

Project Link: https://github.com/KenMwaura1/py-crypto-bot

(back to top)

About

simple python crypto bot to trade crypto on Binance based on RSI. Utilizing web sockets to get real-time prices. Store the data in a Redis instance then a Postgres DB on candle close

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published