SET MARGIN MODE FAILED

This error usually occurs for new users, as new users try to set their bot for the first time. This can happened because of these reasons :
  1. Wrong API Key, Secret or Passphrase. Please check your API Key, Secret and Passphrase once more to ensure the correctness. How to get my API Keys.
  2. Futures trading has not been enabled. To enable futures trading you can go to https://www.okex.com/derivatives/futures and click the button "ENABLE FUTURES TRADING". After that you must finish some quiz about futures trading. Full step by step guidance.
  3. You currently have open trading position with different leverage than our bot. Below are the leverage value for all the pairs :
    • BTCUSD 100x
    • LTCUSD 20x
    • ETHUSD 20x
    • ETCUSD 20x
    • XRPUSD 20x
    • EOSUSD 20x
    • BCHUSD 20x
    • BSVUSD 20x
    • TRXUSD 20x
  4. No asset for trading. Make sure you have move your crypto asset for trading to your futures wallet. Full OKEx Wallet guide.
For a complete tutorial see here.