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 🙏

© 2026 – Pkg Stats / Ryan Hefner

tw-stock

v2.2.0

Published

This is a search tw stock price with command

Readme

tw-stock

A command-line tool for quickly searching Taiwan stock market information, including real-time prices, market indices, and historical trading data.

npm version license

Installation

npm install -g tw-stock

Commands

stock — Search stock information

tw-stock stock [stock_code]

| Option | Description | | --- | --- | | -l, --listed <listed> | Market type: tse (default) or otc | | -m, --multiple | Search multiple stock codes (hyphen-separated) | | -f, --favorite | Search stocks from favorite list | | -o, --oddLot | Search odd-lot trading data | | -d, --date <date> | Search historical data (YYYY-MM or YYYY-MM-DD) | | --details | Show detailed stock data (default: true) |

Examples:

# Search a single TSE stock
tw-stock stock 2330

# Search an OTC stock
tw-stock stock 6488 -l otc

# Search multiple stocks
tw-stock stock 2330-2317-2454 -m

# Search historical monthly data
tw-stock stock 2330 -d 2025-01

# Search historical daily data
tw-stock stock 2330 -d 2025-01-15

index — Search market indices

tw-stock index [code]

Supported indices: TAIEX, TWO, FRMSA

| Option | Description | | --- | --- | | -m, --multiple | Search multiple indices | | -t, --time <time...> | Specify time range (HHMM format, 0900–1330) | | -c, --chart | Display ASCII chart |

Examples:

# Search TAIEX (default)
tw-stock index

# Search with ASCII chart
tw-stock index TAIEX -c

# Search multiple indices
tw-stock index TAIEX-TWO -m

# Search within a specific time range
tw-stock index TAIEX -t 0900 1100

institutional — Institutional investors buy/sell data

tw-stock institutional [stock_code]

View daily buy/sell data from the three major institutional investors (三大法人買賣超). Without a stock code, displays the summary table.

| Option | Description | | --- | --- | | -l, --listed <listed> | Market type: tse (default) or otc | | -d, --date <date> | Search specific date (YYYY-MM-DD) | | -n, --number <number> | Number of results to show |

Examples:

# Show institutional summary for today
tw-stock institutional

# Show institutional data for a specific stock
tw-stock institutional 2330

# Show OTC institutional data for a specific date
tw-stock institutional 6488 -l otc -d 2025-01-15

rank — Daily stock ranking

tw-stock rank

Show daily stock ranking by price change or volume (當日漲跌幅排行).

| Option | Description | | --- | --- | | -l, --listed <listed> | Market type: tse (default) or otc | | -d, --date <date> | Search specific date (YYYY-MM-DD) | | -n, --number <number> | Number of results to show (default: 10) | | --losers | Show top losers instead of gainers | | --volume | Sort by volume |

Examples:

# Show top 10 gainers (default)
tw-stock rank

# Show top 20 losers
tw-stock rank --losers -n 20

# Show top 10 by volume for OTC
tw-stock rank --volume -l otc

# Show ranking for a specific date
tw-stock rank -d 2025-01-15

crawler — Update stock list

Crawl and update the local stock list from TWSE/TPEX exchanges.

tw-stock crawler

favorite — Manage favorite stocks

tw-stock favorite              # List all favorite stocks (default)
tw-stock favorite list         # List all favorite stocks
tw-stock favorite create       # Create favorite file
tw-stock favorite add <code>   # Add a stock code
tw-stock favorite delete <code> # Remove a stock code

completion — Shell tab-completion

tw-stock completion           # Setup shell tab-completion
tw-stock completion --cleanup # Remove completion from shell profile

Screenshots

Search TSE Stock

Search TSE Stock

Search OTC Stock

Search OTC Stock

Search Multiple Stocks

Search Multiple Stocks