How to close a Regular MIS order

How do I close a Regular MIS order. API documentation is not clear.
I am able to place a regular MIS order using order option.
How do I close this order.
I have tried kite.exit_order() and kite.cancel_order(). it gives an error.
DEBUG:urllib3.connectionpool: "DELETE /orders/regular/210927001103049?order_id=210927001103049&variety=regular HTTP/1.1" 400 135
CLOSING ID failed Order cannot be cancelled as it is being processed. Try later.
  • sujith
    You will have to place a market order with opposite transaction type to exit a MIS position.
  • rajtk
    Thanks , Issue resolved. Please close the ticket.
This discussion has been closed.