Skip to content

cpleonardo/simple-market-maker

Repository files navigation

Simple market maker

Simple market maker bot

This bot places limit orders in tauros crypto exchange querying Bitso and Okx orderbooks as reference price.

Parameters

Working parameters:

  • is_active: Designates wether the bot is active (true or false)
  • refresh_rate: Time in minutes for price updating (e.g. every 3 minutes)

Trading related parameters:

  • market: Market to place the order (BTC-MXN, LTC-MXN, BCH-MXN and ETH-MXN are by now allowed)
  • spread: The minimum spread to take in consideration for order placement (e.g. 3%). Negative values are allowed.
  • greedy_mood: If enabled, maximizes spread as much as possible. Default is true.
  • order_value: The maximum value that the order can have (e.g. $10,000.00 MXN)
  • side: Order side (buy or sell)

This parameters can be confirgued locally in the file robots.json or in a remote firebase realtime database. View settings.py file.

Business Logic

Rule 1: Allways look for 1st position in order book

Rule 2: Increase spread as much as posible trying to keep first position in order book. (Only if greedy_mood enabled)

Rule 3: Never place an order bellow configured spread

Rule 4: Use the maximum available funds but never surpase configured order value.

Rule 5: Ignore tauros orders located at first places if its value is bellow $200.00 MXN

Rule 6: Ignore bitso orders localed at first places if its value is bellow $500.00 MXN

Running the bots

Set environment variables

  1. Copy to env.example into .env
cp env.example .env
  1. Edit values in .env depending on your preferences
nano .env

Create and activate a python virtual envirtonment

You must first install or verify that your computer has python 3.8, pip and virtualenv

virtualenv -p python3 env && source env/bin/activate
pip install -r requirements.txt

Run the bots

Do not forget to configure your bots using the robots.json file or in your firebase realtime database.

python3 main.py

Email notificacions

If some of your wallets runs out of funds, an email can be sent to notice you. You can follow this tutorial for creating a dedicated gmail account.

Docker

Create the image

docker image build --tag tauros-bot .

Run the container

docker container run --env-file ./.env tauros-bot

About

Simple market making bot for Tauros Exchange

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published