Add float initializer to FtPrecise

This commit is contained in:
Matthias
2022-08-10 11:29:04 +00:00
parent e7cb1b7375
commit ed004236ce
3 changed files with 12 additions and 4 deletions

View File

@@ -709,8 +709,8 @@ class Exchange:
# counting_mode=self.precisionMode,
# ))
if self.precisionMode == TICK_SIZE:
precision = FtPrecise(str(self.markets[pair]['precision']['price']))
price_str = FtPrecise(str(price))
precision = FtPrecise(self.markets[pair]['precision']['price'])
price_str = FtPrecise(price)
missing = price_str % precision
if not missing == FtPrecise("0"):
price = round(float(str(price_str - missing + precision)), 14)