TextWriter tw = File.CreateText("StockData.csv"); AlphabeticIDIndexDownload dl1 = new AlphabeticIDIndexDownload(); dl1.Settings.TopIndex = null; Response<AlphabeticIDIndexResult> resp1 = dl1.Download(); tw.WriteLine("Id|Isin|Name|Exchange|Type|Industry"); Console.WriteLine("Id|Isin|Name|Exchange|Type|Industry"); foreach (var alphabeticalIndex in resp1.Result.Items) { AlphabeticalTopIndex topIndex = (AlphabeticalTopIndex)alphabeticalIndex; dl1.Settings.TopIndex = topIndex; Response<AlphabeticIDIndexResult> resp2 = dl1.Download(); foreach (var index in resp2.Result.Items) { IDSearchDownload dl2 = new IDSearchDownload(); Response<IDSearchResult> resp3 = dl2.Download(index); foreach (var item in resp3.Result.Items) { tw.WriteLine(item.ID + "|" + item.ISIN + "|" + item.Name + "|" + item.Exchange + "|" + item.Type + "|" + item.Industry); Console.WriteLine(item.ID + "|" + item.ISIN + "|" + item.Name + "|" + item.Exchange + "|" + item.Type + "|" + item.Industry + "Exchange: " + item.Exchange); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)