Repolode
Folgerjun

Folgerjun/stock-tui

A terminal tool that shows A-share stock basic info and an ASCII candlestick chart with volume, using AKShare data.

Open-source alternative to:Wind TerminalTonghuashun

Stars
153
Forks
14
Open issues
1
Last commit
2 months ago

What is it?

stock-tui is a command-line tool for looking up Chinese A-share stocks from a terminal such as PowerShell, Windows Terminal or a Linux shell. Given a stock code or a Chinese company name, it prints a panel with the latest price, change percentage, open, previous close, high and low, P/E (dynamic), P/B, volume, turnover, turnover rate and total and float market value.

Beyond the summary table, it draws an ASCII candlestick chart with a volume bar chart beneath it, colored red for gains and green for declines. The number of trading days shown, and the price adjustment mode (forward-adjusted, backward-adjusted or none), are set with command-line options. The chart can be turned off for a quick text-only view.

Market data comes from AKShare, which requires no API key and draws on public quote endpoints from Eastmoney and Xueqiu. The tool caches the full market code-name list locally for a day to speed up name-based lookups, and it bypasses local proxies and retries on network errors.

Key features

  • 01Shows latest price, change, P/E, P/B, volume, turnover and market value for A-share stocks.
  • 02Draws a terminal candlestick chart with a red/green volume histogram.
  • 03Accepts stock codes with or without exchange prefix, or Chinese stock names.
  • 04Supports choosing the number of trading days and forward, backward or no price adjustment.
  • 05Can be installed as a command-line tool with pip.

Use cases

  • Checking a Chinese stock's price and valuation from a terminal without opening a browser.
  • Viewing a quick candlestick chart over the last few months in an SSH or console session.
  • Looking up A-share quotes by company name in scripts or daily workflows.

Quick start

  1. 1

    Enter the project folder

    cd stock-tui
  2. 2

    Create a virtual environment

    python -m venv .venv
  3. 3

    Install the dependencies

    .\.venv\Scripts\pip install -r requirements.txt
  4. 4

    Show a stock's info and K-line chart (600519 is Kweichow Moutai)

    .\.venv\Scripts\python.exe main.py 600519

Things to know

  • The project has no license, so its terms of use are unclear.
  • It only covers China A-shares and relies on public quote interfaces from Eastern Money and Xueqiu via AKShare.

Topics

FAQ

What is stock-tui?
A terminal tool that shows A-share stock basic info and an ASCII candlestick chart with volume, using AKShare data. stock-tui is a command-line tool for looking up Chinese A-share stocks from a terminal such as PowerShell, Windows Terminal or a Linux shell. Given a stock code or a Chinese company name, it prints a panel with the latest price, change percentage, open, previous close, high and low, P/E (dynamic), P/B, volume, turnover, turnover rate and total and float market value.
Is stock-tui free to use? What license does it have?
stock-tui has no declared license. Its code is public, but without a license you have no explicit permission to reuse it; ask the author before relying on it.
Is stock-tui still maintained?
Updated within 6 months. The last commit to stock-tui was on Aug 26, 2026.
What can I use stock-tui for?
Checking a Chinese stock's price and valuation from a terminal without opening a browser. Viewing a quick candlestick chart over the last few months in an SSH or console session. Looking up A-share quotes by company name in scripts or daily workflows.
How do I install stock-tui?
Enter the project folder: cd stock-tui Create a virtual environment: python -m venv .venv Install the dependencies: .\.venv\Scripts\pip install -r requirements.txt Show a stock's info and K-line chart (600519 is Kweichow Moutai): .\.venv\Scripts\python.exe main.py 600519
Where can I get stock-tui?
The source code and installation instructions are on GitHub: https://github.com/Folgerjun/stock-tui

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects