Eikon API Error 403 Error code 403 | Client Error:

Hi All,

I'v just set up my new Eikon Global Equities. Unfortunately, I got an error Message when trying to request Data my local installed Jupyter Notbooks:

The code i was running is:

import eikon as ek
ek.set_app_key('6441----------------f77')

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


And this is the error message:

2023-06-30 11:32:06,732 P[7112] [MainThread 11924] Error code 403 | Client Error: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>The requested URL could not be retrieved</title>
<link href="http://passthrough.fw-notify.net/static/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://passthrough.fw-notify.net/static/default.js"></script>
</head>

Your Assistance is much appreciated.


BR,

Frank


Best Answer

  • @frank.marsollek Yes that is the likely explanation - please speak to you local IT team and try to open those ports and whilelist the appropriate domains. In the meantime - you can still use the API in the CODEBOOK app - type CODEBK into eikon search bar and you can access a hosted jupyter instance. Let me know if this works for you in the interim. You can look at the example folders there which have a lot of examples for data retrieval using both RD libs and Eikon Libs. I hope this can help.

Answers

  • @frank.marsollek thanks for your question - so the code part is working for me:

    1688118014751.png

    Therefore it is either an older library error or its an appkey error imo. Please can you upgrade to the latest Eikon library by typing the following from the command line.

    pip install eikon --upgrade

    And see if that helps. I would also recommend the customer installs the latest Refinitiv Data Libraries which contain a full port of the Eikon libraries plus additional content and capabilities from the Refinitiv Data Platform - such as Search, IPA, enhanced Historical Pricing service and generally more robust performance.

    pip install refinitiv-data

    and then to use in Python:

    import refinitiv.data.eikon as ek
    ek.set_app_key('YOUR APP KEY HERE')

    you can also create a new appkey if necessary using the AppKey app. Make sure EDAPI is checked.

    I hope this can help.

  • Hi Jason,

    thank you for your assistance:

    I've also installed

    pip install refinitiv-data


    The APPkey was freshly generated and both EDP API and Eikon Data API are checked. Additionally, I've disabled an enabled the Key again.

    Using the following results in:

    import refinitiv.data.eikon as ek
    ek.set_app_key('6441602---------------------709ef77')
    data = ek.get_timeseries('.BRTI', # the RIC for Apple, Inc.
    fields='*', # all fields
    start_date='2017-01-01', # start date
    end_date='2023-12-31') # end date

    Error:

    Error code 403 | Client Error: Target service not allowed - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>The requested URL could not be retrieved</title>
    <link href="http://passthrough.fw-notify.net/static/default.css" rel="stylesheet" type="text/css" />
    <script t


    And using this code results in:

    import eikon as ek
    ek.set_app_key('64416022---------------9ef77')
    data = ek.get_timeseries('.BRTI', # the RIC for Apple, Inc.
    fields='*', # all fields
    start_date='2017-01-01', # start date
    end_date='2023-12-31') # end date

    Error:

    2023-06-30 12:04:36,079 P[13172] [MainThread 9544] Error code 403 | Client Error: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>The requested URL could not be retrieved</title>
    <link href="http://passthrough.fw-notify.net/static/default.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="http://passthrough.fw-notify.net/static/default.js"></script>


    Therefor I think that I do not have permission to Refinitiv Date, but to the Eikon Desktop API.

    ... totally frustrating...

  • @frank.marsollek Can you try checking the following:

    1) Check if API Proxy is running: Please can you type http://localhost:9000/api/ into a browser window as see if you get the following:

    1688121063751.png

    You may have to change to port from 9000 to 9001,9002 etc

    thx

  • i guess you meant 'localhost:9060/api/

    this status is bad:

    {"code":500,"message":"Cannot find module \".\"","statusMessage":"Internal Server Error"}
  • the same with port 9000

  • can you try with 9001 then 9002 etc it tries to start at 9000 and then if occupied moves up in port number increments of 1
  • ref-conn.jpgok, for now it seems to be an firewall issue...


  • Hi Jason,

    ok, this seems to be an proper way to solve this issue.

    Would it be possible to get the domains that our IT team should list in our firewall? This is, beside the port numbers mandatory. (You can send this information to my email adress if you prefer...)

    Many thanks and have a good one!

    BR,
    Frank

  • Hi @frank.marsollek ,

    Please see pages 15-20 for configuring firewall, proxy, and internet options in the document Refinitiv Eikon Networking Guide. Also on page 14, you will see the IP Subnet and TCP Port that we are using.