Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
m5l14i11 committed Apr 30, 2024
1 parent c051a8a commit 1b2657c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sor/_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ async def close_position(self, command: ClosePosition):
f"Trying to reduce order -> algo price: {price}, theo price: {exit_price}, spread: {spread}, max spread: {max_spread}"
)

if max_spread < 0:
self.exchange.close_full_position(symbol, position_side)
break

curr_time = time.time()
expired_orders = [
order_id
Expand Down

0 comments on commit 1b2657c

Please sign in to comment.