/// <summary> /// Subscribes to the token of interest /// </summary> /// <param name="exch"></param> /// <param name="token"></param> /// <returns></returns> public bool UnSubscribeToken(string exch, string token) { UnSubscribeTouchline subs = new UnSubscribeTouchline(); subs.k = exch + "|" + token; wsclient.Send(subs.toJson()); Console.WriteLine($"UnSub Token: {subs.toJson()}"); return(true); }
public bool UnSubscribe(List <Quote> tokenlist) { UnSubscribeTouchline subs = new UnSubscribeTouchline(); subs.k = String.Empty; foreach (var quote in tokenlist) { if (String.IsNullOrEmpty(subs.k)) { subs.k = quote.exch + "|" + quote.token; } else { subs.k += "#" + quote.exch + "|" + quote.token; } } wsclient.Send(subs.toJson()); Console.WriteLine($"UnSub Token: {subs.toJson()}"); return(true); }