How to retrieve constituents of a fund via Eikon Data API?

How can I retrieve constituents of a fund via Eikon Data API?

Best Answer

  • bob.lee
    Answer ✓

    @hiroko.yamaguchi1 ,

    I believe you mean fund's full holdings data. Below is a sample.

    import refinitiv.dataplatform.eikon as ek
    import pandas as pd

    ek.set_app_key('<your app key>')

    fund_holdings = ek.get_data('LP40065886', ['TR.FundHoldingRIC','TR.FundHoldingName',
            'TR.FundPercentageOfFundAssets',
            'TR.FundNumberOfShares',
            'TR.FundNumberOfSharesChanged'],
            {'Endnum':'5000'})

    pd.set_option('display.max_rows', 20000)
    print(fund_holdings)

    Notes, 'LP40065886' is the fund's RIC ('LP' followed by Lipper ID).


Answers