question

Upvotes
Accepted
37 14 15 18

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,

JO


elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-api
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.

Upvotes
Accepted
32.2k 40 11 19

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.


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.

Upvote
32.2k 40 11 19

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?

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.

Upvote
37 14 15 18

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

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.

Upvotes
37 14 15 18

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

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.

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.

Upvotes
32.2k 40 11 19

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.

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.

Upvotes
37 14 15 18

Hi @zoya.farberov, I just tried with snapshot request for "USDCHF=" and nothing comes back for TRDPRC_1.

What common and very simple approach are you talking about? User getting data continuously that never changes?

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.

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"
StatusMsgEnd
Upvotes
37 14 15 18

Hi @zeya.farberov: As using ELEKTRN_DD. What is the difference between this and ELEKTRON_EDGE? My message model is: MM_MARKET_PRICE.


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.

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"
StatusMsgEnd

However, the RIC you are subscribing appears to be invalid. Are you seeing the same status message?

Upvotes
37 14 15 18

Thanks @zoya.farberov. Yes, please lets try with "JPY=" or "GBP=".

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.

Upvotes
32.2k 40 11 19

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.

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.

Upvotes
37 14 15 18

Thanks @zoya.farberov. Back to the other question. You mentioned another simple and common technique to deal with stale data getting received for streaming data. What is the technique?


The users don't want to be streaming data that don't change.


Regard,

josa



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.

Upvotes
37 14 15 18

Hi @zoya.farberov; am still waiting for your response.

Thanks

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.

Upvotes
37 14 15 18

Hi @zoya.farberov: would using
EmaRdm.MMT_MARKET_BY_ORDER solve the problem?

Regards,

Jude

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.

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)

Upvotes
37 14 15 18

Thanks @zoya.ferbarov. I guess I have to look for ways to sort this out on my own.

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.