question

Upvotes
Accepted
19 3 7 8

EMA Returns TIME value upto nanoseconds, whereas RFA used to return upto seconds. Is this intentional?

We have noticed difference in time values, RFA used to return "20:12:27" whereas EMA returns "20:12:27:000:000:000". Not sure if this was intentional or not ?

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

Upvotes
Accepted
9.5k 10 5 7

Hello @gaurav.mahajan

EMA is designed to support MiFID II(the precision of timestamp extends to microsecond and nanosecond) from the beginning. That’s why you see it returns the timestamp up to nanosecond i.e. 20:12:27:000:000:000 even the timestamp’s precision is up to second. While RFA 8.x has been enhanced to support microsecond and nanosecond later from RFA 7.x. RFA 7.x supports up to second and millisecond and it throws an exception if it receives time stamp containing microsecond or nanosecond. For more details, please refer to the article Coding For High Precision Time . That’s why you see RFA returns up to second for the second timestamp.

Based on my test, RFA 8.x returns timestamp according to the timestamp’s precision. For example:

  • second timestamp: 20:12:27
  • Millisecond timestamp: 20:12:27:001
  • Microsecond timestamp: 20:12:27:001:002
  • Nanosecond timestamp: 20:12:27:001:002:003

While EMA returns up to nanosecond regardless the timestamp's precision. For example

  • second timestamp: 20:12:27:000:000:000
  • Millisecond timestamp: 20:12:27:001:000:000
  • Microsecond timestamp: 20:12:27:001:002:000
  • Nanosecond timestamp: 20:12:27:001:002:003

Anyway, EMA provides com.thomsonreuters.ema.access.OmmDateTime interface which has the method to get hour, minute, second, millisecond, microsecond and nanosecond. Hence, you can use the methods to get only unit time you prefer. Please refer to the method decode(FieldList fieldList) in the Consumer example application in example200__MarketPrice__Streaming demonstrating how to use these methods.

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