yahoo-finance-api
yahoo-finance-api copied to clipboard
Statistics Tab
I've checked the code and it doesn't look like the "Statistics" tab data is queryable for a stock.
Is the data on this page able to be returned? I'm trying to access data in the balance sheet for Total Debt/Equity (mrq).
Thanks again love your work!
I'm not aware of an API endpoint to retrieve that data. If you find one, let's talk about adding it to the library. (To be clear, parsing the HTML I'm not considering an option).
As a workaround, some of these stats should be available on the stock object.
Ok thanks for the response. I don't see those stats in the stock object unfortunately.
Good news, I found an endpoint which has the debt to equity value returned. Here is an example of how to use it.
https://query1.finance.yahoo.com/v10/finance/quoteSummary/FMG.AX?modules=assetProfile,defaultKeyStatistics,financialData,recommendationTrend,upgradeDowngradeHistory,majorHoldersBreakdown,insiderHolders,netSharePurchaseActivity,earnings,earningsHistory,earningsTrend,industryTrend,indexTrend,sectorTrend
Do you have time to implement this feature?
The data from defaultKeyStatistics
and financialData
seems to be pretty much what's shown on that statistics page. I could imagine this being interesting to other people as well.
I'd accept a PR to add a method for retrieving these statistics, my suggestion would be to parse it into a StatisticsData
object.
Ok let me code something up then.
Great, a first rough draft would be good enough. Would suggest to implement some of the fields, so we get an idea of the implementation and then we can extend from there.