internal void RequestHistoricalData(QotCommon.QotMarket market, string code, DateTime beginTime, DateTime endTime, QotCommon.KLType kLType) { QotRequestHistoryKL.Request.Builder reqBuilder = QotRequestHistoryKL.Request.CreateBuilder(); QotRequestHistoryKL.C2S.Builder csReqBuilder = QotRequestHistoryKL.C2S.CreateBuilder(); QotCommon.Security.Builder stock = QotCommon.Security.CreateBuilder(); stock.SetCode(code); stock.SetMarket((int)market); csReqBuilder.Security = stock.Build(); csReqBuilder.KlType = (int)kLType; csReqBuilder.BeginTime = beginTime.ToString("yyyy-MM-dd"); csReqBuilder.EndTime = endTime.ToString("yyyy-MM-dd"); reqBuilder.SetC2S(csReqBuilder); qot.RequestHistoryKL(reqBuilder.Build()); }
protected override QotRequestHistoryKL.Request.Builder MakeReqBuilder(ReqHisKL request) { QotRequestHistoryKL.Request.Builder reqBuilder = QotRequestHistoryKL.Request.CreateBuilder(); QotRequestHistoryKL.C2S.Builder csReqBuilder = QotRequestHistoryKL.C2S.CreateBuilder(); QotCommon.Security.Builder stock = QotCommon.Security.CreateBuilder(); stock.SetCode(request.Security.Code); stock.SetMarket((int)request.Security.Market); csReqBuilder.Security = stock.Build(); csReqBuilder.RehabType = (int)request.RehabType; csReqBuilder.KlType = (int)request.KLType; csReqBuilder.BeginTime = request.Begin.ToString("yyyy-MM-dd"); csReqBuilder.EndTime = request.End.ToString("yyyy-MM-dd"); reqBuilder.SetC2S(csReqBuilder); return(reqBuilder); }