views:

8314

answers:

7

How can I link up the Google Finance API to display stock data in Flash?

  • Any Flash + JavaScript mashup code would be great!
  • Even code that can just access Google Finance's data would be great for starters!


+1  A: 

Hi There,

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

Matt F
+4  A: 

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.

Jenko
+1  A: 

Seems like Yahoo! Finance can help.

Real-time stock quotes is available on demand, data is returned as a CSV!

  1. See this NASDAQ page at http://finance.yahoo.com/q?s=^IXIC
  2. Click the Download Data button.
  3. Get data from that URL in Flash using the LoadVars (AS2) or URLLoader (AS3).
  4. Use unescape() to decode the string from its URL-encoded format.

Historical stock quotes are also available on demand, similarly, as a CSV!

  1. See this NASDAQ page at http://finance.yahoo.com/q/hp?s=^IXIC
  2. Scroll to the bottom, and Click the Download To Spreadsheet button.
  3. Repeat!
Jenko
+1  A: 

Thats cleared out too, 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, maybe even for commercial websites!

We have to thank Yahoo! for this. Yell out loud, Yaaahooooo!

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?, via Drupal Stock API Forums.

Jenko
A: 

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

http://billing.finance.yahoo.com/realtime%5Fquotes/signup?.src=quote&.refer=quote

Adam
A: 

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

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

OriChim
+1  A: 

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

Eugene Osovetsky