Skip to content

Maintain negative 0.9x (Price Up, Leverage Down, Sell to increase negative leverage & vice versa)

Notifications You must be signed in to change notification settings

lirenyeo/bitmex-bot

Repository files navigation

Getting started

Install dependencies

  1. This project was developed and tested on Python 3.7.6
  2. This project uses TA-LIB, a C library. Install the dependency https://github.com/mrjbq7/ta-lib#dependencies
  3. pip install -r requirements.txt

Running the code

  1. Majority of the configurations are set in configurations.py
  2. This project uses python-dotenv to manage environment variables, the following env variables are required:
    BITMEX_IS_TESTNET="yes"
    BITMEX_API_KEY=""
    BITMEX_API_SECRET=""
    STRATEGY_NAME="short1x"
    

By set BITMEX_IS_TESTNET to "yes" or "no", the websocket will connect to the respective testnet/live URL.

Strategies Available:

short1x: Negative target leverage. Short to increase leverage. long1x: Positive target leverage. Long to increase leverage. ma-cross: Toggle between short1x and long1x when MA20/50 crosses.

About

Maintain negative 0.9x (Price Up, Leverage Down, Sell to increase negative leverage & vice versa)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages