The yahoo finance quotes API(http://download.finance.yahoo.com/d/quotes.csv?) provides access to a number of features associated with a company for the current year
(Sector Price
Dividend Yield
Price/Earnings
Earnings/Share
Book Value
52 week low
52 week high
Market Cap
EBITDA
Price/Sales
Price/Book).
The yahoo finance historicaldata api (http://ichart.finance.yahoo.com/table.csv?) provides only the following information for a company for a period specificed (start YYMMDD, end YYMMDD)
> "Open": "15.32",
> "High": "15.35",
> "Low": "15.13",
> "Close": "15.24",
> "Volume": "20126900",
> "Adj_Close": "15.24"
How can I get historical data for Dividend Yield,Price/Earnings, Earnings/Share associated with a company? (because right now I can only get information related to the current year using the finance.quotes API and I cannot get historical data associated with these features)
You can view historical price, dividend, and split data for most quotes in Yahoo Finance to forecast the future of a company or gain market insight.
The Yahoo Finance API is a RESTful API that provides access to financial data. This data includes stock quotes, historical prices, and company information. The API is free to use and does not require an API key. The Yahoo Finance API is available in both JSON and XML format.
Yahoo Finance API is Discontinued.
Announcement: Yahoo Finance API discontinued (Update 2017-11-04: Version 217) – Bluecoins.
In order get historical dividends you can add "g=v"
to your query as follows
http://ichart.finance.yahoo.com/table.csv?s=MSFT&g=v
This will give you the following fields
Date
Dividends
I would credit where I found this information but I do not remember where I got it. Even as I search other sites I cannot find details on this API at all.
It's going to be difficult to find the data you require for free. This is why people who provide financial data, like Michael Bloomberg, are billionaires.
One option you could try is Quandl. I successfully used their Wiki Stock db as a backup for the Yahoo historical data api, as well as the primary source for some hard-to-find indices. You might be able to calculate some of the data you require from their free databases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With