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:

1669903783964.png

1669903846740.png



Thanks!

Best Answer

  • bob.lee
    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
    }

Answers

  • Hi @dmitry.benediktovich ,

    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.