TickTimestamp incorrect

I'm accessing the Tick Data from Germany and I find that the TickTimestamp for BANKNIFTY bnfTick.getTickTimestamp() is showing as local German Time. Ideally it should be the exchange Timestamp is it not? If not, where do I get the exchange timestamp?

/** Parses NSE indices data.
* @return Tick is the parsed index data. */
private Tick getIndeciesData(byte[] bin, int x, boolean tradable){
int dec = 100;
Tick tick = new Tick();
tick.setLastTradedPrice(convertToDouble(getBytes(bin, 4, 8)) / dec);
tick.setHighPrice(convertToDouble(getBytes(bin, 8, 12)) / dec);
tick.setLowPrice(convertToDouble(getBytes(bin, 12, 16)) / dec);
tick.setOpenPrice(convertToDouble(getBytes(bin, 16, 20)) / dec);
tick.setClosePrice(convertToDouble(getBytes(bin, 20, 24)) / dec);
tick.setNetPriceChangeFromClosingPrice(convertToDouble(getBytes(bin, 24, 28)) / dec);
if(bin.length > 28) {
long tickTimeStamp = convertToLong(getBytes(bin, 28, 32)) * 1000;
if(isValidDate(tickTimeStamp)) {
tick.setTickTimestamp(new Date(tickTimeStamp));
} else {
return tick;
  • sujith
    We create date object on the javakiteconnect library here. As you can see, the Date considered will be local time.
    You can either convert it to IST after you get data or fork it and change it while parsing.

    If you are looking at indices data then indices parsing is here.
Sign In or Register to comment.