Newtoniano / MyCryptoBot

Automated, open source crypto trading and backtesting platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MyCryptoBot

build_badge build_badge build_badge codecov

Welcome to the MyCryptoBot repository, a free, open source, and extensible trading platform that utilizes a micro-services architecture. The platform empowers you to run your own trading bots and strategies locally or in the cloud. At present, the app is integrated with Binance, supporting both the testnet and live Futures accounts. Additionally, it features backtesting, plotting, and strategy optimization tools.

Please note that the contents of this repository are not intended as trading advice or encouragement to start trading with real money. This platform is designed to assist existing algo traders/professionals in having complete control of their trading strategies and automation. Therefore, it is recommended that you only risk money that you are willing to lose.

This Repo is still under active development and under testing

Installation & Usage

The detailed steps for installing and using this application locally and remotely on Heroku are provided in the INSTALLATION.md file. However, we recommend that you understand the app's structure before diving into the installation steps.

Introduction

The primary goal of this repository is to provide a platform that enables you to deploy your strategies, run them locally or on a remote server, and manage all your trading activities with a user-friendly web UI. The app comprises three micro-services that are interconnected via a database and served by a frontend web app. There is a ready-made functionality to deploy the services to Heroku, which will require an account and associated monthly costs.

The app's architecture consists of the following:

MyCryptoBot Architecture

Data Service

This service acts as the data warehouse of the app. It acquires data from external sources, such as exchanges, preprocesses it, and stores it in a database. When a new trading bot is initiated through the user interface, a new data pipeline is initiated, fetching live data from the various sources. Whenever a new candle is completed, a request is sent to the Model app for processing the new data according to the strategy.

Model Service

The Model service is responsible for processing the data and generating a signal (Buy or Sell) according to the selected strategy. Whenever a request is received to generate a new signal, the data is loaded, processed, and a signal is produced, which is then sent to the Order Execution service with an order to be executed.

This module also contains a comprehensive set of development and research tools for backtesting, analyzing, and exploring new strategies. It also has a strategy optimization API, and has functionality to include margin calls according to a selected leverage.

For more information on how to use this module and customize your strategies, please refer to the MODEL_USAGE.md file.

Order Execution Service

The Order Execution service acts as a layer to handle the communication between the app and the exchange. It receives buy and sell orders from the Model service with a signal, assesses whether an action is required (if the received signal differs from the current one), and responds accordingly.

Web App

The user interface enables the user to start and stop trading bots, view open positions, executed trades, statistics, and more. The following are brief descriptions of the various views of the app.

Dashboard

This serves as the main view of the application, presenting a comprehensive overview of the equity evolution, trading bot data, open positions, and associated trades over time. Summary statistics are displayed to provide key insights. Users can easily navigate to different sections of the app by clicking on the corresponding section or utilizing the left-hand side menu.

Trading Bots

This page provides an overview of all existing trading bots along with their current status. Users have the ability to edit, start, and stop these bots directly from this view. Clicking on a specific trading bot leads to a detailed page, showcasing the equity evolution, statistics, and a comprehensive list of all trades associated with that bot.

Additionally, users can create a new trading bot by selecting the New Trading Bot button. Simply fill in all the required details, and the new bot will be created and initiated automatically.

Positions

This page displays the currently open positions linked to the trading bots.

Trades

This page shows all the trades executed by any of the trading bots. It is possible to filter by live or testnet trades.

Software Requirements

About

Automated, open source crypto trading and backtesting platform


Languages

Language:Python 85.6%Language:TypeScript 13.1%Language:JavaScript 0.6%Language:Dockerfile 0.3%Language:CSS 0.3%Language:HTML 0.1%Language:Shell 0.0%