gazbert / bxbot

A simple Bitcoin trading bot written in Java.
MIT License
779 stars 275 forks source link

Filter getYourOpenOrders by Market #55

Closed askosyrskiy closed 7 years ago

askosyrskiy commented 7 years ago

Hi @gazbert,

I found an issue with Gemini adapter. When you working with 2 markets, for example BTCUSD and ETHUSD same time getYourOpenOrders function returns all your open orders regardless marketId parameter for the function. Not sure if was designed this way or its an issue.

I have added this fix to support multiple markets:

image

gazbert commented 7 years ago

Hi Alexey

This is definitely a bug. All the adapters were based off the original BTC-e adapter, which does filter on market id. But Gemini, Bitfinex, Bitstamp, GDAX, and ItBit do not - no idea how I missed this. I only trade on 1 market on these exchanges, so didn't spot the bug. Great find!

Do you want to submit a PR? Your fix snippet is the way to go... I can get the fix in pretty quick for all the adapters, but just wanted to check in case you wanted to contribute any code, or are happy for me sort it out?

Cheers Gareth

askosyrskiy commented 7 years ago

Will be happy for you to fix it :) I have limited time now for the PR and testing it.

Thank you

gazbert commented 7 years ago

Sure thing. Should be straightforward for Gemini, Bitfinex, GDAX, and ItBit - the open order response contains the market id.

Bitstamp is a bit more work - I'll need to update to v2 of the exchange API in order to distinguish between the markets... Muh. ;-)

gazbert commented 7 years ago

Released.