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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 1

Websocket API - Update message

Hi all,

I requesting the following FIDs for the RIC code RBU2. According with the documentation of the WebSocket API, I’m doing this request,


const ItemRequest = {
      ID: itemID,
      Key: {
        Name: 'RBU2',
        View: [
          'BID',
          'BIDSIZE',
          'ASK',
          'ASKSIZE',
          'TRDPRC_1',
          'TRDVOL_1',
          'QUOTE_DATE',
          'QUOTIM_NS',
          'EXPIR_DATE',
        ],
      },
    };


I’m receiving messages like this:


{
  "ID": 3,
  "Type": "Update",
  "UpdateType": "Trade",
  "DoNotConflate": true,
  "Key": {
    "Service": "ELEKTRON_DD",
    "Name": "RBU2"
  },
  "SeqNumber": 31566,
  "Fields": {
    "TRDPRC_1": 3.2332,
    "TRDVOL_1": 1
  }
}


{
  "ID": 3,
  "Type": "Update",
  "UpdateType": "Quote",
  "Key": {
    "Service": "ELEKTRON_DD",
    "Name": "RBU2"
  },
  "SeqNumber": 32256,
  "Fields": {
    "BID": 3.2329,
    "QUOTIM_NS": "15:39:04.788002823",
    "QUOTE_DATE": "2022-07-05",
    "BIDSIZE": 2,
    "ASK": 3.2358,
    "ASKSIZE": 3
  }
}


As you can see, these fields are never in the same message. Is there a way or an option to specify that I want all the fields on the same message?

I’ve doing some test and some messages has “UpdateType”: “multiple”, and these messages have them together

refinitiv-realtimerefinitiv-realtime-optimised
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 @ivan.esteban

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text on the left side of the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


1 Answer

· Write an Answer
Upvotes
Accepted
25.3k 87 12 25

Hi @ivan.esteban

An Update Message will only contain fields that have changed since the previous Refresh/Update message or others that the feed feels necessary to resend. This is common practice for real-time streaming data - to minimise resending fields that have not changed - to minimise bandwidth usage and processing power.

The View request is to filter the possible fields that you may receive from the server - i.e. to filter out other fields that you may not be interested in. As you may be aware, most instruments have in excess of 100 fields.

You are expected to cache your fields at the application level and update the cache based on the fields that you receive.

The Multiple indicates that the update contains multiple conflated updates in a single message.

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.