/// <summary> /// Request a once-only value. /// </summary> /// <param name="topic">The type of data to be returned from TOS, eg, open, high, low, close, volume, etc</param> /// <param name="item"></param> /// <returns>Returns the value of the TOS data</returns> public static string Request(TOSTopic topic, string item) { return(TOSTopicConnection.GetTOSTopicConnection(topic).Request(item)); }
/// <summary> /// Subscribe to be notified whenever there is a change in the value stored inside TOS. /// The first time you subscribe, the TOSDataPoint will not be initialized. /// The TOSDataPoint is not updated until there is an actual change inside TOS. /// If you need an initial value immediately, first use the TOSClient.Request method. /// </summary> /// <param name="topic">The type of data to be returned from TOS, eg, open, high, low, close, volume, etc</param> /// <param name="item">The ticker symbol</param> /// <returns>Returns a TOSDataPoint object that will raise an event with its new /// value whenever</returns> public static TOSDataPoint Subscribe(TOSTopic topic, string item) { return(TOSTopicConnection.GetTOSTopicConnection(topic).Subscribe(item)); }