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.
- Run
bundle install - Copy
.env.exampleto.envand fill your Bitmex api key and secret - Run
ruby main.rb - You also may want to point to fixed commit (instead of latest master) for my Bitmex api gem.
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