Historical Data

noft
noft edited October 2018 in Java client
When I try accessing historical data, I only get InputExceptions

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.getRequest(KiteRequestHandler.java:69)
at com.zerodhatech.kiteconnect.KiteConnect.getHistoricalData(KiteConnect.java:604)

I am not able to place the field in which the error has occured.
This is the part of the code in question:
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date from = new Date();
Date to = new Date();
try {
from = formatter.parse("2018-01-01 00:00:01");
to = formatter.parse("2018-10-18 16:00:12");
}catch (ParseException e) {
e.printStackTrace();
}

HistoricalData hdata=kiteSdk.getHistoricalData(from, to, "2925313", "15minute", false);

I get the error at the last line of the code above. My KiteSDK session has been correctly authorized and works for non-historical queries etc
Sign In or Register to comment.