From e0c6cc15637dafbc6e097305df95ce023569aa87 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 26 Nov 2024 10:23:03 +0100 Subject: [PATCH] feat: add log_responses to /balance endpoint part of #10994 --- freqtrade/exchange/exchange.py | 1 + freqtrade/exchange/kraken.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 4b8f239628c..5f35e71f9ad 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1657,6 +1657,7 @@ def get_balances(self) -> CcxtBalances: balances.pop("total", None) balances.pop("used", None) + self._log_exchange_response("fetch_balances", balances) return balances except ccxt.DDoSProtection as e: raise DDosProtection(e) from e diff --git a/freqtrade/exchange/kraken.py b/freqtrade/exchange/kraken.py index 365b88681d8..f784ef7277c 100644 --- a/freqtrade/exchange/kraken.py +++ b/freqtrade/exchange/kraken.py @@ -68,7 +68,7 @@ def get_balances(self) -> CcxtBalances: balances.pop("free", None) balances.pop("total", None) balances.pop("used", None) - + self._log_exchange_response("fetch_balances", balances) orders = self._api.fetch_open_orders() order_list = [ ( @@ -86,6 +86,7 @@ def get_balances(self) -> CcxtBalances: balances[bal]["used"] = sum(order[1] for order in order_list if order[0] == bal) balances[bal]["free"] = balances[bal]["total"] - balances[bal]["used"] + self._log_exchange_response("fetch_balances2", balances) return balances except ccxt.DDoSProtection as e: raise DDosProtection(e) from e