gbeced/basana

Bug in binance.exchange.get_pair_info()

petmo opened this issue · 2 comments

petmo commented

There seems to be a bug in how the Binance exchange returns pair info.

E.g.,

pair_info = await exchange.get_pair_info(bs.Pair(base_symbol="DOGE", quote_symbol="USDT"))
print(pair_info.base_precision, pair_info.quote_precision)

Returns
0, 5

But going by the raw output from the binance symbol info, it should be 8 / 8:

{'symbol': 'DOGEUSDT',
 'status': 'TRADING',
 'baseAsset': 'DOGE',
 'baseAssetPrecision': 8,
 'quoteAsset': 'USDT',
 'quotePrecision': 8,
 'quoteAssetPrecision': 8,
 'baseCommissionPrecision': 8,
 'quoteCommissionPrecision': 8,
...
petmo commented

Looks like the API returns 8, 8 for any pair. Anyhow, it's weird the the base precision becomes 0 for DOGE? Surely that can't be right

Also tried clearing the exchange pair info cache - this is a consistent issue it seems like.

petmo commented

Nvm!