yahoo finance quotes API and historical data API
Asked Answered
R

4

11

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)

Rode answered 5/3, 2015 at 19:10 Comment(1)
try this : #44379567 it is a working fine under perlBilabial
R
10

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.

Rawlings answered 21/11, 2016 at 0:18 Comment(0)
D
3

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.

Dyaus answered 7/3, 2015 at 20:37 Comment(0)
G
3

You can look at

https://developer.yahoo.com/yql/console/?q=show%20tables&env=store://datatables.org/alltableswithkeys#h=select+*+from+yahoo.finance.historicaldata+where+symbol+%3D+%22YHOO%22+and+startDate+%3D+%222009-09-11%22+and+endDate+%3D+%222010-03-10%22

Golding answered 13/2, 2016 at 22:8 Comment(1)
This is a different interface to the same data mentioned in part 2 of the OP's question. It does not provide company financial metrics.Felicitasfelicitate
J
0

For anyone who's interested: heres how to download data from eodhistoricaldata.com:

https://eodhistoricaldata.com/api/eod/AAPL.US?from=2017-01-05&to=2017-02-10&api_token=OeAFFmMliFG5orCUuwAKQ8l4WWFQ67YX&period=d

Call the url with the following parameters: *eod: 'end of day' this Is only one of many possibilities for download. check their site for the complete list *AAPL.US: the stock in question * from and to: the from and to date *api_token: a token for your account

The result is a csv file, which can be handeled in for instance c# using this example: download csv

Jordain answered 24/9, 2018 at 11:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.