The tick data received has instrument token as the key.
Using instrument token, i can get the instrument symbol(tradingsymbol) from instrument list. The tradingsymbol for FNO is e.g. HDFC18NOVFUT.
Now, from this i want to detect the base script name (i.e. HDFCBANK), to fetch certain static parameters of HDFCBANK from a seperate table and apply it for my logic on HDFC18NOVFUT.
I cant just simply strip the symbol HDFC18NOVFUT from the first occurring digit, as there are some symbols that has digit in base name also (e.g. TV18BRDCST18NOVFUT). Also it would not be the best way to do, as there can be any new symbols like that in future, where the method will behave weird.
There would already be a better ready way to do it. Perhaps a ready one to one mapping of the FNO scripts with base symbol available to download from kite connect like the instrument list.
Is there a mapping available? Or any alternative? Any suggestions pls?