2021年11月30日 星期二

EZChart Data

意外看到EZChart臺灣股市歷史資料
寫一下程式把資料爬出來

static void Main(string[] args) { var file = File.OpenRead(@"C:\Program Files (x86)\ezChart\Data\0050.dat"); var size = file.Length; using (var br = new BinaryReader(file)) { long readsize = 0; while (size > readsize) { int date = br.ReadInt32(); decimal opening = (decimal)br.ReadInt32() / 100; decimal highest = (decimal)br.ReadInt32() / 100; decimal lowest = (decimal)br.ReadInt32() / 100; decimal closing = (decimal)br.ReadInt32() / 100; int volume = br.ReadInt32(); Console.WriteLine($"date: {date},opening: {opening}, highest: {highest}, lowest: {lowest}, closing: {closing}, volume: {volume}"); readsize += sizeof(Int32) * 6; } } }

https://ez1data.blogspot.com/2024/11/ezchart-1131127.html?m=1

沒有留言:

張貼留言

預測2031/1/1可能 TWCA 憑證 IOS會出現不信任

緣由: TWCA CYBER Root CA 有兩張、兩個效期 (2030、2047年到期) 推測TWCA 預計 2030年12月會停用: TWCA CYBER Root CA (2030 年到期) TWCA Global Root CA 改用啟用: TWCA CYBER ...