npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

yahoo-dl

v1.0.12

Published

A command-line tool for downloading yahoo stock prices.

Downloads

15

Readme

yahoo-dl

A command-line tool for downloading yahoo stock prices.

Installation

npm install -g yahoo-dl

yahoo-dl installation

Usage

To download weekly data for Apple you need to use following command from commandline.

yahoo-dl -t w get AAPL

Download Stock Price

This will download weekly historically data for the latest 12 months.

Usage: yahoo-dl [options] [command]

Yahoo stock price downloader.

Options:
  -V, --version                output the version number
  -t, --timeframe <d,w,m>      Timeframe d for daily, w for weekly, m for monthly. (default: "w")
  -p, --period <104>           Period of the selected time frame e.g. 200, 12 etc... (default: 104)
  -o, --stdout                 Output will be written to stdout.
  -f, --filename <symbol.csv>  Output will be written to a file default is symbol.csv
  -s, --skip                   Do not overwrite if file exits. Usefull to retry a download.
  -h, --help                   output usage information

Commands:
  get <symbol>
  

Example

Download spy 104 week data.

kg@tmp $ yahoo-dl get spy
ℹ Writing to /Users/kg/tmp/spy.csv
✔ Done spy  104w

Output is as follows

kg@tmp $ cat spy.csv
Date,Open,High,Low,Close,Adj Close,Volume
2016-10-24,215.000000,215.320007,211.710007,212.539993,204.589417,420237800
2016-10-31,212.929993,213.190002,208.380005,208.550003,200.748672,485446500
2016-11-07,208.550003,218.309998,208.550003,216.419998,208.324280,743158200
2016-11-14,217.029999,219.270004,215.720001,218.500000,210.326462,404338000
2016-11-21,219.169998,221.559998,219.000000,221.520004,213.233505,232394000
...
2018-10-01,292.109985,293.209991,286.220001,287.820007,287.820007,391529300
2018-10-08,287.049988,288.859985,270.359985,275.950012,275.950012,834839200
2018-10-15,275.549988,281.149994,274.299988,276.250000,276.250000,605470400

Download symbol list

Download fidelity sector data for last 20 weeks

cat fidelity-sectors.txt | xargs -L 1 -t yahoo-dl -t w -p 20 get

Output will be as follows

yahoo-dl -t w -p 20 get FSTCX
ℹ Writing to /Users/kg/git/stock-ranker/FSTCX.csv
✔ Done FSTCX  20w
yahoo-dl -t w -p 20 get FSRFX
ℹ Writing to /Users/kg/git/stock-ranker/FSRFX.csv
✔ Done FSRFX  20w
yahoo-dl -t w -p 20 get FSUTX
ℹ Writing to /Users/kg/git/stock-ranker/FSUTX.csv
✔ Done FSUTX  20w
yahoo-dl -t w -p 20 get FWRLX
ℹ Writing to /Users/kg/git/stock-ranker/FWRLX.csv
✔ Done FWRLX  20w

Symbols

You can find some of the symbols from here

License

MIT