Is instrument_token universally unique; i.e. I can safely use it as my DB primary key?

malay
Is instrument_token universally unique or over a time old instrument_token might refer to some other instrument?
Similarly will a stock in an exchange will always have same instrument_token or over a time Zerodha might change a stock's instrument_token?
  • Vivek
    @malay It's a bad idea to use it as a db primary key since in some case like expired FNO scrips the instrument token is reused.
  • Kailash
    @malay Like Vivek said, they may not be unique. Exchanges reuse tokens from time to time.
  • malay
    Ok; Thanks for clarification. So my next question will be: How to Uniquely & Reliably Identify an instrument? is the combination of Symbol & Exchange Enough?
  • Kailash
    @malay Yes, that should be enough.
Sign In or Register to comment.