public void DownloadDates() { string tradingdaypath = pathutils.GetPath_Tradingday(); int tradingDay = -1; List <int> tradingDays = null; if (File.Exists(tradingdaypath)) { tradingDays = CsvUtils_TradingDay.Load(tradingdaypath); tradingDay = tradingDays[tradingDays.Count - 1]; } List <string[]> arr = Download_DayKLine.RequestIndex("sh000001", tradingDay); if (tradingDays == null) { tradingDays = new List <int>(arr.Count); } for (int i = 0; i < arr.Count; i++) { try { tradingDays.Add(int.Parse(arr[i][0])); } catch (Exception e) { Console.WriteLine(arr[i]); Console.WriteLine(e.Message); } } CsvUtils_TradingDay.Save(tradingdaypath, tradingDays); }
public void TestDownloadKLine() { List <string[]> arr = Download_DayKLine.RequestIndex("sz000002", 20171009); for (int i = 0; i < arr.Count; i++) { Console.WriteLine(ListUtils.ToString(arr[i])); } }
private static void AppendKLineData(string code, string path, int lastUpdatedDate) { List <string[]> arr = Download_DayKLine.RequestCode(code, lastUpdatedDate); SaveData(path, arr); }