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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

gmtm.projectoffice avatar image
3 2 0 0

EIKON DATA API ; how can we setup a proxy and port?

Hi all,


I am trying the tutorial:

data = ek.get_timeseries('AAPL.O',  # the RIC for Apple, Inc.
                         fields='*',  # all fields
                         start_date='2017-01-01',  # start date
                         end_date='2017-12-31')  # end date

When requesting data I have got the following errors (I need to download via a proxy because I am requesting from a company):


                                                 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style type="text/css">html,body{height:100%;padding:0;margin:0;}.oc{display:table;width:100%;height:100%;}.ic{display:table-cell;vertical-align:middle;height:100%;}div.msg{display:block;border:1px solid #30c;padding:0;width:500px;font-family:helvetica,sans-serif;margin:10px auto;}h1{font-weight:bold;color:#fff;font-size:14px;margin:0;padding:2px;text-align:center;background: #30c;}p{font-size:12px;margin:15px auto;width:75%;font-family:helvetica,sans-serif;text-align:left;}</style><title>403 Forbidden: incorrect proxy service was requested</title></head><body><div class="oc"><div class="ic"><div class="msg"><h1>403 Forbidden: incorrect proxy service was requested</h1><p><p>The webserver reported that an error occurred while trying to access the website.  Please click <u><a href="javascript:history.back()">here</a></u> to return to the previous page.</p> <p>    URL: http://127.0.0.1:9060/api/v1/data&lt;br />    <br/>User name:     <br/>Group name: </p></p></div></div></div></body></html> 
2020-12-02 12:10:31,967 P[47248] [MainThread 18444] HTTP request failed: EikonError-Client Error: <!-- IE friendly error message walkround.             if error message from server is less than        512 bytes IE v5+ will use its own error          message instead of the one returned by           server.     


Can you help please?


eikoneikon-data-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikonproxy
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

chavalit-jintamalit avatar image
18.1k 21 12 20

Hi @gmtm.projectoffice

You can contact your Refinitiv Account Manager or Refinitiv CSM to get more information on the required proxy/firewall rules.

I reached out to your account manager, Manoj Naran Dullabh, and informed him to contact you regarding this.


Alternatively, you can contact Refinitiv Helpdesk to ask for required network rules at https://my.refinitiv.com/

10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

gmtm.projectoffice avatar image
3 2 0 0

In fact I want to integrate a proxy into my python code . I am not talking about the "Eikon PROXY API".I have tried this piece of code but it is not working:

import httplib2

# detect presense of proxy and use env varibles if they exist

pi = httplib2.proxy_info_from_environment()

if pi:

import socks

socks.setdefaultproxy(pi.proxy_type, pi.proxy_host, pi.proxy_port)

socks.wrapmodule(httplib2)

# now all calls through httplib2 should use the proxy settings

httplib2.Http()

error:


020-12-03 10:25:36,159 P[54288] [MainThread 39244] Error: no proxy address identified. Check if Eikon Desktop or Eikon API Proxy is running. 2020-12-03 10:25:36,160 P[54288] [MainThread 39244] Port number was not identified, cannot send any request
1 comment
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

The Eikon API only makes request to a locally running Eikon / API Proxy application. I believe you should not apply proxy settings to your Python code. Instead, ensure that Eikon is working through the proxy. The Eikon API should then work correctly.

Hope this helps!