Issue with Historical Data

Naresh
I'm trying to pull volume info for specific stocks for 5min interval, but I can see there is huge discrpency in the data that I got from API call and and on charts from kite.

Example:
for Apollo Hosp I got volumes for today 9:15 and 9:20 as:
Symbol,prevClosePrice,currentClosePrice,prevIntervalVol,CurrentIntervalVolume,prevInteval,currentInterval.
APOLLOHOSP,1290.0,1291.0,15,113,2016-11-08T09:15:00+0530,2016-11-08T09:20:00+0530

From API: volumes are 15 and 113.
Where as volumes from KiteChars are:2.16k, 6.45 k for same interval.

Code I'm using:

Map param8 = new HashMap(){
{
put("from", "2016-11-08");
put("to", "2016-11-08");
}
};
HistoricalData historicalData = this.kiteconnect.getHistoricalData(param8, this.instrument_key, "5minute");

double prevClose = historicalData.dataArrayList.get(0).close;
double currentClose = historicalData.dataArrayList.get(1).close;

String prevTimeStamp = historicalData.dataArrayList.get(0).timeStamp;
String currentTimeStamp = historicalData.dataArrayList.get(1).timeStamp;

long prevVol = historicalData.dataArrayList.get(0).volume;
long currentVol = historicalData.dataArrayList.get(1).volume;


Can you please let me know where is the issue.
  • Vivek
    @Naresh I have checked both and it seems to be fine. We use same historical api for chart also so there shouldn't be any reason its off.
  • Naresh
    Please check my code: let me know is there is any issue: Which I'm running for Justdial.

    public static void getVolume(String key){
    Map param8 = new HashMap(){
    {
    put("from", "2016-11-08");
    put("to", "2016-11-08");
    }
    };

    try{
    HistoricalData historicalData = this.kiteconnect.getHistoricalData(param8, 137125892, "5minute");
    int size = historicalData.dataArrayList.size();
    System.out.println("Key::"key+","+instrument_key);
    for(int i = 0 ; i< size; i++ ){
    System.out.println(historicalData.dataArrayList.get(i).volume);
    }

    }

    Which is producing following output,which is no where related to the actual volumes from kite charts.

    Key::JUSTDIAL,137125892
    3393
    1788
    1395
    1697
    780
    695
    1592
    945
    14203
    3937
    1615
    1290
    856
    245
    791
    962
    3038
    1827
    400
    1089
    698
    894
    557
    1455
    556
    4780
    36733
    54081
    48074
    35
    50
    201
    0
    110
    141
    823
    3779
    760
    573
    5442
    702
    1067
    553
    150
    339
    329
    18860
    21236
    700

    Can you please run the same program and check? and compare the values with voulems from charts.
  • sujith
    Hi @Naresh,

    This token is JUSTDIAL-BSE, what chart did you compare with?
  • Naresh
    Thank you @sujith
    Yes I'm looking at NSE from Charts.
This discussion has been closed.