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

When using FOR loop to request get_timeseries, it sometimes returns TIME OUT

When I use get_timeseries to get Future's close price, I choose to use t FOR loop to get a list of contracts' data, but sometimes the get_timeseries returns TIMEOUT. Even if I set a 1 second time.sleep for each loop. How can I make sure that the get_timeseries can work well?

My code is like this:

for i in range(len(ric_list)):
try:
data = ek.get_timeseries([ric_list[i]], fields=["CLOSE"], start_date=before, end_date=today, interval='daily', count=10000)
except:
data = pd.DataFrame(columns=[ric_list[i]])
data_set = pd.concat([data_set,data],axis=1)
time.sleep(1)

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

1 Answer

· Write an Answer
Upvotes
Accepted
84.6k 287 53 77

@matt.huang

Thank you for reaching out to us.

Is it client request timeout or server timeout?

Please try to use the Refinitiv Data Library for Python instead.

You can refer to the historical pricing example on GitHub. With this library, you can configure the client request timeout via coding or configurations. Please refer to this discussion.

If it is server timeout, the number of items, fields, date range, or count should be reduced.


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.