BitMEX Trading API library was built to be as easy to use as possible. Concern more with the trading strategy logic and less with the code.
All the header files are required to build your BitMEX EA or Script.
Download and install
To use BitMEX Trading API and run all the example codes, you must download all the files and install them in their corresponding folders.
Running some examples
I'm assuming you already have BitMEX Trading API and you correctly downloaded and installed all the required files above.
To set your credentials, you should change the following variables:
//---Set BitMEX account credentials string apikey="BITMEX_API_KEY"; string secret="BITMEX_SECRET"; bool testnet_account=true;
By default all the examples files are to trade on BitMEX Testnet and XBTUSD symbol. If you want to move to real account, change the boolean variable testnet_account to false.
Simple risk management tool.Coin Toss Trading
This script opens a buy or sell order randomly having equally spaced take-profit and stop-loss levels.