Error while exiting cover orders

Samwad
I am using the following code to place a market cover order a bank nifty option and subsequent exit the same. There is a error thrown that "cannot cancel order as it is been processed Try again later" but the actual status of the order is been shown as trigger pending

order_id = kite.place_order(tradingsymbol='BANKNIFTY2061120800CE',
variety= 'co',exchange='NFO',
transaction_type=kite.TRANSACTION_TYPE_BUY,quantity=20,
trigger_price = kite.ltp('10799106')['10799106']['last_price'] - 18,
order_type=kite.ORDER_TYPE_MARKET, product='MIS')


parent_order_id = kite.orders()['parent_order_id'][-1]



kite.exit_order(order_id = order_id, variety = 'co', parent_order_id = parent_order_id)
Sign In or Register to comment.