I want to pull out data in the snapshot using Eikon API.
Thanks in advance
hi @wenjun.xia ,
To retrieve the same data with the Investor Portfolio History Report app, the code below can be used
import eikon as ekek.set_app_key('#### Your Eikon App key ####')df, err = ek.get_data( instruments = ['6902.T'], fields = ['TR.SecurityOwnedRIC' ,'TR.SecurityOwnedName' ,'TR.InvestorValueHeld' ,'TR.InvestorValueHeld.calcdate' ,'TR.InvestorSharesHeld' ,'TR.InvestorPctPortfolio' ,'TR.PctSecuritySharesOut' ,'TR.InvestorFilingDate'], parameters = {'Scale':'6', 'Curn':'USD'})display(df)
Here's an output
To get the value on a specific date, parameter 'SDate' can be used, for example
df, err = ek.get_data( instruments = ['6902.T'], fields = ['TR.SecurityOwnedRIC' ,'TR.SecurityOwnedName' ,'TR.InvestorValueHeld' ,'TR.InvestorValueHeld.calcdate' ,'TR.InvestorSharesHeld' ,'TR.InvestorPctPortfolio' ,'TR.PctSecuritySharesOut' ,'TR.InvestorFilingDate'], parameters = {'Scale':'6', 'Curn':'USD', 'SDate':'2021-09-30'})display(df)
Hope this could help, please let me know in case you have any further question
Hi @wenjun.xia ,
According to the answer in this thread, my colleague mentioned that this report can not be retrieved using Eikon Data APIs or Eikon Excel.
Plus, this forum is more for programming-type queries, rather than content queries. I would recommend you to contact the Eikon support team directly via MyRefinitiv. You can ask for the =TR formula in the Eikon Excel which can be used to retrieve this report and if the formula is available, we can apply it to the get_data method in Eikon Data API. That way a content specialist can work closely with you to find a way to get the required data.
However, for this case, I've raised ticket number 11035306 to a content specialist team to confirm if it is possible to retrieve the data using Eikon Excel or Eikon Data API. I'll keep you updated
Hope this could help.