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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

stream managment for real time pricing using refinitive websocket elektron api

Hi ,

i am trying to get real time prices using websockets and RTDS.

my login gets smooth but when i send the request registering my Rics , it closes the stream immediately and start sending me prices on another stream.

its not a problem as sch but how would i know which ID to set for new incoming tickers Batch request .

is stream ID is something can be reset on its own.?


i send ID=3 for my ric as below


{

\"ID\": 3,

\"Key\": {

\"Name\": [

\"SRAH25\"

],

\"Service\": \"ELEKTRON_AD\"

},

\"View\": [

\"BID\",

\"ASK\"

],

\"Streaming\": true

}"



then it closed the streamID3 and started sending me data on streamid 4

{

\"ID\": 3,

\"Type\": \"Status\",

\"State\": {

\"Stream\": \"Closed\",

\"Data\": \"Ok\",

\"Text\": \"Processed 1 total items from Batch Request. 1 Ok.\"

}

},

{

\"ID\": 4,

\"Type\": \"Refresh\",

\"Key\": {

\"Service\": \"ELEKTRON_AD\",

\"Name\": \"SRAH25\"

},

\"State\": {

\"Stream\": \"Open\",

\"Data\": \"Ok\",

\"Text\": \"All is well\"

},

\"Qos\": {

\"Timeliness\": \"Realtime\",

\"Rate\": \"TickByTick\"

},

\"PermData\": \"AwjREYw=\",

\"SeqNumber\": 56672,

\"Fields\": {

\"BID\": 95.8,

\"ASK\": 95.805

}

}


refinitiv-realtime#technologywebsocketsstreaming-pricesbatch
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
23.7k 61 15 21

Hello @avinash.jain,

You are sending a batch request and this is how they work. The batch stream is closed and individual update streams are opened for all the instruments in the batch.

If you intend to subscribe to only one instrument, please send the request like:

{
  "ID": 3,
  "Key": {
    "Name": "SRAH25",
    "Service": "ELEKTRON_AD"
  },
  "View": [
    "BID",
    "ASK"
  ],
  "Streaming": true
}
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.