Skip to content

Commit

Permalink
Fix cancel order (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
arodus authored Nov 30, 2023
1 parent a5b3f02 commit 88394fb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions QuantConnect.BybitBrokerage/BybitBrokerage.Brokerage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,9 @@ public override bool CancelOrder(Order order)
return;
}

if (order.Status is OrderStatus.Canceled or OrderStatus.CancelPending)
if (order.Status is OrderStatus.Canceled)
{
OnMessage(new BrokerageMessageEvent(BrokerageMessageType.Warning, -1,
"Order already canceled or cancellation submitted"));
OnMessage(new BrokerageMessageEvent(BrokerageMessageType.Warning, -1, "Order already canceled"));
return;
}

Expand Down Expand Up @@ -250,4 +249,4 @@ public override void Disconnect()


#endregion
}
}

0 comments on commit 88394fb

Please sign in to comment.