fix: no tradeID only returns open trades

This commit is contained in:
David Arena
2024-12-17 18:32:27 +01:00
parent ef3a7d5c92
commit 47613b1cf9
2 changed files with 3 additions and 2 deletions

View File

@@ -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 []