Hi, I get the following error while fetching historical data. Iam giving the following parameters. fromdate=new SimpleDateFormat("yyyyMMdd HH:mm:ss").parse("05042020 09:30:00"); todate=new SimpleDateFormat("yyyyMMdd HH:mm:ss").parse("05042020 15:15:00"); token="408065"; //this is instrument token interval="5minute"; oi=false;
Exception in thread "main" com.zerodhatech.kiteconnect.kitehttp.exceptions.TokenException at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.dealWithException(KiteResponseHandler.java:48) at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:20) at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.getRequest(KiteRequestHandler.java:69) at com.zerodhatech.kiteconnect.KiteConnect.getHistoricalData(KiteConnect.java:732) at javaapplication1.Stock_trading_program.getHistoricalData(Stock_trading_program.java:6033) at javaapplication1.Stock_trading_program.storehistoricalintraday(Stock_trading_program.java:5983) at javaapplication1.Stock_trading_program.main(Stock_trading_program.java:493)
You need to print the exception message to know the exact issue or run javakiteconnect with debug logs true while creating the object.