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?
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?
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.
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)
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...
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).
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
andJSON
-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 addformat=JSON
to the end of the URL:Alternatives:
1. 1Forge Financial APIs
2. Financial Content API
3. Open Exchange Rates
4. Oanda API
5. XE API
6. Xignite API
7. currencylayer API
8. Other API discussed at programmableWeb
I'm way late, but check out Quandl. They have an API for stock prices and fundamentals.
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).