c# – MaasOne yahoo-finance-managed为AlphabeticIDIndexResult返回零结果
作者:互联网
我试图使用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,这真的很糟糕.
标签:c,yahoo-api,yahoo-finance 来源: https://codeday.me/bug/20190708/1406725.html