c# – MaasOne yahoo-finance-managed为AlphabeticIDIndexResult
发布时间:2020-12-15 22:00:05 所属栏目:百科 来源:网络整理
导读:我试图使用 http://code.google.com/p/yahoo-finance-managed/来检索所有股票ID的列表 使用以下代码: using MaasOne.Base;using MaasOne.Finance.YahooFinance;using System;using System.Collections.Generic;using System.Linq;using System.Text;namespa
我试图使用
http://code.google.com/p/yahoo-finance-managed/来检索所有股票ID的列表
使用以下代码: using MaasOne.Base; using MaasOne.Finance.YahooFinance; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Elance___Yahoo_Finance_Symbols { class Program { static void Main(string[] args) { AlphabeticIDIndexDownload dl1 = new AlphabeticIDIndexDownload(); dl1.Settings.TopIndex = null; Response<AlphabeticIDIndexResult> resp1 = dl1.Download(); Console.Write("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); int i = 0; foreach (var item in resp3.Result.Items) { Console.Write(item.ID + "|" + item.ISIN + "|" + item.Name + "|" + item.Exchange + "|" + item.Type + "|" + item.Industry); } } } } } } 但是 Response<AlphabeticIDIndexResult> resp1 = dl1.Download(); 总是返回零结果…… 有谁知道可能有什么问题吗? 谢谢 解决方法
我有一个使用这个API的应用已经工作了大约一年,我看到了昨天的相同问题. :(也许雅虎改变了他们的API,这真的很糟糕.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |