How to judge Msg(StatusMsg. UpdateMsg. RefreshMsg) is codeChain or quotation
Hi:
I request the codeChain and stock in one process;
When i get Msg in onRefreshMsg or onUpdateMsg, How i can decide the msg is codeChain or quotation?
thanks
Best Answer
-
Hello @luxiangyuan
Another way is to set closure in OmmConsumer.registerClient(ReqMsg reqMsg,OmmConsumerClient client,java.lang.Object closure) method when the application subscribes a RIC. closure parameter is used to specify application-defined item identification. Hence, in onRefreshMsg(..) or onUpdateMsg(..), you can check OmmConsumerEvent's closure if it is for which RICs or group of RICs(codeChain or quotation) before decoding data.
For example:
//for codeChain RIC
consumer.registerClient( EmaFactory.createReqMsg().serviceName("ELEKTRON").name("0#.DJI"), appClient, "codeChain");
//for quotation RIC
consumer.registerClient( EmaFactory.createReqMsg().serviceName("ELEKTRON").name("JPY="), appClient, "quotation");and in onRefreshMsg(..) , onUpdateMsg(..)
public void onRefreshMsg(RefreshMsg refreshMsg, OmmConsumerEvent event)
{
if(event.closure().toString().equalsIgnoreCase("codeChain"))
{
System.out.println("process codeChain");
....
}
else if(event.closure().toString().equalsIgnoreCase("quotation"))
{
System.out.println("process quotation");
...
}
}The example result:
When the application receives data of codeChain
When the application receives data of quotation
0
Answers
-
Hello @luxiangyuan
You can check if a message is codeChain or quotation by checking field id 239(REF_COUNT). Each codeChain message contains this field. If the message does not have the field, it is quotation. This is explained in How to tell if a RIC is for a chain? section of Simple Chain objects for EMA - Part 1
Hope this help.
0 -
hello Pimchaya.Wongrukun
thanks for your answer.
as your answer, I must decode the FieldList to check if it contain the fileld id 239,
which is inefficient to me;
so I wan to know how i can judge the msg tpye before decode the FieldList, so I can
decode the codeChain or the quotation separately.
0 -
0
-
hello Alex Putkov:
I am so sorry , as I busied my self on "Decoding the info" received from EMA. i did not noticed the mail.
but i can not find the "Accept" text to click on this page. could you pleas gaves more details?
0 -
where is the Accept text,tks
0 -
Hi @luxiangyuan
"We have already accepted the response that we thought best answers your question. If you're happy with this response you don't need to do anything. If you think another response on this thread provides a better answer, you can unaccept the response currently marked as Best Answer and accept another response. And if none of the replies on this thread provide the answer you were looking for, then please unaccept the Best Answer and post again on this thread, or start a new thread.0 -
Hi Alex
Thank you very much, I understand.
I am a new developer and do not skilled with this web site, I am so sorry get you into trouble.
for the future, i will follow your suggestion
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 162 App Studio
- 4 Block Chain
- 5 Bot Platform
- 17 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 370 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛