Service Discovery and hot backup (using Python)

I am attempting to upgrade to V2 authentication. I assume the python library ( https://community.developers.refinitiv.com/home/leaving?allowTrusted=1&target=https%3A%2F%2Fpypi.org%2Fproject%2Flseg-data%2F ) will do this for me. This library demands a configuration file like (https://github.com/LSEG-API-Samples/Example.DataLibrary.Python/blob/lseg-data-examples/Configuration/lseg-data.config.json), and I am still in he process of getting that to work. For now I am having some success with creating the session object directly:

image.png

I noticed one example (https://github.com/Refinitiv/websocket-api/blob/7f03fd6f1c10fe3d6dbdf976e1c366806f46b0f7/Applications/Examples/RDP/python/market_price_rdpgw_client_cred_auth.py#L208) performs service discovery.

  • What do I put into the configuration file so that I can find the AWS endpoint in my region? Right now it defaults to another continent.
  • Can I configure a hot backup connection using the config file too? I assume a hot backup is a second PlatformSession.
  • The streams appear to disconnect after the first access token expires. This library appears to have refresh logic, but have not found the necessary conditions to enable it yet.

Thank you

Answers

  • Hello @kyle,

    I would recommend to start with the Quickstart and Tutorials for the LD Library for Python. The market_price_rdpgw_client_cred_auth sample is using V2 authentication but not using this library. It uses direct websockets protocol to connect and get streaming data.

    Both library and direct websockets sample can perform service discovery but hot standby is not one of the features. For that, you will have to use a real time SDK which is offered in C++, Java and .NET only.

    V2 authentication tokens are long lived and don't need to be refreshed periodically.