Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stock quotes with javascript

Does anyone know a way to get live - or 20 minutes delayed - stock quotes using javascript? I looked at the google api at http://code.google.com/apis/finance/docs/finance-gadgets.html but it was very hard to get a working example.

has anyone got it to work to get quote for any stock, or found a better way ?

thank you.

like image 397
Abraham Adam Avatar asked Mar 01 '11 03:03

Abraham Adam


1 Answers

There is a new library I created called stocks.js, it provides an easy to use stock market API that can fetch live stock data (refreshed every minute). The source of the data is Alpha Vantage.

An example of usage would be:

// Let's get the stock data of Tesla Inc. for the last 10 minutes
var result = stocks.timeSeries({
  symbol: 'TSLA',
  interval: '1min',
  amount: 10
 });
like image 154
Thomas Wagenaar Avatar answered Nov 10 '22 11:11

Thomas Wagenaar