コード例 #1
0
 public void TestPreRestoration()
 {
     ClientApi clientApi = new ClientApi("http://quantum1234.cloudapp.net:6688/api");
     IEnumerable<IStockBonus> bonus = clientApi.GetStockBonus("002498");
     IEnumerable<IStockKLine> kLines = clientApi.GetStockKLine(KLineType.Day, "002498", new DateTime(2013, 8, 1), new DateTime(2016, 2, 1));
     IStockKLine testDayKLine = kLines.FirstOrDefault(p => (p.Time.Year == 2013 && p.Time.Month == 8 && p.Time.Day == 27));
     IStockKLine newStockKLine = testDayKLine.KLinePreRestoration(bonus);
     Assert.AreEqual(1.84, newStockKLine.Close);
 }
コード例 #2
0
        public void TestStockBonusClient()
        {
            using (var client = new ClientApi(serverAddress))
            {
                var result = client.GetStockBonus("600036");

                Assert.IsNotNull(result);
            }
        }