For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 1 4

Question about the TRB feed

We have a question about the TRB feed. Right now, we receive both D4 and TRB on the same session, how we can differentiate if a message is D4 or TRB besides the symbol name?

Right now, in each reuters msg, there is a "NameFlag" Attribute, we see "INR=D4" and "INR=TRB" respectively. But is there a better way to differentiate them rather than comparing symbol name? such as if they are different in other AttribInfo field?

elektronrefinitiv-realtimeelektron-sdk
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.

1 Answer

· Write an Answer
Upvotes
Accepted
26.4k 62 17 14

Hi @george.sommerfield

Which Elektron API that you are using?

If you are using EMA Java API, you can get the service name of incoming OMM message from Elektron/TREP via .serviceName() attribute.

Example Code:

public void onRefreshMsg(RefreshMsg refreshMsg, OmmConsumerEvent event)
{
   if (refreshMsg.hasName())
      System.out.println("Item Name: " + refreshMsg.name());
   
   if (refreshMsg.hasServiceName())
      System.out.println("Service Name: " + refreshMsg.serviceName());
   ...
}

public void onUpdateMsg(UpdateMsg updateMsg, OmmConsumerEvent event) 
{
   if (updateMsg.hasName())
      System.out.println("Item Name: " + updateMsg.name());
   
   if (updateMsg.hasServiceName())
      System.out.println("Service Name: " + updateMsg.serviceName());
   ....
}

Example Result:

Item Name: EUR=
Service Name: ELEKTRON_DD

.....
Fid: 22 Name: BID value: 1.2331
Fid: 393 Name: PRIMACT_1 value: 1.2331
Fid: 25 Name: ASK value: 1.2335

....

For you references, please see more detail regarding parsing and decoding incoming data in the following Elektron SDK tutorials:

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.