BitMEX Adapter

Andry API support
Posts: 548
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 25 times
Been thanked: 85 times

BitMEX Adapter

Post by Andry API support » Wed Jul 11, 2018 11:38 am

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
Last edited by Andry API support on Thu Jul 12, 2018 6:46 pm, edited 4 times in total.

bob7123
Posts: 4
Joined: Thu Jul 12, 2018 1:53 pm

Re: BitMEX Adapter

Post by bob7123 » Fri Jul 13, 2018 3:00 pm

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

Serg
Posts: 113
Joined: Mon Jun 11, 2018 12:40 pm
Has thanked: 15 times
Been thanked: 35 times

Re: BitMEX Adapter

Post by Serg » 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?

bob7123
Posts: 4
Joined: Thu Jul 12, 2018 1:53 pm

Re: BitMEX Adapter

Post by bob7123 » Wed Jul 18, 2018 6:44 am

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

Serg
Posts: 113
Joined: Mon Jun 11, 2018 12:40 pm
Has thanked: 15 times
Been thanked: 35 times

Re: BitMEX Adapter

Post by Serg » Thu Aug 30, 2018 10:47 am

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 37374 times

Svyatoslav
Site Admin
Posts: 278
Joined: Mon Jun 11, 2018 11:44 am
Has thanked: 2 times
Been thanked: 31 times

Re: BitMEX Adapter

Post by Svyatoslav » Wed Nov 07, 2018 10:32 am

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.

minyPB
Posts: 1
Joined: Sun Nov 11, 2018 6:15 pm

Re: BitMEX Adapter

Post by minyPB » Sun Nov 11, 2018 6:22 pm

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 36599 times

Andry API support
Posts: 548
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 25 times
Been thanked: 85 times

Re: BitMEX Adapter

Post by Andry API support » Mon Nov 12, 2018 11:03 am

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.
Attachments
BitMEX_keys.jpg
BitMEX_keys.jpg (16.44 KiB) Viewed 36588 times

juanjo76
Posts: 2
Joined: Sun May 05, 2019 4:01 am

Re: BitMEX Adapter

Post by juanjo76 » Sun May 05, 2019 4:14 am

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.

Andry API support
Posts: 548
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 25 times
Been thanked: 85 times

Re: BitMEX Adapter

Post by Andry API support » Mon May 06, 2019 8:49 am

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.

Post Reply