예제 #1
0
        private void button8_Click(object sender, EventArgs e)
        {
            MdApi md  = MdApi.Instance;
            int   ret = md.Init("*****@*****.**", "Chs771005", MDMode.MD_MODE_NULL);

            if (ret != 0)
            {
                //登录失败
                return;
            }
            List <TradeDate> trade_dates  = md.GetCalendar("SHSE", "2016-01-01", "2016-03-29");
            DateTime         startTimeUTC = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));

            foreach (TradeDate date in trade_dates)
            {
                date.strtime = startTimeUTC.AddSeconds(date.utc_time).ToString();
            }
            ShowData(trade_dates.OfType <object>().ToList());
        }