4

I am trying to use http://code.google.com/p/yahoo-finance-managed/ to retrieve a list of all stock ids

with the following code:

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);
                }

            }
        }

    }
}
}

but the

Response<AlphabeticIDIndexResult> resp1 = dl1.Download();

is always returning zero results...

Does anyone know what might be wrong please?

Thanks

lionheart
  • 423
  • 2
  • 4
  • 17
Trevor Daniel
  • 3,785
  • 12
  • 53
  • 89

1 Answers1

1

I have an app using this API that's been working for about a year, and I see the same issue as of yesterday. :( Perhaps Yahoo changed their API, which would really suck.

Dan Austin
  • 79
  • 1
  • 4
  • im new to maas. only started trying to work it out today. when I debug .download() in maas it looks like something with yahoo url is broken... still not sure... :( – Trevor Daniel Jan 02 '14 at 22:19