Quotes returns Wrong Data

krishnaPrasad
HI Team,
I was using KiteSDk for my java Application, When i fetching quotes with 1Sec interval it was wrong data in between which is not in sync with live Data

String[] instruments = {"256265"};
for (int i=1; i<=30000;i++) {
Map<String, Quote> quotes = kiteSdk.getQuote(Arrays.copyOfRange(instruments, 0, 1));
quotes.entrySet().stream().forEach(quote -> {
System.out.println(Calendar.getInstance().getTime()+ " : " + quote.getKey() + " : " + quote.getValue().lastPrice+ " : " +quote.getValue().lastTradedTime);
});
Thread.sleep(1000L);
}

O/p as follows

Tue Dec 10 09:23:44 IST 2024 : 256265 : 24632.95 : null
Tue Dec 10 09:23:47 IST 2024 : 256265 : 24641.75 : null
Tue Dec 10 09:23:48 IST 2024 : 256265 : 24632.85 : null
Tue Dec 10 09:23:49 IST 2024 : 256265 : 24633.3 : null
Tue Dec 10 09:23:50 IST 2024 : 256265 : 24633.4 : null
Tue Dec 10 09:23:51 IST 2024 : 256265 : 24633.7 : null
Tue Dec 10 09:23:52 IST 2024 : 256265 : 24641.75 : null
Tue Dec 10 09:23:53 IST 2024 : 256265 : 24632.25 : null
If you see the o/p 09:23:47 and 09:23:52 showing wrong data. This was persistent from last 2 days.
Sign In or Register to comment.