Historical Data fetching error

Amitesh
Hi,
I am using below code to fetch historical data but getting error

Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
Date dateTo = calendar.getTime();

calendar.add(Calendar.DAY_OF_YEAR, -2);
Date dateFrom = calendar.getTime();

try {
kiteConnect.getHistoricalData(dateFrom,dateTo, "256265","minute", true, true);
} catch (KiteException | IOException e) {
throw new RuntimeException(e);
}

Error:

Exception: java.lang.RuntimeException: com.zerodhatech.kiteconnect.kitehttp.exceptions.InputException

Please help me to fix the issue

Thanks
Tagged:
This discussion has been closed.