Is there a way to request an item snapshot in EMA? I'm looking to generate last updated time for an item. I don't need to continue listening to the updates.
Thanks,
Is there a way to request an item snapshot in EMA? I'm looking to generate last updated time for an item. I don't need to continue listening to the updates.
Thanks,
Hi @jake.lu,
To get a snapshot for an item, pass in the flag expressing this, when registering an item interest. Here is an example in EMA Java:
consumer.registerClient(reqMsg.serviceName("DIRECT_FEED").name("IBM.N").interestAfterRefresh(false), appClient);
See the EMA example example102__MarketPrice__Snapshot provided with EMA SDK.
Thanks for the reply. I have one more question, is there a way I can get the timestamp of that update from the snapshot?
There are couple of time fields, which will depend on the listing marketplace of your subscribed instrument. For e.g. for IBM.N, I see following time fields. You can see their description in the Data Model Discovery tool or RDMFieldDictionary. Most relevant ones are TRDTIM_1 for time of last trade and QUOTIM for quotes.
name="TRDTIM_1" dataType="Time" value="20:00:00:000:000:000" name="TRDTIM_1" dataType="Time" value="20:00:00:000:000:000" name="NEWS_TIME" dataType="Time" value="22:55:51:000:000:000" name="NEWS_TIME" dataType="Time" value="22:55:51:000:000:000" name="DJTIME" dataType="Time" value="(blank data)" name="DJTIME" dataType="Time" value="(blank data)" name="TIMCOR" dataType="Time" value="(blank data)" name="TIMCOR" dataType="Time" value="(blank data)" name="SALTIM" dataType="Time" value="23:00:00:000:000:000" name="SALTIM" dataType="Time" value="23:00:00:000:000:000" name="QUOTIM" dataType="Time" value="20:00:00:000:000:000" name="QUOTIM" dataType="Time" value="20:00:00:000:000:000" name="EXCHTIM" dataType="Time" value="23:00:00:000:000:000" name="EXCHTIM" dataType="Time" value="23:00:00:000:000:000" name="CLOSE_TIME" dataType="Time" value="23:00:00:000:000:000" name="CLOSE_TIME" dataType="Time" value="23:00:00:000:000:000" name="TRDTIM_MS" dataType="UInt" value="72001888" name="SALTIM_MS" dataType="UInt" value="82800004" name="QUOTIM_MS" dataType="UInt" value="72000026" name="TIMCOR_MS" dataType="UInt" value="(blank data)" name="IMB_TIM_MS" dataType="UInt" value="71400002" name="OFF_CL_TIM" dataType="Time" value="23:00:00:000:000:000" name="OFF_CL_TIM" dataType="Time" value="23:00:00:000:000:000" name="CTRDTIM_MS" dataType="UInt" value="(blank data)" name="CTRDTIM" dataType="Time" value="(blank data)" name="CTRDTIM" dataType="Time" value="(blank data)" name="INSTRD_TIM" dataType="Time" value="(blank data)" name="INSTRD_TIM" dataType="Time" value="(blank data)" name="INSTIM_MS" dataType="UInt" value="(blank data)" name="IRGTIM_MS" dataType="UInt" value="71999995" name="BLKTIM_MS" dataType="Time" value="20:00:01:832:000:000" name="BLKTIM_MS" dataType="Time" value="20:00:01:832:000:000" name="PDTRDTM_MS" dataType="Time" value="(blank data)" name="ORDRECV_MS" dataType="Time" value="20:00:00:026:000:000" name="TRDRECV_MS" dataType="Time" value="23:00:00:001:000:000" name="ORDREC2_MS" dataType="Time" value="(blank data)" name="TRDREC2_MS" dataType="Time" value="(blank data)" name="CRSTIM_MS" dataType="Time" value="(blank data)" name="CRSTIM_MS" dataType="Time" value="(blank data)" name="HLT_RSM_MS" dataType="Time" value="17:13:43:390:000:000" name="ODDTIM_MS" dataType="Time" value="19:59:59:995:000:000" name="ODDTIM_MS" dataType="Time" value="19:59:59:995:000:000" name="HALT_TM_MS" dataType="Time" value="16:56:17:040:000:000" name="OFF_CLS_MS" dataType="Time" value="23:00:00:004:000:000" name="PREMKT_NS" dataType="Time" value="(blank data)" name="AFTMKT_NS" dataType="Time" value="(blank data)"