EikonError: 403 Forbidden - a padding to disable MSIE and Chrome friendly error page

Hi,

When using the Eikon API from python, I am getting a "403 Forbidden Error". This was previously working.

import eikon as ek
ek.set_log_level(1)
ek.set_app_key('XXXXXXXXXXXXXXX')
df, err = ek.get_data(instruments = ["LSEG.L"], fields = ['BID','ASK'])
print(df)


When I run the simple test code above, I get the following output from the get_data() function:

eikon.eikonError.EikonError: Error code 403 | Client Error: <html>
<head><title>403 Forbidden</title></head>
 <body>
 <center><h1>403 Forbidden</h1></center>
 </body>
 </html>
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

Generating a new API key does not seem to resolve the issue.

Best Answer

  • HBL
    HBL
    Answer ✓

    This was resolved internally by Refinitiv Support.

Answers

  • @HBL Please use the most recent Data Libraries.

    !pip install refinitiv-data
    import refinitiv.data as rd
    rd.open_session()
    df= rd.get_data(universe = ["LSEG.L"], fields = ['BID','ASK'])
    df

    1708971772576.png

  • Thanks Jason, when I gave your code a try, I get this error:

    refinitiv.data._errors.RDError: Error code -1 | Cannot load the list of associated URLs from http://localhost:9060/api/rdp/streaming/pricing/v1/ for apis.streaming.pricing.endpoints.main endpoint.

    When I punch that url into my browser, I get an "Internal Server Error"

    Could it be my account not having permissions to access this?

  • @HBL So you are running this code from a local machine (not a browser hosted environment)? If you are having trouble you can use our own Codebook hosted Python environement - which has all the libraries preloaded. Type Codebk into the Eikon/Worskpace Search Bar / Launcher. I hope this can help.

  • @HBL Can you also try with the RIC 'EUR=' ie replace 'LSEG.L' thanks

  • I tried "EUR=" and same error. From Eikon, LSEG.L and EUR= are both accessible.

    Unfortunately, this needs to be done from my local machine, codebook is not an option for me.

    Please note that this all worked before using the Eikon package.

  • I tried "EUR=" and same error. From Eikon, LSEG.L and EUR= are both accessible.

    Unfortunately, this needs to be done from my local machine, codebook is not an option for me.

    Please note that this all worked before using the Eikon package.

  • Hello @HBL

    The library needs to connect to the Workspace desktop application in the same machine (localhost) as a proxy between the API and the platform. The "Cannot load the list of associated URLs from http://localhost:9060/api/rdp/streaming/pricing/v1/ for apis.streaming.pricing.endpoints.main endpoint." error message indicates that the library cannot connect to the proxy in the same machine (localhost).

    Do you have any network policy/firewall that block a connection to localhost?

    I suggest you try the troubleshooting steps on this Eikon Data API and Refinitiv Data Library - Troubleshooting article.

  • Hi @HBL,

    Have you had time to check if you have any network policy/firewall that block a connection to localhost?
    If not, would you mind having a look and also letting us know what version of httpx you are using?

  • Hi, as mentioned in the original comment, none of the suggestions helped. This had to be resolved internally by refinitiv support.