Skip to content

Commit ab80116

Browse files
committed
wip
1 parent 177e282 commit ab80116

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

octobot_trading/exchanges/traders/trader.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ async def update_order_as_inactive(
405405
self, order, ignored_order=None, wait_for_cancelling=True,
406406
cancelling_timeout=octobot_trading.constants.INDIVIDUAL_ORDER_SYNC_TIMEOUT
407407
) -> bool:
408-
if self.simulate:
409-
self.logger.error(f"Can't update order as inactive on simulated trading.")
408+
if not self.enable_inactive_orders:
409+
self.logger.error(f"Can't update order as inactive when {self.enable_inactive_orders=}.")
410410
return False
411411
cancelled = False
412412
if order and order.is_open():
@@ -422,8 +422,8 @@ async def update_order_as_active(
422422
self, order, params: dict = None, wait_for_creation=True, raise_all_creation_error=False,
423423
creation_timeout=octobot_trading.constants.INDIVIDUAL_ORDER_SYNC_TIMEOUT
424424
):
425-
if self.simulate:
426-
self.logger.error(f"Can't update order as active on simulated trading.")
425+
if not self.enable_inactive_orders:
426+
self.logger.error(f"Can't update order as active when {self.enable_inactive_orders=}.")
427427
return order
428428
with order.active_or_inactive_transition():
429429
return await self.create_order(

octobot_trading/personal_data/orders/order_group.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def _default_active_order_swap_strategy(self, timeout: float) -> active_order_sw
7171
"""
7272
Called when an order of this group is becoming active
7373
"""
74+
raise NotImplementedError("_default_active_order_swap_strategy is not implemented")
7475

7576

7677
async def enable(self, enabled):

0 commit comments

Comments
 (0)