From 47613b1cf9306b4b08ff57f3e100f14767b182ed Mon Sep 17 00:00:00 2001 From: David Arena Date: Tue, 17 Dec 2024 18:32:27 +0100 Subject: [PATCH] fix: no tradeID only returns open trades --- freqtrade/rpc/rpc.py | 4 ++-- ft_client/freqtrade_client/ft_rest_client.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index 5b8862556..68b749450 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -1102,8 +1102,8 @@ class RPC: if trade_id: trades = Trade.get_trades(trade_filter=[Trade.id == trade_id]).all() else: - # If no trade_id, get all trades - trades = Trade.get_trades().all() + # If no trade_id, get all open trades + trades = Trade.get_open_trades() if not trades: return [] diff --git a/ft_client/freqtrade_client/ft_rest_client.py b/ft_client/freqtrade_client/ft_rest_client.py index a7027fa42..bd6617f73 100755 --- a/ft_client/freqtrade_client/ft_rest_client.py +++ b/ft_client/freqtrade_client/ft_rest_client.py @@ -477,6 +477,7 @@ class FtRestClient: def list_custom_data(self, trade_id=None, key=None): """Lists custom_data of the running bot. + Without a tradeid, returns all custom_data from open trades. :param tradeid: Optional keyword argument - Id of the trade (can be received via status command) :param key: Optional keyword argument - Key of the custom data