XChange icon indicating copy to clipboard operation
XChange copied to clipboard

(bitfinex) BitfinexTradeServiceRaw.getBitfinexOrderStatus() throws "No such order found"-Exception

Open manuel-armbruster opened this issue 8 years ago • 7 comments

BitfinexOrderStatusResponse orderStatus = bitfinexTradeServiceRaw.getBitfinexOrderStatus(orderId);

throws an

org.knowm.xchange.exceptions.ExchangeException: org.knowm.xchange.bitfinex.v1.dto.BitfinexException: No such order found.

But when I am generating a bitfinex order history report, I can see the corresponding order. Is this a bug? Is anyone else getting an orderStatus object returned?

Side notes: Yes, I have tripple checked the order id. The order has been placed and filled on Dec 11 2017.

manuel-armbruster avatar Jan 02 '18 10:01 manuel-armbruster

UserTrade has two ids - id and orderId. Haven't you mixed them up? Atm. first one starts from 1 and last one from 6

hurricup avatar Jan 03 '18 06:01 hurricup

Thanks for respond. Does it work for you?

Actually I am using the BitfinexOrderStatusResponse class returned by bitfinexTradeServiceRaw.getBitfinexOrderStatus(orderId) with orderId="6060608837". So this should work imo, but receiving the above mentioned BitfinexException...

manuel-armbruster avatar Jan 03 '18 11:01 manuel-armbruster

I've requested status of one of my opened orders and everything worked fine. Anyway, seems like this exception is from a bitfinex side and guess you should ask them about it.

hurricup avatar Jan 03 '18 11:01 hurricup

@tonyskulk calling bitfinexTradeServiceRaw.getBitfinexOrderStatus(orderId) on any of my orders works fine. Calling the same on the order id you provided throws the exception you mention.

lucarosellini avatar Jan 03 '18 11:01 lucarosellini

@lucarosellini Have you tried an order that has been filled already? Maybe that´s the point, that it is only working for open orders...

manuel-armbruster avatar Jan 03 '18 22:01 manuel-armbruster

@tonyskulk this is definitely working for me, the following is a limit order obtained by calling bitfinexTradeService.getOrder(orderId), which in turn calls bitfinexTradeServiceRaw.getBitfinexOrderStatus(orderId):

LimitOrder [limitPrice=13858.0, Order [type=ASK, originalAmount=0.01631, cumulativeAmount=0.01631, averagePrice=13860.70610917, currencyPair=BTC/USD, id=XXXXXXXX, timestamp=Tue Jan 02 16:04:50 CET 2018, status=FILLED]]

(order id obfuscated intentionally).

lucarosellini avatar Jan 04 '18 10:01 lucarosellini

@lucarosellini Ok, thank you for your effort. I will check this on newer orders and / or contact bitfinex support.

manuel-armbruster avatar Jan 04 '18 17:01 manuel-armbruster