question

Upvotes
Accepted
0 0 0 3

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

trep#technologypython apiADSADHrefinitiv-data-libraries
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 @Sismercados ,

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

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

Upvotes
Accepted
79.2k 251 52 74

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

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
24.7k 54 17 14

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

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
0 0 0 3

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
)
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
79.2k 251 52 74

@Sismercados

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

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

1690453080882.png


1690453080882.png (36.1 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.

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.