# terminal-stocks

> Fetch stock price information on terminal

Latest version **1.0.19** (published 2024-06-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install terminal-stocks
pnpm add terminal-stocks
yarn add terminal-stocks
bun add terminal-stocks
```

Provides the command `terminal-stocks`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.19 |
| Published | 2024-06-01 |
| First published | 2020-12-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 12 |
| Unpacked size | 288.4 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 88 |
| Author | Shashi Prakash Gautam |
| Maintainers | shweshi, chrishmmr |
| Keywords | stocks, yahoo-finance, market-data, api, command-line, terminal-stocks, stock-prices, stock-market, finance, terminal |

## Links

- npm: https://www.npmjs.com/package/terminal-stocks
- Repository: https://github.com/shweshi/terminal-stocks
- Homepage: https://github.com/shweshi/terminal-stocks#readme
- Issues: https://github.com/shweshi/terminal-stocks/issues
- npm.io page: https://npm.io/package/terminal-stocks

## Dependencies (12)

- [yargs](https://npm.io/package/yargs.md) ^16.2.0
- [colors](https://npm.io/package/colors.md) ^1.4.0
- [ansi_up](https://npm.io/package/ansi_up.md) ^4.0.4
- [blessed](https://npm.io/package/blessed.md) ^0.1.81
- [express](https://npm.io/package/express.md) ^4.19.2
- [request](https://npm.io/package/request.md) ^2.88.2
- [crypto-js](https://npm.io/package/crypto-js.md) ^4.2.0
- [cli-table3](https://npm.io/package/cli-table3.md) ^0.6.4
- [jsonexport](https://npm.io/package/jsonexport.md) ^3.2.0
- [body-parser](https://npm.io/package/body-parser.md) ^1.4.3
- [yahoo-finance2](https://npm.io/package/yahoo-finance2.md) ^2.11.3
- [blessed-contrib](https://npm.io/package/blessed-contrib.md) ^4.11.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.19 (latest) — 2024-06-01
- 1.0.18 — 2024-05-17
- 1.0.17 — 2024-04-18
- 1.0.16 — 2023-05-09
- 1.0.15 — 2023-02-05
- 1.0.14 — 2023-01-17
- 1.0.13 — 2023-01-14
- 1.0.12 — 2023-01-14
- 1.0.11 — 2023-01-02
- 1.0.10 — 2022-11-08
- 1.0.9 — 2022-11-08
- 1.0.8 — 2021-03-15
- 1.0.7 — 2021-01-05
- 1.0.6 — 2021-01-04
- 1.0.5 — 2021-01-04
- … 5 more at https://npm.io/package/terminal-stocks/versions

## README

# terminal-stocks

terminal-stocks is a terminal first application that provides stock price information.
Read more here: https://blog.shashi.dev/2021/01/track-stock-market-information-right-in.html

<img alt="terminal-stocks" src="https://raw.githubusercontent.com/shweshi/terminal-stocks/main/screenshots/Screenshot_Current.png" />

### Documentation
https://shashi.dev/terminal-stocks

### How to use
```sh
$ curl terminal-stocks.dev/<TICKER>
```

### Example
```sh
$ curl terminal-stocks.dev/ITC.NS
```
<img alt="terminal-stocks" src="https://raw.githubusercontent.com/shweshi/terminal-stocks/main/screenshots/Screenshot_Current.png" />

### TIP
- You can also pass comma separated list of tickers
```sh
$ curl terminal-stocks.dev/ITC.NS,INFY.NS,WIPRO.NS
```
<img alt="terminal-stocks" src="https://raw.githubusercontent.com/shweshi/terminal-stocks/main/screenshots/Screenshot_List.png" />

### Note
- This app uses https://finance.yahoo.com/ to fetch information. Please provide a ticker symbol from yahoo finance to fetch the ticker's market data


### CLI Usage
You can use the terminal-stocks command line interface (cli)

- install cli globaly
```sh
npm i terminal-stocks -g
```

- run the commands to get informations
###### Available commands
```sh
terminal-stocks --help // to get help
terminal-stocks --version  // to see the version
terminal-stocks -t [ticker] // to see current price information of the stock
terminal-stocks --ticker [ticker] // to see current price information of the stock
terminal-stocks --ticker -ms [ticker] // to see current price information of the stock, including market state (open/closed)
terminal-stocks -t [ticker] --historical [domain] // to see the historical price information of stock
terminal-stocks --tickers ITC.NS,INFY.NS // to get the current prices of the multiple stocks
terminal-stocks -m // to see the market summary
terminal-stocks --market // to see the market summary
terminal-stokcs --market --json // to export the data as json file
terminal-stokcs --market --csv // to expor the data as csv file
```

### Example
```sh
terminal-stocks -t ITC.NS
```

### View Historical data
### Example
```sh
$ curl terminal-stocks.dev/historical/ITC.NS
```
<img alt="terminal-stocks" src="https://raw.githubusercontent.com/shweshi/terminal-stocks/main/screenshots/Screenshot_Historical.png" />

- By default it shows 10 entries. This api is paginated so you can use ?page=2 to view next entries.

### View Market Summary
### Example
```sh
$ curl terminal-stocks.dev/market-summary
```
<img alt="terminal-stocks" src="https://raw.githubusercontent.com/shweshi/terminal-stocks/main/screenshots/Screenshot_Market.png" />


### Tech
* [node.js] - evented I/O for the backend
* [Express] - fast node.js network app framework [@tjholowaychuk]
* [node-yahoo-finance2] - community API for Yahoo-Finance

### Installation
Requires [Node.js](https://nodejs.org/) v8+ to run.
Install the dependencies and devDependencies and start the server.

```sh
$ git clone "https://github.com/shweshi/terminal-stocks"
$ npm install
$ npm run serve
```
### Development
Want to contribute? Great! Feel free to open a PR.

### Support
<a href="https://www.producthunt.com/posts/terminal-stocks?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-terminal-stocks" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=281388&theme=dark" alt="Terminal Stocks - Track stock market right in your terminal | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>

<a href="https://www.buymeacoffee.com/shashi" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a> 

### Happy Coding!!!

---
_Source: https://npm.io/package/terminal-stocks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
