Order coverOrderResponse = kiteConnect.placeOrder(coverOrderParams, Constants.VARIETY_CO); System.out.println("Cover Order placed successfully: Order ID - " + coverOrderResponse.orderId);
Error : com.zerodhatech.kiteconnect.kitehttp.exceptions.InputException at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.dealWithException(KiteResponseHandler.java:55) at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:21) at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.postRequest(KiteRequestHandler.java:90) at com.zerodhatech.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:389)
Above is my code , I am not understanding why I am getting input exception , please let me know if I gave something wrong , for above I have followed example code kite github , I have even set up TOTP also. I read previous threads nothing solved my query.
@rakeshr Thanks for reply! I think this is the issue , but in which case do we get this? I thought this much of logs would be enough , please let me know if you still wanna see complete logs. Aug 25, 2023 12:08:36 PM okhttp3.internal.platform.Platform log INFO: Aug 25, 2023 12:08:36 PM okhttp3.internal.platform.Platform log INFO: {"status":"error","message":"The instrument you are placing an order for has either expired or does not exist.","data":null,"error_type":"InputException"} Aug 25, 2023 12:08:36 PM okhttp3.internal.platform.Platform log INFO: <-- END HTTP (154-byte body) com.zerodhatech.kiteconnect.kitehttp.exceptions.InputException at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.dealWithException(KiteResponseHandler.java:55) at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:21) at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.postRequest(KiteRequestHandler.java:90) at com.zerodhatech.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:389) at org.example.Main.placeCoverOrderWithStopLoss(Main.java:256) at org.example.Main$1.run(Main.java:188) at java.base/java.util.TimerThread.mainLoop(Timer.java:566) at java.base/java.util.TimerThread.run(Timer.java:516)
Aug 25, 2023 12:08:36 PM okhttp3.internal.platform.Platform log
INFO:
Aug 25, 2023 12:08:36 PM okhttp3.internal.platform.Platform log
INFO: {"status":"error","message":"The instrument you are placing an order for has either expired or does not exist.","data":null,"error_type":"InputException"}
Aug 25, 2023 12:08:36 PM okhttp3.internal.platform.Platform log
INFO: <-- END HTTP (154-byte body)
com.zerodhatech.kiteconnect.kitehttp.exceptions.InputException
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.dealWithException(KiteResponseHandler.java:55)
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:21)
at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.postRequest(KiteRequestHandler.java:90)
at com.zerodhatech.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:389)
at org.example.Main.placeCoverOrderWithStopLoss(Main.java:256)
at org.example.Main$1.run(Main.java:188)
at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
at java.base/java.util.TimerThread.run(Timer.java:516)