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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

Python APi Eikon get data is not Fetching ( error 502) ,

ek.get_data(["0#.SPX"],[{'TR.CompanyMarketCap':{'sort_dir':'desc'}}]), 

This is the code I'm using to fetch data from eikon, but unfortunately it throwing me an error, (error 502)

Please help me with this issue.

Thank you

eikoneikon-data-apipython
icon clock
10 |1500

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

Upvotes
Accepted
47.3k 111 44 60

@Akhilesh.Kumar

I can run it properly.

df, err = ek.get_data(["0#.SPX"],[{'TR.CompanyMarketCap':{'sort_dir':'desc'}}])

1654672339178.png

You can enable logging in the API to verify the problem.

ek.set_log_level(1)
ek.set_app_key('<app key>')

1654672339178.png (29.9 KiB)
icon clock
10 |1500

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

Upvotes
1 0 0 0


Yes the code is fine, but for some reason in my system it throws this error and doesn't fetch the values.

eikon.eikonError.EikonError: Error code 502 | Server Error:

Let me know your thoughts.

icon clock
10 |1500

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

@Akhilesh.Kumar

Please enable logging and share it. You can use the below code to enable logging.

ek.set_log_level(1)
ek.set_app_key('<app key>')

Hello @Akhilesh.Kumar ,

Were you able to enable logging as suggested by @Jirapongse ?

Please share by zipping and attaching, or share the relevant excerpt so that we can progress with this discussion and try to help with the issue.