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?
Many thanks.