Ownership data through API

Hi,

I would like to download ownership data for a given company on a certain date through API. for example something like:

ek.get_data(['0973.HK'], ['TR.SharesHeld','TR.SharesHeldValue','TR.PctOfSharesOutHeld','TR.InvestorFullName','TR.InvParentType','TR.InvestorType','TR.InvInvestmentStyleCode','TR.InvInvmtOrientation','TR.InvAddrCountry','TR.HoldingsDate','TR.PrevHoldingsDate','TR.CompanyCntCountryA'], {'SDate': 0})

but it returned NaN under each field (the name of the fields are correctly returned though), what is the issue here? Also I am a bit uncertain about the date format here, is there somewhere I could find the complete reference for the parameters for get_data?

Best wishes,

Ding.

Best Answer

  • @ding.chen to better understand the data model of the ownership data try looking at one of the pre-built excel templates, such as 'SINGLE SECURITY - CONSOLIDATED OWNERSHIP OVERVIEW' (Excel Ribbon > Thomson Reuters > Templates and search for 'ownership' tag).

    The issue with you request is that you mix fields from different types of reports. Try executing them according to their respective groups. For example,

    df, e = tr.get_data(['0973.HK'], ['TR.SharesHeld','TR.SharesHeldValue'])

    or

    df, e = tr.get_data(['0973.HK'], ['TR.PctOfSharesOutHeld','TR.InvestorFullName','TR.InvParentType','TR.InvestorType','TR.InvInvestmentStyleCode','TR.InvInvmtOrientation','TR.InvAddrCountry'])

    will both return data.

    For the parameters, you can either use the Excel's formula builder or the Data Item Browser app on Eikon, selecting the parameter tab.

Answers