Hi @Atul.Sanwal ,
Could you please confirm which product would you like to use?
import pandas as pdimport refinitiv.dataplatform.eikon as ekek.set_app_key('DEFAULT_CODE_BOOK_APP_KEY')
def getUnderlying(baseRic): LONGNEXTLR = baseRic #For LONGLING1 to LONGLINK15 and LONGNEXTLR fields fields = ['LONGLINK{}'.format(x) for x in range(1, 15)] fields.append('LONGNEXTLR') all_underlying_rics = [] #if LONGNEXTLR is not empty, try to retrieve the data fields while LONGNEXTLR!='': df,e = ek.get_data(LONGNEXTLR,fields) LONGNEXTLR = df.iloc[0]['LONGNEXTLR'] if pd.notnull(df.iloc[0]['LONGNEXTLR']) else '' #If LONGLINK<x> field is not null, append its value to all_underlying_rics list for x in range(1, 15): currentField = 'LONGLINK{}'.format(x) all_underlying_rics.append(df.iloc[0][currentField]) if pd.notnull(df.iloc[0][currentField]) else None return all_underlying_rics
rics_list = getUnderlying('GBRPIZILS=')ek.get_timeseries(rics_list)
Please let me know in case you have any questions.