Start from LEI to get company information
New user of Code Book inside Eikon API.
I want to start with LEI and find corpororate information like parent LEI and industry code.
Input: ZYBR0GI2DCOB4RV8NO37
Output industry group: debt fund
Answers
-
Thank you for reaching out to us.
You can use the LEI with the get_data method in the LSEG Data Library for Python.
ld.get_data("ZYBR0GI2DCOB4RV8NO37@LEI","TR.Commonname")
The output is:
However, you need to contact the helpdesk team directly via MyAccount of the fields that can provide the required data.
Otherwise, you can use the Search API to search data for this LEI.
ld.discovery.search(
view = ld.discovery.Views.ORGANISATIONS ,
top = 10,
query = "ZYBR0GI2DCOB4RV8NO37",
select = "DocumentTitle,ParentOrganisationName"
)The output is:
You can use the following code to list all fields in the search.Views.ORGANISATIONS view.
response = search.metadata.Definition(
view = search.Views.ORGANISATIONS
).get_data()
response.data.dfI think this LEI is a private company so the data in the database is quite limited.
You can access the LD library examples on GitHub.
0 -
Thanks for explaining. I have the earlier version of this API (refinitiv-data). I was able to run above code, except for last cell. The last line gives strang results. I am looking for all fields (e.g., "TR.Commonname") that can be obtained.
import refinitiv.data as rd
rd.open_session()
df = rd.get_data(["ZYBR0GI2DCOB4RV8NO37@LEI", "5493004LZLCTSJUBPZ86@LEI"], "TR.Commonname")
rd.discovery.search(view=rd.discovery.Views.ORGANISATIONS, query="5493004LZLCTSJUBPZ86")
rd.discovery.search(view=rd.discovery.Views.ORGANISATIONS)
0 -
For the last line, please refer to the following example on GitHub. The code will get all available fields of the ORGANISATIONS view in the Search API.
For the TR.xxx fields used by the get_data method, you can use the Data Item Browser tool to search for fields.
Otherwise, you can contact the helpdesk team directly via MyAccount of the fields that can provide the required data.
0 -
This is my code.
from refinitiv.data.content import search
response = search.metadata.Definition(view=search.Views.ORGANISATIONS).get_data()
Now I can get field names from this object.
response.data.df.iloc[195:200]
gives these names: LegalNameZhHans, LegalNameZhHant, LEI, LipperID, LiquidityRIC
But these names do not return any values.
rd.get_data(["ZYBR0GI2DCOB4RV8NO37@LEI", "5493004LZLCTSJUBPZ86@LEI", 'MSFT.O'],
['TR.BusinessEntity', 'TR.Ebit', 'TR.ExpenseRatio', 'TR.Gics', 'TR.GicsCode',
'TR.GicsIndustryId', 'TR.HasESGContent', 'TR.IPDate', 'TR.IsPublic',
'TR.IssuerPrimaryRIC', 'TR.LEI', 'TR.LipperID',
'TR.Commonname'])
Above call returns a data frame with only four columns: Instrument, EBIT, Expense Ratio, Organization is Public Flag, Company Common Name. But we already know that LEI is available.
What is the correct way to input field names in function call rd.get_data()?
Thanks again,
0 -
You can use the Data Item Browser tool to verify the available fields.
Otherwise, you can contact the helpdesk support team directly via MyAccount to verify the content of those fields.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛