MtGox websockets api returning "400 Bad Request"
It seems that the client should send the Origin header in opening handshake to the MtGox server.

If you use current websocket-sharp, you should do like the following before connecting.


ws.Origin = "http://websocket.mtgox.com";


Could you try?

Update:

Could you try again the following code?

static void Main(string[] args)
{
    var ws = new WebSocket("ws://websocket.mtgox.com/mtgox?Currency=USD");
    ws.Origin = "http://websocket.mtgox.com";
    ws.OnOpen += (sender, e) =&gt;
    {
      ws.Send(
@"{
    ""op"": ""unsubscribe"",
    ""channel"": ""d5f06780-30a8-4a48-a2f8-7ed181b4a13f""
}"
      );
    };
    ws.OnMessage += (sender, e) =&gt;
    {
        if (!String.IsNullOrEmpty(e.Data))
        {
            Console.WriteLine("{0}", e.Data);
        }
    };
    ws.Connect();
    Console.ReadLine();
    ws.Close();
}


It seems that an exception has occurred when the client is receiving ticker type data in a while.

I'll investigate a little further.

Update:

I've found out the cause of the exception, and fixed websocket-sharp.

Could you try your code with current websocket-sharp?