Skip to content
Prev 323515 / 398503 Next

Problem with R websocket package

Hello to everybody,

I'm repeating my post as the previous one was posted in HTML - sorry guys! 

I seem to be in struggle with the websockets in R. I wanted to download the 
streaming data from the BitCoin exchange MtGox directly to R, but R cannot 
establish the connection.

The websocket specs are defined as:


Host:                 websocket.mtgox.com or socketio.mtgox.com
Port:                 80 or 443 ( ssl )
Namespace:    /mtgox (Including beginning slash)

url for more details: https://en.bitcoin.it/wiki/MtGox/API/Streaming

and my code is:
and I always end up with an error:
 > con = websocket("https://socketio.mtgox.com/mtgox",port=443)
Does anyone have an idea what is wrong? I was informed that MtGox does not use
 the proper websocket protocol but something called Socket-io.
Is it the reason why it doesn't work? If so, is there any other way to handle 
socket-io in R? I searched all websockets packages but did not find any.

 

Many thanks for help.

Stepan