Unable to exit the Market order.

Andy2188
Order is placed successfully and is open. while placing the exit order, it fails with below error:

>>> kite.exit_order(variety=kite.VARIETY_REGULAR, order_id = orderId)

kiteconnect.exceptions.InputException: Order cannot be cancelled as it is being processed. Try later.

Upon checking the order status, the order is in completed state as seen below:

'order_id': '220207500185656', 'exchange_order_id': '1000000064185255', 'parent_order_id': None, 'status': 'COMPLETE',

Am is missing something here? How to exit the open orders?
This discussion has been closed.