微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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,这真的很糟糕.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐