glitch100 / BinanceDotNet

Official C# Wrapper for the Binance exchange API, with REST and WebSocket endpoints
https://www.nuget.org/packages/BinanceDotNet/
MIT License
161 stars 140 forks source link

ConnectToDepthWebSocketCombinedPartial #171

Open Mohsin-Habib opened 4 years ago

Mohsin-Habib commented 4 years ago

Issue Overview

i am sending request "ConnectToDepthWebSocketCombinedPartial" and get an exception

|Fatal|WebSocket.Connect|WebSocketSharp.WebSocketException: Not a WebSocket handshake response. at WebSocketSharp.WebSocket.doHandshake() at WebSocketSharp.WebSocket.connect()

Package Version: ?.?.?

BinanceDotNet by jon evans v4.12.0

Repro Steps

BinancePartialDepthData r = null;

        //var ApiKey = ".....";
        //var SecretKey = "....";

        var client = new BinanceClient(new ClientConfiguration()
        {
            ApiKey = ApiKey,
            SecretKey = SecretKey,
        });

Thread WebSocketSyncing = new Thread(() => { var manualWebSocketClient = new InstanceBinanceWebSocketClient(client); try { var socketId = manualWebSocketClient.ConnectToDepthWebSocketCombinedPartial("BTCUSDT", "1000ms", data => { try { r = data; } catch (Exception) { Environment.Exit(0); } }); } catch (Exception ex) { Console.WriteLine("ERROR ON SOCKET: " + ex.Message); Environment.Exit(0); } });

Other Information

Other information here