From de5dd66512fa094ba0e36635eac8bee31e314e06 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 1 Aug 2025 06:53:38 +0200 Subject: [PATCH] fix: update decimal_to_precision usage to new interface The keyword parameter name changed in https://github.com/ccxt/ccxt/pull/26289 Breaking how we call decimal_to_precision. --- freqtrade/exchange/exchange_utils.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/freqtrade/exchange/exchange_utils.py b/freqtrade/exchange/exchange_utils.py index 550aab2c3..ddb57b123 100644 --- a/freqtrade/exchange/exchange_utils.py +++ b/freqtrade/exchange/exchange_utils.py @@ -213,9 +213,9 @@ def amount_to_precision( amount = float( decimal_to_precision( amount, - rounding_mode=TRUNCATE, - precision=precision, - counting_mode=precisionMode, + TRUNCATE, # rounding_mode + precision, # numPrecisionDigits + precisionMode, # counting_mode ) ) @@ -311,11 +311,11 @@ def price_to_precision( return float( decimal_to_precision( price, - rounding_mode=rounding_mode, - precision=int(price_precision) + rounding_mode, # rounding mode + int(price_precision) if precisionMode != TICK_SIZE - else price_precision, - counting_mode=precisionMode, + else price_precision, # numPrecisionDigits + precisionMode, # counting_mode ) )