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
1 0 1 2

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.

eikon-data-apipython#technologyapipython api
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.

Hi @HBL ,

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

HBL avatar image   HBL raksina.samasiri
Hi, none of the suggestions helped. This had to be resolved internally by refinitiv support.
Upvotes
10.2k 18 6 9

@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


1708971772576.png (35.6 KiB)
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.

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?

Upvotes
10.2k 18 6 9

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

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
10.2k 18 6 9

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

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.

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.

Upvotes
1 0 1 2

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.

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.

Upvote
24.7k 54 17 14

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.

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.

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?

HBL avatar image HBL jonathan.legrand

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

Upvotes
1 0 1 2

This was resolved internally by Refinitiv Support.

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.