Closed BobMakhlin closed 3 years ago
When I pass invalid symbol to the SubscribeToSymbolMiniTickerUpdatesAsync method, no exception is thrown:
SubscribeToSymbolMiniTickerUpdatesAsync
BinanceSocketClient socketClient = new BinanceSocketClient(); CallResult<UpdateSubscription> callResult = await socketClient.Spot .SubscribeToSymbolMiniTickerUpdatesAsync("XRPXRP", response => { Console.WriteLine(response.LastPrice); }); Console.WriteLine($"Error: {callResult.Error}"); // null Console.WriteLine($"Success: {callResult.Success}"); // true
I am passing "XRPXRP" as the symbol. As you can see, it's an invalid symbol, so here we should have an exception. But nothing happens.
"XRPXRP"
Debug logging
2021/02/24 15:34:03:909 | Binance | Debug | Client configuration: LogVerbosity: Debug, Writers: 1, Credentials: Set, BaseAddress: wss://stream.binance.com:9443/, Proxy: -, AutoR econnect: True, ReconnectInterval: 00:00:05, SocketResponseTimeout: 00:00:10, SocketSubscriptionsCombineTarget: 2021/02/24 15:34:04:047 | Binance | Debug | Created new socket for wss://stream.binance.com:9443/stream?streams=xrpxrp@miniTicker 2021/02/24 15:34:04:127 | Binance | Debug | Socket 1 connecting 2021/02/24 15:34:06:362 | Binance | Debug | Socket 1 connected
This is how Binance has implemented it. It doesn't return an error if you try to subscribe to symbols which don't exist. Not much I can do about that.
I understood. Thanks!
When I pass invalid symbol to the
SubscribeToSymbolMiniTickerUpdatesAsync
method, no exception is thrown:I am passing
"XRPXRP"
as the symbol. As you can see, it's an invalid symbol, so here we should have an exception. But nothing happens.Debug logging