Skip to content

stonks-cli v0.7.0

Latest

Choose a tag to compare

@igoropaniuk igoropaniuk released this 29 Oct 11:39
· 3 commits to main since this release
Immutable release. Only release title and notes can be modified.

Added

  • stonks watchlist add|remove|list commands so the watchlist can be managed
    from the shell instead of only through the TUI or by editing the YAML file.
    add accepts --asset-type and --external-id for crypto routing.
  • stonks set name NAME (or --clear) and stonks set base-currency CODE
    to change portfolio settings from the CLI.
  • Bond positions. A bond block in the YAML (maturity, coupon, optional
    CUSIP, face value, frequency and manual price) values the position as
    face value x clean price plus accrued interest. U.S. Treasuries are
    priced daily from Treasury FedInvest by CUSIP, falling back to a model
    price from the Treasury par yield curve; other bonds use a manual price.
    The Exchange column shows the price source.
  • TUI support for bonds: choosing the "Bond" asset type in the add/edit form
    reveals the bond fields, and f / Enter on a bond opens a detail view
    with terms, price source, yield to maturity and a value breakdown.
  • stonks add and stonks remove accept fractional quantities
    (stonks add BTC-USD 0.5 60000). add tags BASE-USD symbols as
    crypto, fills in the CoinGecko coin ID when the bundled map knows it
    unambiguously, and takes --currency, --asset-type and
    --external-id.

Changed

  • Commands that modify a portfolio (add, remove, add-cash,
    remove-cash, watchlist add|remove, set, import) now exit with an
    error when more than one -p flag is given, instead of silently writing
    to the first portfolio only.
  • A corrupt portfolio file now produces a one-line error from the mutating
    commands rather than a traceback.
  • Backtests skip bond positions and list them under "Skipped (no historical
    data)".
  • Requires yfinance 1.7 or newer and rich 15; pandas is now a declared
    dependency. Python 3.13 and 3.14 are tested in CI.
  • Python warnings (such as pandas deprecations raised inside yfinance) are
    written to the log file instead of the terminal.
  • The Docker image is built on Python 3.14, installs the exact versions in
    uv.lock and runs as user stonks (uid 1000). Mount the directory that
    holds your portfolio, not the file itself: saving through a single-file
    mount fails with "Device or resource busy".

Removed

  • The AI chat screen (c in the dashboard), its stonks doctor check
    and the openai dependency. OPENAI_API_KEY, OPENAI_MODEL and
    OPENAI_BASE_URL are no longer read.

Fixed

  • A lowercase currency on a position no longer blanks the row and the
    portfolio total; position currencies are normalised like cash ones.
  • Share classes with a dash (BRK-B, BF-B) are no longer treated as
    crypto: they get their real exchange label and market session.
  • London tickers quoted in pence (and Johannesburg cents, Tel Aviv agorot)
    are converted to the major unit, so a .L position in GBP is no longer
    valued 100 times too high.
  • Crypto symbols CoinGecko cannot price now fall back to yfinance per
    symbol instead of silently disappearing.
  • Forex rates for minor currencies against a non-USD base can be crossed
    through USD; unresolved currencies and yfinance download failures are
    now written to the log file.
  • Portfolio files are written atomically, and the TUI no longer overwrites
    edits made with the CLI (or an editor) while it was open: it reloads the
    file and asks you to repeat the edit.
  • stonks import ibkr merges rows for the same symbol (e.g. one stock held
    in two accounts) into one position with a weighted average cost, instead
    of writing a file that cannot be loaded.
  • News headlines and error messages containing square brackets are shown
    verbatim instead of being parsed as markup (a headline starting with
    [Update] lost that word).
  • The news panel and stonks feed show headlines again. Yahoo retired the
    endpoint yfinance used for news, so stonks falls back to Yahoo's search
    API; it has little news for non-US listings.