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?
Updating answer a bit
1. Try Alpha Vantage API
For beginners you can try to get a JSON output from query such as
https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=MSFT&apikey=demo
DON'T Try Yahoo Finance API (it is DEPRECATED or UNAVAILABLE NOW).
For beginners, you can generate a CSV with a simple API call:
http://finance.yahoo.com/d/quotes.csv?s=AAPL+GOOG+MSFT&f=sb2b3jk
(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:
http://developer.yahoo.com/yql/console/?q=select%20*%20from%20yahoo.finance
.quotes%20where%20symbol%20in%20(%22YHOO%22%2C%22AAPL%22%2C%22GOOG%22%2C%22
MSFT%22)%0A%09%09&env=http%3A%2F%2Fdatatables.org%2Falltables.env
2. Use the webservice
For example, to get all stock quotes in XML
:
http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote
To get all stock quotes in JSON
, just add format=JSON
to the end of the URL:
http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote?format=json
1. Currency API
5. Oanda API
6. XE API
7. Xignite API
9. Other APIs - discussed at programmableWeb