Shashi Techlogues

Track stock market information right in your Terminal.

As a developer, I love working with the terminal. The plain, simple, and in my opinion the best way to interact with the computer (also it makes you look geeky).

I spent most of my time in the terminal. By now you must have guessed I am a huge fan of the terminal and terminal-based applications.

Recently I developed an interest in stock markets and started tracking the stock markets. Since I love working with the terminal I decided to build a terminal-oriented application that can help me to track the stock market.

Inspired by wttr.in , I built terminal-stocks , which can provide the stock's current prices, historical prices, and global market summary.


How to Use terminal-stocks

terminal-stocks is available and can be used without installation.

1. Get the Current Price of a Stock

curl terminal-stocks.dev/ITC.NS
Current stock price displayed by terminal-stocks
Current price of stocks

You need to provide the ticker of the stock and terminal-stocks will give you the price information of the stock. terminal-stocks uses Yahoo Finance's ticker to fetch stock information.

2. Get the Historical Prices of a Stock

curl terminal-stocks.dev/historical/ITC.NS
Historical stock prices displayed by terminal-stocks
Historical prices

This will give the 10 entries. To fetch more, you can get them by providing page parameters like below.

curl terminal-stocks.dev/historical/ITC.NS?page=2

3. Get the Global Market Summary Right in Your Terminal

curl terminal-stocks.dev/market-summary
Global market summary displayed by terminal-stocks
Global market summary

More and more features will be added going forward.


How to Use terminal-stocks as a CLI

If you want to use terminal-stocks as a CLI tool, you are lucky. terminal-stocks comes with a CLI as well. You can install terminal-stocks on Windows, Ubuntu, or Mac and use it.

1. Install terminal-stocks from npm

npm install terminal-stocks -g

2. Get the Price Information of a Stock

terminal-stocks -t ITC.NS

3. Get the Historical Price Information of a Stock

terminal-stocks -t ITC.NS --historical

4. Get the Market Summary

terminal-stocks --market

5. Export as JSON or CSV

terminal-stocks --market --json  // as a JSON
terminal-stocks --ticker ITC.NS --csv  // as a CSV

Roadmap

terminal-stocks is still in development and needs a lot of improvements and feature development.

  • Add stock price chart right in the terminal.
  • Add live price for stocks.
  • Add support to maintain a portfolio and track P&L right in the terminal.

If you want to contribute and make terminal-stocks better, contributions are welcome via pull requests on GitHub .

Important Links

GitHub: https://github.com/shweshi/terminal-stocks

NPM: https://www.npmjs.com/package/terminal-stocks


Thanks for reading. If you have some feedback, please reach out to me on Twitter or GitHub .

Make sure to upvote on Product Hunt.

Terminal Stocks - Track stock market right in your terminal | Product Hunt

Happy Coding!!!