Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
notVitaliy committed Dec 26, 2020
1 parent 211c8f6 commit d292ef8
Showing 1 changed file with 86 additions and 10 deletions.
96 changes: 86 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,92 @@

![logo](https://rawgit.com/magic8bot/magic8bot/master/assets/logo.svg)

# How To Use

**The master branch is unstable. Do not depend on it working correctly or even running at all.**

checkout [stable](https://github.com/magic8bot/magic8bot/tree/stable)

## Requirements

- [node](https://nodejs.org/en/)
- [mongodb](https://www.mongodb.com/)
- [The UI](https://github.com/magic8bot/ui/tree/stable)\*

The only 2 supported exchanges are `coinbasepro` and `binance` although the bot is capable of supporting any exchange that `ccxt` supports with the addition of small adapter file, found in`./src/exchange/adapters`.

There are a minimal amount of strategies and technical indicators implemented as well.

\*The UI is not required to run. It just makes things easier.

_If you have questions, just ask on discord. The invite link is below._

## Magic8Bot Installation

There are 2 repos (magic8bot and ui) that need to be installed. To do that, you will need to clone them. Let's go!

Clone the magic8bot repo:

git clone https://github.com/magic8bot/magic8bot.git

Clone the UI repo:

git clone https://github.com/magic8bot/ui.git

Go to /magic8bot folder and run:

npm install

Go to /ui folder and run:

npm install

You also need a `.env` inside the `/magic8bot` folder. You can just copy `.env-sample` and rename it `.env`

Once you're done you need to run this command in both the `magic8bot` and `ui` folders:

npm run start:dev

> you'll need to open 2 terminals
# Development

M8bot is entering stage 2 of development. I'm separating out all the moving parts into stateless microservices. The idea is to be able to auto-scale individual parts of the bot as load increases on each part.

The parts:

- [ui](https://github.com/magic8bot/ui)
- Is the UI/control panel for the bot
- [web-server](https://github.com/magic8bot/web-server)
- This is the layer that sits between the UI and the bot
- [smq](https://github.com/magic8bot/smq)
- Not a micro-service but a critical shared library
- Used for communication between micro-services
- [db](https://github.com/magic8bot/db)
- Not a micro-service but a critical shared library
- Used for establishing a connectio to the database
- Provides shared data models for the micro-services
- `pub/sub`
- Not yet implemented
- Publishes events for mass consumption
- Might be integrated into `smq`
- `trade`
- Currently part of core but will be a micro-service
- Handles syncing data from the exchange to the database
- `period`
- Currently part of core but will be a micro-service
- Generates candle (OHLCv) data
- Emits candle data events via pub/sub
- `strategy`
- Currently part of core but will be a micro-service
- Listens to candle events
- Calculates signals
- Sends signals via simple message queue
- `order`
- Currently part of core but will be a micro-service
- Handles opening and closing positions
- Consumes signal via simple message queue

## Disclaimer

- This bot is NOT a sure-fire profit machine. Use it AT YOUR OWN RISK.
Expand All @@ -17,16 +103,6 @@

this bot has a Discord chat! You can get in [through this invite link](https://discord.gg/JGCNsh8).

## Development

### Flowchart

Green: Shows directionality of instantiation

Purple: Blunt end of line is directly injected into the arrow end of line

![flowchart](https://rawgit.com/magic8bot/magic8bot/master/assets/flowchart.svg)

## Donate

### notVitaliy (author)
Expand Down

0 comments on commit d292ef8

Please sign in to comment.