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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 1 1

Why some message miss subscribed fields?

I'm using WebSocket API to subscribe fx rate from refinitiv.

I subscribe "ASK", "BID" for price and "QUOTE_DATE", "QUOTIM_MS" indicate rate event time.

Why some message I received only contains "ASK", "BID" fields?

treprdp-apiwebsocketsrrtofieldsquote
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
9.6k 10 6 7

Hello @joelxzhang

Views feature that you use allows the client application to request specific fields. After the feed/exchange sends the fields to the server, the server will filter out the fields which you do not request so only requested fields sent to you. Hence, the feature does not guarantee that every message contains all fields you specific. This depends on the feed which generates/sends the fields of each message to the server. In your case the feed did not generate QUOTE_DATE and QUOTIM_MS in every message that why's you received only ASK and BID which you specific in the request.

This is data question that the feed does not send "QUOTE_DATE", "QUOTIM_MS" with ASK and BID in every message. I would suggest you reach out to the Refinitiv Helpdesk as they have feed/data specialists who can help you on this.

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.

But I need to know when the data generated by refinitiv, and someone told me that these two fields express the time point the data create. Or you can suggest me another field to the usage?

Hello @joelxzhang

Sorry. I am not data expert and do not know the answer. Please contact Refinitiv Helpdesk who can answer data questions.

This forum is dedicated to questions and discussions on Refinitiv APIs, rather then data questions, the majority of the members of the community are developers, the moderators of the forum are API experts.

Hi @joelxzhang

The most likely reason why some updates do not contain QUOTE related fields is because that update is for a Trade type event - rather than a Quote type event. For Trade type events the Trade related fields e.g. TRADE_DATE would be sent.

However, as mentioned by my colleague it is best to check with the Content Helpdesk for your particular instruments/RICs.

Upvotes
16.9k 32 9 12

Hello @joelxzhang

If you are using a streaming request, it is an expected behavior as mention by my colleague (Pimchaya). The only to way to let TREP/Elektron always returns all requested fields is to use a snapshot request.

A snapshot request is a request for one response without the intent to receive updates. The data stream is considered closed after the data is received by the consumer because the request has been fulfilled. You can send a snapshot request via the Elektron WebSocket API with "Streaming" : false attribute in the request message.

{
  "ID": 2,
  "Key": {
    "Name": "EUR="
  },
  "View": [
    "BID",
    "ASK",
    "QUOTE_DATE",
    "QUOTIM_MS"
  ],
  "Streaming": false
}
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.