Bitmex IllegalArgumentException: value already present: H18 after version 4.3.2
See original GitHub issueI randomly started getting this exception in all of my programs using Bitmex:
Exception in thread "main" java.lang.IllegalArgumentException: value already present: H18 at com.google.common.collect.HashBiMap.put(HashBiMap.java:282) at com.google.common.collect.HashBiMap.put(HashBiMap.java:258) at org.knowm.xchange.bitmex.service.BitmexMarketDataServiceRaw.getActivePrompts(BitmexMarketDataServiceRaw.java:117) at org.knowm.xchange.bitmex.BitmexExchange.remoteInit(BitmexExchange.java:54)
Only way I have been able to stop it is changing my pom file to 4.3.2, getting the same thing with 4.3.3 and 4.3.4 snapshot
I am guessing the H18 is from the supposed base pair of the futures contracts like LTCH18, but I am getting this exception even with a fresh project. thanks!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top GitHub Comments
i will try to take a look i think we are now getting duplicate contract dates being returned bý the active instruments api adding quick .contains() in the remote init before adding the contracts to the hash map should fix it.
On Sat, 3 Mar 2018, 02:23 Jim Northrup, notifications@github.com wrote:
if you’re feeling like implementing the features you need most I have generated bitmex fresh from swagger this morning to remove all the stacktraces in my console when its running.
it appears that @timmolter would rather maintain 60+ handwritten modules than generate the boilerplate, or let anyone commit code that does so and the bitmex module is a galactic scale amount of hand-maintained brittle code so it looks like an impending fork as I implement the features i need in the exchanges I can’t contribute to the main codebase here.
you can get the bitmex work-in-progress from https://github.com/jnorthrup/XChange swagger-gen branch (now my default)