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
3 1 1 4

Invalid Hostname Error

Hi, I'm having trouble executing any data request using the Eikon API for Python. I get the following error in return after any ek.get_data or ek.get_timeseries:

EikonError: Error code 400 | Client Error: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid Hostname</h2>
<hr><p>HTTP Error 400. The request hostname is invalid.</p>
</BODY></HTML>

Could someone clarify how to fix this? Thanks in advance.

eikon-data-apipythonerror-400
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 @tiago.marchiore

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

1 Answer

· Write an Answer
Upvotes
Accepted
79.2k 251 52 74

@tiago.marchiore

First, we need to check if the Eikon API proxy is running properly by accessing the following URLs via a web browser.

The output looks like this:

1640058728185.png

Next, enable logging in the Eikon Data API to verify what the problem is.

import eikon as ek

ek.set_log_level(1)

ek.set_app_key('<app key>')
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.