{"id":22957085,"url":"https://github.com/kenmwaura1/py-crypto-bot","last_synced_at":"2026-05-07T04:44:09.539Z","repository":{"id":63157237,"uuid":"436035106","full_name":"KenMwaura1/py-crypto-bot","owner":"KenMwaura1","description":"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","archived":false,"fork":false,"pushed_at":"2024-01-27T09:39:19.000Z","size":213,"stargazers_count":38,"open_issues_count":0,"forks_count":11,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-27T17:47:21.468Z","etag":null,"topics":["binance-api","bot","crypto","postgresql","python","redis","websockets"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KenMwaura1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"KenMwaura1","ko_fi":"kenmwaura1","custom":["https:paypal.com/kenzmwaura1@gmail.com"]}},"created_at":"2021-12-07T21:47:41.000Z","updated_at":"2025-07-19T00:34:34.000Z","dependencies_parsed_at":"2024-01-27T12:01:28.949Z","dependency_job_id":"e3648571-7355-4514-9a59-79e4d90f3264","html_url":"https://github.com/KenMwaura1/py-crypto-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KenMwaura1/py-crypto-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenMwaura1%2Fpy-crypto-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenMwaura1%2Fpy-crypto-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenMwaura1%2Fpy-crypto-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenMwaura1%2Fpy-crypto-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KenMwaura1","download_url":"https://codeload.github.com/KenMwaura1/py-crypto-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenMwaura1%2Fpy-crypto-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272446641,"owners_count":24936517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binance-api","bot","crypto","postgresql","python","redis","websockets"],"created_at":"2024-12-14T17:15:14.388Z","updated_at":"2026-05-07T04:44:04.519Z","avatar_url":"https://github.com/KenMwaura1.png","language":"Python","funding_links":["https://github.com/sponsors/KenMwaura1","https://ko-fi.com/kenmwaura1","https:paypal.com/kenzmwaura1@gmail.com"],"categories":[],"sub_categories":[],"readme":"\n[![Python application](https://github.com/KenMwaura1/py-crypto-bot/actions/workflows/python-app.yml/badge.svg)](https://github.com/KenMwaura1/py-crypto-bot/actions/workflows/python-app.yml)\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n[![LinkedIn][linkedin-shield]][linkedin-url]\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\n\u003ch3 align=\"center\"\u003ePy Crypto Bot\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    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.\n    Currently supported pairs are ETH/USDT and BTC/USDT.\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n  \u003c/p\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#acknowledgments\"\u003eAcknowledgments\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\n[Link to accompanying article](https://dev.to/ken_mwaura1/crypto-data-bot-using-python-binance-websockets-and-postgresql-db-5fnd) :pencil2:\n\n\n\n![Py Crypto Bot](images/2021-12-08_01-32-crypto.png)\n\n### Sample image of data stored in DB \n![Data Screenshot](images/py-crypto-data.png)\n\n\u003c!--Here's a blank template to get started: To avoid retyping too much info. Do a search and replace with your text editor for the following: `KenMwaura1`, `py-crypto-bot`, `Ken_Mwaura1`, `kennedy-mwaura`, `kemwaura`, `gmail.com`, `py-crypo-bot`, --\u003e\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Built With\n\n* [Python 3.8+](https://www.python.org/downloads/)\n* [Binance WebSocket API](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md#klinecandlestick-streams)\n* [TA-Lib](https://mrjbq7.github.io/ta-lib/)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nTo get started, you'll need to install the following:\n\n### Prerequisites\n\nThis is an example of how to list things you need to use the software and how to install them.\n\n* [Python 3.7+](https://www.python.org/downloads/)\n* Postgresql Database.\n  * This could either be installed [locally](https://www.postgresql.org/) or via  [docker](https://www.docker.com/).\n      This [article](https://blog.crunchydata.com/blog/easy-postgresql-12-and-pgadmin-4-setup-with-docker) is an awesome resource on how to get Postgresql and pgadmin4  installed as containers.\n\n    Create a database `price_data`. Either using SQL or 3-party client like pgadmin4 or [dbeaver](https://dbeaver.io/)\n\n### Installation\n\n1. Get a free API Key at [Binance](https://www.binance.com).\n2. Clone the repo\n\n   ```sh\n   git clone https://github.com/KenMwaura1/py-crypto-bot.git\n   ```\n\n3. Create a virtual environment\n\n   ```sh\n   python -m venv venv\n   ```\n\n4. Activate the virtual environment\n\n   ```sh\n   source venv/bin/activate\n   ```\n\n5. Install the dependencies\n\n   ```sh\n   pip install -r requirements.txt\n   ```\n\n6. Add your credentials to a .env file\n\n   ```sh\n   echo \"BINANCE_API_KEY=\u003cyour api key\u003e\" \u003e\u003e .env\n   echo \"BINANCE_API_SECRET=\u003cyour api secret\u003e\" \u003e\u003e .env\n   ```\n\n   OR\n   Copy the provided example file to your .env file\n\n   ```sh\n   cp .env.example .env\n   ```\n\n7. Run the bot\n\n   ```sh\n   python bot.py\n   ```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\nSee the [open issues](https://github.com/KenMwaura1/py-crypto-bot/issues) for a full list of proposed features (and known issues).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf 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\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- LICENSE.txt --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\n [@Ken_Mwaura1](https://twitter.com/Ken_Mwaura1) - \u003ckemwaura@gmail.com\u003e\n\nProject Link: [https://github.com/KenMwaura1/py-crypto-bot](https://github.com/KenMwaura1/py-crypto-bot)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/KenMwaura1/py-crypto-bot.svg?style=for-the-badge\n[contributors-url]: https://github.com/KenMwaura1/py-crypto-bot/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/KenMwaura1/py-crypto-bot.svg?style=for-the-badge\n[forks-url]: https://github.com/KenMwaura1/py-crypto-bot/network/members\n[stars-shield]: https://img.shields.io/github/stars/KenMwaura1/py-crypto-bot.svg?style=for-the-badge\n[stars-url]: https://github.com/KenMwaura1/py-crypto-bot/stargazers\n[issues-shield]: https://img.shields.io/github/issues/KenMwaura1/py-crypto-bot.svg?style=for-the-badge\n[issues-url]: https://github.com/KenMwaura1/py-crypto-bot/issues\n[license-shield]: https://img.shields.io/github/license/KenMwaura1/py-crypto-bot.svg?style=for-the-badge\n[license-url]: https://github.com/KenMwaura1/py-crypto-bot/blob/master/LICENSE.txt\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge\u0026logo=linkedin\u0026colorB=555\n[linkedin-url]: https://linkedin.com/in/kennedy-mwaura/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenmwaura1%2Fpy-crypto-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenmwaura1%2Fpy-crypto-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenmwaura1%2Fpy-crypto-bot/lists"}