Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including historic with all npm packages installed. Try it out:

var historic = require("historic")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

historic v0.0.3

Fetch historic stock data from yahoo

#Yahoo Historic Stock Quote Data Fetch historic stock data from yahoo

##Usage npm install historic

var historic = require('historic');

var symbol = 'TSLA';

// Note: months are zero indexed
// start..end (inclusive)
// no data for weekends
var start = new Date(2013, 7, 27);
var end = new Date(2013, 7, 30);

historic(symbol, start, end, function (err, data) {
  console.log(err ? err : data);
});

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free