How to track renamed symbols

spartacus
How can we track renamed symbols? And is there a way to know old and new symbol name?

Like I had records for DAAWAT earlier and recently when I checked, it seems to have been renamed to LTFOODS. How do I know or subscribe to such changes so that I can keep their records merged.
  • MAG
    @spartacus Can you let me know a time frame when it was named as daawat? a month ago? a year ago? etc.
    I know the answer. But i want to doublecheck and confirm before I give you a proper answer will do so after the market close.
    In the meantime if you can give me the timeline when it changed, it will make my work easier. Help me help you. :smile:
  • MAG
    MAG edited December 2023
    https://www.just-food.com/news/indias-lt-foods-buys-back-daawat-foods-stake-in-salic-saudi-arabia-partnership/

    I checked the instrumentlists for today and found the instrument token for LTFOODS which is 3536897.
    Then i used Linux cli tools to search through last few months instrumentlists and this is what it returned
    ./instrumentslist_20230101.csv:84088:LT FOODS,3536897,13816,0.0,NSE,DAAWAT,0.05,0.0,EQ,NSE,,1
    ./instrumentslist_20230102.csv:84166:LT FOODS,3536897,13816,0.0,NSE,DAAWAT,0.05,0.0,EQ,NSE,,1
    ./instrumentslist_20230103.csv:84511:LT FOODS,3536897,13816,0.0,NSE,DAAWAT,0.05,0.0,EQ,NSE,,1
    ./instrumentslist_20230104.csv:84551:LT FOODS,3536897,13816,0.0,NSE,DAAWAT,0.05,0.0,EQ,NSE,,1
    ./instrumentslist_20230105.csv:84880:LT FOODS,3536897,13816,0.0,NSE,DAAWAT,0.05,0.0,EQ,NSE,,1
    ./instrumentslist_20230106.csv:85382:LT FOODS,3536897,13816,0.0,NSE,DAAWAT,0.05,0.0,EQ,NSE,,1
    ...
    ...

    ./instrumentslist_20231101.csv:88539:LT FOODS,3536897,13816,0.0,NSE,DAAWAT,0.05,0.0,EQ,NSE,,1
    ./instrumentslist_20231102.csv:88972:LT FOODS,3536897,13816,0.0,NSE,DAAWAT,0.05,0.0,EQ,NSE,,1
    ./instrumentslist_20231103.csv:89640:LT FOODS,3536897,13816,0.0,NSE,DAAWAT,0.05,0.0,EQ,NSE,,1
    ./instrumentslist_20231104.csv:90925:LT FOODS,3536897,13816,0.0,NSE,LTFOODS,0.05,0.0,EQ,NSE,,1
    ./instrumentslist_20231105.csv:90925:LT FOODS,3536897,13816,0.0,NSE,LTFOODS,0.05,0.0,EQ,NSE,,1
    ./instrumentslist_20231106.csv:90926:LT FOODS,3536897,13816,0.0,NSE,LTFOODS,0.05,0.0,EQ,NSE,,1
    ./instrumentslist_20231107.csv:91362:LT FOODS,3536897,13816,0.0,NSE,LTFOODS,0.05,0.0,EQ,NSE,,1
    ./instrumentslist_20231108.csv:92080:LT FOODS,3536897,13816,0.0,NSE,LTFOODS,0.05,0.0,EQ,NSE,,1
    ...
    ...
    So as per the news article LT foods bought out the other shareholders in Daawat foods and then the symbol changed to LTFOODS from 4th November onwards though the instrument code remained the same.
    I havent checked the NSE bhav copies for the same period but I think the same would reflect in the bhavcopies too.

    Now for your question about how do you track these changes, there is no api or automated way to do this.
    You would need to write your own code to alert for new entrants or changes to the listing details.

    I maintain historical copies of bhavcopies as well as instrument code in csv format as well as a database and in those databases for the bhav copies the ISIN is the primary key and source of truth. For the instrument list db the instrument token is the primary key and source of truth. And I have a separate mapping for instrument code to ISIN mapping.

    Once you have system like this you could build your own change reporting tools.

  • spartacus
    @MAG Thanks. Makes sense. Checked the ISIN and they are same.

    I think keeping instrumentation token only should be sufficient. Will track it at my end.
  • MAG
    @spartacus Glad to help.
    Please also note that any change tracking logic will only apply to fundamental/spot instruments on the NSE and BSE and not derivative instruments (FNO) . The instrument tokens for derivative instruments could be recycled over time.
    And I am not sure at all about how the logic would work for other instrument categories like Mutual funds, Currency and Commodities.
Sign In or Register to comment.