thomas779 / trading-bot

Orderbook bot for market-making. Currently only supports probit. Built using Python (WebSockets, RESTful HTTP, pandas).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

Simple market-making bot designed to narrow spreads and entice volume.

Improvements

I wrote this in Python as a personal experiment. As I scale this, I will rewrite this entirely in another programming language.

If development time was not of the essence, I would have:

  • Used a performance-based programming language (C++, Rust).
  • Ditched http for websockets.
  • Server location.
  • Improved typecasting on JSON posts and requests.
  • Sorting algorithms on my bids and asks.

Installation Process (PROD)

  1. Insall python3 virtual environment module
apt install python3.10-venv
  1. create local environment
# just on the first time do this
python3 -m venv .venv      # sets up the venv first time

# do this every time before starting the server
source .venv/bin/activate
  1. Install required packages
pip install -r requirements.txt
  1. Copy .env from local environment to production server
# create dotfile
touch .env

# this is where you add your keys
nano .env

# OPTIONAL: confirmed saved chagnes to .env file
cat .env
  1. Run the program
# without logging out
python3 http/probit/main.py

# OR
# logged out
nohup python3 http/probit/main.py &

About

Orderbook bot for market-making. Currently only supports probit. Built using Python (WebSockets, RESTful HTTP, pandas).


Languages

Language:Python 97.3%Language:JavaScript 2.7%