Skip to content

[IndexTrading] cancel orders on iteration#1472

Merged
GuillaumeDSM merged 1 commit intodevfrom
index
Apr 2, 2025
Merged

[IndexTrading] cancel orders on iteration#1472
GuillaumeDSM merged 1 commit intodevfrom
index

Conversation

@GuillaumeDSM
Copy link
Member

No description provided.

@GuillaumeDSM GuillaumeDSM requested a review from Herklos March 31, 2025 12:59
@GuillaumeDSM GuillaumeDSM self-assigned this Mar 31, 2025
Comment on lines -692 to -702
symbol_open_orders = [
order
for order in self.exchange_manager.exchange_personal_data.orders_manager.get_open_orders()
if order.symbol in self.exchange_manager.exchange_config.traded_symbol_pairs
]
self.logger.info(
f"Optimizing portfolio: cancelling {len(symbol_open_orders)} open orders, selling {sellable_assets} "
f"to buy {target_asset}"
)
for order in symbol_open_orders:
await self.cancel_order(order)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we still do that for "entire portfolio" bots?

@GuillaumeDSM
Copy link
Member Author

up!

@GuillaumeDSM GuillaumeDSM changed the title [IndexTrading] Don't cancel orders on optimization [IndexTrading] cancel orders on iteration Apr 1, 2025
@GuillaumeDSM GuillaumeDSM merged commit 97ca95f into dev Apr 2, 2025
5 checks passed
@GuillaumeDSM GuillaumeDSM deleted the index branch April 2, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants