Cancel Order | Market (MIS)

Not able to cancel Market (MIS) order.

Tried below code:
1 )kite.CancelOrder("1234");
2) kite.CancelOrder(
OrderId: "1234",
Variety: Constants.VARIETY_Regular
3) kite.CancelOrder(
OrderId: "1234"

Please suggest the solution.
  • sujith
    One can only cancel an open order and not the executed ones.
  • WahWah
    WahWah edited April 2019
    Thanks for your response.

    How we can exit from the executed Market order through .Net API.
    For example, I bought 500 shares on Market Price and I want to take exit (Sell) later.

  • sujith
    You need to fetch positions and check the open position quantity and then place an opposite market regular order to exit the position.
  • WahWah
    Got it.
    Will try at my end.

    Thank you for your response.
This discussion has been closed.