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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
26 15 22 25

New subcription for same symbol

Hi team,


I had a question about 2 subscriptions for a same symbol like VOD.L with ID: 2 and ID:3. I get quote updates regularly for my ID:2. But my ID:3 request throws -

[{
  "Type": "Status",
  "State": {
    "Stream": "Closed",
    "Data": "Suspect",
    "Text": "Request Rejected: Cannot reopen item with different stream.",
    "Code": "AlreadyOpen"
  },
  "ID": 3,
  "Key": {
    "Service": "ELEKTRON_DD",
    "Name": "VOD.L"
  }
}]

For our product we have a scenario where we need two different workflows doing a subscription for VOD.L. Is it possible to do such requests at all? Or we would always get this above error?

Please let me know if you need anything else.


Thank you,

Bansal

elektron-sdktreprdp-apiwebsocketsrrtostreaming-prices
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
17.3k 82 39 63

Hi @bansalshah,

To work around this scenario, you can try to provide different views (fields) when you make the request for each one. Alternatively, you can form a different WebSocket connection into the server.

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.

So even if the symbol subscribed is made with two different set of views, it would be fine? And websocket would not complain?

Because of the limit of 5 Websocket connections we do not want to create new connections on every new subscription.


Thank you

Hi @bansalshah,

Yes, the server will not complain and you should see updates for both.

Hi @bansalshah

Just to be clear - you should not be creating 'new connections' for every new subscription. Generally speaking, the application should only need to create one websocket connection, one login and then open multiple streams - one for each subscription - as and when required.

<AHS>

Hello @nick.zincone.1 could you please help the client on the follow up question?

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.