private void kiwoomApi_OnReceiveTrCondition(object sender, AxKHOpenAPILib._DKHOpenAPIEvents_OnReceiveTrConditionEvent e) { // 조건검색 요청으로 검색된 종목코드 리스트를 전달하는 이벤트. ';'로 구분 Console.WriteLine("[DEBUG] OnReceiveTrCondition " + e.sScrNo + " " + e.strCodeList); int cnt = e.strCodeList.Trim().Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries).Length; if (cnt > 0) { // 한번에 100 종목을 조회할 수 있는 코드 //axKHOpenAPI1.CommKwRqData(e.strCodeList.Remove(e.strCodeList.Length - 1), 0, cnt, 0, "조건검색종목", 화면번호_조건검색); } }
private void axKHOpenAPI1_OnReceiveTrCondition(object sender, AxKHOpenAPILib._DKHOpenAPIEvents_OnReceiveTrConditionEvent e) { logger.Debug("axKHOpenAPI1_OnReceiveTrCondition"); logger.Debug(e.strCodeList); string[] itemCodeList = e.strCodeList.TrimEnd(';').Split(';'); foreach (string itemCode in itemCodeList) { if (itemCode.Length > 0) { this.opt10001EventHandler.requestTrOpt10001(itemCode, $"관심종목저장TR요청_{e.strConditionName}"); } Thread.Sleep(3000); } }