[R] Problem with R websocket package

malej.gregy at seznam.cz malej.gregy at seznam.cz
Tue May 14 14:59:53 CEST 2013


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: 

> require(websockets)
> con = websocket("https://socketio.mtgox.com/mtgox",port=443)

and I always end up with an error:
 > con = websocket("https://socketio.mtgox.com/mtgox",port=443)
> Error in websocket("https://socketio.mtgox.com/mtgox", port = 443) : 
> Connection error

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



More information about the R-help mailing list