Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 1

Eikon fails to return financial data

Hi,

I am trying to get some financials for a list of companies using the Eikon API on Python over a certain time period.

When using the eikon.get function, I get two lists, where the first one is for the successful requests and the other is for the errors. When analysing the errors for a specific row, I get

"'code': 416, 'col': 19, 'message': "Unable to collect data for the field 'TR.REVENUE.DATE' and some specific identifier(s).", 'row': 27410".

Hence, guessing that there is a problem with the timeout (or too many requests in one time), I try the same request for all the error rows and still I obtain many errors. In particular, I don't understand why these errors exists, given that I can find the corresponding data on the desktop app. May you help me with it somehow?

I attach the relevant script

Thanks!

eikon-data-api#technology
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.

Sorry, apparently the code didn't go through. Here it is!

example_error_eikon.txt

Hi @marco.castelluccio.20 , I would suggest upgrading to the RD library, as the eikon one is being deprecated, and preferably using `get_history` functions rather than `get_data`, as the former is formatted by the library itself, and the later is not - by design. Please do let us know if this solves your problem. If it does not, please do not hesitate to provide us with the aaa.csv file used in the code, or an eddited version of it, so we can test with it.

Upvotes
Accepted
6.5k 21 3 6

Hi @marco.castelluccio.20 , I would suggest upgrading to the RD library, as the eikon one is being deprecated, and preferably using `get_history` functions rather than `get_data`, as the former is formatted by the library itself, and the later is not - by design. Please do let us know if this solves your problem. If it does not, please do not hesitate to provide us with the aaa.csv file used in the code, or an eddited version of it, so we can test with it.

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 1

Hi @jonathan.legrand, thanks a lot for the answer.

1. When using the ek.get_history function I get the error "module 'eikon' has no attribute 'get_history'" and I am not sure what to do with it... What do you suggest?

2. Regarding the use of rdp, I am not sure my license comprehends it as it is an institutional license.

Thanks again!

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.

Hi @marco.castelluccio.20, if your license allows you to use the `eikon` data library (EDAPI), then it will allow you to use the aforementioned RD library for Python. you can install it with `pip install refinitiv-data`. Please make sure that you are using version 1.5.0 or higher. I would then advise using rd.get istory as shown here:

https://github.com/LSEG-API-Samples/Example.DataLibrary.Python/blob/main/Examples/1-Access/EX-1.01.02-GetHistory.ipynb

You can continue using `eikon` too, if you wish, as shown here:

https://github.com/LSEG-API-Samples/Example.DataLibrary.Python/blob/main/Examples/5-Eikon%20Data%20API/EX-5.02.01%20-%20Eikon%20Data%20API%20-%20TimeSeries.ipynb

Hi @m.castelluccio,

As per the Eikon Data API (EDAPI) Quickstart page, when using the eikon module in the RD Lib., or EDAPI itself, the `get_history` function is named `get_timeseries`.
With regards to the RD Lib., if your license allows you to use EDAPI, then it also alows for RD Lib. use. I would therefore suggest using it.


Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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