Can I change the row header with the 'Rh' parameter using the Eikon Data API?

I would like to use the Eikon Data API to replicate the data pull of this excel formula

=TR(FLWS.OQ,"TR.InvestorFullName;TR.InvestorType;TR.InvAddrCountry;TR.InvInvestmentStyleCode;TR.PctOfSharesOutHeld;#1(Sdate=-1CQ);#1(Sdate=-1CQ).date;#1(Sdate=-2CQ);#1(Sdate=-2CQ).date;#1(S"&"date=-3CQ);#1(Sdate=-3CQ).date;#1(Sdate=-4CQ);#1(Sdate=-4CQ).date;#1(Sdate=-5CQ);#1(Sdate=-5CQ).date;#1(Sdate=-6CQ);#1(Sdate=-6CQ).date;#1(Sdate=-7CQ);#1(Sdate=-7CQ).date;#1(Sdate=-8CQ);#1(Sdate=-8CQ).date","CH=Fd RH=investorID NULL=-",,"TR.SharesHeld")

Best Answer

  • RH parameter cannot be used with Eikon Data APIs. What one should understand here is that in your request the fields TR.InvestorFullName, TR.InvestorType etc are also dependent on the value of SDate parameter, just as the field TR.SharesHeld is. The list of investors returned may not be the same depending on the value of SDate. Even if the table is aligned on investorID, as =TR function does when you add RH:investorID, the result is still not perfect. You'll get the best result if you retrieve the list of investors separately for each quarter and then combine the tables as you see fit. I suggest you use the following request and repeat it for each quarter:

    ek.get_data("FLWS.OQ",["TR.InvestorFullName.investorID",
    "TR.InvestorFullName","TR.InvestorType",
    "TR.InvAddrCountry","TR.InvInvestmentStyleCode",
    "TR.PctOfSharesOutHeld",
    "TR.SharesHeld","TR.SharesHeld.date"],
    {'Sdate':'-1CQ'})