Download Finance Yahoo Com Api

  • The provided methods will retrieve all of the required information in the least amount of requests possible towards Yahoo Finance. You can change the default timeout of 10s for requests to Yahoo Finance by setting the yahoofinance.connection.timeout system property.
  • Yahoo Finance API changes (2017) Ask Question 24. First, the old Yahoo finance iChart download is gone for good. In one of the forum posts, a Yahoo employee has confirmed that the free EOD data has been terminated, and will not be reintroduced.
  • Thanks to M.Kishinevsky and M. Here's a neat way to download stock data from Yahoo, perhaps into a spreadsheet (so you can play with the data).

Yahoo Finance API Replacement. Google also offers a free finance API but, now that data providers are aware of Yahoo's redistribution redistribution, it seems likely that Google's service will be next. Google doesn't support the API, meaning developers can't get help when a call doesn't work or historical prices are un-adjusted.

I wanted to use Google Finance API to get stock data about the company but this API is deprecated since 2011/26/05.

What do you use as free API to get stock data in real time?

KivaKiva

closed as off-topic by animusonMay 26 '15 at 22:45

Download Finance Yahoo Com Api

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • 'Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.' – animuson
If this question can be reworded to fit the rules in the help center, please edit the question.

5 Answers

Updating answer a bit

1. Try Alpha Vantage API

For beginners you can try to get a JSON output from query such as

DONT Try Yahoo Finance API (it is DEPRICATED or UNAVAILABLE NOW).

  • Here is a link to previous Yahoo Finance API discussion on StackOverflow.
  • Here's an alternate link to Yahoo Finance API posted onGoogle Code.

For beginners, you can generate a CSV with a simple API call:

(This will generate and save a CSV for AAPL, GOOG and MSFT)

Note that you must append the format to the query string (f=..). For an overview of all of the formats see this page.

For more examples, visit this page.

For XML and JSON-based data, you can do the following:

Don't use YQL (Yahoo Query Language)**

For example:

2. Use the webservice

For example, to get all stock quotes in XML:

To get all stock quotes in JSON, just add format=JSON to the end of the URL:

Alternatives:

1. 1Forge Financial APIs

  • Real-time rates for about 40 currency pairs are available here.

2. Financial Content API

  • The documentation for this API is very good.

3. Open Exchange Rates

4. Oanda API

5. XE API

6. Xignite API

7. currencylayer API

8. Other API discussed at programmableWeb

AurAAurA

I'm way late, but check out Quandl. They have an API for stock prices and fundamentals.

Yahoo Finance Rest Api

Yahoo Finance Api Documentation

Yahoo finance rest api

Here's an example call, using Quandl-api download in csv

example:

They support these languages. Their source data comes from Yahoo Finance, Google Finance, NSE, BSE, FSE, HKEX, LSE, SSE, TSE and more (see here).

user2023861user2023861

I'd suggest using TradeKing's developer API. It is very good and free to use. All that is required is that you have an account with them and to my knowledge you don't have to carry a balance ... only to be registered.

ra9rra9r

If you are still looking to use Google Finance for your data you can check this out.

I recently needed to test if SGX data is indeed retrievable via google finance (and of course i met with the same problem as you)

KevinLKevinL

I followed the top answer and started looking at yahoo finance. Their API can be accessed a number of different ways, but I found a nice reference for getting stock info as a CSV here: http://www.jarloo.com/

Using that I wrote this script. I'm not really a ruby guy but this might help you hack something together. I haven't come up with variable names for all the fields yahoo offers yet, so you can fill those in if you need them.

Here's the usage

loadStockInfo returns a hash, such that SpecificData['GOOG']['name'] is 'Google Inc.'

Finally, the actual code to run that...

Jack FranzenJack Franzen

Not the answer you're looking for? Browse other questions tagged apigoogle-apigoogle-financequandl or ask your own question.

How to call the API

All requests begin with a base url of http://finance.yahoo.com/d/quotes.csv and have arguments added onto the end.

The name of the requested stock is added through ?s=%40%5Eindex,stock. eg. ?s=%40%5EDJI,GOOG for Google stock.

Data to download

You then need to choose the data to request. This is done by appending a &f= followed by the different arguments. The list of arguments is available at the bottom of this file.

There are a huge number of data pieces you can download. Many of these were ambigous in the original documentation, and I haven't figured out exactly what they refer to e.g. the difference between ask and ask (realtime), so I've left them how they appear in the original docs.

These can be concatenated eg. if you wanted to download the ask, bid and change in percent you would use &f=abp2

Ratelimit

According to the Yahoo general API documentation, usage is capped at 2,000 requests/hour. This doesn't seem to apply to the finance API however, as I've performed 8,000 requests in 15 minutes before returning HTTP error 999. No true figure is known.

Examples

http://download.finance.yahoo.com/d/quotes.csv?s=%40%5EFTSE,ARM.L&f=sl1vop

This will return the stock ticker, current price, volume, opening price and closing price for the stock FTSEARM.L

API Arguments

ArgumentMeaning
aAsk
yDividend Yield
bBid
dDividend per Share
b2Ask (Realtime)
r1Dividend Pay Date
b3Bid (Realtime)
qEx-Dividend Date
pPrevious Close
oOpen
c1Change
d1Last Trade Date
cChange & Percent Change
d2Trade Date
c6Change (Realtime)
t1Last Trade Time
k2Change Percent (Realtime)
p2Change in Percent
c8After Hours Change (Realtime)
m5Change From 200 Day Moving Average
c3Commission
m6Percent Change From 200 Day Moving Average
gDay's Low
m7Change From 50 Day Moving Average
hDay's High
m8Percent Change From 50 Day Moving Average
k1Last Trade (Realtime) With Time
m350 Day Moving Average
lLast Trade (With Time)
m4200 Day Moving Average
l1Last Trade (Price Only)
t81 yr Target Price
w1Day's Value Change
g1Holdings Gain Percent
w4Day's Value Change (Realtime)
g3Annualized Gain
p1Price Paid
g4Holdings Gain
mDay's Range
g5Holdings Gain Percent (Realtime)
m2Day's Range (Realtime)
g6Holdings Gain (Realtime)
k52 Week High
vMore Info
j52 week Low
j1Market Capitalization
j5Change From 52 Week Low
j3Market Cap (Realtime)
k4Change From 52 week High
f6Float Shares
j6Percent Change From 52 week Low
nName
k5Percent Change From 52 week High
n4Notes
w52 week Range
sSymbol
s1Shares Owned
xStock Exchange
j2Shares Outstanding
vVolume
a5Ask Size
b6Bid Size
k3Last Trade Size
t7Ticker Trend
a2Average Daily Volume
t6Trade Links
i5Order Book (Realtime)
l2High Limit
eEarnings per Share
l3Low Limit
e7EPS Estimate Current Year
v1Holdings Value
e8EPS Estimate Next Year
v7Holdings Value (Realtime)
e9EPS Estimate Next Quarter
s6Revenue
b4Book Value
j4EBITDA
p5Price / Sales
p6Price / Book
rP/E Ratio
r2P/E Ratio (Realtime)
r5PEG Ratio
r6Price / EPS Estimate Current Year
r7Price / EPS Estimate Next Year
s7Short Ratio