Open pavlo-pastushok opened 10 months ago
did anyone facing same issue?
Hello, @pavlo-pastushok i checked https://api.bitfinex.com/v2/tickers?symbols=tALT2612%3AUSD strange, but results are different, sometimes one, sometimes another. ["tALT2612:USD",100,0,100,0,0,0,100,1.0E-6,0,0] ["tALT2612:USD",100,null,100,null,null,null,null,null,null,null]
We need to understand that this is normal operation of the exchange API, and then create an exception handler. Or is this some kind of temporary error?
Hi @rizer1980
I am not sure, but I received this situation more than 10 times a day during last 3 days I will try to contact support with this question
@rizer1980 @pavlo-pastushok
I have faced a similar issue. It seemed that exchange metadata was not populated for currency pairs with USDT as the quoted currency. Upon checking, it looks like during the remote init process, currency pairs derived from tickers and symbol details are processed inconsistently, at least in terms of adapting the currencies. This resulted in
BigDecimal last = lastPrices.get(currencyPair);
in BitfinexAdapters.adaptMetaData()
not finding USDT quoted symbols, because the ticker-derived list of symbols (lastPrices) had the quoted currency as UST, but the symbols-details-derived (symbolDetails) currency as USDT.
The fix appears to be needed in
BitfinexAdapters.adaptTicker(org.knowm.xchange.bitfinex.v2.dto.marketdata.BitfinexTicker bitfinexTicker)
Change:
CurrencyPair currencyPair = CurrencyPairDeserializer.getCurrencyPairFromString(bitfinexTicker.getSymbol().substring(1));
to:
CurrencyPair currencyPair = BitfinexAdapters.adaptCurrencyPair(bitfinexTicker.getSymbol());
This will then adapt ticker-derived symbols and symbols-details-derived symbols in the same way, and results in UST being converted to USDT in both cases.
Note that getTicker() and getTickers() on BitfinexMarketDataService also call BitfinexAdapters.adaptTicker, so a regression test could be extended to these use cases as well.
Hope this helps with any bug fix that may be deemed necessary :)
@rustyruzzee nice. shouldnt this be a PR?
During Bitfinex remoteInit I received an error related to tickers adaptation
a line above throws an exception
because some tickers have
dailyChangePerc
field as nullfor example: