Bitcoin Forum
August 20, 2025, 03:27:33 AM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: « 1 2 3 4 5 6 7 [8] 9 10 11 12 13 14 15 16 17 18 19 20 21 »  All
  Print  
Author Topic: [BETA] MTGox websocket API, testers wanted  (Read 77956 times)
molecular
Donator
Legendary
*
Offline Offline

Activity: 2800
Merit: 1023



View Profile
November 24, 2011, 03:07:21 PM
 #141

Quote
   S.ws.send('1::/mtgox')

*headdesk*
* slush bashing all developers writing incomplete documentations and expecting that some things are so obvious they don't need to be in doc.

molecular, you're my savior. What's your donation address?

cool to have been of help, especiall to you, slush.

almost didn't post, but so many complained so I did... instant karma Wink

1JX3YkScnu2RBHjUBZTLB6qBgmGeUWxANL

EDIT: slush, are you coming to Prague? I'm there on saturday and maybe sunday, maybe I recognize you Wink

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
slush
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
November 24, 2011, 03:35:47 PM
 #142

No, I'm not coming to Prague...
(...dramatic drums...)
...because I already am in Prague!.

Would be nice to meet you, however I'm myself curious how I'll be able to communicate with my "fluent" english :-).

molecular
Donator
Legendary
*
Offline Offline

Activity: 2800
Merit: 1023



View Profile
November 24, 2011, 03:41:29 PM
 #143

No, I'm not coming to Prague...
(...dramatic drums...)
...because I already am in Prague!.

Would be nice to meet you, however I'm myself curious how I'll be able to communicate with my "fluent" english :-).

Nice. Hoping to meet you. Thanks for the generous token of appreciation you sent me Wink

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
jothan
Full Member
***
Offline Offline

Activity: 184
Merit: 100


Feel the coffee, be the coffee.


View Profile
November 24, 2011, 05:03:43 PM
 #144

Quote
   S.ws.send('1::/mtgox')

almost didn't post, but so many complained so I did... instant karma Wink

1JX3YkScnu2RBHjUBZTLB6qBgmGeUWxANL

EDIT: slush, are you coming to Prague? I'm there on saturday and maybe sunday, maybe I recognize you Wink

+1 BTC, Thanks !

Bitcoin: the only currency you can store directly into your brain.

What this planet needs is a good 0.0005 BTC US nickel.
zelyony
Newbie
*
Offline Offline

Activity: 23
Merit: 0



View Profile
December 11, 2011, 05:33:59 PM
 #145

I created project for .NET socket.io + WebSockets at codeplex.com
http://socketiowebsockets.codeplex.com/
for now it can hold ssl-connection with mtgox (no parsing json and etc)

my old ideas (in this topic) died and raised again Smiley
Ente
Legendary
*
Offline Offline

Activity: 2126
Merit: 1001



View Profile
January 07, 2012, 01:03:58 PM
 #146

..I try to get a simple python client running for days now. When I finally managed to connect via websockets, the first thing I read was "deprecated, use socket.io instead".

Instead of using socket.io (which I cant get to work) I could as well just connect to the underlying websocket just as before, not? I will not have fallback to longpoll etc in case the websocket dies and the socket.io still works. But besides that, my ticker should happily work with just websockets for the future, not?

Is there a new websocket daemon running now, for socket.io, with a different adress?

TL;DR:
Will ws://websocket.mtgox.com/mtgox continue to work?


Ente
piotr_n
Legendary
*
Offline Offline

Activity: 2058
Merit: 1427


aka tonikt


View Profile WWW
January 07, 2012, 01:08:29 PM
 #147

..I try to get a simple python client running for days now. When I finally managed to connect via websockets, the first thing I read was "deprecated, use socket.io instead".
Even though it's "deprecated" it's still much more reliable than the socket.io interface.
So please don't turn it off!

The only problem is that it doesn't work with the latest Chrome and other late WebSocket libs... and nobody wants to fix it. Sad
That's probably why they labeled it "deprecated".

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
molecular
Donator
Legendary
*
Offline Offline

Activity: 2800
Merit: 1023



View Profile
January 08, 2012, 01:26:34 PM
 #148

..I try to get a simple python client running for days now. When I finally managed to connect via websockets, the first thing I read was "deprecated, use socket.io instead".

Instead of using socket.io (which I cant get to work) I could as well just connect to the underlying websocket just as before, not? I will not have fallback to longpoll etc in case the websocket dies and the socket.io still works. But besides that, my ticker should happily work with just websockets for the future, not?

Is there a new websocket daemon running now, for socket.io, with a different adress?

TL;DR:
Will ws://websocket.mtgox.com/mtgox continue to work?


Ente

the way it works: you connect to socket.io server and it will give you a unique ID which will be part of the url you can subsequently use to connect to websocket. socket.io is just a "negotiation protocol".

look at my python code here: https://bitcointalk.org/index.php?topic=5855.msg629600#msg629600

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
molecular
Donator
Legendary
*
Offline Offline

Activity: 2800
Merit: 1023



View Profile
January 08, 2012, 01:28:14 PM
 #149

..I try to get a simple python client running for days now. When I finally managed to connect via websockets, the first thing I read was "deprecated, use socket.io instead".
Even though it's "deprecated" it's still much more reliable than the socket.io interface.
So please don't turn it off!

The only problem is that it doesn't work with the latest Chrome and other late WebSocket libs... and nobody wants to fix it. Sad
That's probably why they labeled it "deprecated".

"direct connection" to old websocket url is deprecated. you should now use socket.io to get an ID which will be part of a websocket url you can use.

check out sample implementation: https://bitcointalk.org/index.php?topic=5855.msg629600#msg629600

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
piotr_n
Legendary
*
Offline Offline

Activity: 2058
Merit: 1427


aka tonikt


View Profile WWW
January 08, 2012, 01:37:07 PM
 #150

"direct connection" to old websocket url is deprecated. you should now use socket.io to get an ID which will be part of a websocket url you can use.
So you see the new "indirect connection" working reliably?

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
molecular
Donator
Legendary
*
Offline Offline

Activity: 2800
Merit: 1023



View Profile
January 08, 2012, 04:02:31 PM
 #151

"direct connection" to old websocket url is deprecated. you should now use socket.io to get an ID which will be part of a websocket url you can use.
So you see the new "indirect connection" working reliably?


no, not reliable since roughly a week, lots of outages on the websocket part, pretty stable many weeks before that. havent seen the socket.io part fail yet.

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
bzzard
Sr. Member
****
Offline Offline

Activity: 398
Merit: 250


View Profile WWW
January 08, 2012, 04:09:51 PM
 #152

havent seen the socket.io part fail yet.

How come you say such thing when such sites as:
http://www.btccharts.com/
http://bitcoin.clarkmoody.com/

have a connection but there's no data received, any explanation for this?

BTCCharts.com - still for free!
molecular
Donator
Legendary
*
Offline Offline

Activity: 2800
Merit: 1023



View Profile
January 08, 2012, 04:12:45 PM
 #153

havent seen the socket.io part fail yet.

How come you say such thing when such sites as:
http://www.btccharts.com/
http://bitcoin.clarkmoody.com/

have a connection but there's no data received, any explanation for this?

socket.io is just a tool to negotiate a transport layer and keepalive. one of the possible transports is websocket. this means you usually use socket.io PLUS websocket (at least that's how I do it).

I'm guessing a connected websocket with no data flowing means some problem in magicaltux' backend.

any insights appreciated.

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
zelyony
Newbie
*
Offline Offline

Activity: 23
Merit: 0



View Profile
January 09, 2012, 07:56:18 PM
Last edit: January 09, 2012, 10:29:22 PM by zelyony
 #154

request to "https://socketio.mtgox.com/socket.io/1" doesnt respond (net::ERR_CONNECTION_REFUSED)
Is URL valid?
something happened.. but WHAT happened?..

UPD1:
P.S.
I wrote to Mt.Gox support issue: open some technical twitter channel with info: what? when? how long?
IRC-channel is just flame - no info, no logs, no history, no search..

UPD2 (2:28 AM):
its working now
molecular
Donator
Legendary
*
Offline Offline

Activity: 2800
Merit: 1023



View Profile
January 11, 2012, 03:06:49 AM
 #155

request to "https://socketio.mtgox.com/socket.io/1" doesnt respond (net::ERR_CONNECTION_REFUSED)
Is URL valid?
something happened.. but WHAT happened?..

UPD1:
P.S.
I wrote to Mt.Gox support issue: open some technical twitter channel with info: what? when? how long?
IRC-channel is just flame - no info, no logs, no history, no search..

UPD2 (2:28 AM):
its working now

yeah, I see this, too from time to time. also a lot of times the connection setup works fine, but there's just no data flow. mtgox datastreaming is on and off on most levels as far as I can tell.

supposedly socket.io is some typical bay-area shit and there's a big rewrite pull request pending for a while now that could fix the issue mtgox is suffering from.

my latest "kind-of-official" info is that the socket.io server is now restarted every 2 hours to mitigate effects of this (and potentially other) issue(s).

I for one am preparing to survive using api requests (switched form api/0 to api/1)

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
zelyony
Newbie
*
Offline Offline

Activity: 23
Merit: 0



View Profile
January 11, 2012, 09:53:33 AM
 #156

I see data
Quote
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","op":"private","origin":"broadcast","private":"depth","depth":{"price":"5.80025","type":2,"type_str":"bid","volume":"0","price_int":"580025","volume_int":"0","item":"BTC","currency":"USD","now":"1326266472912980","total_volume_int":"19811387"}}    
why exists messages with volume=0 ?
is this rounding errors in MtGox's guts or users posts such orders to exchange ?

+++ existence of "total_volume_int" - is wonderful
rwcp97
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
January 11, 2012, 10:20:27 AM
 #157

havent seen the socket.io part fail yet.

How come you say such thing when such sites as:
http://www.btccharts.com/
http://bitcoin.clarkmoody.com/

have a connection but there's no data received, any explanation for this?

I have the same problem using the websocket from my C++/Qt-bot - sometimes, usually after some hours working correctly, there is no more data coming in through the socket (but the connection isn't closed by the remote host).
So I check for incoming data and if there isn't anything for 3 minutes, I close the connection and reconnect. Afterwards it's working without problems again. Strange anyway  Huh
notme
Legendary
*
Offline Offline

Activity: 1904
Merit: 1002


View Profile
January 13, 2012, 01:54:06 AM
 #158

I'm trying to connect via the SocketIO Ruby gem.  When I try to subscribe to the trades channel the following string is passed to the server: ""\x003:::{\"channel\":\"dbf1dee9-4f2e-4a08-8cb7-748919a71b21\",\"op\":\"subscribe\"}\xFF".  The server response with a json message: {"op":"remark","success":false,"message":"Unknown command","debug":{"op":"client","uuid":"5a1f3b8f-1e03-462b-bd38-e463bb39ff2e","data":{"channel":"dbf1dee9-4f2e-4a08-8cb7-748919a71b21","op":"subscribe"}}}

The "data" field seems to be the message I intended to submit, but the subscribe fails with "Unknown command".  Any help would be appreciated.

https://www.bitcoin.org/bitcoin.pdf
While no idea is perfect, some ideas are useful.
zelyony
Newbie
*
Offline Offline

Activity: 23
Merit: 0



View Profile
January 13, 2012, 09:37:48 PM
 #159

The "data" field seems to be the message I intended to submit, but the subscribe fails with "Unknown command".  Any help would be appreciated.
my subscribtions (raw socket.io messages over websocket - no explicit frames borders) are:
   "4:::{"op":"mtgox.subscribe","type":"trades"}"
   "4:::{"op":"mtgox.subscribe","type":"ticker"}"
   "4:::{"op":"mtgox.subscribe","type":"depth"}"
notme
Legendary
*
Offline Offline

Activity: 1904
Merit: 1002


View Profile
January 13, 2012, 11:43:05 PM
 #160

Thanks... I changed channel to type and subscribe to mtgox.subscribe and now it works.

https://www.bitcoin.org/bitcoin.pdf
While no idea is perfect, some ideas are useful.
Pages: « 1 2 3 4 5 6 7 [8] 9 10 11 12 13 14 15 16 17 18 19 20 21 »  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!