Hi,
From a list of LEI codes, how can I get the data items for those companies with a workspace licence using worksphace APIs?
Thanks.
Hi,
From a list of LEI codes, how can I get the data items for those companies with a workspace licence using worksphace APIs?
Thanks.
Hi @asli.sahin
For that purpose you can use refinitiv.data library and convert the LEI codes to RIC codes which can be later on used as standard inputs in api.
import refinitiv.data as rd rd.open_session() rd.get_data("213800TB53ELEUKM7Q61@LEI","TR.RIC")
And from there 1) How do I bring the data items related 2) if it is a list of LEI instead of only one, how do I need to add the list of LEI in the code?
Many thanks
If you insist on using the list of LEI codes you can do it like this:
lei_codes = ['213800TB53ELEUKM7Q61','213800LH1BZH3DI6G760','2138002P5RNKC5W2JZ46'] lei_codes_2 = [f'{lei}@LEI' for lei in lei_codes] rd.get_data(lei_codes_2,"TR.RIC,TR.COMMONNAME,TR.CLOSEPRICE,TR.DIVIDENDYIELD")
However it is recommended to use the RIC codes and here is how you can easily tranform a LEI list to a RIC list
df = rd.get_data(lei_codes_2,"TR.RIC") rics = df['RIC'].tolist()