Pages:
Author

Topic: Real Time MtGox Order Book (Read 26716 times)

newbie
Activity: 3
Merit: 0
February 16, 2014, 06:43:08 AM
Anybody buying or selling within MtGox to other MtGox traders for real cash for MtGoxBTC to each other?  Any talk about that?
hero member
Activity: 548
Merit: 502
So much code.
December 11, 2013, 07:35:58 PM
Is clark moody frozen?

Mt. Gox has disconnected its real time WebSocket.
hero member
Activity: 490
Merit: 500
December 11, 2013, 05:13:26 PM
Is clark moody frozen?
member
Activity: 71
Merit: 10
March 03, 2012, 03:41:50 PM
The problem was with the Java-WebSocket implementation. Gottox' socket.io recently switched to Weberknecht and it fixed the problem. Just pull the new version from github and you should be fine.

Man, you saved my life! It works like a charm now!
legendary
Activity: 910
Merit: 1001
Revolutionizing Brokerage of Personal Data
February 17, 2012, 07:08:40 PM
The problem was with the Java-WebSocket implementation. Gottox' socket.io recently switched to Weberknecht and it fixed the problem. Just pull the new version from github and you should be fine.
donator
Activity: 980
Merit: 1004
felonious vagrancy, personified
February 01, 2012, 08:39:20 PM
Here is a self-contained piece of code that demonstrates the problem:

Code:
import io.socket.*;
import org.json.*;
import net.tootallnate.websocket.*;

public class MtGoxStreaming {
   
    private static final String tickerChannel = "d5f06780-30a8-4a48-a2f8-7ed181b4a13f";
    private static final String tradesChannel = "dbf1dee9-4f2e-4a08-8cb7-748919a71b21";
    private static final String depthChannel  = "24e67e0d-1cad-4cc0-9e7a-f8523ef460fe";

    public static void main(String[] args) throws Exception {
        SocketIO socket = new SocketIO("https://socketio.mtgox.com/mtgox");
        socket.connect(new IOCallback() {
                @Override
                    public void onMessage(JSONObject json, IOAcknowledge ack) {
                    try {
                        System.out.println("We received a message: " + json.toString(2));
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }

                @Override
                    public void onMessage(String data, IOAcknowledge ack) {
                    System.out.println("We received a message:" + data);
                }
               
                @Override
                    public void onError(SocketIOException socketIOException) {
                    System.out.println("Something went wrong: " + socketIOException);
                    socketIOException.printStackTrace();
                    //System.exit(0);
                }

                @Override
                    public void onDisconnect() {
                    System.out.println("Disconnected");
                    System.exit(0);
                }

                @Override
                    public void onConnect() {
                    System.out.println("Connected");
                }

                @Override
                    public void on(String event, IOAcknowledge ack, Object... args) {
                    System.out.println("got: " + event);
                    ack.ack("Roger that!");
                    //socket.emit("answer", new JSONObject().put("msg", "Hello again Socket.io!"));
                }
            });

        // This will be cached until the server is connected.
        //socket.emit("hello", new JSONObject().put("msg", "Hello Socket.io! :D"));
 
        JSONObject obj = new JSONObject();
        obj.put("op",      "subscribe");
        //obj.put("channel", depthChannel);
        obj.put("channel", "d5f06780-30a8-4a48-a2f8-7ed181b4a13f");
        socket.send(obj);
 
    }
}

Run it and you get:

Code:
Connected
> 1::/mtgox
> 4::/mtgox:{"op":"subscribe","channel":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f"}
> 2::
> 2::
> 2::
> 2::
> 2::
> 2::
> 2::
< 7:::1+0
Something went wrong: io.socket.SocketIOException: 1+0
io.socket.SocketIOException: 1+0
donator
Activity: 980
Merit: 1004
felonious vagrancy, personified
donator
Activity: 980
Merit: 1004
felonious vagrancy, personified
January 30, 2012, 10:35:43 PM
sooner or later getting the "7:::1+0" message.

Please, anyone possessing the knowledge about the "new technology", comment on what does the 1+0 message mean?

I have not seen this message, and I have a bit of experience with the socket.io interface now.

I am getting the "7:::1+0" as well.
hero member
Activity: 548
Merit: 502
So much code.
November 16, 2011, 12:04:28 PM
sooner or later getting the "7:::1+0" message.

Please, anyone possessing the knowledge about the "new technology", comment on what does the 1+0 message mean?

I have not seen this message, and I have a bit of experience with the socket.io interface now.


BTW, I still have not found more documentation on the protocol.
OMFG. Is it undocumented?

The protocol still follows the WebSocket protocol listed on the wiki. The incoming data are straight objects instead of JSON.
full member
Activity: 158
Merit: 100
November 16, 2011, 06:55:18 AM
socket.io simply does not work atm.

sooner or later getting the "7:::1+0" message.
Firefox at  http://bitcoin.clarkmoody.com/
or handwritten socket.io application connection to https://socketio.mtgox.com/  - that does not matter.
Interesting, though, connection passes handshake stage and receives "connect" message.

Please, anyone possessing the knowledge about the "new technology", comment on what does the 1+0 message mean?

socket.io-spec says:
Quote
(7) Error

'7::' [endpoint] ':' [reason] '+' [advice]

For example, if a connection to a sub-socket is unauthorized.
just a nonsense.
BTW, I still have not found more documentation on the protocol.
OMFG. Is it undocumented?
hero member
Activity: 548
Merit: 502
So much code.
November 10, 2011, 10:16:57 PM
Just a detail, now the data sent to the function is no longer a string with some json inside, but an object (it didn't make much sense to just send strings).

I didn't expect you'd have this implemented already, if you can just comment out the JSON.parse that'll fix everything.

Actually I was!

I was just sitting here developing and I saw the messages change from strings to JSON!
vip
Activity: 608
Merit: 501
-
November 10, 2011, 10:15:24 PM
Awesome!

I've completed the transition of bitcoin.clarkmoody.com to the new socket.io interface.

Hi,

Just a detail, now the data sent to the function is no longer a string with some json inside, but an object (it didn't make much sense to just send strings).

I didn't expect you'd have this implemented already, if you can just comment out the JSON.parse that'll fix everything.


Mark
hero member
Activity: 548
Merit: 502
So much code.
November 10, 2011, 04:30:20 PM
Awesome!

I've completed the transition of bitcoin.clarkmoody.com to the new socket.io interface.
hero member
Activity: 548
Merit: 502
So much code.
November 10, 2011, 02:10:20 PM
Thanks for working on this! It will be nice to see more browsers able to use the live quote services!
vip
Activity: 608
Merit: 501
-
November 10, 2011, 10:49:32 AM
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:

Code:


That should be simple enough, and is cross browser.
donator
Activity: 2772
Merit: 1019
November 10, 2011, 10:30:51 AM
#99
some news: obviously websocket was replaced with socket.io

Quote from: #mtgox
websocket is officially deprecated now?
shockdiode: yep, replaced by socket.io server
which is more stable
but not using the same protocol
client libs are however in most languages, however
when will that be up?

[18:23:22] when will that be up? <- IT IS
MagicalTux, any doc/wiki/??? on socket.io server?

molecular: http://socket.io got a lot of doc
it's basically the same websocket data, passed through socket.io

MagicalTux, thanks. so you merely switched the transport layer? everything else like before...?
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
donator
Activity: 2772
Merit: 1019
October 27, 2011, 04:22:42 PM
#98

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/

you never fail to surprise.

Quote from: #mtgox
is the websocket offline?
the routing is still down

didn't bug him any further
hero member
Activity: 548
Merit: 502
So much code.
October 27, 2011, 11:00:59 AM
#97

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/
legendary
Activity: 1932
Merit: 1004
October 27, 2011, 10:54:21 AM
#96

Socket Closed.
full member
Activity: 125
Merit: 100
October 11, 2011, 02:13:13 PM
#95
Installed Safari 5.1.....

Socket Still Closes......do you add any plugins or anything after the initial install?

Pages:
Jump to: