From f5e5203388b6666664c5b9edd09683956d196478 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 3 Oct 2021 09:48:50 +0200 Subject: [PATCH] Use "round" to 12 digits for TickSize mode Avoids float rounding problems, fix #5652 --- freqtrade/exchange/exchange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 2b9b08d70..e9d0316d2 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -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)