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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
39 4 5 12

Websocket API encoding protocols

According to websocket examples, API supports tr_json2 ( subprotocols=['tr_json2'] in https://github.com/Refinitiv/websocket-api/blob/master/Applications/Examples/python/market_price.py example) .
1. Are other suprotocols available? We are interested in more efficient (vs. json/string-based ) formats. It looks like TREP rmdstestclient tool is able to consume market data in RFW from websocket port. E.g.: using "ws_rwf" encoding format:
rmdstestclient -S IDN_RDF -itemList JPY= -h localhost -p 15000 -X -d 3 -dfile etc/RDMFieldDictionary -ct ws_rwf -v -l stdout
Can something similar can be done with websockets?
2. Does websocket API support Views ( field filtering/request capability to minimize payload)?


Thank you

treprdp-apiwebsocketsrrtorefinitiv-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.

1 Answer

· Write an Answer
Upvotes
Accepted
25.1k 57 17 14

Hello @RG1

The WebSocket API on the deployed Refinitiv Real-Time Distribution System (formerly known as TREP) and Refinitiv Real-Time - Optimized (Cloud) supports only tr_json2 subprotocol.

The WebSocket API supports Views by sending an array of field names like the following example

{
  "ID":2,
  "Key":{
    "Name":"VOD.L"
  },
  "View":[
    "BID",
    "ASK",
    "BIDSIZE"
  ]
}


You can find more detail in the following resources:

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.