Use "round" to 12 digits for TickSize mode

Avoids float rounding problems, fix #5652
This commit is contained in:
Matthias 2021-10-03 09:48:50 +02:00
parent e73f5ab480
commit f5e5203388

View File

@ -523,7 +523,7 @@ class Exchange:
precision = self.markets[pair]['precision']['price']
missing = price % precision
if missing != 0:
price = price - missing + precision
price = round(price - missing + precision, 10)
else:
symbol_prec = self.markets[pair]['precision']['price']
big_price = price * pow(10, symbol_prec)