Tasty Champa
Member

Offline
Activity: 84
Merit: 10
|
 |
August 28, 2011, 02:20:59 AM |
|
@Clark, do you have any advice or directional links to code or tuts for someone who wants to explore making charts similar to these?
|
|
|
|
|
|
|
|
|
"The nature of Bitcoin is such that once version 0.1 was released, the
core design was set in stone for the rest of its lifetime." -- Satoshi
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
Clark (OP)
|
 |
August 28, 2011, 02:35:45 AM |
|
@Clark, do you have any advice or directional links to code or tuts for someone who wants to explore making charts similar to these?
Learn jQuery and get familiar with the WebSocket in JavaScript. You can look on the Bitcoin Wiki for details on the messages that MtGox broadcasts on this page.
|
|
|
|
Tasty Champa
Member

Offline
Activity: 84
Merit: 10
|
 |
August 28, 2011, 02:56:45 AM |
|
@Clark, do you have any advice or directional links to code or tuts for someone who wants to explore making charts similar to these?
Learn jQuery and get familiar with the WebSocket in JavaScript. You can look on the Bitcoin Wiki for details on the messages that MtGox broadcasts on this page. Thanks Clark! Also, one last question if possible, I've been looking into Node.js, is that a wise direction?
|
|
|
|
Clark (OP)
|
 |
August 28, 2011, 02:58:11 AM |
|
Also, one last question if possible, I've been looking into Node.js, is that a wise direction?
I have no experience with Node.js, so I couldn't give you an answer one way or the other.
|
|
|
|
cronopio
Newbie
Offline
Activity: 55
Merit: 0
|
 |
August 28, 2011, 06:00:32 PM |
|
Yeah, Node.js its ideal for this. The problem is the API its a websocket interface from MtGox.
Node.js work perfectly only if mtgox be rewritten in Node.js
Here you have the relay on MtGox plataform.
|
|
|
|
S3052
Legendary
Offline
Activity: 2100
Merit: 1000
|
 |
August 29, 2011, 11:09:00 PM |
|
Here is what happens:
Mt.Gox does not stream the full order book over the WebSocket; it streams only the changes as they come in. Therefore, the site polls the normal API at getDepth.php to get the 'whole' book. The problem is that the call to that API address seems to return only those orders within +/- $2 of the strike price. This is what you see when the order book loads initially.
As new orders come in, some lie outside of the initial 'full' book, so you get that light volume in the fringes of the book. There really is no way at this point to get an accurate representation of the entire order book.
Hi again, there is still some discrepancy between your order book completeness vs. MtGox (see here: https://mtgox.com/trade/history)
If you click on Market depth rounded, you see that the bids and ask go further than on your site. Any idea why? I remember it was better on your site days before. Anything changed?
|
|
|
|
Clark (OP)
|
 |
August 29, 2011, 11:40:32 PM |
|
Unfortunately, I am at the mercy of the getDepth API call. The data you see on my site comes from MtGox as-is.
My site reflects the most recent output of the MtGox API, which changes frequently, as you've noticed.
|
|
|
|
S3052
Legendary
Offline
Activity: 2100
Merit: 1000
|
 |
August 30, 2011, 04:50:53 AM |
|
thanks. I wish mtgox would deliver better data
|
|
|
|
|
S3052
Legendary
Offline
Activity: 2100
Merit: 1000
|
 |
September 19, 2011, 11:43:07 AM |
|
This is great! Wonderful.
Just one question: Is there an issue with the connection at the moment. In my case, it disconnects within a split second after hitting the connect button.
|
|
|
|
|
DrKennethNoisewater
|
 |
September 19, 2011, 11:03:52 PM |
|
For one reason or another, gox and crew are dragging there feet on this 1.
I hope they're not sand bagging because they're going to launch a competing product and lock up the api.
|
|
|
|
molecular
Donator
Legendary
Offline
Activity: 2772
Merit: 1018
|
 |
September 24, 2011, 11:57:36 PM |
|
For one reason or another, gox and crew are dragging there feet on this 1.
I hope they're not sand bagging because they're going to launch a competing product and lock up the api.
I think thats unlikely. That would p.ss off a lot of people. The websocket is also used by bots and custom trading clients, for example. MagicalTux has had websocket on low priority, it seems, and it's been like that for a long time. It's more important to have the trading engine working first 
|
PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0 3F39 FC49 2362 F9B7 0769
|
|
|
Clark (OP)
|
 |
September 25, 2011, 01:14:30 AM |
|
For one reason or another, gox and crew are dragging there feet on this 1.
I hope they're not sand bagging because they're going to launch a competing product and lock up the api.
I think thats unlikely. That would p.ss off a lot of people. The websocket is also used by bots and custom trading clients, for example. MagicalTux has had websocket on low priority, it seems, and it's been like that for a long time. It's more important to have the trading engine working first  Yeah, the main issue here is the changing browser support of the WebSocket protocols. Python certainly has no problem connecting, so the bots aren't hurting.
|
|
|
|
DrKennethNoisewater
|
 |
October 11, 2011, 06:13:13 PM |
|
Installed Safari 5.1.....
Socket Still Closes......do you add any plugins or anything after the initial install?
|
|
|
|
klaus
Legendary
Offline
Activity: 1932
Merit: 1003
|
 |
October 27, 2011, 02:54:21 PM |
|
Socket Closed.
|
bitmessage:BM-2D9c1oAbkVo96zDhTZ2jV6RXzQ9VG3A6f1 threema:HXUAMT96
|
|
|
Clark (OP)
|
 |
October 27, 2011, 03:00:59 PM |
|
Socket Closed.
It looks like MtGox has taken the socket down for the last 8 hours or so. For something a little different, you could try http://bitcoin.clarkmoody.com/ticker/
|
|
|
|
molecular
Donator
Legendary
Offline
Activity: 2772
Merit: 1018
|
 |
October 27, 2011, 08:22:42 PM |
|
you never fail to surprise. <molecular> is the websocket offline? <MagicalTux> the routing is still down
didn't bug him any further
|
PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0 3F39 FC49 2362 F9B7 0769
|
|
|
molecular
Donator
Legendary
Offline
Activity: 2772
Merit: 1018
|
 |
November 10, 2011, 02:30:51 PM |
|
some news: obviously websocket was replaced with socket.io <shockdiode> websocket is officially deprecated now? <MagicalTux> shockdiode: yep, replaced by socket.io server <MagicalTux> which is more stable <MagicalTux> but not using the same protocol <MagicalTux> client libs are however in most languages, however <shockdiode> when will that be up? <MagicalTux> [18:23:22] <shockdiode> when will that be up? <- IT IS <molecular> MagicalTux, any doc/wiki/??? on socket.io server? <MagicalTux> molecular: http://socket.io got a lot of doc <MagicalTux> it's basically the same websocket data, passed through socket.io <molecular> MagicalTux, thanks. so you merely switched the transport layer? everything else like before...? <MagicalTux> molecular: yep, switched transport layer, which will allow us to make it work in any browser EDIT: I might add I have hope it will also work through transparent proxies that have probs with websocket, will check it out soon with my python client
|
PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0 3F39 FC49 2362 F9B7 0769
|
|
|
MagicalTux
VIP
Hero Member
Offline
Activity: 608
Merit: 501
-
|
 |
November 10, 2011, 02:49:32 PM Last edit: November 11, 2011, 02:14:16 AM by MagicalTux |
|
I should also add that it works with most browsers including MSIE 5.5+, and has various fallback mechanisms depending if websocket fails. To use it: <script type="text/javascript" src="https://socketio.mtgox.com/socket.io/socket.io.js"></script> <script type="text/javascript"> var conn = io.connect('https://socketio.mtgox.com/mtgox'); conn.on('message', function(data) { var message = event.data; // do things with message (same format as before) }); </script> That should be simple enough, and is cross browser.
|
|
|
|
|