Getting InputException when trying to fetch historical data

yeshari edited September 2023 in Java client
I am trying to fetch historical data using the following code"Getting Data for " + tradingSymbol);"from = " + tempFromDate + " to = " + tempToDate + " instrumentToken = " + instrumentToken + " interval = " + intervalType.label);
HistoricalData historicalData = kiteConnect.getHistoricalData(tempFromDate, tempToDate, instrumentToken, intervalType.label, false, true);
The output is below.
[2023-09-28T17:53:18.249+05:30] mytrading.stockdata.StockDataService: Getting Data for VOLTAS23NOVFUT
[2023-09-28T17:53:18.249+05:30] mytrading.stockdata.StockDataService: from = Fri Sep 01 00:00:00 IST 2023 to = Thu Sep 28 23:59:59 IST 2023 instrumentToken = 14883842 interval = minute
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.dealWithException(
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(
at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.getRequest(
at com.zerodhatech.kiteconnect.KiteConnect.getHistoricalData(
It was working 2 days before. I am not able to download yesterday's and today's data. I then reset the date to download the data for this whole month. I am getting this exception for all the instruments. The exception is very generically worded.

Because of this, I don't have data for yesterday and today. Please let me know if I am doing anything wrong.
  • sujith
    You need to enable debug logs and check the error json from the response. You can enable while initializing the Kite Connect object.
Sign In or Register to comment.