Skip to content

Commit

Permalink
feat: improve waiting time for pending market exit orders
Browse files Browse the repository at this point in the history
The code changes in `Strategy.py` modify the waiting time for pending market exit orders. The previous waiting time was set to 10 seconds, but it has been increased to 12 seconds in order to allow more time for the exchange to respond as expected for order execution. This change aims to improve the reliability of the order execution process.

Note: The recent user commits and repository commits are not relevant for generating the commit message in this case.
  • Loading branch information
saleh-mir committed Jun 7, 2024
1 parent c94226f commit 28a6f97
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jesse/strategies/Strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,11 +660,12 @@ def _check(self) -> None:
if jh.is_debugging():
logger.info(f'Waiting {waiting_seconds} second for pending market exit orders to be handled...')
waiting_counter += 1
sleep(1)
if waiting_counter > 10:
if waiting_counter > 12:
raise exceptions.ExchangeNotResponding(
'The exchange did not respond as expected for order execution'
)
else:
sleep(1)

self._simulate_market_order_execution()

Expand Down

0 comments on commit 28a6f97

Please sign in to comment.