Skip to content

Commit

Permalink
fix: clear event for each loop; remove sleep debug in amm_arb
Browse files Browse the repository at this point in the history
  • Loading branch information
fibonacci998 committed Apr 19, 2024
1 parent 219cf03 commit e6cfc9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hummingbot/strategy/amm_arb/amm_arb.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ async def execute_arb_proposals(self, arb_proposals: List[ArbProposal]):
self.log_with_clock(logging.INFO,
f"Placing {side} order for {arb_side.amount} {arb_side.market_info.base_asset} "
f"at {arb_side.market_info.market.display_name} at {arb_side.order_price} price")
arb_side.completed_event.clear()
arb_side.failed_event.clear()

order_id: str = await self.place_arb_order(
arb_side.market_info,
Expand All @@ -337,7 +339,6 @@ async def execute_arb_proposals(self, arb_proposals: List[ArbProposal]):
})

if not self._concurrent_orders_submission:
await asyncio.sleep(6)
await arb_side.completed_event.wait()
if arb_side.is_failed:
self.log_with_clock(logging.ERROR,
Expand Down

0 comments on commit e6cfc9a

Please sign in to comment.