com.zerodhatech.kiteconnect.kitehttp.exceptions.OrderException: null at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.dealWithException(KiteResponseHandler.java:56) ~[kiteconnect-3 .1.1.jar!/:na] at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:20) ~[kiteconnect-3.1.1.jar!/: na] at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.postRequest(KiteRequestHandler.java:85) ~[kiteconnect-3.1.1.jar !/:na] at com.zerodhatech.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:291) ~[kiteconnect-3.1.1.jar!/:na]
I got the above error in Place Order API , however the order still got placed. It was a buy order and My code assumed that order failed due to the exception and therefore never created a sell. It was an MIS order, I got charged for not Completing this at 3:20 pm.
The exception doesn't seems to have any information either. How are we supposed to handle these kind of scenarios?
You may also run it in debug mode to see what are the params being sent and what is the exact json response.
You can also check out this thread to know more about the error handling while placing orders.