获取所有股票符号股市 - 明智 [英] Get All Stock Symbols Stock-Market-Wise

查看:112
本文介绍了获取所有股票符号股市 - 明智的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

当天的问候!



我没有太多的Yahoo Finance API经验。我需要使用这个API从雅虎获得股票市场的所有股票代码。有人可以帮我实现这个目的吗?



我认为这可以通过从雅虎下载股票数据来实现。



我已尝试通过 http://code.google访问示例代码。 com / p / yahoo-finance-managed / [ ^ ]但没有运气。



我很感激任何帮助。





到目前为止我已尝试过这个:



 TextWriter tw = File.CreateText(  StockData.csv); 
AlphabeticIDIndexDownload dl1 = new AlphabeticIDIndexDownload();
dl1.Settings.TopIndex = null ;
响应< AlphabeticIDIndexResult> resp1 = dl1.Download();

tw.WriteLine( Id | Isin |名称|交换|类型|行业< /跨度>);
Console.WriteLine( Id | Isin |名称|交换|类型|行业) ;
foreach var alphabeticalIndex in resp1.Result.Items)
{
AlphabeticalTopIndex topIndex =(AlphabeticalTopIndex)alphabeticalIndex;
dl1.Settings.TopIndex = topIndex;
响应< AlphabeticIDIndexResult> resp2 = dl1.Download();
foreach var index in resp2.Result.Items)
{
IDSearchDownload dl2 = new IDSearchDownload();
回复< 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 + < span class =code-string> |
+ item.Exchange + | + item.Type + + item.Industry + Exchange: + item.Exchange);
}
}
}







最好的问候,

Sunny

解决方案

您确定无法获得此代码示例。



我可以从链接 [ ^ ]以及来自此处 [ ^ ]

Hi everyone,
Greetings for the day!

I don''t have much experience of Yahoo Finance API. I''m required to get all the stock symbols stock-market-wise from yahoo using this API. Can somebody please help me to achieve this purpose?

I think this could be achieved by downloading the ticker data from Yahoo.

I''ve tried getting into the sample codes at http://code.google.com/p/yahoo-finance-managed/[^] but no luck.

I appreciate any little help.


I''ve tried this so far:

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




Best Regards,
Sunny

解决方案

Are you sure you cant get this code samples.

I can download the code from this link[^] and sample codes from here[^]


这篇关于获取所有股票符号股市 - 明智的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆