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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
2 4 0 2

Do you have an example to retrieve multiple Rics in a single request using C# Web Api

Hi,

I read on another post that it is possible to retrieve multiple Rics like EUR=, GBP=, JPY= in a single request by using json request.

The post i read about ti https://community.developers.refinitiv.com/questions/31705/python-api-get-timeseries-use-multiple-rics.html

I use C# for accessing Web api, can you give me a example how to get those mutliple Rics in a single request? I also want to get real time prices per milliseconds.

I know that i have to write code to parse the json.

elektronrefinitiv-realtimeelektron-sdkweb
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

Upvote
Accepted
14.3k 23 8 12

Hello @0c62b574-a087-4b69-8ba8-1f3ad682f116

I am assuming that you are using the ERT in Cloud C# example. You can request a multiple RICs in a single request message with the Batch features. The JSON structure of Batch request message is following:

Example JSON request messages:

{
  "ID": 2,
  "Key": {
    "Name": ["GOOG.O","IBM.N","FB.O"]
  }
}

When the WebSocket server receives a Batch Request, it will respond on the same ID of the Request with a Status message that acknowledges receipt of the Batch by indicating a State object with a "Data":"Ok" and "State":"Closed".

The Batch stream closes because all additional responses are provided on individual streams. The ID values of the resulting streams are assigned sequentially according to the order of the entries in the Batch Request's "Key":{"Name":[...]} array, beginning with the ID of the original Batch Request message + 1. The Batch Response and Item Response tiles in the Context section below highlight this exchange.

Please note that you can find more detail regarding the Elektron WebSocket JSON message structure and reference from Elektron WebSocket API Development Guide page.


batch.png (17.7 KiB)
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.