I Have developed an algorithm which generates signals per minute. Suppose for a buy signal I place a market cover order and in the next minute I wish to exit the second leg of the cover order. I am using the following syntax to exit the second leg
kite.exit_order(order id= oid, parent order id = poid, variety='co')
The above syntax throws the following error
Cannot cancel order as it is being processed Try later.
During the kite.exit_order() call the status of the order is "TRIGGER PENDING"