mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-17 13:21:15 +00:00
fix: no tradeID only returns open trades
This commit is contained in:
@@ -1102,8 +1102,8 @@ class RPC:
|
|||||||
if trade_id:
|
if trade_id:
|
||||||
trades = Trade.get_trades(trade_filter=[Trade.id == trade_id]).all()
|
trades = Trade.get_trades(trade_filter=[Trade.id == trade_id]).all()
|
||||||
else:
|
else:
|
||||||
# If no trade_id, get all trades
|
# If no trade_id, get all open trades
|
||||||
trades = Trade.get_trades().all()
|
trades = Trade.get_open_trades()
|
||||||
|
|
||||||
if not trades:
|
if not trades:
|
||||||
return []
|
return []
|
||||||
|
|||||||
@@ -477,6 +477,7 @@ class FtRestClient:
|
|||||||
|
|
||||||
def list_custom_data(self, trade_id=None, key=None):
|
def list_custom_data(self, trade_id=None, key=None):
|
||||||
"""Lists custom_data of the running bot.
|
"""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 tradeid: Optional keyword argument - Id of the trade (can be received via status command)
|
||||||
:param key: Optional keyword argument - Key of the custom data
|
:param key: Optional keyword argument - Key of the custom data
|
||||||
|
|||||||
Reference in New Issue
Block a user