Retrieve fund derived holdings data via Python API
Hi,
I would like to retrieve particular data upon Mutual funds/ETFs using Python (Refinitiv data platform and/or Eikon libraries):
- Maturity allocation,
- Debt structure and
- Asset universe (whether the fund is ETF or Mutual).
Here are some examples from Refinitiv Desktop:
Thanks!
Best Answer
-
Hi @dmitry.benediktovich , If you are using or trying to use the RDP Funds API, then yes, you can access the derived allocations and the "fund universe" information via the API. It is an REST API, so you can use Python or any programming language that can make web query via public Internet to access it. Notes RDP Funds API is a separate service, not included in the Eikon/Workspace desktop service.
e.g. Using the access URL to raise an query like:
https://api.refinitiv.com/data/funds/v1/assets?symbols=LP60092182&properties=derivedallocations[filter:MATUR]
Will give you the response:
{
"assets": [
{
"id": "LP60092182",
"derivedAllocations": [
{
"type": {
"id": "4293",
"code": "MATUR",
"name": "Maturity"
},
"values": [
{
"date": "2022-10-31",
"values": [
{
"name": "% Maturity 5 to 10 Years",
"rank": 1,
"value": 28.787,
"id": 4297
},
{
"name": "% Maturity Greater than 30 Years",
"rank": 2,
"value": 23.84,
"id": 4300
},
{
"name": "% Maturity 1 to 3 Years",
"rank": 3,
"value": 16.9961,
"id": 4295
},
{
"name": "% Maturity Other",
"rank": 4,
"value": 13.6555,
"id": 4301
},
{
"name": "% Maturity 3 to 5 Years",
"rank": 5,
"value": 9.9079,
"id": 4296
},
{
"name": "% Maturity 20 to 30 Years",
"rank": 6,
"value": 1.5921,
"id": 4299
},
{
"name": "% Maturity Less than 1 Year",
"rank": 7,
"value": 1.2224,
"id": 4294
}
]
}
]
}
]
}
],
"totalRecords": 1,
"fromIndex": 0,
"toIndex": 0,
"pageNumber": 0
}Change the "MATUR" to "DEBTTYPE" to get the debt type, you will get:
{
"assets": [
{
"id": "LP60092182",
"derivedAllocations": [
{
"type": {
"id": "4284",
"code": "DEBTTYPE",
"name": "Debt Type Allocation"
},
"values": [
{
"date": "2022-10-31",
"values": [
{
"name": "Fixed Income",
"rank": 1,
"value": 96.001,
"values": [
{
"name": "Fixed Income",
"rank": 1,
"value": 96.001,
"values": [
{
"name": "Corporate Notes/Bonds",
"rank": 2,
"value": 27.1488,
"values": [
{
"name": "CORP",
"rank": 1,
"value": 25.7155,
"id": 4405
},
{
"name": "Corporate Medium Term Notes",
"rank": 2,
"value": 1.4333,
"id": 13689
}
],
"id": 31846
},
{
"name": "Fixed Income",
"rank": 1,
"value": 67.901,
"values": [
{
"name": "Junior Subordinated Note",
"rank": 1,
"value": 15.3832,
"id": 9715
},
{
"name": "Senior Note",
"rank": 2,
"value": 15.2213,
"id": 9863
},
{
"name": "Note",
"rank": 3,
"value": 13.9643,
"id": 9847
},
{
"name": "Subordinated Note",
"rank": 4,
"value": 8.392,
"id": 9965
},
{
"name": "Senior Subordinated Note",
"rank": 5,
"value": 5.7502,
"id": 9869
},
{
"name": "Bond",
"rank": 6,
"value": 5.7208,
"id": 9585
},
{
"name": "Tax Antic Notes",
"rank": 7,
"value": 3.1902,
"id": 13546
},
{
"name": "Inhaberschuldverschreibung",
"rank": 8,
"value": 0.279,
"id": 9785
}
],
"id": 36881
},
{
"name": "Fixed Income Other",
"rank": 3,
"value": 0.9512,
"values": [
{
"name": "Fixed Income",
"rank": 1,
"value": 0.9512,
"id": 29722
}
],
"id": 31849
}
],
"id": 29862
}
],
"id": 371
}
]
}
]
}
]
}
],
"totalRecords": 1,
"fromIndex": 0,
"toIndex": 0,
"pageNumber": 0
}To check the assets "universe", you can raise the query:
https://api.refinitiv.com/data/funds/v1/assets?symbols=LP60092182&properties=attributes[filter:BASEASSETCATEGORY]
and get:
{
"assets": [
{
"id": "LP60092182",
"attributes": [
{
"code": "BASEASSETCATEGORY",
"type": {
"id": "25680",
"name": "Asset Universe"
},
"values": [
{
"value": {
"id": "25349",
"code": "Mutual_Funds",
"name": "Mutual Funds"
}
}
]
}
]
}
],
"totalRecords": 1,
"fromIndex": 0,
"toIndex": 0,
"pageNumber": 0
}0
Answers
-
Thank you for posting the question in
this forum. However, the moderators on this forum do not have deep expertise in
every type of content available through Refinitiv products. Such expertise is
available through Refinitiv Helpdesk. If the Helpdesk can show you how to
retrieve it using =@TR formula in Eikon Excel, then
the moderators on this forum can help you translate it into get_data method in Eikon Data API call. Refinitiv Helpdesk can
be reached via MyRefinitiv and you may request from
them what you would like to get.To be of help, ticket number 11923762 was raised on your
behalf and the support team is going to contact you directly to assist with
this.Hope this helps and please let me
know in case you have any further questions.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 中文论坛