If you placed order at market price then it would have already completed right? If the parent order is already executed then you need to exit the order and not cancel the order.
i use the same. it was confusing for me because commented header is CO market exiting and variety is BO in your git hub library. but i tried both BO and CO but still not working .
Can you private message the second leg order id and client id? We will check and get back to you. You need to send co as the variety. I think .NET documentation is wrong if it says BO
so tell me which order id should i use to cancel the cover order?
If the parent order is already executed then you need to exit the order and not cancel the order.
This is equivalent to exiting the order.
If you are then you need to open the Kite web and check if the second leg order is still pending.
// CO MARKET exiting
kite.CancelOrder(
OrderId: "1234",
Variety: Constants.VARIETY_BO,
ParentOrderId: "5678"
);
i use the same. it was confusing for me because commented header is CO market exiting and variety is BO in your git hub library. but i tried both BO and CO but still not working .
You need to send co as the variety. I think .NET documentation is wrong if it says BO