How do I retrieve index constituents in RDP/Python
I'm looking for the canonical (best) way to retrieve the set of index constituents as of a specific date, using the refinitiv.dataplatform API in Python. Assume for the purpose of discussion that I'm interested in constituents in .TRAFWLT1 or .TRXFLDUSP as of 2020-09-30. Ideally, I'd like to get back a data frame where I can also have some columns of constituent-specific data (e.g., free float market cap, dividend yield, P/E, P/Book, etc.), but if I can't do that in a single call...my follow-up question is how would I retrieve this constituent level data, once I have the constituent set.
I apologize if this seems like a basic question, but I've searched in the API Playground as well as in the API samples and if the information is there, I'm not seeing it.
Best Answer
-
Hello @jeff.kenyon,
Agree with @Gurpreet,and do not believe at this time this level of historical reference data is exposed via RDP. RDP is an actively evolving and improving API, highly strategic API, so this can well become included (for ids pemissioned to historical reference) in the future.
In general, historical reference data is exposed via Datascope reference product and via Refinitiv Workspace/Eikon product, from what I know.
ek.get_data('.DJI', ['TR.IndexConstituentRIC' , 'TR.IndexConstituentName'], {'SDate':'20200930'})
And DSS REST API
{{protocol}}{{host}}{{api}}Search/HistoricalChainResolution
{
"Request": {
"ChainRics": ["0#.DJI"],
"Range": {
"Start": "2020-09-30T00:00:00.000Z",
"End": "2020-09-30T00:00:00.000Z"
}
}
}For these instruments you list, however, I would start with content inquiry, and consult with Starmine content experts directly, via Refinitiv Content Helpdesk Online or over the phone, to learn how the specific content you are looking for, is made available in general, via which product, and what permissions are required to access, and then look into API access of the content.
Hope this info helps
0
Answers
-
Hello @jeff.kenyon
I don't think this functionality is available in RDP yet. There is a pre-released API endpoint which can expand chain RIC, but it is unable to expand the starmine indicies that you have provided. Even then, it is unable to provide the chain contituents on a particular date.
Here is what the endpoint looks like:
GET https://api.refinitiv.com/data/pricing/beta3/views/chains?universe=.AV.O
{
"universe": {
"ric": ".AV.O",
"displayName": "TOP 25 BY VOLUME",
"serviceName": "ELEKTRON_DD"
},
"data": {
"constituents": [
"MDGS.O",
"AAPL.O",
"NAKD.O",
"EARS.O",...once you have chain rics, you can use Datagrid endpoint (in beta currently) to get the data points:
POST https://api.refinitiv.com/data/datagrid/beta1/
{
"universe": [
"AAPL.O"
],
"fields": [
"TR.DividendYield",
"TR.PE",
"TR.PriceToBVPerShare"
]
}
response:
...
"data": [
[
"AAPL.O",
0.6290192926,
37.8194818974192,
29.4912709446062
]
],
...0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛