Line 84237: INFO: {"status":"success","data":{"order_id":"240327200070722"}} Line 84241: INFO: OrderPlaced :240327200070722 Line 84243: INFO: Order update received for: 240327200070722OrderStatus:OPEN Line 84245: INFO: Order update received for: 240327200070722OrderStatus:COMPLETE Line 84249: INFO: --> GET https://api.kite.trade/orders/240327200070722 Line 84259: INFO: <-- 200 OK https://api.kite.trade/orders/240327200070722 (338ms)
Mar 27, 2024 9:29:02 AM okhttp3.internal.platform.Platform log INFO: {"status":"error","message":"Order cannot be cancelled as it is being processed. Try later.","data":null,"error_type":"InputException"} Mar 27, 2024 9:29:02 AM okhttp3.internal.platform.Platform log INFO: <-- END HTTP (135-byte body) Mar 27, 2024 9:29:02 AM com.samba.MISOrderHandler run SEVERE: KiteException com.zerodhatech.kiteconnect.kitehttp.exceptions.InputException at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.dealWithException(KiteResponseHandler.java:54) at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:20) at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.deleteRequest(KiteRequestHandler.java:117) at com.zerodhatech.kiteconnect.KiteConnect.cancelOrder(KiteConnect.java:338) at com.samba.MISOrderHandler.exitTargetOrder(MISOrderHandler.java:152) at com.samba.MISOrderHandler.run(MISOrderHandler.java:68) at java.lang.Thread.run(Unknown Source)
Not sure why it is failing. Can you please let me know what is wrong for cancel order.
it is already executed. you can see the order status as 'completed' and the cancel order is after couple 0.5 hrs. since it is not cancelled, auto square off triggered and charged 50rs for that.... for exit orders do we have any other API other than cancel order from kite connect???
Cancel order will only cancel a pending or partially filled order. You need to place a new order with same quantity and product type but opposite transaction type to exit a position.
it is still failing..
Thanks,
Samba