예제 #1
0
        private void buttonAddOption_Click(object sender, EventArgs e)
        {
            DataSet1.StockQuotesRow row = dataSet1.StockQuotes.NewStockQuotesRow();
            row.Symbol = textBoxOption.Text;
            dataSet1.StockQuotes.AddStockQuotesRow(row);

            OptionSubscriptionId subscription = new OptionSubscriptionId(row.Symbol, (object)row);

            m_subscriptions.Add(subscription);

            if (m_nativeUtilities.IsConnected)
            {
                m_nativeUtilities.Subscribe(new OptionSubscriptionId[] { subscription });
            }
            else if (m_messageUtilities.IsSubscriberStarted)
            {
                m_messageUtilities.Subscribe(subscription.Symbol, QuoteType.Option, subscription.QuoteObject);
            }
        }
예제 #2
0
        public void TestBloombergOptionSymbol()
        {
            OptionSubscriptionId option = new OptionSubscriptionId("SPY   170519C00276500");

            Assert.AreEqual("SPY US 05/19/17 276.5 EQUITY", option.BloombergSymbol, "Wrong Bloomberg symbol");
        }