Exemplo n.º 1
0
        public void SubscribeInstrument(TTInstrument ttinstr)
        {
            cout("Subscribing to Instrument...");

            // Find out instrument based on the previously created key
            TT.InstrumentLookupSubscription instrRequest = new TT.InstrumentLookupSubscription(this.m_TTAPI.Session, TT.Dispatcher.Current, ttinstr.InstrumentKey);
            instrRequest.Update += instrRequest_Completed;
            instrRequest.Start();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Function to find a list of InstrumentKeys.
        /// </summary>
        /// <param name="keys">List of InstrumentKeys.</param>
        public void FindInstrument(IList <TT.InstrumentKey> keys)
        {
            foreach (TT.InstrumentKey key in keys)
            {
                // Update the Status Bar text.
                cout("TT API FindInstrument {0}", key.ToString());

                TT.InstrumentLookupSubscription instrRequest = new TT.InstrumentLookupSubscription(m_TTAPI.Session, TT.Dispatcher.Current, key);
                instrRequest.Update += instrRequest_Completed;
                instrRequest.Tag     = key.ToString();
                instrRequest.Start();
            }
        }