How to properly open a Platform session?

I am trying to open a platform session in Python using the following guide:

Example.DataLibrary.Python/Examples/4-Session/EX-4.01.01-Sessions.ipynb at lseg-data-examples · LSEG-API-Samples/Example.DataLibrary.Python · GitHub

However, it systematically fails. The code either runs indefinitely or returns a timed-out error.

I have properly modified the configuration file to specify my userID, UserPWD, and AppKey, and passed the path to the function open_session as follows:


import lseg.data as ld

ld.open_session(name='platform.ldp', config_name=".../LSEG API/Configuration/lseg-data.config.json")

Tagged:

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @KPLUZANSKI

    Your lseg-data.config.json looks valid to me. About the "An error occurred while requesting URL('https://api.refinitiv.com/auth/oauth2/v1/token'). ConnectTimeout('[WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time...." error message, it seems to be a connection issue between your machine and the RDP API Gateway (api.refinitiv.com).

    Does your company has any firewall or proxy or network policy that blocks a HTTP connection to LSEG api.refinitiv.com?

    If your network team needs to configure the firewall, the static IPs of the api.refinitiv.com are as follows:

    • 75.2.0.254
    • 99.83.242.11


Answers