I’m now trying to subscribe several rics but the it seems once I subscribe to a ric, I cannot subscribe to another:
RECEIVED on session1:
[
{
"ID":2,
"Key":{
"Name":"/0005.HK",
"Service":"ELEKTRON_DD"
},
"State":{
"Code":"AlreadyOpen",
"Data":"Suspect",
"Stream":"Closed",
"Text":"Request Rejected: Cannot request new item on open stream."
},
"Type":"Status"
}
]
I did see in the docs where we can send a list of rics in batch. However, I’d like to append new ric on demand instead of subscribe all in one go.
what i am doing currently (which i believe is incorrect):
session1 = WebSocketTestSession("session1", hostList[0], sts_token, position) session1.connect() if session1.logged_in: session1._send_market_price_request('/TRI.N') session1._send_market_price_request('/0005.HK') session1._send_market_price_request('/0700.HK')