Page 1 of 5

BitMEX Adapter

Posted: Wed Jul 11, 2018 11:38 am
by Andry API support
Installation

See the Knowledge Base adapter page for BitMEX installation instructions.

Why BitMEX

Before you register an account ;) If you wish to contribute to the developers, please use following affiliate link to register an account on BitMEX: https://www.bitmex.com/register/2rg2pY
This will not affect your own fees. It's a regular affiliate link that BitMEX assigns to any trading account including yours. Read more about it here.

It's easy to find on internet pros/cons of BitMEX exchange and comparison to other exchanges. Here are some of its pros:
  • Ability to open a trading account within minutes regardless of your country of residence (probably because it accepts only digital currency and therefore has to comply with less regulations)
  • Low minimum fund, $50 or so...
  • Relatively low commissions compared to other exchanges
  • High leverage if you wish so 8-)


Project page
https://github.com/BookmapAPI/bitmex-adapter
click release tab to download the adapter in its current stage, put it under C:\Bookmap\API\Layer0ApiModules, configure connection, connect, subscribe (e.g. XBTUSD).

Target connection API
https://www.bitmex.com/app/restAPI
https://www.bitmex.com/app/wsAPI

General status
Supports market data and trading

Market Data
There are no major issues, but some tasks to be completed (listed in the project page)

Trading
To generate API keys visit your account at https://www.bitmex.com/app/apiKeys (real account) or https://testnet.bitmex.com/app/apiKeys (the paper trade account). Note that testnet requires a separate registration. The market data on testnet isn't real.

No need to select Withdraw checkbox. This functionality isn't supported by the adapter.

Insert the two API keys into corresponding fields of connection configuration in Bookmap. In case of testnet, select "This is a demo account" checkbox.

Known issues:
  • Market orders sent on BitMEX web platform cause short disconnection of Bookmap and executions don't appear as icons.
  • Limit Orders sent on BitMEX web platform cause short disconnection of Bookmap, but appear on Bookmap chart.
  • No warning is shown if the account is marked as a Spam Account
  • If a Bracket Order parent gets rejected by BitMEX the children will be placed anyway. They never get triggered though. If not cancelled manually they get canceled by BitMEX within 30s.
  • There is a chance that Executions and/or Cancelled info lacks orders. And the earlier the execution happened the higher the chance is.

Untested:
  • Stop Orders
  • Brackets, OCO, TP, SL
  • Trailing stop
  • TiF
  • Leverage and P&L computation
  • Stress test

Re: BitMEX Adapter

Posted: Fri Jul 13, 2018 3:00 pm
by bob7123
OK, I downloaded this and tried to get it going in Eclipse.

Short story, I am getting a lot of errors in Velox.api.layer0.live.Provider.balanceMap

For example:

BalanceInfo.BalanceInCurrency cannot be resolved to a type Provider.java /bitmex-adapter/src/velox/api/layer0/live line 86

Offending code: private Map<String, BalanceInfo.BalanceInCurrency> balanceMap = new HashMap<>();

Perhaps this is something simple, but as this is all new to me, I'm a bit stumped. Any ideas?

Thanks,
-Bob

Re: BitMEX Adapter

Posted: Mon Jul 16, 2018 4:34 pm
by Serg
Hi Bob,
Are you able to use the compiled adapter (from the "release" tab) without Eclipse, i.e. not in debug mode?

Re: BitMEX Adapter

Posted: Wed Jul 18, 2018 6:44 am
by bob7123
Serg wrote:
Mon Jul 16, 2018 4:34 pm
Hi Bob,
Are you able to use the compiled adapter (from the "release" tab) without Eclipse, i.e. not in debug mode?
I'm actually not seeing a release tab. Could it be a rights issue on your end? An idiot issue on my end? ;)

Can you share a URL where it should be?

Thanks,
-Bob

Re: BitMEX Adapter

Posted: Thu Aug 30, 2018 10:47 am
by Serg
bob7123 wrote:
Wed Jul 18, 2018 6:44 am
I'm actually not seeing a release tab.
Bob, I remember that we resolved this via email or skype, but I'll leave an answer here to be available for others. Here, it's marked on the image. However, most users don't need it anymore because adapters are now available to install via Bookmap: How to install a Bookmap Connect adapter?

release tab.png
release tab.png (19.02 KiB) Viewed 37184 times

Re: BitMEX Adapter

Posted: Wed Nov 07, 2018 10:32 am
by Svyatoslav
Version 0.5 is available. You should be able to get an update via Settings->Manage plugins menu in Bookmap. You can also get it directly from GitHub, but it's recommended to use bookmap plugin management instead.

Re: BitMEX Adapter

Posted: Sun Nov 11, 2018 6:22 pm
by minyPB
Hello. I have the latest beta version of bookmap 7.0.0 build 49. I installed Bitmex adapter but I can't connect to it. When I want to connect to bitmex it return to me information : Invalid credentials. Reason: invalid API key. My credentials are ok. Where to put my bitmex api key? There is no place to put it there. Could anybody help me? Thanks
zz.jpg
connetion error
zz.jpg (10.97 KiB) Viewed 36409 times

Re: BitMEX Adapter

Posted: Mon Nov 12, 2018 11:03 am
by Andry API support
Hello minyPB
When you registered an API key for BitMEX they gave you an ID and a Key ('Secret') (see the attached picture)
Bookmap -> Connection -> Configure
Choose your BitMEX connection, insert your ID in the 'Username' field and your Key in the 'Password' field.

Important: testnet keys (aquired from testnet.bitmex.com) will only work for the testnet exchange and make sure the checkbox 'This is a demo account' is checked for the testnet.
Non-testnet keys (aquired from www.bitmex.com) must be used for the real exchange and in this case the checkbox 'This is a demo account' must be UNchecked.

Re: BitMEX Adapter

Posted: Sun May 05, 2019 4:14 am
by juanjo76
Hi everyone,

This post helped me a lot. Thank you!

I hope you can help me: How can I configure or change the leverage of my real bitmex account from Bookmap?

I need to establish the leverage in 10x and exchange with this configuration in bookmap, but I do not know how to do it.

Thanks in advance.

J.

Re: BitMEX Adapter

Posted: Mon May 06, 2019 8:49 am
by Andry API support
Hi juanjo76,
This feature is not implemented in our BitMEX adapter.
We'll add it to our backlog. Its priority might be adjusted based on number of similar requests.