Why does this code not work??
df, err = ek.get_data(['M312WZV08Y7LYUC71685@LEI' ,'5493004D82XDFVPWQJ91@LEI' ], ['TR.TotalAssetsReported','TR.TotalAssetsReported.currency'])
df
I need a script that fetches tickers or total assets/ratings/PD data from a list of LEIs (which may be non-public or small).
There must be a way, since I can see them in WS, but not able to fetch them in lseg.data.
For example: 5493004D82XDFVPWQJ91.
============
Upon checking, the script functions are working using ISIN, as demonstrated in the attached code below.
import refinitiv.data as rd
rd.open_session()
df = rd.get_data(
universe = ['5493004D82XDFVPWQJ91'],
fields = [
'TR.F.TOTASSETS',
'TR.TotalAssetsReported.currency'
]
)
display(df)
However, when using LEI, an error message appears:
import refinitiv.data as rd
rd.open_session()
df = rd.get_data(
universe = ['5493004D82XDFVPWQJ91'],
fields = [
'TR.F.TOTASSETS',
'TR.TotalAssetsReported.currency'
]
)
display(df)
Additionally, please take note that LEI 5493004D82XDFVPWQJ91 is a private company and private companies generally do not have RICs (Reuters Instrument Codes). They may have other identifiers such as Perm IDs, but RICs are typically assigned to publicly traded companies.
On a positive note, retrieving the RIC and ISIN using LEI is possible using Excel:
=RDP.Data("549300MMVL80RTBP3O28"&"@LEI" , "TR.RIC,TR.ISIN")
Can you please confirm if there's any way we can pull data using LEI code using API like the workaround in excel?