Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Docs for the development version; the latest release is v0.8.1.

StockWise — stock market toolkit for your terminal

StockWise

A command-line tool for investors in Indian (NSE/BSE) and US markets. It tracks your portfolio with exact lots and XIRR, works out Indian capital-gains tax and advance tax, looks up stocks, mutual funds and options, and lets an AI assistant read your portfolio through an MCP server. Your data stays in local files. One binary, no account, no API key.

Install

# macOS / Linux / Termux on Android
curl -fsSL https://raw.githubusercontent.com/iamsaquib8/stockwise/main/install.sh | sh

# Debian/Ubuntu, Fedora/RHEL: .deb and .rpm from the latest release
sudo dnf install https://github.com/iamsaquib8/stockwise/releases/latest/download/stockwise-x86_64.rpm

# With Rust (1.97+)
cargo binstall stockwise            # prebuilt binary
cargo install --locked stockwise    # build from source

Windows: scoop install https://github.com/iamsaquib8/stockwise/releases/latest/download/stockwise.json or the .zip from the latest release. Docker: docker run --rm ghcr.io/iamsaquib8/stockwise quote RELIANCE. Nix and the .deb/.rpm details are on the Install page, which also lists what is not published yet (PyPI, Homebrew, winget, AUR).

Then run stockwise doctor to check your setup. If a command fails, see Troubleshooting.

Quickstart

The five-minute quickstart goes from install to a quote, a portfolio with XIRR and a tax estimate. It works on throwaway data, so you can try it safely.

Pick your path

I want toRead
See my real returns across brokers and mutual fundsImport your trades and see true returns
Estimate my capital-gains tax and fill my ITRFile your Indian capital-gains tax
Check a stock or fund quicklyCheck a stock or fund fast
Put new money where I am underweightRebalance to target weights
Ask Claude or Cursor about my portfolioUse StockWise from Claude or Cursor
Get a message when a price or RSI level is reachedSet up alerts and the daemon
Test an idea on past data, or practise with paper moneyBacktest and practise on past markets
Use the numbers in a script or spreadsheetScript it with JSON, CSV and jq

Each guide is a short walkthrough with commands to copy, the output to expect and links to the reference. What do you want to do? lists them with the commands each one uses.

The commands at a glance

stockwise quote RELIANCE TCS            # Indian stocks are the default
stockwise TCS                           # no command needed: a one-screen overview
stockwise quote AAPL NVDA -m us         # US stocks
stockwise import kite tradebook.xlsx    # CSV or .xlsx; yearly tradebooks merge
stockwise portfolio xray                # your real exposure across stocks, funds and ETFs
stockwise tax in                        # LTCG/STCG per lot, with set-off rules
stockwise harvest                       # losses and gains to book before 31 March
stockwise tax advance --paid 2025-06-14:3000   # instalments and Sec. 234C interest
stockwise mf sip 122639 5000 -p 5y      # what a ₹5,000/month SIP became
stockwise backtest INFY -s macd         # a strategy after STT and brokerage
stockwise mcp                           # read-only tools for AI assistants

stockwise history AAPL -m us -p 6mo

Reference

When you know what you want and need an option or a field name:

  • Cheatsheet: the commands people use most, on one page.
  • Commands: every command and option, with the JSON each one prints.
  • Markets: India, US, global exchanges, crypto, FX, commodities.
  • Data providers: where each number comes from.
  • AI: the MCP server for Claude, Cursor and other assistants, and stockwise ask.
  • Backtesting and Simulator: strategies, costs, replays and scores.
  • Bots and alerts and Brokers: alerts, the paper-trading daemon, importing holdings, and optional live orders behind a preview.
  • Troubleshooting: Yahoo or NSE not answering, Not enough price data, import skips, where your data is.
  • How StockWise compares with other tools.

StockWise is open source under the MIT licence: github.com/iamsaquib8/stockwise. It is for education and information, not financial advice — see the disclaimer.