Display stocks data from Google Finance or Yahoo! Finance
Asked Answered
A

9

14

Can I use the Google Finance API to get stock data?

If there is a Flash or Javascript viewer for such stocks data it would be good.
I found some chart components that could be used for the same:

Arredondo answered 27/12, 2008 at 19:1 Comment(0)
A
7

Yahoo! Finance gives you real-time stock quotes. Data is returned as a CSV.

See this NASDAQ page at http://finance.yahoo.com/q?s=^IXIC

  1. Click the Download Data button to access live data

  2. Click the Download To Spreadsheet button to access historical data

You can access that data from Flash using the LoadVars or URLLoader classes. Use unescape() to decode the string from its URL-encoded format.

Arredondo answered 28/12, 2008 at 0:36 Comment(2)
CSV is one way to get the data, but they also offer XML and JSON through YQL. You can read about it here jarloo.com/tutorials/get-yahoo-finance-api-data-via-yqlAdvantage
@Kelly. FY: your link is missing the www in front of it. Here's the link with it: jarloo.com/get-yahoo-finance-api-data-via-yqlAwning
A
10

Thats cleared out, Dion Loy, a Google employee recently affirmed that it was perfectly legal to use the Finance API on commercial websites.

"You can use our APIs for commercial or non-commercial purposes."

Using Google Finance Portfolio Data javascript API, via MarkMail.

"Yes, it is fine to use the portfolio API in a commercial application."

Using Google Finance API in commercial app?, via MarkMail.

Arredondo answered 27/12, 2008 at 19:46 Comment(0)
A
7

Yahoo! Finance gives you real-time stock quotes. Data is returned as a CSV.

See this NASDAQ page at http://finance.yahoo.com/q?s=^IXIC

  1. Click the Download Data button to access live data

  2. Click the Download To Spreadsheet button to access historical data

You can access that data from Flash using the LoadVars or URLLoader classes. Use unescape() to decode the string from its URL-encoded format.

Arredondo answered 28/12, 2008 at 0:36 Comment(2)
CSV is one way to get the data, but they also offer XML and JSON through YQL. You can read about it here jarloo.com/tutorials/get-yahoo-finance-api-data-via-yqlAdvantage
@Kelly. FY: your link is missing the www in front of it. Here's the link with it: jarloo.com/get-yahoo-finance-api-data-via-yqlAwning
A
2

About the legality of using Yahoo Finance data via the API:

Khalid, from the Drupal project recently assured us that although Yahoo! is aware of the use of its CSV's by third parties (automated scripts and the like) Yahoo! allows them to take it, even for commercial websites!

Officially, there is no explicit permission to use stock data from Yahoo in scripts. However, in reality, there are tons of scripts in every language imaginable (PHP, Perl, .asp, java, ...etc.) that use that data all over the internet. Just do a Google search and see how many there are.

It seems Yahoo realize that many people are using the data in this way, and turn a blind eye to it.

~ Legality of use of Yahoo! data on commercial website?

Arredondo answered 30/12, 2008 at 21:19 Comment(0)
M
2

As an alternative to Google Finance, consider http://www.mergent.com/servius (the Historical Securities Data API)

Mcspadden answered 19/10, 2010 at 6:22 Comment(1)
This is a commercial API and data serviceGaby
U
2

Several points:

1) Google has recently deprecated the finance API: http://code.google.com/apis/finance/

2) From reading discussions on the forums, google does not have rights to deliver stock quotes, only portfolio performance data, so there is no direct way to get a quote via the API

3) Several items are broken in the web service at this point such as the ability to get market value for a position or portfolio and ability to get the cash position in a portfolio

Yahoo finance seems the best option at this point.

Usual answered 2/6, 2011 at 16:33 Comment(0)
D
1

Had a look into this a while ago but, as far as I can tell, google dont let you use their finance data outside of google itself. So, you could use it in a google gadget but you're not allowed to re-publish the finance data outside of google. I assume its something to do with googles licence terms on all that (expensive) market data. If I'm wrong.. someone please please reply and let me know as I could do to do something similar ;)

Matt

Derayne answered 27/12, 2008 at 19:36 Comment(0)
I
1

I experienced the same problem, that is, if I executed my flex apps locally all worked fine, but when I published it on the server I got 2048 sandbox error. I think that the problem is caused by the crossdomain.xml file on yahoo finance server; if I am right, you can solve it in this way: your flex app do not have to call directly yahoo finance download page but another page (that you can make with php,jsp, asp) that call yahoo finance download page and returns you the data.

Infinitesimal answered 19/11, 2011 at 8:20 Comment(0)
A
0

It looks like at least yahoo is charging for real-time quotes now:

http://billing.finance.yahoo.com/realtime_quotes/signup?.src=quote&.refer=quote

Acrospire answered 23/9, 2009 at 23:2 Comment(0)
S
0

When I try to access the URL, I get this problem..

Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation

Scissor answered 2/10, 2009 at 20:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.