Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yahoo finance quotes API and historical data API

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)

like image 256
mathopt Avatar asked Mar 05 '15 19:03

mathopt


People also ask

Does Yahoo Finance have historical data?

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.

What API does Yahoo Finance use?

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.

What happened to Yahoo Finance API?

Yahoo Finance API is Discontinued.

When was Yahoo Finance API discontinued?

Announcement: Yahoo Finance API discontinued (Update 2017-11-04: Version 217) – Bluecoins.


2 Answers

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.

like image 80
John G Avatar answered Oct 03 '22 03:10

John G


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.

like image 26
wooters Avatar answered Oct 03 '22 05:10

wooters