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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 1 1

How to get source list and dictionary with webSocket API?

I try to request the domains Source and SymbolList in the WebSocket API in order to retrieve the source list and dictionary. It was possible to retrieve these data by requesting the RMDS infra using the library RFA but we don't how to do it with WebSocket API.

We try this request but it doesn't work.

Request:

{

"ID": 2,

"Domain": "SymbolList",

"Key": {}

}


response:

{

"ID": 2,

"Type": "Status",

"Domain": "SymbolList",

"State": {

"Stream": "Closed",

"Data": "Suspect",

"Code": "AlreadyOpen",

"Text": "Request Rejected: Request key did not contain service Id."

}

}


thanks for your help!

websocketsrrtorefinitiv-realtime-optimisedsymbol-listdomain
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
Accepted
25.3k 87 12 25

Hi @lucas.briere

Please refer to the Websocket API Tutorial for Request Data before attempting to code, it will clarify several points.

A SymbolList is a special domain that can allow the publishing and consumption of a list of related symbols. It will not yield a Data Dictionary nor a Source Directory. If your source did support a SymbolList, you would need to provide a Key i.e. RIC code for the SymbolList e.g '.AV.L'

{
  "Domain":"SymbolList",
  "ID":2,
  "Key":{
    "Name":[
      ".AV.L"
    ],
    "Service":"ELEKTRON_DD"
  }
}

Also, on some servers, if your request is rejected with a message similar to 'Request key did not contain service Id' then you will need to explicitly specify the service you want to source the data from because a default service has not been defined on that server. However, in your case, this could be a red herring because the key is empty.

e.g. for a Source directory for all Services :

{
  "Domain":"Source",
  "ID":3,
  "Key":{
    "Filter":1
  }
}

For Dictionary, it would be something similar:

{
  "Domain":"Dictionary",
  "ID":4,
  "Key":{
    "Name":"RWFEnum",
    "Filter":7
  }
}

and repeat for 'RWFFld'.

You can find full details of the filter values etc in the RDMUsageGuide Documents provided with the Real-Time SDKs





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
5 1 3 8

Hi @lucas.briere. This might help: https://community.developers.refinitiv.com/questions/78384/is-it-possible-to-request-a-list-of-available-serv.html I had a similar question and this definitely worked. Not sure about the dictionary, but the list of sources can be retrieved.

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
24.6k 54 17 14

Hello @lucas.briere

You can find how to request Source Directory information via the WebSocket API from my colleague answer in this post (request message structure, filter information, etc).

Regarding the SymbolList request message, the request message format and example are followings:

You can find more detail in the WebSocket API Try it Now! interactive documentation on the WebSocket API download page.


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.