Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
97 10 12 13

eikon data api bulk data

I tried to obtain constituent data but it only returns 10 records.

For example,

index_ric = "MCHI.OQ";

df, err = ek.get_data([index_ric],['TR.FundHoldingRIC','TR.FundHoldingName','TR.FundCountryOfDomicile','TR.FundPercentageOfFundAssets','TR.FundNumberOfShares','TR.FundNumberOfSharesChanged'])
df.columns=['INDEX_RIC','RIC','NAME','COUNTRY','PctWgt','SHARES','SHARES_CHANGE']

I expect about 300 names.

=TR("MCHI.OQ","TR.FundHoldingRIC;TR.FundHoldingName;TR.FundCountryOfDomicile;TR.FundPercentageOfFundAssets;TR.FundNumberOfShares;TR.FundNumberOfSharesChanged","StartNum=1 EndNum=1000 CH=Fd RH=IN",B2)


apidataconstituents
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @dong.han

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

@dong.han

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
39.4k 77 11 27

In =TR function you have StartNum and EndNum parameters, whereas in get_data method they're missing. Add these parameters and you'll get the full result.

ek.get_data('MCHI.OQ',
    ['TR.FundHoldingRIC','TR.FundHoldingName','TR.FundCountryOfDomicile',
     'TR.FundPercentageOfFundAssets','TR.FundNumberOfShares',
     'TR.FundNumberOfSharesChanged'],
    {'StartNum':'1', 'EndNum':'1000'})
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
97 10 12 13

thank you!

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.