Post
Topic
Board Exchanges
Re: www.BITSTAMP.net Bitcoin exchange site for USD/BTC
by
dexX7
on 14/05/2013, 02:51:01 UTC
Does bitstamp have a public websocket/streaming API?
Also, are there any request limits to usual API?

Yes:

Code:
var trades_socket = io.connect('https://websocket.bitstamp.net:8080/live_trades');
 var orders_socket = io.connect('https://websocket.bitstamp.net:8080/live_orders');

Yes:

 up to 1 per second

How do we use the Socket.IO API? There doesn't seem to be happening much besides a connected message when using this:

Code:



Change your conn.on('message', to conn.on('trade'.

I'd really like to see non-https access to websocket too. I have problems using ruby gems to create a connection.

Thank you so much! Got some pretty cool charting working now Smiley. One question for the bitstamp guys:

Why do tid's sometimes increment with more then 1?
"tid": 245967
to
"tid": 245972

I'm new with socket.io and I don't seem get this to work..
There is also no documentation to be found about this websocket. Is this deceprated or something?
The socket.io.js returns the string 'Welcome to socket.io.'
This throws me a syntax error in the console because there is no JS.


Code:



I also allowed cross origin sharing before testing it by running chromium with the --disable-web-security command.
Googling for solutions didn't help, so I'm kind of stuck with the HTTP API for the moment.

I would be very very very happy to get this working, too.