Stockdex

Financial data from Yahoo Finance, Digrin, Finviz, Macrotrends and justETF as pandas DataFrames and Plotly figures, in one Ticker object.

PyPI version Code style: black ruff

Install

pip install -U stockdex

Download stockdex.mcpb from the latest release and double-click it. See Use with Claude.

Requires uv, which the plugin uses to start the MCP server.

/plugin marketplace add ahnazary/stockdex
/plugin install stockdex@stockdex

See Claude Code (plugin) for the full setup.

Quick start

from stockdex import Ticker

ticker = Ticker(ticker="NVDA")

income = ticker.yahoo_api_income_statement(frequency="quarterly")
prices = ticker.yahoo_api_price(range="1y", dataGranularity="1d")
dividends = ticker.digrin_dividend
ticker.plot_yahoo_api_income_statement()

Every method name starts with its data source, e.g. yahoo_api_* or finviz_*, so you always know where the numbers come from.

Data sources

Yahoo Finance

Prices, statements, valuation, profile, analyst estimates, holders, SEC filings, funds, options and search.

Yahoo Finance (API)
Digrin

Long dividend history, payout ratio, dividend growth and fundamentals over many years.

Digrin
Macrotrends

Up to 15 years of statements, margins, ratios and revenue.

Macrotrends
Finviz

Insider trades, revenue by segment and region, earnings and revisions.

Finviz
justETF

European ETFs by ISIN: holdings, countries, sectors and fund basics.

justETF
Use with Claude

A local MCP server so Claude can look up stock data for you.

Use with Claude

Plots

Charts

Bar and line charts for statements, dividends and cash flow, with show_plot=False to get the figure back.

Plots and figures
Sankey and dashboards

Cash-flow Sankey charts and multi-plot Dash apps.

Sankey charts

Disclaimer

Stockdex is an independent, unofficial open-source project. It is not affiliated with, endorsed by, or sponsored by Yahoo, Nasdaq, Digrin, Macrotrends, JustETF, Finviz or any other data provider it supports. All product names, trademarks and registered trademarks (including “Yahoo” and “Yahoo Finance”) belong to their respective owners and are used here only to identify the data sources.

Stockdex does not host, store or redistribute any data. All data belongs to its respective providers, and you are responsible for complying with each provider’s terms of use (e.g. Yahoo’s Terms of Service). Stockdex is intended for personal, research and educational use only.