Giter Club home page Giter Club logo

mmm_bot's Introduction

Multi-Market Maker bot

There are two ways to run the bot

Option 1: Run the bot with docker (recommended way)

You can install the docker from link and docker-compose (https://docs.docker.com/compose/install/)

Step 1: Clone the git repo: git clone https://github.com/blockcollider/market_maker.git

Step 2: cd into the folder: cd market_maker and run ./mmm_bot.sh start to config your strategy.

Note: The webserver is authorized by an ephemeral token generated on the server bootstrap. If you forget the token, you can get it via running this command: ./mmm_bot.sh start, which gives you the url to access your webserver

./mmm_bot.sh will show you how to use the cli.

Option 2: Run with source code

Environment / OS setup

You need to follow these steps only when you choose to run the bot on bare operating system. For running using Docker you can fast forward to "run using docker" section

Prerequisites

  • python >= 3.7
  • nodejs >= 10.16
  • yarn
  • poetry

Ubuntu 18.04 LTS setup

Ubuntu 18.04 LTS has both 2 and 3 python versions of python present. We want to use python 3 for setup and running of MM bot but we need 3.7 version

run:

  • apt install python3.7 python3.7-dev python3-distutils python3.7-venv for installing latest python 3.7 and poetry's needed dependencies
  • curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3.7 (note the 3.7 at the end)
  • sed -i 's/python/python3.7/' $HOME/.poetry/bin/poetry to use ubuntu's custom python3 environment

MacOS

TBD

Before First Run

Install Dependencies

poetry install
cd mm_bot/exchange/maker && yarn && cd -

Prepare Database Environment

  • MMM bot uses sqlite database
  • default database location is db/database.sqlite, you can change MMBC_DATABASE_URL to any location
  • run poetry run alembic upgrade head to create sqlite DB file and apply all migrations

Run test

you can run poetry run pytest in the root directory, all tests should pass before running

Run the web ui to config the parameters

poetry run python server.py

Run the bot

poetry run python mmm_bot.py

Move liquidity from taker exchanges to maker exchange

It means there is more liquidity in the taker exchanges with smaller bid-ask spread.

There are two types of orders: buy order and sell order

  1. Buy order. Bot creates a limit buy order on the maker exchange. Once this order is filled, it immediately creates an opposite sell order in the taker exchange. This requires the Price(bid, taker exchange) > Price(bid, maker exchange) when opening a buy order in the maker exchange

  2. Sell order. Bot creates a limit sell order in the maker exchange. Once this order is filled, it immediately creates an opposite buy order in the taker exchange. This requires the Price(ask, taker exchange) < Price(ask, maker exchange) when opening a buy order in the maker exchange

FAQ

Are my private keys and API keys secure?

Since the MMM Bot is a local client, your private keys and API keys are as secure as the computer you use. The keys are only used to sign authorized instructions locally on the local machine, and only signed/authorized transactions are sent out from the client. Always use caution and make sure the computer you are running MMM Bot on is safe, secure, and free from unauthorized access.

mmm_bot's People

Contributors

goblueping avatar

Stargazers

kristof kaehler avatar  avatar

Watchers

James Cloos avatar Arjun Raj Jain avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.