instruments API : instrument_token vs exchange_token

swas99
Is `instrument_token` guaranteed to change when `exchange_token` changes?
Tagged:
  • sujith
    Ideally it should change but we can't guarantee that. There are cases wherein exchange reuses the same exchange token.
  • swas99
    hhmm... Is `instrument_token` defined at Kite's end? If so, what triggers the change of `instrument_token` for the a given (symbol, exchange)?
  • sujith
    Instrument token is derived from the exchange token and the segment. But you never know since exchange only keeps reusing token and two different exchanges might be using same exchange token. It is not guaranteed to be unique.
  • swas99
    Ack.

    Does fetching the historical data(say last 10 years) using the current instrument_token for some stock (say whose instrument_token has changed several times) return the old data?
    If yes then will the historical API return all the previous data from the day of the token change? (or is there a delay)
  • rakeshr
    Does fetching the historical data(say last 10 years) using the current instrument_token for some stock (say whose instrument_token has changed several times) return the old data?
    All these cases, including corporate actions (such as spin-offs where the token is changed), are handled on the chart backend. Any instrument will only show data for itself, irrespective of any token migration in the past.
    If yes then will the historical API return all the previous data from the day of the token change? (or is there a delay)
    It will show data for all the days the instrument traded. The data will be fetched like a regular instrument. All migrations and updates are handled at the chart's backend.
Sign In or Register to comment.