{"id":13532891,"url":"https://github.com/diogomatoschaves/MyCryptoBot","last_synced_at":"2025-04-01T21:31:20.966Z","repository":{"id":106617646,"uuid":"347037914","full_name":"diogomatoschaves/MyCryptoBot","owner":"diogomatoschaves","description":"Open source crypto trading platform to automate trading strategies.","archived":false,"fork":false,"pushed_at":"2024-04-17T00:28:54.000Z","size":11986,"stargazers_count":128,"open_issues_count":4,"forks_count":25,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-23T02:22:47.821Z","etag":null,"topics":["algorithmic-trading","algotrading","backtesting","backtesting-trading-strategies","binance","binance-bot","binance-trading-bots","crypto","crypto-trading","crypto-trading-bot","cryptocurrency","open-source","quantitative-analysis","quantitative-trading","trading","trading-bot","trading-bot-for-binance","trading-platform","trading-strategies","trading-systems"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diogomatoschaves.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-03-12T11:08:30.000Z","updated_at":"2025-03-17T07:27:18.000Z","dependencies_parsed_at":"2023-12-10T18:23:02.849Z","dependency_job_id":"607d3714-21db-4a39-8d7d-e75a3ff3f81e","html_url":"https://github.com/diogomatoschaves/MyCryptoBot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diogomatoschaves%2FMyCryptoBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diogomatoschaves%2FMyCryptoBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diogomatoschaves%2FMyCryptoBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diogomatoschaves%2FMyCryptoBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diogomatoschaves","download_url":"https://codeload.github.com/diogomatoschaves/MyCryptoBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246713075,"owners_count":20821836,"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","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":["algorithmic-trading","algotrading","backtesting","backtesting-trading-strategies","binance","binance-bot","binance-trading-bots","crypto","crypto-trading","crypto-trading-bot","cryptocurrency","open-source","quantitative-analysis","quantitative-trading","trading","trading-bot","trading-bot-for-binance","trading-platform","trading-strategies","trading-systems"],"created_at":"2024-08-01T07:01:14.645Z","updated_at":"2025-04-01T21:31:15.950Z","avatar_url":"https://github.com/diogomatoschaves.png","language":"Python","funding_links":[],"categories":["Backtest + live trading"],"sub_categories":["Crypto currency focus"],"readme":"# MyCryptoBot\n\n![build_badge](https://github.com/diogomatoschaves/MyCryptoBot/workflows/test-build-data-app/badge.svg)\n![build_badge](https://github.com/diogomatoschaves/MyCryptoBot/workflows/test-build-model-app/badge.svg)\n![build_badge](https://github.com/diogomatoschaves/MyCryptoBot/workflows/test-build-execution-app/badge.svg)\n[![codecov](https://codecov.io/gh/diogomatoschaves/MyCryptoBot/branch/master/graph/badge.svg?token=M1Z50IJEJ3)](https://codecov.io/gh/diogomatoschaves/MyCryptoBot)\n\n\u003cp align=\"middle\"\u003e\n  \u003cimg src=\"shared/utils/drawings/dashboard.png\" style=\"width: 48%\" /\u003e\n  \u003cimg src=\"shared/utils/drawings/trades.png\" style=\"width: 48%\" /\u003e \n\u003c/p\u003e\n\nWelcome to the MyCryptoBot repository, a free, open source, and extensible trading platform that utilizes a \nmicroservices architecture. The platform empowers you to run your own trading bots and strategies locally \nor in the cloud. At present, the app is integrated with Binance, supporting both the \n[testnet](https://testnet.binancefuture.com) and [live](https://www.binance.com/en/futures) *Futures* accounts.\n\nFor those looking to validate trading strategies against historical data, **[stratestic](https://github.com/diogomatoschaves/stratestic)** \noffers a comprehensive backtesting framework and integrates seamleassly with this trading platform.\n\n*Please check the **[disclaimer](DISCLAIMER.md)** before using this repository.*\n\n## Installation \u0026 Usage\n\nThe detailed steps for installing and using this application locally and remotely on Heroku are provided in the\n[INSTALLATION.md](INSTALLATION.md) file. However, we recommend that you understand the app's structure before \ndiving into the installation steps.\n\n\n## Introduction\n\nThe primary goal of this repository is to provide a platform that enables you to deploy your strategies, \nrun them locally or on a remote server, and manage all your trading activities with a user-friendly web UI. \nThe app comprises three micro-services that are interconnected via a database and served by a frontend web app.\nThere is a ready-made functionality to deploy the services to Heroku, which will require an account and associated \nmonthly costs.\n\nThe app's architecture consists of the following:\n\n![MyCryptoBot Architecture](shared/utils/drawings/MyCryptoBot%20architecture.png)\n\n\n### Data Service\n\nThis service acts as the data warehouse of the app. It acquires data from external sources, such as exchanges, \npreprocesses it, and stores it in a database. When a new trading bot is initiated through the user interface, \na new data pipeline is initiated, fetching live data from the various sources. Whenever a new candle is completed, \na request is sent to the **Model** app for processing the new data according to the strategy.\n\nThis service can also be used to retrieve historical data for any symbol.\n\n```python\nfrom data.sources.binance import get_historical_data\ndata = get_historical_data(\"BTCUSDT\", \"1h\", \"2021-01-01\", \"2021-01-31\", save_file=True)\n```\n\n### Model Service\n\nThe Model service is responsible for processing the data and generating a signal (Buy or Sell) according to the \nselected strategy. Whenever a request is received to generate a new signal, the data is loaded, processed, \nand a signal is produced, which is then sent to the **Order Execution** service with an order to be executed.\n\nThis is also the module where you can add a new strategy. Check [ADD_NEW_STRATEGY.md](ADD_NEW_STRATEGY.md) for more \ndetails on how to do this.\n\n### Order Execution Service\n\nThe Order Execution service acts as a layer to handle the communication between the app and the exchange. \nIt receives buy and sell orders from the **Model** service with a signal, assesses whether an action is required \n(if the received signal differs from the current one), and responds accordingly.\n\n\n### Web App\n\nThe user interface enables the user to start and stop trading bots, view open positions, executed trades, \nstatistics, and more. The following are brief descriptions of the various views of the app.\n\n\n#### Dashboard\n\n\u003cp align=\"middle\"\u003e\n  \u003cimg src=\"shared/utils/drawings/dashboard.png\" style=\"width: 60%\" /\u003e\n\u003c/p\u003e\n\nThis serves as the main view of the application, presenting a comprehensive overview of the equity evolution, \ntrading bot data, open positions, and associated trades over time. Summary statistics are displayed to provide \nkey insights. Users can easily navigate to different sections of the app by clicking on the corresponding section \nor utilizing the left-hand side menu.\n\n#### Trading Bots\n\n\u003cp align=\"middle\"\u003e\n  \u003cimg src=\"shared/utils/drawings/trading-bots.png\" style=\"width: 60%\" /\u003e\n\u003c/p\u003e\n\nThis page provides an overview of all existing trading bots along with their current status. \nUsers have the ability to edit, start, and stop these bots directly from this view. \nClicking on a specific trading bot leads to a detailed page, showcasing the equity evolution, \nstatistics, and a comprehensive list of all trades associated with that bot.\n\n\u003cp align=\"middle\"\u003e\n  \u003cimg src=\"shared/utils/drawings/trading-bot-detail.png\" style=\"width: 60%\" /\u003e\n\u003c/p\u003e\n\nAdditionally, users can create a new trading bot by selecting the `New Trading Bot` button. \nSimply fill in all the required details, and the new bot will be created and initiated automatically.\n\n\u003cp align=\"middle\"\u003e\n  \u003cimg src=\"shared/utils/drawings/create-new-bot.png\" style=\"width: 60%\" /\u003e\n\u003c/p\u003e\n\n#### Positions\n\n\u003cp align=\"middle\"\u003e\n  \u003cimg src=\"shared/utils/drawings/positions.png\" style=\"width: 60%\" /\u003e\n\u003c/p\u003e\n\nThis page displays the currently open positions linked to the trading bots.\n\n#### Trades\n\n\u003cp align=\"middle\"\u003e\n  \u003cimg src=\"shared/utils/drawings/trades.png\" style=\"width: 60%\" /\u003e\n\u003c/p\u003e\n\nThis page shows all the trades executed by any of the trading bots. It is possible to filter by live or testnet trades.\n\n\n## Software Requirements\n\n- [Poetry](https://python-poetry.org/docs/) (For creating an environment for local development.)\n- [Docker](https://docs.docker.com/get-docker/) (For running the app locally.)\n- [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) (For deploying the app to a Heroku.)\n- [AWS S3](https://signin.aws.amazon.com/) (For storing machine learning models in the cloud.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiogomatoschaves%2FMyCryptoBot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiogomatoschaves%2FMyCryptoBot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiogomatoschaves%2FMyCryptoBot/lists"}