Ejemplo n.º 1
0
        public void 종목일별시세가져오기(string code, string cts_date)
        {
            if (query == null)
            {
                query                 = new XAQueryClass();
                query.ReceiveData    += query_ReceiveData;
                query.ReceiveMessage += query_ReceiveMessage;
                query.LoadFromResFile($".\\res\\{resName}.res");
            }

            query.SetFieldData(inBlock, "shcode", 0, code);
            query.SetFieldData(inBlock, "gubun", 0, "2");
            query.SetFieldData(inBlock, "qrycnt", 0, "5");
            query.SetFieldData(inBlock, "sdate", 0, DateTime.Today.AddDays(7).ToString("yyyyMMdd"));
            query.SetFieldData(inBlock, "edate", 0, DateTime.Today.ToString("yyyyMMdd"));
            query.SetFieldData(inBlock, "cts_date", 0, cts_date);
            query.SetFieldData(inBlock, "comp_yn", 0, "N");

            if (string.IsNullOrEmpty(cts_date))
            {
                query.Request(false);
            }
            else
            {
                query.Request(true);
            }
        }
Ejemplo n.º 2
0
 public void Load()
 {
     if (query == null)
     {
         query                 = new XAQueryClass();
         query.ReceiveData    += query_ReceiveData;
         query.ReceiveMessage += query_ReceiveMessage;
         query.LoadFromResFile($".\\res\\{resName}.res");
     }
     query.SetFieldData(inBlock, "gubun", 0, "");
     query.Request(false);
 }
Ejemplo n.º 3
0
        public Api_IndexFutureTrade()
        {
            this.resName = "CFOAT00100";
            inBlock      = resName + "InBlock1";
            outBlock1    = resName + "OutBlock1";
            outBlock2    = resName + "OutBlock2";

            if (query == null)
            {
                query                 = new XAQueryClass();
                query.ReceiveData    += query_ReceiveData;
                query.ReceiveMessage += query_ReceiveMessage;
                query.LoadFromResFile($".\\res\\{resName}.res");
            }
        }
Ejemplo n.º 4
0
        public BaseTradeApi(string resName)
        {
            this.resName = resName;
            inBlock      = resName + "InBlock";
            outBlock     = resName + "OutBlock";
            outBlock1    = resName + "OutBlock1";
            outBlock2    = resName + "OutBlock2";

            if (query == null)
            {
                query                 = new XAQueryClass();
                query.ReceiveData    += query_ReceiveData;
                query.ReceiveMessage += query_ReceiveMessage;
                query.LoadFromResFile($".\\res\\{resName}.res");
            }
        }