public void InquireDayInfo(string code, string endDate) { axKHOpenAPI1.SetInputValue("종목코드", code); axKHOpenAPI1.SetInputValue("기준일자", endDate); axKHOpenAPI1.SetInputValue("수정주가구분", "1"); int nRet; if (true) // TODO do i neeed 연속조회 { // 신규조회 nRet = axKHOpenAPI1.CommRqData("주식일봉차트조회", "OPT10081", 0, "1002"); } else { // 연속조회 nRet = axKHOpenAPI1.CommRqData("주식일봉차트조회", "OPT10081", 2, "1002"); } if (nRet == 0) { control.Print("주식정보요청 성공"); } else { control.Print("주식정보요청 실패"); } }
public string GetCurrentStock(String 종목코드 = "035420") { //035420 <--네이버종목번호\ this.axKHOpenAPI.SetInputValue("종목코드", 종목코드); int nRet = axKHOpenAPI.CommRqData("주식기본정보", "OPT10001", 0, ScreenNumber.getClass1Instance().GetEosScrNum()); return("sdfsdf:"); }
public void SendRequestAccountInfo() { axKHOpenAPI1.SetInputValue("계좌번호", currentAccount); axKHOpenAPI1.SetInputValue("비밀번호", ""); axKHOpenAPI1.SetInputValue("비밀번호입력매체구분", "00"); int result = axKHOpenAPI1.CommRqData("계좌평가내역요청", "OPW00018", 0, Util.GetScrNum()); }
//---------------------------------------------------------- Request ---------------------------------------------------------- public void requestTrAccountBalance(string account) { // opw00018 : 계좌평가잔고내역요청 openApi.SetInputValue("계좌번호", account); openApi.SetInputValue("비밀번호", ""); openApi.SetInputValue("비밀번호입력매체구분", "00"); openApi.SetInputValue("조회구분", "1"); openApi.CommRqData("trAccountBalance", "opw00018", 0, SCREEN_NO_ACCOUNT_INFO); }
private void InputValueRqData(TR param) { string[] count = param.ID.Split(';'), value = param.Value.Split(';'); int i, l = count.Length; for (i = 0; i < l; i++) { axAPI.SetInputValue(count[i], value[i]); } Error_code = axAPI.CommRqData(param.RQName, param.TrCode, param.PrevNext, param.ScreenNo); if (Error_code != 0) { SendError?.Invoke(this, new Error(Error_code)); } }