Example #1
0
        private void kiwoomApi_OnReceiveRealCondition(object sender, AxKHOpenAPILib._DKHOpenAPIEvents_OnReceiveRealConditionEvent e)
        {
            // 실시간 조건검색 요청으로 종목 편입 확인 (type - I : 종목편입, D : 종목이탈)
            if (e.strType.Equals("I"))
            {
                Console.WriteLine("조건검색 실시간 편입 [" + e.sTrCode + "]");

                ConditionStock conditionStock = conditionStocks.SingleOrDefault(item => item.StockNo.Equals(e.sTrCode));

                if (conditionStock != null)
                {
                    conditionStock.Status = "편입";
                    conditionStock.upTransferCnt();
                }
                else
                {
                    //conditionStocks.Add(new ConditionStock(e.sTrCode, kiwoomApi.GetMasterCodeName(e.sTrCode)));
                    requestRealtimeQuote(SCREEN_NO_CONDITION, e.sTrCode, conditionStocks.Count > 0 ? REALTIME_ADD : REALTIME_NEW);
                }

                // 실시간으로 여러 종목을 가져올 경우는 없는가? 확인이 필요할듯..
            }
            else if (e.strType.Equals("D"))
            {
                Console.WriteLine("조건검색 실시간 이탈 [" + e.sTrCode + "]");

                ConditionStock conditionStock = conditionStocks.SingleOrDefault(item => item.StockNo.Equals(e.sTrCode));

                if (conditionStock != null)
                {
                    conditionStock.Status = "이탈";
                    removeRealtimeQuote(SCREEN_NO_CONDITION, e.sTrCode);
                }
            }
        }
Example #2
0
 private void axKHOpenAPI1_OnReceiveRealCondition(object sender, AxKHOpenAPILib._DKHOpenAPIEvents_OnReceiveRealConditionEvent e)
 {
     logger.Debug("axKHOpenAPI1_OnReceiveRealCondition");
 }