For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
166 10 17 21

Eikon Data API - TR.IndexConstituentWeightPercent throws an error

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!

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonconstituents
weights.jpg (28.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
4.6k 26 7 22

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.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

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.

Upvotes
18k 21 12 20

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:


capture.png (51.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Thanks @chavalit.jintamalit, that is output I would expect. I need to investigate a bit more...

Click below to post an Idea Post Idea