public void Start(string channel, string args = null) { if (wsb != null) { wsb.stop(); } string url = BitmexConfig.Uri + "?subscribe=" + channel; if (!string.IsNullOrEmpty(args)) { url += "," + args; } wsb = new WSocket.WebSocketBaseBitMex(url, wsl); wsb.start(); }
public void Stop() { wsb.stop(); wsb = null; wsl = null; }