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

Eikon API issue

Hello,


I am trying to connect to the Eikon API, see below the snippet code which I took from the quickstart guide:


import eikon as ek

ek.set_log_level(1)

ek.set_app_key('01b52a73XXXXXXX')

df = ek.get_timeseries(["TRAPI2Mc1"],start_date="2016-01-01",end_date="2016-01-10")

data, err = ek.get_data(["IBM", "GOOG.O", "MSFT.O"], ["TR.PriceClose", "TR.Volume", "TR.PriceLow"])


I get the following response:


INFO:pyeikon:Send GET request to http://127.0.0.1:9060/api/status to detect API Proxy...

DEBUG:pyeikon:Request to http://127.0.0.1:9060/api/status

headers = {'x-tr-applicationid': '01b52a73XXXXXXX '}

params = None

Level 1:pyeikon:HTTP request response 404: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">

<HTML><HEAD><TITLE>Not Found</TITLE>

<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>

<BODY><h2>Not Found</h2>

<hr><p>HTTP Error 404. The requested resource is not found.</p>

</BODY></HTML>


I have already deprecated eikon to 1.1.8 and httpx to 0.14.2 (via pip) and checked the antivirus


@Ereny.Adeeb

@jonathan.legrand


Thank you for your assistance

apiquickstart-guide
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.

Hello @ludomir.garreau01

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

@ludomir.garreau01

Hi,

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

Thanks,

AHS

Upvotes
Accepted
1.3k 3 2 4

Hi @ludomir.garreau01 ,

eikon python lib is sending request only to locahost (to Eikon API Proxy which is listening all requests to http://127.0.0.1:9060/api).

There is at lest 2 ways to allow request to localhost:

  1. update your corporate proxy to allow requests to localhost
  2. switch your corporate proxy for requests to localhost : set NO_PROXY=localhost:9000,localhost:9060 in environment variables.

To verify if it's fixed, you can run his command:

python -c "import httpx; print(httpx.get('http://localhost:9060/api/status'))"
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.

Upvotes
1 0 0 1

I would like to add to the above question: I am behind a corporate proxy, please could you advise how I can incorporate the proxy variables into the script?

Thank you

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.