Websocket API encoding protocols

Options

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

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    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: