cryptocom-exchange
cryptocom-exchange copied to clipboard
quantity_precision 0 bug?
if quantity_precision is 0, 11.76 goes 12 it should be down(floor)
class Pair, round_quantity func
my case was XRP_USDT, python 3.9.13
heplers.py def round_down(value: TP.Union[float, str], precision: int) -> float: """Rounds number to lower precision 0.13 -> 0.1""" # value = float(value) # pwr = 10**precision # return round((value * pwr) / pwr, precision)
value = float(value)
pwr = 10 ** precision
return int(value * pwr) / pwr