Not able to place order

sin
Here is the payload

Order Param : {"exchange":"NSE","tradingsymbol":"SUNTV","transactionType":"BUY","quantity":205,"price":487.45,"product":"CNC","orderType":"LIMIT","validity":"DAY","triggerPrice":0.0,"tag":"myApp"}

Here is the exception

com.nse.common.core.OrderException: Could not place Order null
at com.nse.common.core.dao.OrderManagementDao.placeOrder(OrderManagementDao.java:121)
at com.nse.common.core.ManageOrders.placeOrder(ManageOrders.java:46)
at com.nse.common.action.v2.ExecuteKiteTradeV2Action.doGet(ExecuteKiteTradeV2Action.java:32)
at com.nse.common.action.v2.ExecuteKiteTradeV2Action.doPost(ExecuteKiteTradeV2Action.java:22)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.CorsFilter.handleSimpleCORS(CorsFilter.java:259)
at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:163)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: 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.postRequest(KiteRequestHandler.java:86)
at com.zerodhatech.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:319)
at com.nse.common.core.dao.OrderManagementDao.placeOrder(OrderManagementDao.java:100)
... 31 more



Tagged:
  • sin
    Do I need to enable any permission?
  • sujith
    Can you enable debug logs and paste the exception message here?
  • sin
    This is the exception message I have. Didn't get any other message. Is there anything else should I configure in the client code to enable extra logging?
  • sin
    Found this config
    KiteConnect kiteConnect = new KiteConnect("xxxxyyyyzzzz", true);
    Will enable and get back to you.
  • sujith
    Make sure to not post any app or client specific tokens.
  • sin
    After enabling log, identify TOTP was not enabled. Now enabled TOTP and it's working.

    Thanks
This discussion has been closed.