33

Yahoo finance recently discontinued their API. I have been looking for alternatives. The ones I've found so far are Google Finance and Quandl.

Google Finance was deprecated in 2011 but still appears to work somewhat. However, there is little to no documentation, and I need to pull dividend data which I was unable to find.

Quandl appears to work well but the data is spread across multiple databases which makes getting appropriate access timely and costly.

Does anyone know of any other viable alternatives?

msanford
  • 11,803
  • 11
  • 66
  • 93
Alex F
  • 2,086
  • 4
  • 29
  • 67
  • The comment I would like to add to this answer is that the big thing missing is split & dividend adjusted returns. Even just the raw split/dividend data would allow us to derive what we need. – Laereom May 22 '17 at 02:01
  • You can still use the Yahoo API: See http://stackoverflow.com/a/44050039/2279831 – Eduardo May 22 '17 at 10:32
  • 31
    Off topic? what is wrong with people here god, this is the most valuable question in here . Get out of your box !! – Curnelious Jun 09 '17 at 12:59
  • 1
    Someone created a package to fix the yahoo api https://pypi.python.org/pypi/fix-yahoo-finance. – Alex F Jun 16 '17 at 12:26
  • See https://stackoverflow.com/questions/47064776/has-yahoo-suddenly-today-terminated-its-finance-download-api/47148296#47148296 for a workaround. – mti2935 Nov 07 '17 at 01:03
  • Yahoo finance API Discontinued 2017-11-06 – Json Nov 19 '17 at 14:41

1 Answers1

27

Alpha Vantage have real-time intraday as well as historical daily time series in JSON format. Accessing the data requires an API key but it is free.

Caveat: I have not yet used Alpha Vantage myself. The focus of my work requires long daily data series and for that Quandl (or, while it lasted, Yahoo) is better because (unlike Alpha Vantage) it provides both split-adjusted and un-adjusted data, which is helpful for tracking corporate actions etc.

Candamir
  • 586
  • 9
  • 22
  • The data looks great, but when querying the API you get No 'Access-Control-Allow-Origin' header is present on the requested resource. – Dan Whiteside May 23 '17 at 12:10
  • Did you get your own API key? That API key must then be included in the URL that you use to make a request. See examples in their documentarion [here](http://www.alphavantage.co/documentation/). If that's not your problem I'm afraid I can't help you any further; as said I don't use Alpha Vantage myself but simply wanted to point it out to people who need real-time intraday data. – Candamir May 23 '17 at 12:24
  • 1
    Yeah I've added the API, I was using the historical data from Yahoo so just looking for alternatives! I may drop their support an email. – Dan Whiteside May 24 '17 at 07:11
  • The data is very thorough, but it doesn't seem to have dividends. Am I mistaken? – Alex F May 24 '17 at 19:19
  • I don't think so. – Candamir May 24 '17 at 21:23
  • 2
    Alpha Vantage now supports split-adjusted price as well - e.g., [link] (http://www.alphavantage.co/query?function=TIME_SERIES_DAILY_ADJUSTED&symbol=MSFT&outputsize=full&apikey=demo) – Steve Carino May 26 '17 at 07:30
  • 3
    I was able to change my python code from using the unreliable Yahoo Finance API to using the [Alpha Vantage API](http://www.alphavantage.co/documentation/) in about a day. I generated an API key and was ready to go. So far so good, and the data returned matches the data sets I compared it with from previous Yahoo calls. – Derk May 27 '17 at 21:10
  • Here's a package someone wrote to use your previous code as is https://pypi.python.org/pypi/fix-yahoo-finance – Alex F Jun 16 '17 at 12:27
  • 3
    Does anyone know their business model? Plus, I haven't been able to find any contact info, business address, or information about anyone who works there on their website. I'd love to use their API, but I can't find anything that suggests I can trust them. – jennEDVT Jul 03 '17 at 16:03
  • Not on my computer now so can't look into it in detail but I was once in touch with them via support@alphavantage.co (you should be able to find this address and perhaps other contact details on the website). It took them a few days to reply but they were friendly and helpful. – Candamir Jul 03 '17 at 21:36
  • I too am interested in their business model. I need to know how they make money off this (like google who depend on ad or is it nagware). That will help me know how stable it is and nuisances I have to deal with. – Phil Aug 29 '17 at 17:35
  • 1
    I've written a blog post on using Alpha Vantage to acquire stock data: http://www.the-data-wrangler.com/acquiring-stock-market-data-from-alpha-vantage/ – Ashley Davis Nov 02 '17 at 22:34
  • 1
    Alpha Vantage is not flexible at all. It can only return 100 results or "all" results. You can't even specify a business date. Use Barchart instead: https://www.barchart.com/ondemand/free-market-data-api – ProgrammingWithRandy Nov 14 '17 at 21:51
  • It has a problem in converting to and from MYRf and SBDf, namely, Malaysian Ringgit and Solomon Islands Dollar. I'm trying to contact them to fix the problem. – Shadi Alnamrouti Dec 28 '17 at 10:15
  • Alpha Advantage's free API is not so generous. "In certain use cases that exceed our standard API volume limit (5 API requests per minute; 500 API requests per day" according to their web page. – kawingkelvin Dec 31 '19 at 18:13
  • Alpha Vantage doesn't support the markets in ASIAN countries. Please recommend me other ways. – Soonmyun Jang Jun 09 '21 at 15:58