diff --git a/sor/_router.py b/sor/_router.py index 80f3eb12..45c8e8a3 100644 --- a/sor/_router.py +++ b/sor/_router.py @@ -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