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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
89 9 16 21

data time real-time

How to get the Data-Time which is in the history files, but which is not present in real-time.

real-time code

OmmConsumer consumer(config.host("1**.***.***.*:14002").username("EM1_****_*********"));        consumer.registerClient(ReqMsg().serviceName("hEDD").domainType(MMT_MARKET_PRICE).name("ESZ1m"), client)        sleep(1200000);

Result

UpdateMsg
    streamId="5"
    domain="MarketPrice Domain"
    updateTypeNum="0"
    seqNum="33040"
    name="UROZ1m"
    serviceId="259"
    serviceName="hEDD"
    Payload dataType="FieldList"
        FieldList
            FieldEntry fid="17" name="ACTIV_DATE" dataType="Date" value="06 DEC 2021"
            FieldEntry fid="5" name="TIMACT" dataType="Time" value="21:59:00:000:000:000"
            FieldEntry fid="4148" name="TIMACT_MS" dataType="UInt" value="79199700"
            FieldEntry fid="2420" name="BEST_BSIZ9" dataType="Real" value="53"
            FieldEntry fid="6552" name="NO_BIDORD9" dataType="UInt" value="9"
            FieldEntry fid="2430" name="NO_BIDMKR9" dataType="Real" value="9"
        FieldListEnd


    PayloadEnd
UpdateMsgEnd
UpdateMsg
    streamId="5"
    domain="MarketPrice Domain"
    updateTypeNum="0"
    seqNum="33056"
    name="UROZ1m"
    serviceId="259"
    serviceName="hEDD"
    Payload dataType="FieldList"
        FieldList
            FieldEntry fid="17" name="ACTIV_DATE" dataType="Date" value="06 DEC 2021"
            FieldEntry fid="5" name="TIMACT" dataType="Time" value="21:59:00:000:000:000"
            FieldEntry fid="4148" name="TIMACT_MS" dataType="UInt" value="79199700"
            FieldEntry fid="2421" name="BEST_BSZ10" dataType="Real" value="55"
            FieldEntry fid="6553" name="NO_BIDRD10" dataType="UInt" value="15"
            FieldEntry fid="2431" name="NO_BIDMK10" dataType="Real" value="15"
        FieldListEnd


    PayloadEnd
UpdateMsgEnd
UpdateMsg
    streamId="5"
    domain="MarketPrice Domain"
    updateTypeNum="0"
    seqNum="33072"
    name="UROZ1m"
    serviceId="259"
    serviceName="hEDD"
    Payload dataType="FieldList"
        FieldList
            FieldEntry fid="6517" name="HALT_REASN" dataType="Rmtes" value="0"
            FieldEntry fid="6615" name="HALT_RSN" dataType="Enum" value="0"
        FieldListEnd


    PayloadEnd
UpdateMsgEnd

historical data code

new TickHistoryMarketDepthExtractionRequest
   {
      Condition = new TickHistoryMarketDepthCondition
    {
  ReportDateRangeType = ReportDateRangeType.Range,
 QueryStartDate = startDate, 
 QueryEndDate = lastDate,
ExtractBy = TickHistoryExtractByMode.Ric,
MessageTimeStampIn = TickHistoryTimeOptions.LocalExchangeTime,
SortBy = TickHistorySort.SingleByRic,
View = TickHistoryMarketDepthViewOptions.LegacyLevel2,
DisplaySourceRIC = true
 },
IdentifierList = new InstrumentIdentifierList
{
InstrumentIdentifiers = new[]
{
InstrumentIdentifier.Create(result.IdentifierType, result.Identifier)
},
ValidationOptions = new InstrumentValidationOptions
{
AllowHistoricalInstruments = true
} 
},

Result

UROZ1,Market Price,2021-12-06T15:59:59.707461577-06,Legacy Level 2,UPDATE,UNSPECIFIED,,,,115,,25280,,UROZ1m,6
,,,FID,17,,ACTIV_DATE,2021-12-06,
,,,FID,5,,TIMACT,21:59:00.000000000,
,,,FID,4148,,TIMACT_MS,79199700,
,,,FID,2420,,BEST_BSIZ9,53,
,,,FID,6552,,NO_BIDORD9,9,
,,,FID,2430,,NO_BIDMKR9,9,
UROZ1,Market Price,2021-12-06T15:59:59.707461577-06,Legacy Level 2,UPDATE,UNSPECIFIED,,,,115,,25296,,UROZ1m,6
,,,FID,17,,ACTIV_DATE,2021-12-06,
,,,FID,5,,TIMACT,21:59:00.000000000,
,,,FID,4148,,TIMACT_MS,79199700,
,,,FID,2421,,BEST_BSZ10,55,
,,,FID,6553,,NO_BIDRD10,15,
,,,FID,2431,,NO_BIDMK10,15,
UROZ1,Market Price,2021-12-06T16:00:00.114722985-06,Legacy Level 2,UPDATE,UNSPECIFIED,,,,115,,25312,,UROZ1m,2
,,,FID,6517,,HALT_REASN,0,
,,,FID,6615,,HALT_RSN,0,"  "

You can see that the historical data in the header of update messages has Data-Time in the format 2021-12-06T15:59:59.707461577-06

How do I get the same header in the real-time data so that there is a timestamp with the same format as on the historical data?


Please help in this matter, as time stamps are critical for algorithms.

refinitiv-realtimehistoricaltime-stamp
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

Upvote
Accepted
24.9k 86 10 22

Hi @s61670

I am not a content expert, but I believe the above Historical data timestamps are when the value was added to the historical database OR simple a combination of date+time fields to generate the timestamp.

For our real-time streaming data, we can only provide data as we receive it from the originating exchange.

As per previous content-related questions, you need to raise a Content-type ticket to confirm if any such data is available for the hEDD feed and to confirm how the timestamp in the Historical is arrived at/what it represents?

However, looking at the output from the above streaming data RIC - it does not appear to be the case.

Therefore, it may be a case of you need to combine the ACTIV_DATE and TIMACT_MS to arrive at your full timestamp.

As per my reply to your other question:

TIMACT_MS is milliseconds since midnight, so for example

45434283 = 12:37:14:283

This is something you can confirm with the Content helpdesk.

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.