Hi @yuyang
You can use "CODECR" application in Eikon to check for the available fields.
From your provided screenshot, here is the sample code:
df, err = ek.get_data( instruments = ['ARKK.K'], fields = [ 'TR.ETPConstituentRIC', 'TR.ETPConstituentName', 'TR.ETPConstituentShares', 'TR.ETPConstituentWeightPercent' ], parameters = {'SDate': '2021-04-30'})df = df.sort_values('Weight percent', ascending=False)df.head(10)
@yuyang, Firstly, you may need to find the Lipper ID for that ETF, in your sample case, the ARK Innovative ETF is 40209693, hence the ID used for Eikon is "LP40209693". Then the following call will return the latest holdings:
fund_holdings = ek.get_data('LP40209693', ['TR.FundHoldingRIC','TR.FundHoldingName','TR.FundPercentageOfFundAssets','TR.FundNumberOfShares','TR.FundNumberOfSharesChanged'],{'Endnum':'5000'})
Thank you for your reply. When I used this method to obtain ETF positions, I often found that I could not request data but returned NaN. Could you please tell me what happened?