Polymarket / poly-market-maker

Market maker keeper for the Polymarket CLOB
MIT License
49 stars 14 forks source link

poly-market-maker

Market maker keeper for the Polymarket CLOB.

NOTE

This software is experimental and in active development. Use at your own risk.

Description

The keeper is an automated market maker for CLOB markets. Places and cancels orders to keep open orders near the midpoint price according to one of two strategies.

Requirements

Setup

Usage

Usage with Docker

Config

The config.env file defines 3 environment variables:

Strategies

Strategy Lifecycle

Every sync_interval (the default is 30s), the strategies do the following:

  1. Fetch the current midpoint price from the CLOB
  2. Compute expected orders.
  3. Compare expected orders to open orders.
  4. Compute open orders to cancel and new orders to place to achieve or approximate the expected orders.
  5. Cancel orders.
  6. Place new orders.

When the app receives a SIGTERM, all orders are cancelled and the app exits gracefully.