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
0 3 2 1

Error with get_timeseries

Hi folks,

I will ask all questions I have at this moment here, hopefully it is the correct way to do it.

I saw Excel and the Api were not giving me the same High, Low... values, and even I got different number of rows in the files. Then I realized that in the "Build Formula" at Excel I am allowed to specify what kind of price I want to download: Mid price, Common, Ask, Bid, Trade price etc...

I have seen that the get_timeseries from the APi does not allow us to choose from that list of prices and automatically chooses the "trade price", Am I correct? In that case I suggest you to add to the help section of the get_timeseries function an explanation of what you are actually downloading.

I assume that what I get with get_timeseriers is the trade price with the parameter "adjusted" set to "no". Is this correct?


Now my biggest problem is that I prepare a list of rics, I put a time.sleep(1) in my algorithm to avoid the limits on the API but after looping through several RICs I get an error:


2020-04-22 17:17:01,131 P[26600] [MainThread 4164] Request timeout occured Traceback (most recent call last):   File "C:/direction.py", line 17, in <module>     result = ek.get_timeseries(j, start_date = fecha_inicio, end_date = fecha_fin, interval="minute",fields= ["HIGH", "LOW", "OPEN", "CLOSE", "VOLUME"] )   File "C:\Users\....\eikon\time_series.py", line 178, in get_timeseries     ts_result = eikon.json_requests.send_json_request(TimeSeries_UDF_endpoint, payload, debug=debug)   File "C:\Users\...eikon\json_requests.py", line 127, in send_json_request     _check_server_error(result)   File "C:\Users\....eikon\json_requests.py", line 203, in _check_server_error     raise EikonError(int(server_response['ErrorCode']), error_message) eikon.eikonError.EikonError: Error code 408 | Request timeout occured


And I got a different error telling me "no content for that RIC" or something like that.


My question is, Do you know how could I tell the loop to ignore the error and jump to the next RIC?

Maybe this has been answered in the past but I can't find it.


I add that the list of RICS was the stocks at the Tokyo Stock Exchange and the error appeared after looping through 98 of them.


Thanks for your time




eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apierror-message
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.

@arnoldpredator

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
22k 58 14 21

Hi @arnoldpredator, You can attach your code snippet which replicates this issue, and then we can take a look at it. Since an exception is being throws, the simplest way would be to wrap the function in try-catch block and ignore the problem instrument.

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.

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.