question

Upvotes
Accepted
22 2 0 6

How to detect closing run events?

How can the closing run events be detected? I am working on upgrading from rfa to ema and my application has some existing logic that executes on a closing run event. In rfa, I was able to detect closing run events by checking the MarketDataItemEvent.MarketDataMessageType (CLOSING_RUN)but I can't seem to find an equivalent for ema.

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvote
Accepted
9.5k 10 5 7

Hello @CAM

In EMA Java, Closing run is defined as one type of UpdateTypeNum component in an Market Price Update Message shown in EMAJ_RDMUsageGuide.pdf below:

EMA Java provides com.thomsonreuters.ema.access.UpdateMsg.updateTypeNum() method to get UpdateTypeNum component as explained in EMA Java document of UpdateMsg class:

Hence, you can use the method to check if a message received in onUpdateMsg(..) is closing run event or not. The snipped example application source code is shown below:

public void onUpdateMsg(UpdateMsg updateMsg, OmmConsumerEvent event) 
{
   …
  int updateTypeNum = updateMsg.updateTypeNum();	 
  if(updateTypeNum==com.thomsonreuters.ema.rdm.EmaRdm.INSTRUMENT_UPDATE_CLOSING_RUN)
   {
	//process closing run event
	…
   }
   …
}

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea