Stocks.js Time Series example
by Thomas
HTML
<script src="https://cdn.rawgit.com/wagenaartje/stocks.js/8548d960/dist/stocks.js"></script>
JavaScript
var stocks = new Stocks('SYTCQBUIU44BX2G4'); // Replace with your own
// Let's get the stock data of Tesla Inc for the last 10 minutes
async function request () {
var result = await stocks.timeSeries({
symbol: 'TSLA',
interval: 'daily',
start: new Date('2017-07-01'),
end: new Date('2017-07-09')
});
document.body.innerHTML = JSON.stringify(result);
}
request();