How can I retrieve service directory information from EMA?
While EMA markets itself as being something easier to use, what if I'm interested in acquiring the list of services available within my ADS Server?
For example, previously with the lower level APIs, RFA, UPA, etc, I was required to go through a basic sequence of steps where I connect, login, retrieve
the directory of services and optionally retrieve the dictionary. Within this sequence, it was available to me to capture the list of services. However, EMA significantly reduces this code effort and all I need to do to request for data now is to perform the following method call:
consumer.registerClient(
ReqMsg().serviceName( "ELEKTRON" ).name( "AAPL.O" ),
client );
In this situation, I am forced to know what service I want. What if I don't know and I want to dynamically choose which service? How do I do it?
thanks.
Best Answer
-
Hi @Ripley79
Please refer to the EMA example 331_Directory_Streaming which demonstrates how to make a Directory Request and process it.
That example registers a client for MMT_DIRECTORY but filters on a single service name
UInt64 dirHandle = consumer.registerClient( ReqMsg().domainType( MMT_DIRECTORY ).serviceName( "DIRECT_FEED" ), client, closure );
However, by removing the optional serviceName() filter, you can receive the complete Directory
UInt64 dirHandle = consumer.registerClient( ReqMsg().domainType( MMT_DIRECTORY ), client, closure );
The Decode methods in the AppClient show you how to decode the payload and extract the list of Services. Please the EMA_RDMUsageGuide.pdf for full details
Example output from the 331 example once I remove the ServiceName filter :
ID: ☺ Action: 2 DataType: ElementList Value: Name: Name DataType: Ascii Value: ELEKTRON_EDGE
Name: Vendor DataType: Ascii Value: Reuters
Name: Capabilities DataType: OmmArray Value:
Name: DictionariesProvided DataType: OmmArray Value:
Name: DictionariesUsed DataType: OmmArray Value:
Name: QoS DataType: OmmArray Value:
ID: ☻ Action: 2 DataType: ElementList Value: Name: ServiceState DataType: UInt Value: 1
ID: ♦ Action: 2 DataType: ElementList Value: Name: OpenLimit DataType: UInt Value: 10000
ID: ☺ Action: 2 DataType: ElementList Value: Name: Name DataType: Ascii Value: ELEKTRON_DD
Name: Vendor DataType: Ascii Value: Reuters
Name: Capabilities DataType: OmmArray Value:
Name: DictionariesProvided DataType: OmmArray Value:
Name: DictionariesUsed DataType: OmmArray Value:
Name: QoS DataType: OmmArray Value:
ID: ☻ Action: 2 DataType: ElementList Value: Name: ServiceState DataType: UInt Value: 1
ID: ♦ Action: 2 DataType: ElementList Value: Name: OpenLimit DataType: UInt Value: 10000In the above example my server provides two Services ELEKTRON_DD and ELEKTRON_EDGE
Note, however, that just picking a service from the Service Directory and then using that to consume data is not guaranteed to give you the expected results - as you have no way of knowing which service provides the data source you are expecting to consume from. If you are connecting to an ADS server on your site, the ADS could well be providing multiple services, including both internal and external vendor data. In addition to that, the server may be providing delayed or conflated data - which may not be suitable for your client application. Finally, you may also not be permissioned on Dacs to consume data from a given service.
Therefore, whilst requesting a Service Directory can be useful for confirming if the service you require is up and running, you should be checking with your Market Data team in the first instance to ascertain the correct service that provides the data you are expecting to consume. Once your Market Data team confirms the service name, it would be highly surprising if they changed the name of the service without informing all internal users in advance.
4
Answers
-
Is there a way to have only the services for which the account is able to access ?
This new EMA API is better than RFA, but it is still lacking basic function to retrieve list of accessible services without 150 lines of code to parse the message
0 -
When we verify with EMA developer guide, "The Directory request calls for all services and filters", so no. In the application, I would keep the service or the list of services that are of interest to the specific application, and from the list of services returned by the directory request, only process the responses for those services, while ignoring the rest.
0 -
that was my thought, the API and the whole platform is bloated.
0 -
I have run same example with the removal of serviceName filter, I always get following error.
loggerMsg
TimeStamp: 08:53:04.822 ClientName: DirectoryCallbackClient Severity: Error Text: Internal error: failed to encode RsslRDMDirectoryMsg in DirectoryCallbackClient::processCallback() RsslChannel 0x0000000000000000 Error Id -21 Internal sysError 0 Error Location RDM\rsslRDMDirectoryMsg.c:417 Error Text (ret = rsslEncodeElementEntryInit(pEncodeIter, &elementEntry, 0)) == RSSL_RET_SUCCESS
loggerMsgEnd
What could be the issue? The original example with serverName runs fine. Thanks.
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛