Hello, I am using R software and struggling to make a websocket connection. The initial source for my websocket connection is here https://github.com/rstudio/websocket The codes, which I want to repicate ar here https://github.com/Refinitiv/websocket-api/blob/master/Applications/Examples/R/market_price_authentication.R
websocket function in github is old one and seems not to work.
header_entry = list(name="Cookie", value=paste("AuthToken=", auth_token, ";AuthPosition=", position, ";applicationId=", app_id,";", sep=""))
#header_entry_new = list(Domain="Login",ID=1, Key=list(Elements=list(ApplicationId=app_id,AuthenticationToken=auth_token,
Position=paste(position,"/S24533",sep = "")),NameType="AuthnToken"))
#header_entry_new<-jsonlite::toJSON(header_entry_new)
#header_entry_new<-gsub("\\[|\\]","",header_entry_new)
headers_list = list(header_entry)
ws <- WebSocket$new("wss://emea-1.pricing.streaming.edp.thomsonreuters.com:443/WebSocket", headers =header_entry)
By using wss://emea-1.pricing.streaming.edp.thomsonreuters.com:443/WebSocket and header_entry_new (in header) I tried to replicate following command in Python. I also tried in R to use only wss://emea-1.pricing.streaming.edp.thomsonreuters.com (+ headers =header_entry, port=443) and multiple different combinations, because in the github code :443/WebSocket part is neglected. However I got an error message saying that Error in .subset2(public_bind_env, "initialize")(...) : unused arguments (headers = list("Cookie" .....
Connecting to WebSocket wss://emea-1.pricing.streaming.edp.thomsonreuters.com:443/WebSocket ...
WebSocket successfully connected!
SENT:
{
"Domain":"Login",
"ID":1,
"Key":{
"Elements":{
"ApplicationId":"256",
"AuthenticationToken":"XXXXX",
"Position":"172.17.57.17/S24533"
},
"NameType":"AuthnToken"
}
}
What else can I change to establish a connection? (Authentication token I could retrieve)