Simplify code by removing unnecessary (and non-working) method

This commit is contained in:
Matthias
2023-09-07 20:16:56 +02:00
parent f19f3ed4eb
commit ffaa121bc7
3 changed files with 2 additions and 11 deletions

View File

@@ -1315,7 +1315,7 @@ class FreqtradeBot(LoggingMixin):
Timeout setting takes priority over limit order adjustment request.
:return: None
"""
for trade in Trade.get_open_order_trades():
for trade in Trade.get_open_trades():
for open_order in trade.open_orders:
try:
order = self.exchange.fetch_order(open_order.order_id, trade.pair)
@@ -1426,7 +1426,7 @@ class FreqtradeBot(LoggingMixin):
:return: None
"""
for trade in Trade.get_open_order_trades():
for trade in Trade.get_open_trades():
for open_order in trade.open_orders:
try:
order = self.exchange.fetch_order(open_order.order_id, trade.pair)

View File

@@ -1442,14 +1442,6 @@ class Trade(ModelBase, LocalTrade):
# raise an exception.
return Trade.session.scalars(query)
@staticmethod
def get_open_order_trades() -> List['Trade']:
"""
Returns all open trades
NOTE: Not supported in Backtesting.
"""
return cast(List[Trade], Trade.get_trades([Trade.open_orders_count != 0]).all())
@staticmethod
def get_open_trades_without_assigned_fees():
"""

View File

@@ -2037,7 +2037,6 @@ def test_Trade_object_idem():
'total_open_trades_stakes',
'get_closed_trades_without_assigned_fees',
'get_open_trades_without_assigned_fees',
'get_open_order_trades',
'get_trades',
'get_trades_query',
'get_exit_reason_performance',