Quote Updates
Hi,
I am subscribing to data via EMA Java API. Basically, I subscribe to 3 fields. BID, ASK, LAST (TRDPRC_1). The issue am having is that I don't get data for TRDPRC_1 and also, I get data for both BID and ASK even if there are no updates.
I would like to only get data when there are updates. Does this mean that I have to ignore processing
messages in method "onRefreshMsg" and only process "onUpdateMsg"?
Also, why am I not getting data for TRDPRC_1?
Regards,
JOBest Answer
-
Hello Jude @josa,
Not exactly, but this is an excellent question, has come up before, but glad to share more on this.
To summarize, processing status information per design is the key requirement for a production application, from the start we design with consideration for reliability and dependability, in addition to structure and full conformance to requirements. Yet, very often this is an implicit requirement, in addition to the list of the explicit requirements you may get from your organization's business
If this is your goal, please consider that EMA is usability tier on top of ETA. An application in either of these APIs needs to design for and process status. In ETA Developer Guide, you will find full detailed information on available state. This infomration applies to both ETA and EMA. The current version - section 11.2.6, discusses State. For me, this is a good starting point, for a production strength application design both in ETA and in EMA, for designing, in accordance with your app's requirements, how will you process the possible state, stream state and data state.
---
For future questions, please try to ask a new question as a separate new question, as otherwise it will get very little visibility in the forums. Searches by members focus on the original question, by title an tags.
0
Answers
-
Hello @josa,
Looks like you may be subscribing to a view, view would be getting not every field, but only the ones in the view.
Not every update is of the same type and contains the same set of fields. For example, there are quotes, and there are trades. They would be getting a different set of fields. TRDPRC_1 should only be update by trades.
If you are subscribing a view, and fields that have updated are not included in your requested view, you would still be getting the update. For example, if only BIDSIZE was updated in an update message, you would be getting the same BID and ASK.
This way you may get data but do not see the updated fields. You may choose to keep the last BID and ASK, compare them with the new BID and ASK, and if they are the same- ignore them.
The initial refresh message is important as it carries the most current value of every field.
Does this help to explain?
1 -
Thanks @zoya.farberov. Yes, am subscribing to a view. What field do I need for quotes? Say, last price for "USDCHF="?
Regarding the updates, they should be a better way. I don't know ahead of time what fields will be requested as am building a generic API. Caching in a map could introduce performance issues when for instance a client is subscribing to say 10,000 RICs.
Can't I check for the state of each message to know whether it is an update?
To be honest, there is an issue with this design concept on Refinitiv end. Why should I be getting data that does not change and we call it streaming API?
Please advise.
Regards,
Jude
1 -
Also, I added TRDPRC_1 field to the view when creating the ElementList. See below.
public static ElementList createBatchViewList(List<String> identifiers, List<String> fields) {
ElementList batchView = EmaFactory.createElementList();
OmmArray identifierArray = EmaFactory.createOmmArray();
for (String identifier : identifiers) {
identifierArray.add(EmaFactory.createOmmArrayEntry().ascii(identifier.toUpperCase()));
}
batchView.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, identifierArray));
return getElementEntries(fields, batchView);
}
private static ElementList getElementEntries(List<String> fields, ElementList view) {
if (fields.isEmpty()) return view;
OmmArray fieldArray = EmaFactory.createOmmArray();
fieldArray.fixedWidth(2);
for (String field : fields) {
fieldArray.add(EmaFactory.createOmmArrayEntry().intValue(FIELD_DICTIONARY.getOrDefault(field.toUpperCase(), 0)));
}
view.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1));
view.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, fieldArray));
return view;
}When the data comes back, there is no data for TRDPRC_1.
I need help.
Regards,
Jude
0 -
Hello @josa,
In my understanding, the fields that you include in the view will be determined by your application requirements. You decide. Depending on the type if the instrument, and exchanges providing the data, it may be contained in different fields.
As a customer, you can contact Refinitiv Content Helpdesk Online to have Refinitiv content expert determine the fields that you require for a specific instrument set (spot rate ?). Or use Data Model Discovery tool to look up the content requirements on your own.
There are other ways to approach how to deal with changes. Another very commonly used and very simple approach is to apply the update whether or not the field has changed. You can decide what works best for your application's requirements.
0 -
Hello Jude @josa,
What RIC are you consuming?
Is the market open and updating for it at current time, do you see the update messages?
Is it a composite instrument ,i.e. there may be no trade per ce for that instrument, because it's not a specific traded instrument, but a generic published composite, accumulated via multiple exchanges?
Refinitiv content experts may give you a more appropriate answer on content questions.
0 -
Hello Jude @josa,
For me, this instrument itself is invalid, comes back as not found. Please verify you are logging or printing status that you get back.
StatusMsg
streamId="5"
domain="MarketPrice Domain"
state="Closed / Suspect / Not found / 'The record could not be found'"
name="USDCHF="
nameType="1"
serviceId="300"
serviceName="ELEKTRON_EDGE"
StatusMsgEnd0 -
Hi Jude @josa,
To answer your question, there is no difference, as under different infrastructure endpoints Elektron service is named differently.
StatusMsg
streamId="5"
domain="MarketPrice Domain"
state="Closed / Suspect / Not found / 'The record could not be found'"
name="USDCHF="
nameType="1"
serviceId="221"
serviceName="ELEKTRON_DD"
StatusMsgEndHowever, the RIC you are subscribing appears to be invalid. Are you seeing the same status message?
0 -
Hello Jude @josa,
If I correctly understand your question as:
"is trade price populated for JPY= in field TRDPRC_1", which is a composite currency, then the answer is "it is not".
I believe this is because it is a composite instrument, rather then a specifically traded instrument.
However for definitive answers on appropriate content, identifying appropriate symbology to request the content that you requre, as a customer, I suggest you contact Refinitiv Content Helpdesk and they will connect your content questions with the appropriate Refinitiv content expert.
This forum is dedicated for developers, for general questions and discussions centeretd around Refinitiv APIs and their usage.
---
Would like to help with your question, so would like to additionally note, that for different types of instrument (for example, equity, bond, spot) different sets if fields are populated by their providers . Furthermore, for the same type of instrument, different exchanges/providers often populate a different sets of fields (for example NYSE exchange or Tokyo exchange will differ in what they provide for a bond). For example, TRI.N instrument will have TRDPRC_1 field populated.
To fully identify the content that you require, please use Data Model Discovery tool or contact Refinitiv Content Helpdesk and involve the Refinitiv experts to help you identify the required content. Please provide teh complete details with your support case, what instruments and what fields you are looking for. Next you can use the EMA to consume the identified content per your requirements.
---
I hope this info helps?
Otherwise, please provide more details on your API question so we can address it better.
0 -
Hi @josa,
I am afraid it is not relevant, Market_By_ORDER will allow you to request and process level 2 data, order books (if you are permissioned for this content)
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 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
- 367 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 中文论坛