Bitcoin Forum
July 08, 2024, 02:50:38 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Mt Gox Web Socket Hair Pulling Out Situation  (Read 524 times)
The General (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
May 08, 2013, 03:27:31 AM
 #1

Guys,

As I saw another post here in the Newbies section relating to web sockets and code, thought this was a good place for me (newbie) to post my question. I am having an issue with getting data returned from the web socket (i am using a version of Basic btw). So far, the below is the situation:

I can successfully initiate the handshake but am unable to subscribe to a channel and get some data returned. Below is the data being sent and the returned data and the area where I am having issues:

websocket.mtgox.com
GET /mtgox/Currency=USD HTTP/1.1
Upgrade: websocket
Connection: Upgrade
Host: websocket.mtgox.com:80
Origin: websocket.mtgox.com:80
Sec-WebSocket-Key: UWaphFPiSqq3f2gOmaD5Sg==
Sec-WebSocket-Version: 13

RETURNS:

4{"message":"Now online (no channels)","op":"remark"}

Which is expected but when I try to initiate a subscribe, I just keep on getting disconnected:

\x00{"channel":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f","op":"subscribe"}\xFF

Now, please be advised that I have put \x00 and \xFF in the above as I believe that is the correct notation for PHP and Python. As I am using Basic, I have set the first byte to 0 and the last to 255 and included the ANSI text above. Done the same with converting the JSON ANSI string above to UTF-8 but still no luck..Have tried to use Wireshark to get a handle on exactly what is being sent but my wireless hardware is not allowing promiscuous something or other.

Any pointers would be very helpful ! With my Basic version, I will have to handle any unicode etc conversions myself etc..

Am definitely slightly bolder after having started this exercise !

Cheers,

The General.
The General (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
May 08, 2013, 11:34:13 AM
 #2

A pint of cold beer for someone to pipe up !  Grin
The General (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
May 09, 2013, 05:22:20 AM
 #3

Two pints then !  Grin
Pages: [1]
  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!