4

最近几天我一直在寻找这个。我已经通过 YQL 实现了获取基本的东西,比如他们的股票、价格等等。

像这样 :

从 yahoo.finance.quotes 中选择 Name、Symbol、LastTradePriceOnly、LastTradeDate、LastTradeTime、Change、ChangeInPercentage、PreviousClose、Open、Bid、Ask、DaysRange、YearRange、Volume 、Average、MarketCapitalization、PERatio、EPSEstimateCurrentYear、TralingAnnualDividendYield,其中 symbol = 'aapl'

但我不知道如何在国家/地区获得股票报价。首先,我没有获得 YQL 来获取与股票相关的国家/地区。

例如:从 yahoo.finance.quotes 中选择 Name,Symbol,其中 Country = "India"。

谢谢你的时间。

4

4 回答 4

2

以这种方式使用 YQL 基本上是查找您提供的给定股票代码的结果。(在幕后,这个 YQL 表正在查询 Yahoo Finance 使用的数据源。)它不是一个通用数据库,您可以在其中进行查询,例如获取给定国家/地区的符号或市场列表。

YQL 确实适用于一些国际市场股票,但您需要再次知道该符号。例如:

select * from yahoo.finance.quotes where symbol="arm.l"

select * from yahoo.finance.quotes where symbol="kfa.bo"

于 2012-06-20T00:51:44.500 回答
1

雅虎 API 似乎不适用于国际交易所。尝试这个:

select * from yahoo.finance.quotes where symbol="ril.bo"

查询有效并且不返回任何数据。这是我得到的样本:

"Name": "RIL.BO",
"Notes": null,
"Open": null,
"PreviousClose": null,
"PricePaid": null,
"ChangeinPercent": null,
"PriceSales": null,
"PriceBook": null,
"ExDividendDate": null,
"PERatio": null,
"DividendPayDate": null,
"PERatioRealtime": null,
"PEGRatio": null,
"PriceEPSEstimateCurrentYear": null,
"PriceEPSEstimateNextYear": null,
"Symbol": "RIL.BO",

YQL 提供了一个线索,表明它不是为国际交易所设置的。隐藏在 JSON 中的是消息:

"ErrorIndicationreturnedforsymbolchangedinvalid": "No such ticker symbol. <a href=/l>Try Symbol Lookup</a> (Look up: <a href=/l?s=RIL.BO>RIL.BO</a>)",

请注意,我使用的符号是有效的,并且来自 Yahoo! 自己的查找。

对于美国交易所来说,一切都很好。尝试用 GOOG 或 YHOO 代替 RIL.BO。奇迹般有效。

于 2014-01-12T07:53:46.170 回答
1

我正在寻找同样的东西,我原以为你需要使用市场名称而不是国家名称。即纳斯达克、富时或疯牛病。

于 2012-06-13T10:29:01.583 回答
0

有一个世界明智地区的重要证券交易所代码列表-http: //finance.yahoo.com/intlindices ?e=asia ,我在这里解释了 URL 和查询逻辑-http://prasanta-paul.blogspot。 kr/2013/01/accessing-yahoo-finance-api.html

希望能帮助到你!

于 2013-01-05T15:53:42.583 回答