Need Instrument tokens in realtime for Options instrument

Darshana_mule11
So, In my app I have subscribed to few tokens on ws, which are received from the instruments API.
Now In realtime I want to check the ltp and subsribe to more tokens if they are generated (the range is shifted) for an options symbol. Is there any way to get the updated list of tokens for options of an underlying or do I have to generate symbol and call the market quotes API ?

What's the best way to achieve this ?

(P.S. I'm using python client)
  • vaibhavsharma13
    For calculating instrument token without downloading the instrument file everytime, you need 3 information-stock symbol, expiry date and stock strike difference. For example the instrument token of state bank of india expiring at April is "SBIN24APR750CE". "SBIN" is stock symbol, "24APR" is expiry date.
    Stock strike difference is used to calculate the strike which are in option chain, for example SBIN today is 758 and strike differnce of SBIN is 20 so by this formula ltp-ltp%strikeDiff=758-758%20=750, you can calculate the ATM strike and with ATM you can decide how many strikes above or below you want to get data of.
    Now the question is how to calculate strike differnce, for that you have to download instrument file once in the morning and with 2 consecutive strikes, strike difference can be calculated.
  • Darshana_mule11
    @rakeshr I meant how do I get the instrument tokens for (eg. 219857413 for BANKEX2440852700CE @vaibhavsharma13 (Token not symbol!) ) the options symbols if they were not present in the instrument list generated in the morning
  • sujith
    If an instrument is not present in the instruments master file provided today then it is not traded for the day.
  • Darshana_mule11
    So, @sujith Suppose I got strikes for BANKEX in instruments master file for current expiry symbol as 49200 (lower limit) and 57600 (upper limit)
    Then you're saying other strikes out of range will never be traded ? If market moves by 10 % and for some reason 49200 becomes the ATM then symbols for lower strikes won't be traded ?
  • vaibhavsharma13
    vaibhavsharma13 edited April 18
    @Darshana_mule11 sorry I meant symbol but wrote token. But if you have symbol you can get token with that from the instruments file. I told you the method to calculate symbol for any stock and with that any token can be calculated.
  • Darshana_mule11
    Yes @vaibhavsharma13 so my question is regarding that only I can generate the symbol but what if for that strike there is no associated row ? As explained in previous response in detail
  • vaibhavsharma13
    yes some option strikes are missing especially at extreme end.
  • Darshana_mule11
    Then how do I get the token for them ? @vaibhavsharma13
Sign In or Register to comment.