piotr_n
Legendary
Offline
Activity: 2055
Merit: 1359
aka tonikt
|
|
September 20, 2011, 09:52:43 AM |
|
The WebSocket API does not work with the latest Chrome. Chrome dev claims that the problem is at mtgox side. Please fix.
|
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
|
|
|
AV
|
|
September 20, 2011, 12:56:57 PM |
|
Hi, MagicalTux ! The WebSocket API really does not work with the latest (14.0.835.163) Chrome. For example http://bitcoin.clarkmoody.com/WebSocket Closed after 2 second. Help ! Help ! Help ! Thanks.
|
|
|
|
speeder
|
|
September 20, 2011, 12:58:38 PM |
|
Yay! Correct thread to complain about that!
Indeed, me too want clarkmoody on Chrome 14!
(thankfully at work Chrome is still stuck on 13)
|
|
|
|
bzzard
|
|
September 22, 2011, 11:42:50 PM |
|
yeah, this should work? I know that ws://mtgoxlive.com:3456/channel works MtGox! Anyone there?
|
|
|
|
paraipan
In memoriam
Legendary
Offline
Activity: 924
Merit: 1004
Firstbits: 1pirata
|
|
September 24, 2011, 05:50:28 PM |
|
sup MagicalTux, any plans to update websockets to draft-10 any time soon ? Thanks
|
BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
|
|
|
Ente
Legendary
Offline
Activity: 2126
Merit: 1001
|
|
September 25, 2011, 04:28:12 PM |
|
I was going to make a nice interface for the feed as well, but I'm not going to bother until the problems are resolved: Rounding issues No perfect way to start out in-sync Alleged missing data and dark pool inconsistencies
How about these and the wss://? Its been months that Mark didnt post here now.. And, general question: I chose this API as a starting project to learn ruby. Maybe a bit (too) ambitious, but would at least be a useable project, if it ever gets finished.. Are there real advantages of this "new" websocket API over the old HTTP API except that I dont have to poll any more and have instant updates (instead of every 10 secs)? I would at least not have the syncing issues? With the probably still unsolved issues I hesitate to invest much more time into this - being a novice I still am trying to actually post to the websocket.. *rolleyes* Thanks, Ente
|
|
|
|
Clark
|
|
October 10, 2011, 07:49:55 PM |
|
I found the part of the draft where Chrome 14 is failing: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#section-4.2Apparently, MtGox is setting the RSV2 bit in the responses to the client. Thus, according to the spec, Chrome is required to FAIL the connection. Using a packet sniffer, I can see the subscribed responses from the WebSocket after connecting, but the message never gets through and Chrome fails and closes the connection. This is such a simple fix...
|
|
|
|
BkkCoins
|
|
October 12, 2011, 06:43:21 AM Last edit: October 12, 2011, 12:20:58 PM by BkkCoins |
|
Does the "own" channel work at all?
I can't figure out how to get data about my own trades/orders. I've dumped all the data streamed and there is no data not matching the default channels. I tried subscribing using a key of my own account. That doesn't work either. It seems like this just doesn't work yet.
It would be really useful to see when your own orders/trades occur. If this does work then is there a web page somewhere that says more than the one line on the wiki?
*** Edit:
Another thing I noticed now is multi-currency trades coming thru. I don't quite understand these:
19:07:57 BUY 22.81 @ $2.63192 GBP 19:07:57 BUY 22.81 @ $25.6 CNY
I see British Pounds and Chinese Yuan. But why twice and how does this work - is someone buying with Pounds and settling in Yuan or something? I realize that this must be the same trade since the GBPCNY exchange rate is now about 10.33. Just not sure how I can handle this as info if the USD isn't indicated.
Thx.
|
|
|
|
qxzn
|
|
October 12, 2011, 05:06:44 PM |
|
I have not been able to get the "own" channel to work either. If anyone has, please share how!
|
|
|
|
Cluster2k
Legendary
Offline
Activity: 1692
Merit: 1018
|
|
October 16, 2011, 12:41:20 PM Last edit: October 16, 2011, 12:54:18 PM by Cluster2k |
|
Subscribing to my own channel doesn't work either. I'm using VB and tried sending ANSI strings to MtGox in various formats, but as soon as I do I lose the TCP connection. Sending the handshake right after connecting exactly the same way works fine however. I have tried: {'key': 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', 'op': 'mtgox.subscribe'} {'key': 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', 'op': 'subscribe'} {'op': 'mtgox.subscribe', 'key': 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'} {'op': 'subscribe', 'key': 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'} Sending nonsensical data "eg. 'testing 123' to the connection causes a disconnection as well. Is this standard behaviour if MtGox doesn't recognise the message? I assume the key is my key listed in my MtGox API section. I have successfully used the key and secret to retrieve account data using a sample PHP script. EDIT: Just tried using plain old telnet to connect to MtGox. Works fine, just like this example: http://dl.dropbox.com/u/24900303/screenshot/2011/04/20110415_websocket_telnet_example.pngBut as soon as I try to send any subsequent data to the connection I lose it. The wiki entry at https://en.bitcoin.it/wiki/MtGox/API is non descriptive. "Additionally each user has a "own" channel which streams informations about orders (new order, deleted order, etc) and trades only the user's trades). " There is no description on how someone can subscribe to their own channel.
|
|
|
|
qxzn
|
|
October 16, 2011, 05:39:19 PM |
|
You should not be getting a disconnect just for sending an invalid message type. You should be getting a json message back that says something about how your command was unrecognized. I would double check the bytes you're sending. As a test, you can try to unsubscribe to one of the feeds. That works, so you should be able to get it to work.
|
|
|
|
Cluster2k
Legendary
Offline
Activity: 1692
Merit: 1018
|
|
October 16, 2011, 10:56:54 PM Last edit: October 17, 2011, 12:20:56 AM by Cluster2k |
|
You should not be getting a disconnect just for sending an invalid message type. You should be getting a json message back that says something about how your command was unrecognized. I would double check the bytes you're sending. As a test, you can try to unsubscribe to one of the feeds. That works, so you should be able to get it to work.
It seems I can't send anything to MtGox after the initial handshake without getting disconnected. I've tried in telnet too (MS Windows telnet client). Surely it should work? telnet websocket.mtgox.com 80 Sent the following text: GET /mtgox HTTP/1.1 Upgrade: WebSocket Connection: Upgrade Host: websocket.mtgox.com Origin: null After pressing enter the second time I start to get the stream of data. But when I try to send something like "{'op': 'mtgox.unsubscribe', 'key': 24e67e0d-1cad-4cc0-9e7a-f8523ef460fe}" the connection is lost. If I send anything at all the connection dies. I don't get it. EDIT: Just tried it again with Putty on Win7. Type of connection: raw. Same result. I can get the streaming data, but as soon as I try to send anything back to the server on the same connection it disconnects.
|
|
|
|
|
Cluster2k
Legendary
Offline
Activity: 1692
Merit: 1018
|
|
October 17, 2011, 01:26:20 AM |
|
Thanks for that. I'll try putting \x00 before my message and \xFF after and see how that goes.
|
|
|
|
Cluster2k
Legendary
Offline
Activity: 1692
Merit: 1018
|
|
October 17, 2011, 03:38:46 AM |
|
That works fine. I wasn't sending the \x00 and \xFF at the beginning and end of each message. I can successfully unsubscribe from the depth feed using: {"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","op":"unsubscribe"} However when I try to resubscribe I get the following error: {"message":"Unknown command","op":"remark","success":false} I have tried all sorts of combinations of subscribe messages, but none seems to work. I also can't subscribe to my own channel. The following all fail: {"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","op":"subscribe"} {"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","op":"mtgox.subscribe"} {"op":"subscribe","channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe"} {"op":"mtgox.subscribe","channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe"} {"op":"subscribe","24e67e0d-1cad-4cc0-9e7a-f8523ef460fe"} {"op":"mtgox.subscribe","24e67e0d-1cad-4cc0-9e7a-f8523ef460fe"} I looked at the haskell code and tried that subscription message first, then tried various other combinations. hPutFrame h $ "{\"op\":\"mtgox.subscribe\"," ++ key ++ "}"
|
|
|
|
Cluster2k
Legendary
Offline
Activity: 1692
Merit: 1018
|
|
October 17, 2011, 07:33:09 AM |
|
I have just been informed on #mtgox IRC that websockets are read-only. Have been for a number of weeks. Subscriptions don't work and it's not possible to view your own executed trades.
It's possible get around this limitation, but it really makes the system slow and a bit cumbersome to use. It would be so much more convenient to get instant confirmation of your own trades.
|
|
|
|
Clark
|
|
October 20, 2011, 04:12:46 PM |
|
I would like to see depth messages for all of the currencies broadcast out over the WebSocket, as I do not think it's happening right now.
Can anyone confirm that there are only USD depth messages coming across the socket?
|
|
|
|
molecular
Donator
Legendary
Offline
Activity: 2772
Merit: 1019
|
|
October 21, 2011, 01:23:06 PM |
|
I would like to see depth messages for all of the currencies broadcast out over the WebSocket, as I do not think it's happening right now.
Can anyone confirm that there are only USD depth messages coming across the socket?
Looks like it's true. I am filtering for "depth_msg['currency'] == 'USD'", but put a debug log line for the other case. It doesn't trigger.
|
PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0 3F39 FC49 2362 F9B7 0769
|
|
|
Ente
Legendary
Offline
Activity: 2126
Merit: 1001
|
|
October 26, 2011, 03:29:34 PM |
|
I am having problems with Websockets and Ruby in general, maybe someone of you is kind enough to help out? I am beginner with Ruby and chose this as a learning-by-doing project. Using examples from the web, I am still trying to connect to the websocket (works) and sending strings to it (handshake and channel subscription/exiting): require 'rubygems' 'eventmachine' 'em-http-request' EventMachine.run { verbindung = EventMachine::HttpRequest.new("http://websocket.mtgox.com").get :timeout => 0
verbindung.errback { puts "oops" } verbindung.callback { puts "WebSocket connected!" verbindung.send("GET /mtgox HTTP/1.1\n", 0) } } Error, my Ruby doesnt recognize "GET /mtgox HTTP/1.1\n" as a string to be "send" : websocket.rb:19:in `send': undefined method `GET /mtgox HTTP/1.1 (NoMethodError) ' for #<EventMachine::HttpClient:0x7f9f6d22e8b8> I tried "print", "send", "write", "<<", still didnt get it to work. I am lost, grateful for any hint! Ente
|
|
|
|
runeks
Legendary
Offline
Activity: 980
Merit: 1008
|
|
October 28, 2011, 09:13:22 PM |
|
Anyone else getting timeouts connecting to ws://websocket.mtgox.com/mtgox? I am right now...
|
|
|
|
|