BitMEX Adapter

The incubator of Bookmap adapter(s) to BitMEX exchange. May contain number of ongoing projects
AndreyR
Posts: 131
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 9 times
Been thanked: 37 times

Re: BitMEX Adapter

Post by AndreyR » Sat Aug 31, 2019 8:17 am

Hi ChuckBanger,
it's being tested at the moment, and will be updated soon (post-only).

ChuckBanger
Posts: 3
Joined: Sat Aug 31, 2019 3:09 am

Re: BitMEX Adapter

Post by ChuckBanger » Sat Aug 31, 2019 10:30 am

Thanks for the great work.... I like it.

What about implementing changing leverage?. Is it doable?

ChuckBanger
Posts: 3
Joined: Sat Aug 31, 2019 3:09 am

Re: BitMEX Adapter

Post by ChuckBanger » Sat Aug 31, 2019 10:57 am

Another question....

When i tried to do a little bigger position size. My ip get blocked. I guess my ip get flagged as spam because BookMap sends so many small orders to Bitmex.

In the header of a response from a request you have "x-ratelimit-remaining" and "x-ratelimit-limit". These parameters is meant to be used to prevent this. Is it possible to calculate the position sizes based on this parameters or something like that?

AndreyR
Posts: 131
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 9 times
Been thanked: 37 times

Re: BitMEX Adapter

Post by AndreyR » Tue Sep 03, 2019 7:41 am

New durations added for v.0.6.2.1 BitMEX adapter. Update the adapter from Bookmap.
Choose the GTC_PO duration to place a post-only order.
Warning: DAY duration seems no longer to be supported by BitMEX. It'll be on the list until I get an answer from BitMEX support. To support Bookmap trading functions DAY duration for Market orders will be automatically changed to GTC.
The requested features besides order durations are being considered.

AndreyR
Posts: 131
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 9 times
Been thanked: 37 times

Re: BitMEX Adapter

Post by AndreyR » Tue Sep 03, 2019 3:28 pm

Update the adapter from Bookmap to v.0.6.3.
DAY duration is supported.

AndreyR
Posts: 131
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 9 times
Been thanked: 37 times

Re: BitMEX Adapter

Post by AndreyR » Fri Sep 06, 2019 7:20 am

BookMap sends so many small orders to Bitmex.
BitMEX stopped supporting contingent orders in late 2018. Contingent orders placing is emulated by Bookmap. Current behavior is placing contingent orders at size of primary order execution size. Like, if a 500 size order placed and being executed like 10-10-20-30-5 these will be the sizes of contingent orders placed.
Now, we're considering to change this. Options we're thinking of are accumulating (?contingent) orders and/or placing them with a delay.
Accumulating - contingent orders will be placed:
- all-at-once as soon as the primary order started being executed
- all-at-once as soon as the primary order is completely executed
- placed with portions of executions equal to <size>
Placing with a delay:
- placing orders not more than once a <fixed delay, ms>
- placing orders not more than once a <delay depending on ratelimit, ms>
Will this solve your issue?

suspy
Posts: 2
Joined: Sat Sep 07, 2019 1:53 pm

Re: BitMEX Adapter

Post by suspy » Sat Sep 07, 2019 2:03 pm

Hi everyone,

How to build the adapter?

I download the source and export jar in eclipse, then put it in C:\Bookmap\API\Layer0ApiModules\, it doesn't work.I download the compiled jar from github release, it works. Is there any problem of exporting jar file?

Why I need to compile it ? Because getting orderbook snapshot take more than 10s for me, I want to make this time longer.

Thanks in advance.

Suspy

AndreyR
Posts: 131
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 9 times
Been thanked: 37 times

Re: BitMEX Adapter

Post by AndreyR » Sat Sep 07, 2019 7:07 pm

Hi suspy,
You've done everything right and it should be working if exported as jar from Eclipse. Would you please make some screenshots and send me the log file so I can figure out what's wrong (there's no attach button for a quick reply but you press 'Full editor&preview' there'll be one) .
Sorry I do not get the problem you have with snapshots, could you provide more details.
 

suspy
Posts: 2
Joined: Sat Sep 07, 2019 1:53 pm

Re: BitMEX Adapter

Post by suspy » Sun Sep 08, 2019 1:21 am

AndreyR wrote:
Sat Sep 07, 2019 7:07 pm
[img]E:[/img]You've done everything right and it should be working if exported as jar from Eclipse. Would you please make some screenshots and send me the log file so I can figure out what's wrong (there's no attach button for a quick reply but you press 'Full editor&preview' there'll be one) .
When I use my compiled jar, there is no error message in ui or log file, BitMEX is not shown in Connectivity configuration. Replace with github release version, BitMEX listed.
AndreyR wrote:
Sat Sep 07, 2019 7:07 pm
Sorry I do not get the problem you have with snapshots, could you provide more details.
 It seems this timer timeout most of time, I want make it wait longer.

Code: Select all

instr.setSnapshotTimer(timer); 
Log.info("[bitmex] BmConnector launchSnapshotTimer " + localTimerCount + " for " + instr.getSymbol() + ": " + ZonedDateTime.now(ZoneOffset.UTC)); 
timer.schedule(task, 10000);  

AndreyR
Posts: 131
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 9 times
Been thanked: 37 times

Re: BitMEX Adapter

Post by AndreyR » Mon Sep 09, 2019 8:28 am

Hi suspy,
send me your log files (at C:\Bookmap\Logs for Windows) for Bookmap started with GitHub release version and your custom version.

Post Reply