stock quotes with javascript

后端 未结 6 1024
眼角桃花
眼角桃花 2021-02-08 17:32

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-gadget

6条回答
  •  无人及你
    2021-02-08 17:42

    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
     });
    

提交回复
热议问题