I am new to the Kite API tried to place an order the first time but was not able to place it. I am able to access my holding and other data thru kiteConnect. I am using Orderparam given in the example only. OrderParams orderParams = new OrderParams(); orderParams.quantity = 1; orderParams.orderType = Constants.ORDER_TYPE_LIMIT; orderParams.tradingsymbol = "ASHOKLEY"; orderParams.product = Constants.PRODUCT_CNC; orderParams.exchange = Constants.EXCHANGE_NSE; orderParams.transactionType = Constants.TRANSACTION_TYPE_BUY; orderParams.validity = Constants.VALIDITY_DAY; orderParams.price = 120.2; orderParams.triggerPrice = 0.0; orderParams.tag = "myTag"; order = kiteConnect.placeOrder(orderParams, Constants.VARIETY_REGULAR);
Error: 2021-12-13 10:56:15.395 ERROR 50981 --- [ Thread-2] zerodha.KiteTradeApp : null 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.postRequest(KiteRequestHandler.java:86) at com.zerodhatech.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:353)
2021-12-13 10:56:15.395 ERROR 50981 --- [ Thread-2] zerodha.KiteTradeApp : null
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.postRequest(KiteRequestHandler.java:86)
at com.zerodhatech.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:353)
Maybe you can run javakiteconnect with debug log on and check the json response.
logging:
level:
root: ERROR
...
com.zerodhatech: DEBUG
Do I need to do something more to enable logs in kiteconnect
Let me try to set TOTP