Skip to content

dominikduda/bitmex_cash_keeper

Repository files navigation

bitmex_cash_keeper

A bot automatically shorting x1.00 with whole account when all positions are closed. The shorted instrument is XBT month future, because it has no funding which you would have to pay few times a day on other instruments.

Shorting with leverage x1.00 freezes your money because such position is literally like borrowing (you owe) N units of XBT then selling it instantly. You could say that you are N XBT long and N XBT short so this is fully hedged position.

Read more about Bitmex contracts here.

Output screenshot:

output

Usage

  1. Run bundle install
  2. Copy .env.example to .env and fill your Bitmex api key and secret
  3. Run ruby main.rb
  4. You also may want to point to fixed commit (instead of latest master) for my Bitmex api gem.

With pending entry

If you are using pending entry order run with following flag:

ruby main.rb --pending-entry-present

It will make the script wait for entry then start looking for close

Tested on ruby 2.6.1

About

A bot automatically entering hedged position with whole account when all positions are closed to keep cash.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages