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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
98 10 21 27

Python and Eikon API error: request.exceptions.HTTPError:

Hello again everybody, I'm having issues making API calls to Eikon.

Does anybody know what could be the source of this error? I updated the python module to the latest.

Thanks for your time,

Aquiles

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
captura.jpg (40.1 KiB)
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

@aquilesjlp300
I checked the entitlements on your Eikon account. You do not subscribe to any services from Thomson Reuters. You subscribe to the product named Xenith from the company named Metastock, which includes a variant of Thomson Reuters Eikon. Metastock Xenith is positioned as a retail product. It can only be sold by Metastock to private (non institutional) clients. The variant of Thomson Reuters Eikon included with Metastock Xenith is a retail variant and it does not include access to Eikon Data APIs and many other institutional features.
In order to use Eikon Data APIs you need to subscribe to a premium tier variant of Eikon from Thomson Reuters. If you'd like to sign up for Eikon variant, which includes access to Eikon Data APIs, please contact Thomson Reuters Sales team following the link below.
https://financial.thomsonreuters.com/en/contact-sales.html

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.

@Alex Putkov.

Thanks a lot for your prompt response Alex! Ok, got that. I'd like to point out something strange, given that you mention this. When I use Eikon on my personal computer I don't get this issue, and I use the same Eikon credentials as I do for the machine that's giving me trouble. Why would that be?

Please correct me if I'm wrong, but what I think you mean is that you can use the API with Eikon API Proxy not embedded in Eikon application, i.e. run as a separate application, as you mentioned in one of the earlier comments on this thread, right? Eikon Data API is not launched yet. It's in Beta and some unintended behavior is expected. The fact that with your Eikon account you can use the API through Eikon API Proxy application is one of those unintended behaviors, which will eventually be corrected.

Upvote
38.1k 71 35 53

Eikon Data API sends requests to this URL: http://localhost:{port}/api/v1/data in order to get the data. If you use Eikon API Proxy, the default port number is 36036. However, if you use Eikon, the default port number is 9000.

From the error, it returns 404 Not Found. Therefore, the application that listens on that port is unable to provide a response for this URL: http://localhost:{port}/api/v1/data.

From the question, I assume that you are connecting Eikon Data API with Eikon. Therefore, the default port is 9000.

To verify the problem, please run "netstat -anb" as Administrator to verify all listening TCP port. The TCP port 9000 must be owned by EikonBox.exe.

 TCP    127.0.0.1:9000         0.0.0.0:0              LISTENING
[Eikonbox.exe]

You can try http://localhost:9000/api/v1/data with your browser. You should see Internal Server Error instead of Not Found.

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.

Your assumption is correct, I'm using Eikon Data API with Eikon, and the default port should be 9000 as you mention.

Can this issue be solved by adding the URL you gave me to "Trusted Sites" in Internet Options (using 9000 as port)?

@aquilesjlp300
I don't think adding anything to Trusted Sites in Internet Options would be helpful here. What I think would be very helpful is to follow the suggestion @jirapongse.phuriphanvichai made: run Windows Command Prompt as Administrator and execute "netstat -anb" command. Then in the table returned by netstat see two things:
1. Which process is listening on TCP 127.0.0.1:9000?
2. Which ports Eikonbox.exe processes are listening to on the localhost?
If you could share your observations on the two questions above, this I think would be very helpful.

Hello @Alex Putkov.

Well, I ran the command suggested by @jirapongse.phuriphanvichai and I got this. It seems the port 9000 is listening to EikonBox.exe like it should be, but I still get the same error. I also enabled scripting in the "Internet Zone", but like I said, the same error keeps coming up.

image.png (49.8 KiB)
Upvotes
38.1k 71 35 53

@aquilesjlp300

Yes, it shows that Eikon is properly listening on TCP port 9000. Can you run a postman tool to send a POST request to http://localhost:9000/api/v1/data to verify the problem?

The response of the POST request should be 200 OK.

You can download postman from https://www.getpostman.com/.


post.png (23.8 KiB)
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.

@jirapongse.phuriphanvichai @Alex Putkov.

I am facing the same error, and this is the result of my Postman request.

Any ideas?

error.png (45.3 KiB)

@aquilesjlp300

Please let us know, if you have any update on this question.

It could be a permission issue. Please follow steps in this question to verify the problem.

Hello @jirapongse.phuriphanvichai!

I still get the same issue when I use Eikon desktop app to make API calls. But when I use Eikon API Proxy, which by the way points out to this port http://localhost:36036/api/v1/data, I get no errors at all.

Is there a way to make Eikon point out to a certain port? This might solve the issue.

What do you think?

Thanks for your interest in this issue!

Eikon desktop uses TCP port 9000 as a default port for API proxy. Eikon API Proxy uses TCP port 36036 as a default port for API proxy.

Please follow steps in this question to verify the Eikon desktop log file. If you don't see APIPROXY in the log file, it means that you can't use API Proxy with Eikon Desktop.

[2018-01-10 13:44:36.155|show] (app) PO: SIDEBYSIDE,APIPROXY
Show more comments
Click below to post an Idea Post Idea