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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
15 1 0 2

Error on Closing Stream

Hi,

I was trying to close event stream as explained in the tutorial

https://developers.refinitiv.com/en/api-catalog/refinitiv-real-time-opnsrc/refinitiv-websocket-api/tutorials#closing-event-streams

Request

{"ID":[1,2],"Type":"Close"}

1 = Login

2 = Request Data

But I was getting the following error.

Response

[{

"Type": "Status",

"State": {

"Stream": "Closed",

"Data": "Ok",

"Text": "Processed 2 total stream ids from Batch Close Request. 0 Ok. 2 Failed."

},

"ID": 1

}]


streamstream-id
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
56k 145 45 65

@weber01

They are different domains. Stream ID 1 is a login domain and stream ID 2 is a data domain (MarketPrice). I think you can't batch streams of different domains.

According to that page, we do not specify a Domain value as MarketPrice is the default Domain. If the Stream we wanted to close was for some other Domain we would need to explicitly specify the Domain.

Moreover, if you would like to close all streams and Logoff from the server, you can just send a single Close request for the Login stream.

  {
    "ID": 1,
    "Type": "Close",
    "Domain": "Login"
  }


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.