error while requesting for historical data

Farhath
I am developing java app for algo trading. I am using maven in Eclipse for coding. I have included kiteconnect jar in references.

here is extract from my code:

........
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date from = new Date();
Date to = new Date();
try {
from = formatter.parse("2020-01-01 09:15:00");
to = formatter.parse("2020-01-31 15:30:00");
}catch (ParseException e) {
e.printStackTrace();
}
HistoricalData historicalData = kiteConnect.getHistoricalData(from, to, "AXISBANK", "minute", false);


........
I have added this dependency in my pom.xml

dependency>
com.zerodhatech.kiteconnect
kiteconnect
3.0.0


commons-codec
commons-codec
1.11


net.sf.supercsv
super-csv
2.4.0


com.neovisionaries
nv-websocket-client
2.3


org.json
json
20171018


com.squareup.okhttp3
okhttp
4.4.0


com.squareup.okio
okio
2.4.3


com.squareup.okhttp3
logging-interceptor
4.4.0


org.jetbrains.kotlin
kotlin-stdlib
1.3.70


com.google.code.gson
gson
2.6.2



.......

I get the following error:

Exception in thread "main" java.lang.NoSuchMethodError: 'com.zerodhatech.models.HistoricalData com.zerodhatech.kiteconnect.KiteConnect.getHistoricalData(java.util.Date, java.util.Date, java.lang.String, java.lang.String, boolean)'

Please let me know where i have gone wrong.....

  • Farhath
    resoleved.....corrected version in the pom file to 3.1.14 and this error did not occur
This discussion has been closed.