The field "TR.IndexConstituentWeightPercent" throws an error:
eikon.get_data('.SPX', ['TR.IndexConstituentRIC', 'TR.IndexConstituentWeightPercent'])
Retrieving only 'TR.IndexConstituentRIC' does work.
Also, the the Excel formula with TR.IndexConstituentWeightPercent does work:
=TR(".SPX","TR.IndexConstituentRIC;TR.IndexConstituentWeightPercent")
Any suggestions? Thanks!
It seems like an issue on your side:
Could you send me your UUID and also the exact time when the request was executed, and I will escalate this.
Thanks! I've e-mailed my UUID and the timestamp. Updating the Python package to the latest version didn't help. I'm running Python 3.6.0 on Windows. Running Python from the command line rather than Jupyter/iPython also doens't help...
Problem is no longer occurring.... Not sure what the cause has been.
I'm currently experiencing the same behaviour with the ek requests that are stated above and below (post from @chavalit.jintamalit). The constituents RICs are successfully returned, but the weight fields don't have any value and the error object contains a 'code 415' element for each row.
Any idea what the problem could be? Actually my goal is to request the TRBC sector weights of an index, so if there is a shortcut to directly request the sector weights that would solve my problem as well.
i've opened a new thread concerning my issue: https://community.developers.refinitiv.com/questions/72579/eikon-data-api-error-requesting-trindexconstituent.html
Here is my sample code:
import eikon as ek ek.set_app_id('your_app_id') y = ek.get_data('.SPX', ['TR.IndexConstituentWeightPercent','TR.IndexConstituentRIC']) print y
I can retrieve the data. I did try swap the order of field and it also worked fine.
Here is the output:
Thanks @chavalit.jintamalit, that is output I would expect. I need to investigate a bit more...