{"id":16930691,"url":"https://github.com/erfaniaa/binance-spot-trading-bot","last_synced_at":"2026-01-31T22:03:49.109Z","repository":{"id":158063202,"uuid":"633259498","full_name":"Erfaniaa/binance-spot-trading-bot","owner":"Erfaniaa","description":"Easy-to-use Binance spot trading bot","archived":false,"fork":false,"pushed_at":"2023-05-04T14:49:27.000Z","size":30,"stargazers_count":14,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T18:40:08.138Z","etag":null,"topics":["algo-trading","algotrading","binance","binance-api","binance-bot","bitcoin","crypto","cryptocurrency","trading-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Erfaniaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-04-27T05:53:52.000Z","updated_at":"2025-02-19T16:57:41.000Z","dependencies_parsed_at":"2024-06-14T16:00:12.102Z","dependency_job_id":null,"html_url":"https://github.com/Erfaniaa/binance-spot-trading-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Erfaniaa/binance-spot-trading-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erfaniaa%2Fbinance-spot-trading-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erfaniaa%2Fbinance-spot-trading-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erfaniaa%2Fbinance-spot-trading-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erfaniaa%2Fbinance-spot-trading-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Erfaniaa","download_url":"https://codeload.github.com/Erfaniaa/binance-spot-trading-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erfaniaa%2Fbinance-spot-trading-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28956938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["algo-trading","algotrading","binance","binance-api","binance-bot","bitcoin","crypto","cryptocurrency","trading-bot"],"created_at":"2024-10-13T20:42:16.064Z","updated_at":"2026-01-31T22:03:49.091Z","avatar_url":"https://github.com/Erfaniaa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Binance Spot Trading Bot\n\nEasy-to-use automatic trading for Binance Spot with Telegram integration\n\u003ccenter\u003e\u003cimg src=\"https://user-images.githubusercontent.com/7780269/183316217-a1e8faba-48cd-4317-abe7-9ceeecd0216a.png\" width=\"50%\" align=\"center\"\u003e\u003c/center\u003e\n\n## Features\n\n- You can run it fast and it's easy to use.\n- There are no complexities and no database usage in this project. Even dependencies are a few.\n- It's easy for modifying and customization.\n- It automatically stores recent candles that can be used for machine learning model input.\n- You can read the code for educational purposes.\n- You can be notified with Telegram messages\n\n## Run\n\n1. Clone the repository.\n2. Generate a Binance API key (with Spot access) and put it in `credentials.py`.\n3. Run `pip3 install -r requirements.txt`.\n4. Run `python3 init_indicators_dict.py`.\n5. Run `python3 main.py`.\n\nThis will run an example bot on trading Bitcoin. \n\n## Config\n\nTo write custom bots you can:\n\n- Set an initial indicators setting in `init_indicators_dict.py` (because we are handling indicators in the client side with pickle files).\n- Set an initial orders setting in `init_orders_dict.py` (because we are handling orders in the client side with pickle files).\n- Define new indicators in `indicators.py`.\n- Define a new strategy in `main.py` (especially inside `is_it_time_to_open_long_position` and `is_it_time_to_open_short_position` functions).\n- Config your bot settings in `config.py`.\n\n**Note:** If you define any machine learning model, you can use `recent_prices_list` as its input.\n\n## Telegram Config\n\n1. Firstly, you need to create a Telegram bot, so talk to [@botfather](https://t.me/botfather).\n2. Secondly, need to know your own Telegram user ID, so the bot will know who to send messages to. Talk to [@userinfobot](https://t.me/userinfobot) to get this information.\n3. Thirdly, you have to `/start` your bot. Open up a private message with your bot by searching its username, then hit the start button.\n4. Finally, set `TELEGRAM_API_KEY` and `TELEGRAM_USER_ID` in `credentials.py`, and `SEND_TELEGRAM_MESSAGE` in `config.py`.\n\n## To-do\n\n- Import modules, not variables.\n- Use classes and make `main.py` smaller.\n- Add more indicators to `indicators.py`.\n- Find a better way for handling error codes.\n\n## See Also\n\n- [Crypto Trading Strategy Backtester](https://github.com/Erfaniaa/crypto-trading-strategy-backtester)\n- [Binance Futures Trading Bot](https://github.com/smzerehpoush/binance-futures-trading-bot)\n\n## Credits\n\n[Erfan Alimohammadi](https://github.com/Erfaniaa) and [Amir Reza Shahmiri](https://github.com/Amirrezashahmiri)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferfaniaa%2Fbinance-spot-trading-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferfaniaa%2Fbinance-spot-trading-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferfaniaa%2Fbinance-spot-trading-bot/lists"}