How to connect using Real-Time SDK EMA C# and RIC for FX
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()
1.Initialize()
at LSEG.Ema.Access.OmmConsumerImpl.HandleAdminDomains()
at LSEG.Ema.Access.OmmBaseImpl
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
-
Thank you for reaching out to us.
The error ("Access Denied: User req to PE(5050)") indicates that the account doesn't have permission to access the subscribed RIC.
Regarding RICs, you can the RIC Search Tool to search for RICs.
To connect to RTO with EMA C#, you can refer to the 113_MP_SessionMgmt example in the package. The example uses the Consumer_4 and Channel_4 in the EMA configuration file.
0 -
Hello @tboonte
There are others RTO examples as follows:
- 450_MP_QueryServiceDiscovery : RTO connection with a Service Discovery (automatic find RTO endpoint) like 113_MP_SessionMgmt example but with programmatic configuration
- 451_MP_OAuth2Callback_V2: RTO connection with manual RTO endpoint input
The 113 example is the easiest one.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 37 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 697 Datastream
- 1.5K DSS
- 633 Eikon COM
- 5.2K Eikon Data APIs
- 14 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 6 Trading API
- 2.9K Elektron
- 1.5K EMA
- 256 ETA
- 564 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 283 Open PermID
- 47 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2.1K Refinitiv Data Platform
- 779 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 122 Open DACS
- 1.1K RFA
- 107 UPA
- 194 TREP Infrastructure
- 231 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 98 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛