0.2.0 • Published 12 months ago

stock-bars v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

Stock bars

Get stock bars from Yahoo Finance.

Setup

This library use curl to download stock data, please make sure that the curl command is available in your system.

Usage

import Stock from 'stock-bars';

const stock = new Stock('SPY');
const main = async () => {
  await stock.fetch('1d'); // 1d for daily, 1wk for weekly, 1mo for monthly
  // stock.history contains all the bars
};
main();

Auto cache

By default, stock data will be downloaded and saved in .stock-cache folder.

If you don't want stock data to be read from cache folder, clear or delete the folder.

0.2.0

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago