//public void SubscribeToPrice(object marketId) //{ // if (!CIAPI_Global.IsConnected) // CIAPI_Global.ConnectCIAPI(); // List<string> marketIDs = (List<string>)marketIdsList; // for (int i = 0; i < marketIDs.Count; i++) // { // var priceStreamListner = CIAPI_Global.StreamingClient.BuildPriceListener("PRICES.PRICE." + marketId);//marketIDs[i]); // priceStreamListner.Start(); // priceListnerList.Add(priceStreamListner); // var gate = new ManualResetEvent(false); // priceStreamListner.MessageReceived += (sender, priceArg) => // { // OnPriceReceived(new PriceReceivedArgs(priceArg.Data)); // gate.Set(); // }; // gate.WaitOne(); // } //} public void UnSubscribePriceStream() { priceListner.Stop(); CIAPI_Global.DisConnectCIAPI(); }
public void UnSubscribeNewsHeadLineStream() { newsListener.Stop(); CIAPI_Global.DisConnectCIAPI(); }