How to connect to a specific deployed RTDS service using Pyhon RDL?

How to connect to a specific deployed RTDS service using Pyhon RDL?

I've been able to successfully hand over on-premise server IPs, dacs users and subscribe as snapshot or stream to RICs and specific fields. I was wondering if it was possible to open_session and/or get_data, etc to a specific service within our RTDS ADH service list. e.g. ABC_SELECTFEED


Not exactly sure if this is something that is tied to the configuration file for session establishment or if it is something that can be handed over as a flag when opening a session such as:

rd.open_session(config_name=".\\Configuration\\refinitiv-data.custom.config.json")


Thanks in advance for your help

Welcome!

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

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @Sismercados

    Thank you for reaching out to us.

    The content in the refinitiv-data.custom.config.json file should be like this:

    {
         "logs": {
        "level": "debug",
        "transports": {
          "console": {
            "enabled": false
          },
          "file": {
            "enabled": false,
            "name": "refinitiv-data-lib.log"
          }
        }
      },
        "sessions": {
            "default": "platform.my-custom-session",
            "platform": {
                "my-custom-session": {
                    "app-key": "",
                    "realtime-distribution-system": {
                        "url" : "<hostname>:15000",
                        "dacs" : {
                            "username" : "<username>",
                            "application-id" : 256,
                            "position" : ""
                        }
                    }
                }
            }
        }
    }

    The server must be configured to support WebSocket connections.

    Then, refer to the example on GitHub.

    stream = rd.open_pricing_stream(
        universe=['JPY='],
        service="ABC_SELECTFEED",
        fields=['BID', 'ASK'],
        on_data=display_data
    )

    You can enable the file logging in the configuration file to troubleshoot the problem.

Answers

  • Hello @Sismercados

    Thank you reaching out to us. You can find how to specify the service name with the Data Library - Python edition from my colleagues' answers in this old post (the question is about requesting ATS data, but the main concept is the same for other RTDS components).

  • is there also any way where using the stream we can select one of our feeds?

    stream = rd.content.pricing.Definition(
    universe=ricarray,
    fields=fieldarray
    ).get_stream()

    Or the only way to select a feed is via?

    stream = rd.open_pricing_stream(
    universe=ricarray,
    fields=fieldarray,
    service=session_select,
    on_data=display_data
    )
  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Sismercados

    I ran help(rd.content.pricing.Definition).

    rd.content.pricing.Definition supports the service parameter.

    1690453080882.png

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.