Beispiel #1
0
        void QuoteNotify_OnRspQryCommodityEvent(uint sessionId, int errorCode, char isLast, TapAPIQuoteCommodityInfo info)
        {
            if (errorCode == 0)
            {
                lock (m_sessionID_Lock)
                {
                    //Console.WriteLine($"sessionID update === value:{m_sessionID} - QryContract");
                    // 查询合约
                    m_api.QryContract(out m_sessionID, info.Commodity);
                    //Console.WriteLine($"sessionID update end value:{m_sessionID} - QryContract");
                }

                if (isLast != 'Y')
                {
                    ListCommodity.Add(info);
                }
                else
                {
                    //m_api.QryContract(out m_sessionID, new TapAPICommodity()
                    //{
                    //    ExchangeNo = ListCommodity[1].Commodity.ExchangeNo,
                    //    CommodityNo = "",
                    //    CommodityType='F'

                    //});
                }
            }
            else
            {
                Console.WriteLine($"QuoteNotify_OnRspQryCommodityEvent result errorCode:{errorCode}");
            }
        }
Beispiel #2
0
 void QuoteNotify_OnRspQryCommodityEvent(uint sessionId, int errorCode, char isLast, TapAPIQuoteCommodityInfo info)
 {
     if (errorCode == 0)
     {
         if (isLast != 'Y')
         {
             ListCommodity.Add(info);
         }
         else
         {
             m_api.QryContract(out m_sessionID, new TapAPICommodity()
             {
                 ExchangeNo    = ListCommodity[1].Commodity.ExchangeNo,
                 CommodityNo   = "",
                 CommodityType = 'F'
             });
         }
     }
 }
Beispiel #3
0
 void QuoteNotify_OnAPIReadyEvent()
 {
     m_api.QryContract(out m_sessionID, null);
 }