Kite Ticks - For INDICES absolute change is received and for equity percentage change

RajR
Hi,

I am checking the field change in package com.zerodhatech.models. For INDICES, like NIFTY 50, I am getting absolute change; where as for stocks I am getting percentage change. Is this expected behaviour?

Thanks
Tagged:
  • sujith
    sujith edited January 2022
    Hi @RajR,
    For indices the exchange is sending the value, but for other segments we are calculating the value.

    Can you calculate the change at your end for now? We will make changes in next release.

    Here is the pseudo code,
    change = lastPrice - closePrice

    change% = (lastPrice - closePrice) * 100 / closePrice
  • sujith
    For non-indices segments, exchange is sending 0 as the value always. Hence we overwrite it.
  • RajR
    Thank you very much @sujith
This discussion has been closed.