Does RFA data and/or RFA API support HH:MM:SS.MILLISECONDS for time format? What data type to use RDM Field Dictionary ? Thanks
New posts are disabled while we improve the user experience.
You can browse the site, or for urgent issues, raise a query at MyAccount.
Yes, RFA supports milliseconds. The fields are:
TRDTIM_MS "TRDTIM MS" 3853 NULL INTEGER 15 UINT64 4 ! ! Time of regular trades in milliseconds ! SALTIM_MS "SALTIM MS" 3854 NULL INTEGER 15 UINT64 4 ! ! Time of the last trade with precision in milliseconds - the time of the last update ! to the field TRDPRC_1 (FID 6). ! QUOTIM_MS "QUOTIM MS" 3855 NULL INTEGER 15 UINT64 4 ! ! Time of best bid/ask quote update in milliseconds !
The data type of these fields is unsigned integer 64bit which represents the number of milliseconds since midnight. You can use the below logic to convert it to HH:MM:SS.MMM.
int msec = time_ms%1000; int seconds = (((int)(time_ms/1000)) % 60); int minutes = (((int)(time_ms/60000)) % 60); int hours = (((int)(time_ms/3600000)) % 24);
Moreover, RFA supports nanoseconds via the following fields.
ASK_TIM_NS "ASK TIME NS" 14263 ASK_TM2_NS INTEGER 15 TIME 8 ! ! Time of best ask quote update - self describing timestamp supporting up to ! nanosecond granularity ! BID_TIM_NS "BID TIME NS" 14264 BID_TM2_NS INTEGER 15 TIME 8 ! ! Time of best bid quote update - self describing timestamp supporting up to ! nanosecond granularity ! QUOTIM_NS "QUOTIM NS" 14265 QUOTIM2_NS INTEGER 15 TIME 8 ! ! Time of best bid/ask quote update - self describing timestamp supporting up to ! nanosecond granularity ! SALTIM_NS "SALTIM NS" 14266 SALTIM2_NS INTEGER 15 TIME 8 ! ! Time of the last eligible trade - the time of the last update to the field TRDPRC_1 ! (FID 6). - self describing timestamp supporting up to nanosecond granularity
However, the availability of these fields depends on exchanges. The OMM type of the nanosecond fields is TIME. For more information, please refer to the Coding For High Precision Time article.