How to connect using Real-Time SDK EMA C# and RIC for FX

Options
tboonte
tboonte Newcomer
edited July 24 in EMA

Hello,

This actually a two questions post.

I am trying to connect to RTO using EMA (LSEG.Ema.Core 3.4.0), however, I am struggling to do so (more on this later.)

First, I am able to login and connect with websocket using example from MarketPriceRTOClientCredAuthExample project (I was given <client_id> and <client_secret>.)

Now that I am connected and able to receive "Ping" and send "Pong", but I am unable to get real-time data for RIC "/TRI.N" in the sample. Output from running the example below.

07/24/2025 9:25:51 AM SENT on Session1:
{
"ID": 2,
"Key": {
"Name": "/TRI.N",
"Service": "ELEKTRON_DD"
}
}

07/24/2025 9:25:52 AM RECEIVED on Session1:
[
{
"ID": 2,
"Type": "Status",
"Key": {
"Service": "ELEKTRON_DD",
"Name": "/TRI.N"
},
"State": {
"Stream": "Closed",
"Data": "Suspect",
"Code": "NotEntitled",
"Text": "Access Denied: User req to PE(5050)"
}
}
]

Tried with different RIC such as "IBM.N"; no luck.

I need to get two set of data, first FX data ie. USDTHB, I tried "USDTHB", "USDTHB=" these did not work.

Another set of data is US Equity data, I am subscribed to NASDAQ, but I do not know what would be the RIC for let's say MSFT, AMZN, etc.

OK, that was the first question.

The second question is, I would like to use RTO using provided library instead of websocket.

I use the code below, I have tried different combination of with/without TokenScope(), Host(), TokenUrlV2, ServiceDiscoveryUrl() but no joy.

            var config = new OmmConsumerConfig()
.ClientId(<client_id>)
.ClientSecret(<client_secret>)
.OperationModel(OperationModelMode.USER_DISPATCH)
.TokenScope("trapi.streaming.pricing.read") //From this point on I have tried different combination but no luck
.Host("api.refinitiv.com:443")
.TokenUrlV2("https://api.refinitiv.com/auth/oauth2/v2/token")
.ServiceDiscoveryUrl("https://api.refinitiv.com/streaming/pricing/v1/");
// create OMM consumer consumer = new OmmConsumer(config);

It would throw exception when executing

consumer = new OmmConsumer(config);

at LSEG.Ema.Access.OmmBaseImpl1.HandleLoginReqTimeout()
at LSEG.Ema.Access.OmmConsumerImpl.HandleAdminDomains()
at LSEG.Ema.Access.OmmBaseImpl
1.Initialize()
at LSEG.Ema.Access.OmmConsumer.Initialize()
at LSEG.Ema.Access.OmmConsumer..ctor(OmmConsumerConfig config)
at tutorial2.BasicConsumer.Main(String[] args) in C:\Working\temp\ema_csharp_consumer\tutorial2 - Requesting MarketPrice data\BasicConsumer.cs:line 76

Wonder if anyone can help share some pointer.

Best,

Wit

Answers