Bitcoin Forum
May 04, 2024, 01:35:31 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 [6]  All
  Print  
Author Topic: Real Time MtGox Order Book  (Read 26716 times)
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
November 10, 2011, 06:10:20 PM
 #101

Thanks for working on this! It will be nice to see more browsers able to use the live quote services!

1714786531
Hero Member
*
Offline Offline

Posts: 1714786531

View Profile Personal Message (Offline)

Ignore
1714786531
Reply with quote  #2

1714786531
Report to moderator
1714786531
Hero Member
*
Offline Offline

Posts: 1714786531

View Profile Personal Message (Offline)

Ignore
1714786531
Reply with quote  #2

1714786531
Report to moderator
1714786531
Hero Member
*
Offline Offline

Posts: 1714786531

View Profile Personal Message (Offline)

Ignore
1714786531
Reply with quote  #2

1714786531
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714786531
Hero Member
*
Offline Offline

Posts: 1714786531

View Profile Personal Message (Offline)

Ignore
1714786531
Reply with quote  #2

1714786531
Report to moderator
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
November 10, 2011, 08:30:20 PM
 #102

Awesome!

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

MagicalTux
VIP
Hero Member
*
Offline Offline

Activity: 608
Merit: 501


-


View Profile
November 11, 2011, 02:15:24 AM
 #103

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
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
November 11, 2011, 02:16:57 AM
 #104

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!

throughput
Full Member
***
Offline Offline

Activity: 158
Merit: 100


View Profile
November 16, 2011, 10:55:18 AM
 #105

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?
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
November 16, 2011, 04:04:28 PM
 #106

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.

eldentyrell
Donator
Legendary
*
Offline Offline

Activity: 980
Merit: 1004


felonious vagrancy, personified


View Profile WWW
January 31, 2012, 02:35:43 AM
 #107

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.

The printing press heralded the end of the Dark Ages and made the Enlightenment possible, but it took another three centuries before any country managed to put freedom of the press beyond the reach of legislators.  So it may take a while before cryptocurrencies are free of the AML-NSA-KYC surveillance plague.
eldentyrell
Donator
Legendary
*
Offline Offline

Activity: 980
Merit: 1004


felonious vagrancy, personified


View Profile WWW
January 31, 2012, 09:31:29 PM
Last edit: February 02, 2012, 12:35:51 AM by eldentyrell
 #108

I am getting the "7:::1+0" as well.

FWIW I am using the standard Java (not javascript) Socket.IO client.

The printing press heralded the end of the Dark Ages and made the Enlightenment possible, but it took another three centuries before any country managed to put freedom of the press beyond the reach of legislators.  So it may take a while before cryptocurrencies are free of the AML-NSA-KYC surveillance plague.
eldentyrell
Donator
Legendary
*
Offline Offline

Activity: 980
Merit: 1004


felonious vagrancy, personified


View Profile WWW
February 02, 2012, 12:39:20 AM
 #109

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

The printing press heralded the end of the Dark Ages and made the Enlightenment possible, but it took another three centuries before any country managed to put freedom of the press beyond the reach of legislators.  So it may take a while before cryptocurrencies are free of the AML-NSA-KYC surveillance plague.
wareen
Millionaire
Legendary
*
Offline Offline

Activity: 910
Merit: 1001

Revolutionizing Brokerage of Personal Data


View Profile
February 17, 2012, 11:08:40 PM
 #110

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.

        ▄▄▀▀▄▄
    ▄▄▀▀▄▄██▄▄▀▀▄▄
▄▄▀▀▄▄█████▄████▄▄▀▀▄▄
█▀▀█▄█████████████
█▄▄████▀   ▀██████
███████     █▄████
█████▀█▄   ▄██████
█▄█████▌   ▐█████
█████▀█     ██████
██▄███████████████
▀▀▄▄▀▀█████▀████▀▀▄▄▀▀
    ▀▀▄▄▀▀██▀▀▄▄▀▀
        ▀▀▄▄▀▀
.PDATA..
.
TOKEN..
██
██
██   ██
██   ██
██   ██
██   ██
██   ██
██   ██

██   ██
██   ██

██   ██
██
██
██
██
██  ██
██  ██
██  ██
██  ██
██  ██
██  ██

██  ██
██  ██

██  ██
██
██
██
██
██   ██
██   ██
██   ██
██   ██
██   ██
██   ██

██   ██
██   ██

██   ██
██
██
TELEGRAM     BITCOINTALK     FACEBOOK
MEDIUM    SLACK    TWITTER    YOUTUBE
▬▬▬▬▬▬▬   E M A I L   ▬▬▬▬▬▬▬
██
██
██  ██
██  ██
██  ██
██  ██
██  ██
██  ██

██  ██
██  ██

██  ██
██
██
brox
Member
**
Offline Offline

Activity: 71
Merit: 10



View Profile
March 03, 2012, 07:41:50 PM
 #111

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!

Save dolphins! Donate to 1BTC4brox2pd14QubXGsXwarp9zV9tc8CZ
Mine Bitcoins in the cloud at cex.io
TheFootMan
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile
December 11, 2013, 09:13:26 PM
 #112

Is clark moody frozen?
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
December 11, 2013, 11:35:58 PM
 #113

Is clark moody frozen?

Mt. Gox has disconnected its real time WebSocket.

TrustedPartner
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
February 16, 2014, 10:43:08 AM
 #114

Anybody buying or selling within MtGox to other MtGox traders for real cash for MtGoxBTC to each other?  Any talk about that?
Pages: « 1 2 3 4 5 [6]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!