I would like to retrieve all the constituent bonds in a EUR Corporate bond index such as .IBBEU003D using Eikon Python API (preferred) or the Datastream Python API.
My Eikon API code attempt is as follows:
df, err = ek.get_data(
instruments = ['.IBBEU003D'],
fields = ['TR.PortfolioConstituentsName',
'TR.IndexConstituentName'],
parameters = {
'SDate':'2006-01-02'
}
)
df
Certain Data items have a TR.PortfolioConstituentsName field, that comes up empty when I try to access it.