Bitcoin Forum

Other => Beginners & Help => Topic started by: Flaff on May 10, 2013, 10:42:48 AM



Title: Bitstamp websocket API
Post by: Flaff on May 10, 2013, 10:42:48 AM
I'm trying to make a live graph of the Bitstamp exchange in my browser, and am currently doing it with HTTP requests.

On this forum, I read (https://bitcointalk.org/index.php?topic=38711.msg1734562#msg1734562) that they have a (public?) websocket API.

Does anyone know if there's any more information to be found about their websocket?
I'm new to socket.io, but with a bit more of information I would be on the way again.
I know how to parse the information in JS, so connecting is my only problem.

If anyone manages to make me get connected with their websocket API, I'll make it open source! ;)

Thanks!


Title: Re: Bitstamp websocket API
Post by: BitCheese on May 10, 2013, 11:53:00 AM
You can repeat the function every tot seconds, like 5 seconds. I don't know about this socket API, but the biggest problem is the SSL protocol. You must buy it or nothing, the requests HTTP>to HTTPS won't work.


Title: Re: Bitstamp websocket API
Post by: Flaff on May 10, 2013, 12:34:01 PM
You can repeat the function every tot seconds, like 5 seconds. I don't know about this socket API, but the biggest problem is the SSL protocol. You must buy it or nothing, the requests HTTP>to HTTPS won't work.
I already have a script working that way.

The advantage of using websocket is that I'd get a live stream of trades instead of comparing arrays to eachother.
That would make me use less processor resources while keeping the load on their servers minimal.
It's also easier to trigger functions sequentially instead of checking for timeouts on requests so previous data wouldn't get mixed up with more recent data.

I'll try to post it in the forum mentioned before after i get rid of my newb status..


Title: Re: Bitstamp websocket API
Post by: BitCheese on May 10, 2013, 12:48:30 PM
I found this https://bitcointalk.org/index.php?topic=38711.160


Title: Re: Bitstamp websocket API
Post by: Flaff on May 10, 2013, 01:34:58 PM
I found this https://bitcointalk.org/index.php?topic=38711.160

That's the topic i've got the idea of websockets from..
read OP


Title: Re: Bitstamp websocket API
Post by: BitCheese on May 11, 2013, 11:08:09 AM
I think ask to Bitstamp support is the best thing.