EIKON API not working

Hi,

I'm not able to use the eikon api.

Tried the trouble shoot link: Eikon Data API(Python) Troubleshooting | Refinitiv | Devportal (lseg.com)

capture.jpg

and noticed that my Log doesn't have any proxy information. However, the article doesn't tell you what to do.

Here is the log I get when trying to connect to the API:

2024-05-14 16:58:32,254 P[44336] [MainThread 43016] Reset a Desktop session with new app_key

2024-05-14 16:58:32,256 P[44336] [MainThread 43016] Send GET request to http://127.0.0.1:9060/api/status to detect API Proxy...

2024-05-14 16:58:32,257 P[44336] [MainThread 43016] Request to http://127.0.0.1:9060/api/status

headers = {'x-tr-applicationid': 'xxxxxxxxxxxxxxxa5e9da6e44f5bc5481b5451f'}

params = None

2024-05-14 16:58:32,258 P[44336] [MainThread 43016] HTTP request failed: AssertionError()

2024-05-14 16:58:32,258 P[44336] [MainThread 43016] Error on checking proxy url http://127.0.0.1:9060/api/status : AssertionError()

2024-05-14 16:58:32,259 P[44336] [MainThread 43016] Retrieved port 9060 value from .portIntUse isn't valid.

2024-05-14 16:58:32,260 P[44336] [MainThread 43016] Warning: file .portInUse was not found. Try to fallback to default port number.

2024-05-14 16:58:32,260 P[44336] [MainThread 43016] Try defaulting to port 9000...

2024-05-14 16:58:32,261 P[44336] [MainThread 43016] Send GET request to http://127.0.0.1:9000/api/status to detect API Proxy...

2024-05-14 16:58:32,262 P[44336] [MainThread 43016] Request to http://127.0.0.1:9000/api/status

headers = {'x-tr-applicationid': 'xxxxxxxxxxxxxxxxxxxxda6e44f5bc5481b5451f'}

params = None

2024-05-14 16:58:32,262 P[44336] [MainThread 43016] HTTP request failed: AssertionError()

2024-05-14 16:58:32,263 P[44336] [MainThread 43016] Error on checking proxy url http://127.0.0.1:9000/api/status : AssertionError()

2024-05-14 16:58:32,263 P[44336] [MainThread 43016] Default proxy port #9000 failed

2024-05-14 16:58:32,264 P[44336] [MainThread 43016] Try defaulting to port 9060...

2024-05-14 16:58:32,264 P[44336] [MainThread 43016] Send GET request to http://127.0.0.1:9060/api/status to detect API Proxy...

2024-05-14 16:58:32,265 P[44336] [MainThread 43016] Request to http://127.0.0.1:9060/api/status

headers = {'x-tr-applicationid': 'f8f72db20a5b4e26a5e9da6e44f5bc5481b5451f'}

params = None

2024-05-14 16:58:32,266 P[44336] [MainThread 43016] HTTP request failed: AssertionError()

2024-05-14 16:58:32,266 P[44336] [MainThread 43016] Error on checking proxy url http://127.0.0.1:9060/api/status : AssertionError()

2024-05-14 16:58:32,267 P[44336] [MainThread 43016] Default proxy port #9060 failed

2024-05-14 16:58:32,268 P[44336] [MainThread 43016] Error: no proxy address identified.

Check if Eikon Desktop or Eikon API Proxy is running.

2024-05-14 16:58:32,269 P[44336] [MainThread 43016] Try to handshake on url http://127.0.0.1:None/api/handshake...

2024-05-14 16:58:32,269 P[44336] [MainThread 43016] Request to http://127.0.0.1:None/api/handshake

headers = {'Content-Type': 'application/json', 'x-tr-applicationid': 'f8f72db20a5b4e26a5e9da6e44f5bc5481b5451f'}

params = None

2024-05-14 16:58:32,270 P[44336] [MainThread 43016] HTTP request failed: InvalidURL("Invalid port: 'None'")

2024-05-14 16:58:32,271 P[44336] [MainThread 43016] Error on handshake url http://127.0.0.1:None/api/handshake : InvalidURL("Invalid port: 'None'")

2024-05-14 16:58:32,271 P[44336] [MainThread 43016] Error on handshake url http://127.0.0.1:None/api/handshake : InvalidURL("Invalid port: 'None'")

2024-05-14 16:58:32,272 P[44336] [MainThread 43016] Port number was not identified, cannot send any request

2024-05-14 16:58:32,272 P[44336] [MainThread 43016] Received notification for closed streaming session 0

2024-05-14 16:58:32,273 P[44336] [MainThread 43016] Received notification for closed streaming session 0

2024-05-14 16:58:32,273 P[44336] [MainThread 43016] Init a Desktop session with new app_key

2024-05-14 16:58:32,274 P[44336] [MainThread 43016] entity: TimeSeries

2024-05-14 16:58:32,274 P[44336] [MainThread 43016] payload: {'rics': ['EUR=', 'CAD=', 'GBP='], 'fields': ['CLOSE', 'TIMESTAMP'], 'interval': 'daily', 'startdate': '2020-01-01T00:00:00', 'enddate': '2020-05-18T00:00:00'}

2024-05-14 16:58:32,275 P[44336] [MainThread 43016] Request:{'Entity': {'E': 'TimeSeries', 'W': {'rics': ['EUR=', 'CAD=', 'GBP='], 'fields': ['CLOSE', 'TIMESTAMP'], 'interval': 'daily', 'startdate': '2020-01-01T00:00:00', 'enddate': '2020-05-18T00:00:00'}}}

2024-05-14 16:58:32,275 P[44336] [MainThread 43016] Request to http://127.0.0.1:None/api/v1/data

headers = {'Content-Type': 'application/json', 'x-tr-applicationid': 'xxxxxxxxxxxa5e9da6e44f5bc5481b5451f'}

params = None

2024-05-14 16:58:32,276 P[44336] [MainThread 43016] HTTP request failed: InvalidURL("Invalid port: 'None'")

2024-05-14 16:58:32,277 P[44336] [MainThread 43016] HTTP request failed: Invalid port: 'None'

Hope someone can help.


regards,

Luiz


Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • raksina.samasiri
    Answer ✓

    Hi @lflu ,

    Eikon Data API supports a proxy setting via the Windows HTTP_PROXY variable. For example:

    import os
    os.environ['HTTP_PROXY']="http://127.0.0.1:8080"

    It looks like it requires a proxy to connect to the localhost. I assumed that a web browser also uses a proxy to connect to http://localhost:9060/api/status.

    You may verify a proxy setting used by a web browser. It may have a security application that blocks a connection to the localhost.

Answers

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.