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.

1 Answer

· Write an Answer
Upvotes
Accepted
80k 257 52 75

@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.