Title: MtGox websocket API: I get ticker and depth messages, but no trade or lag Post by: pescador on April 20, 2013, 04:26:30 PM I'm experimenting with the MtGox websocket API. This API is documented here https://en.bitcoin.it/wiki/MtGox/API/Streaming (https://en.bitcoin.it/wiki/MtGox/API/Streaming) and discussed here https://bitcointalk.org/index.php?topic=5855.msg86219#msg86219 (https://bitcointalk.org/index.php?topic=5855.msg86219#msg86219). However since I'm a newbie I can't post my question there, so I have to ask it here. I'm using Python with the websocket module from https://pypi.python.org/pypi/websocket-client (https://pypi.python.org/pypi/websocket-client). See example code below
Code: import threading When I run this code I receive ticker and depth messages, but no lag or trade messages. Also I do not get any replies to my mtgox.subscribe commands, that the documentation seems to promise. However when I send a mtgox.subscribe command with a wrong type parameter, I get an error message "Unknown mtgox message type", so it seems my subscribe commands are received and accepted. Could somebody please tell me why I'm not receiving trade and lag messages? Title: Re: MtGox websocket API: I get ticker and depth messages, but no trade or lag Post by: Webengers on April 23, 2013, 07:07:26 AM I've been experiencing the same thing from the websocket. A stream of Ticker messages, and occasional depth message and I haven't seen a trade message yet.
I'd really like to figure this out! Title: Re: MtGox websocket API: I get ticker and depth messages, but no trade or lag Post by: pescador on April 27, 2013, 08:53:33 AM It seems to be working now. Now I also get trade and lag messages. Apparently it was something at MtGox's side.
Title: Re: MtGox websocket API: I get ticker and depth messages, but no trade or lag Post by: RomanKnight on April 30, 2013, 02:25:20 AM Hello I am trying to do the same thing you are and yet when I run the code I made I get.
----------------------- --- response header --- HTTP/1.1 400 Bad Request ----------------------- Handshake Status 400 ### closed ### This is very frustrating would you happen to know what I am doing wrong? Title: Re: MtGox websocket API: I get ticker and depth messages, but no trade or lag Post by: ralphtheninja on May 02, 2013, 01:37:06 AM Same here and using the same python code. Bad request 400. What's going on?
Title: Re: MtGox websocket API: I get ticker and depth messages, but no trade or lag Post by: pescador on May 02, 2013, 07:10:50 PM Try changing ws into wss.
Title: Re: MtGox websocket API: I get ticker and depth messages, but no trade or lag Post by: milkyman on January 05, 2014, 12:47:19 PM I'm not sure whether anyone is still reading here, but I'll give it a try. I ran the above code in python 2.7.6 - using wss instead of ws - and get the following response:
Code: --- request header --- Does anyone know whether this is what I should get? How do I interpret this response? How do I get the ticker / depth / etc. updates? Thanks |