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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
22 2 3 7

for PYTHON API

import eikon as ek

API = ek.set_app_id('ECC3299DC668A7E4F5B9714F')

while True:

API = ek.set_app_id('ECC3299DC668A7E4F5B9714F')

print(API)

Data = ek.get_timeseries(['GGAL.O'], start_date='2017-01-10' , end_date='2018-07-12')

print(DATA)

Data.to_csv('ADR_GGAL.O_ACTUALIZADO.csv',decimal=",",sep=";"))

I want to read my api constantly and have it printed on the screen. I do not know if my code is correct, I would like you to help me. On the other hand, it gives me an error: HTTPError: <Response [403]>

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonapi
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
39.2k 75 11 27

@pablo
In addition to comments from @nick.zincone.1 the app ID you're using is no longer valid, which is the reason you receive HTTP 403 response to your data requests. About a month ago Thomson Reuters started validating the app keys used in applications utilizing Eikon Data APIs. Prior to this all participants in the Beta program for Eikon Data APIs were notified via email of the upcoming change and that they would need to generate new API keys using a new App Key Generator app. It appears that some users either missed this notification or didn't receive it. Long story short what you need to do is generate a new app key following the procedure described in the Quick Start Guide for Eikon Data APIs, which was updated. Please make sure to use the App Key Generator app to generate the new app key.
You may also want to update the eikon Python library from pip to the latest version 0.1.13, which among other things provides more explicit error messages. If you were using this version of the eikon Python library you'd see in the error message that the app key you use is invalid.

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
9.7k 49 38 60

Hi @pablo,

The call to 'set_app_id' should only happen once, at the start of your application, not in a while loop. This set_app_id() effectively establishes a session with Eikon to enable you to request data, which you only need to do once.

As for the above calls to get_timeseries and save it to a file, those lines work fine. I don't know what you mean by "I want to read my api constantly". Can you elaborate?

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.

Click below to post an Idea Post Idea