/// <summary>
        /// Close a specific WebSocket instance using the Guid provided on creation
        /// If it is a user data stream socket then also the listenKey is closed
        /// </summary>
        public void CloseWebSocketInstance(Guid id)
        {
            BinanceWebSocket ws = null;

            lock (ActiveWebSockets)
            {
                if (ActiveWebSockets.ContainsKey(id))
                {
                    ws = ActiveWebSockets[id];
                    ActiveWebSockets.Remove(id);
                }
                else
                {
                    throw new Exception($"No Websocket exists with the Id {id.ToString()}");
                }
            }
            try { _ = ws.CloseAsync(); }
            catch { }
            if (ws.ListenKey != null)
            {
                _ = this.BinanceClient.CloseUserDataStream(ws.ListenKey);
            }
        }