简体   繁体   English

如何获取雅虎财经网络搜索API的关键统计数据?

[英]How to get key statistics for yahoo finance web search api?

I am working on retrieving yahoo finance companies data and I was succeeded in getting the companies stock data. 我正在检索雅虎财务公司的数据,我成功地获得了公司的股票数据。 Apart from the basic data I am also trying to retrieve key statistics data for the same company. 除了基本数据,我还试图检索同一公司的关键统计数据。 Below image is the key statistics fields which I require. 下图是我需要的关键统计字段。

在此输入图像描述

I am using yahoo web service api to get the stock data. 我正在使用yahoo web service api来获取股票数据。 But when I am trying to add the parameters like f=nab and f=snbaopl1 , I am getting 406 error response code . 但是当我试图添加像f = nabf = snbaopl1这样的参数时,我得到406错误响应代码 The below is the finance api which I am using. 以下是我正在使用的财务api。

http://finance.yahoo.com/webservice/v1/symbols/SPARC.BO/quote?format=json&view=detail&f=nab

If that is the way to give then how should I get the stocks key statistics for companies. 如果这是给出的方式那么我应该如何获得公司的股票关键统计数据。

You can try access this link: 您可以尝试访问此链接:

https://query2.finance.yahoo.com/v10/finance/quoteSummary/YOUR_COMPANY_SYMBOL?modules=ANY_PERMITTED_MODULE_SEPPARATED_BY_COMMAS https://query2.finance.yahoo.com/v10/finance/quoteSummary/YOUR_COMPANY_SYMBOL?modules=ANY_PERMITTED_MODULE_SEPPARATED_BY_COMMAS

i found some modules that i think are interesting: 我发现了一些我觉得很有趣的模块:

assetProfile
financialData
defaultKeyStatistics
calendarEvents
incomeStatementHistory
cashflowStatementHistory
balanceSheetHistory

this link will response with a json file. 此链接将使用json文件进行响应。

I have succeeded in getting yahoo finance key_statistics data by using the following quotes api http://finance.yahoo.com/d/quotes.csv?s=MSFT&f=snd1l1ydrbj1mt8opjk 我已成功通过使用以下引号获取雅虎财务key_statistics数据api http://finance.yahoo.com/d/quotes.csv?s=MSFT&f=snd1l1ydrbj1mt8opjk

By default the api will display the output in csv format if we want we can also convert the CSV output to JSON format.The quotes api is working perfectly fine to my requirement in getting the above mentioned statistics which are given as f=snd1l1ydrbj1mt8opjk and also getting the JOSN format by converting the csv output to JSON. 默认情况下,如果我们希望我们也可以将CSV输出转换为JSON格式,api将以csv格式显示输出。引号api完全符合我的要求,可以获得上面提到的统计数据,这些统计数据以f = snd1l1ydrbj1mt8opjk给出,并且通过将csv输出转换为JSON来获取JOSN格式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM