yfinance extension for OpenBB
Project description
OpenBB Yahoo Finance Provider
This extension integrates Yahoo! Finance into the OpenBB Platform. It is a hybrid extension — a single package that registers as both:
- an
openbb_provider_extension, contributing ~80 Yahoo Finance fetchers, and - an
openbb_core_extension, contributing a router with namespaced commands, interactive PyWry widgets, a bundled OpenBB Workspace app, and an embedded MCP server.
Because of this, it works standalone (no other OpenBB data extensions required) and also slots cleanly into a full OpenBB Platform install.
Installation
pip install openbb-yfinance
Runtime dependencies: openbb-core, yfinance, pywry, and fastmcp.
Hybrid registration
Fetchers register under their standard OpenBB model names when the companion
extension is installed, and fall back to namespaced Yf* aliases when it is not.
For example EquityHistorical is provided when openbb-equity is present, otherwise the
same fetcher registers as YfEquityHistorical and the bundled equity router exposes
the command. The companion extensions detected at import time are:
openbb-equity, openbb-etf, openbb-derivatives, openbb-index, openbb-crypto,
openbb-currency, openbb-news, and openbb-economy.
The matching router namespace (equity, etf, derivatives, index, crypto,
currency, news, economy) is only mounted when that companion extension is absent,
so the hybrid never collides with a first-party OpenBB extension.
Data coverage
| Area | Examples |
|---|---|
| Equity | historical prices, quotes, company profile, balance sheet / income / cash flow, key metrics, key executives, share statistics, dividends, EPS history, company filings |
| Screening & movers | equity screener with INI presets — bundled movers/discovery presets (gainers, losers, most active, undervalued growth & large caps, aggressive small caps, growth tech) plus Yahoo's predefined screeners |
| Estimates | analyst recommendations, price target & consensus, earnings / revenue / growth estimates, EPS trend & revisions |
| Funds & ETFs | fund info, holdings, allocation, historical, performance, ratings, risk; ETF info & historical |
| Ownership | institutional / mutual fund / major holders, insider trading, insider purchases, insider roster |
| Sectors & industries | sector overview, top companies & funds, industries; industry overview, top performing & top growth |
| Derivatives | options chains, futures curve, futures historical |
| Index / Crypto / Currency | available indices & index historical, crypto historical, currency historical |
| Calendars | earnings, IPO, splits, economic calendar, per-company calendar |
| Other | symbol search, news (with full article body), private companies (Crunchbase data) |
Router namespaces
Always mounted: funds, estimates, ownership, sectors, industry, plus the
top-level search, news, private_companies, and company_calendar commands.
Mounted only when the matching companion extension is not installed: equity,
etf, derivatives, index, crypto, currency, news, economy.
Interactive widgets
The router ships PyWry-powered, interactive widgets that open as a native desktop window, render inline in a Jupyter notebook, or serve as an iframe in the OpenBB Workspace (on a headless host the command returns the iframe endpoint instead of opening a window):
obb.yfinance.tv_widget(...)— TradingView chart backed by a live Yahoo Finance datafeed (GET /yfinance/tv_widget/view).obb.yfinance.screener_builder(...)— interactive screener builder that syncs results back to a Workspace table (GET /yfinance/screener_builder/view).- Asset Info overview widget (
GET /yfinance/asset_info/view) — a styled, live header summary that adapts to the asset type.
A curated Workspace app is served from GET /yfinance/apps.json.
Embedded MCP server
A FastMCP server is mounted at /yfinance/mcp with
tools for agents.
Core market-data tools:
search_symbolsget_price_historyget_quoteget_company_profilerun_screener
TradingView chart control tools:
- Generic dispatch:
tvchart_send_event - Symbol/interval/view:
tvchart_symbol_search,tvchart_compare,tvchart_change_interval,tvchart_time_range,tvchart_time_range_picker,tvchart_request_state - Indicators:
tvchart_add_indicator,tvchart_remove_indicator,tvchart_list_indicators,tvchart_show_indicators - Chart options/actions:
tvchart_chart_type,tvchart_toggle_dark_mode,tvchart_log_scale,tvchart_auto_scale,tvchart_show_settings,tvchart_drawing_tool,tvchart_undo,tvchart_redo,tvchart_screenshot,tvchart_fullscreen
Dispatch and confirmation behavior:
- TV tools emit
tvchart:*events using PyWry's event system. - Dispatch attempts local in-process emit first; when unavailable, it falls back to
the API bridge endpoint
POST /yfinance/mcp/tvchart/emit. - Many mutation tools accept
confirm+timeoutand can wait for localtvchart:data-settledconfirmation. - State and indicator tools can return confirmed snapshots when local response
events (
tvchart:state-response,tvchart:list-indicators-response) are captured before timeout.
Development
This package follows the OpenBB v5 packaging standard (hatchling
build backend, uv for installs, ruff + ty for
linting and type-checking). Dev tooling is provided by the dev dependency group
(openbb-devtools).
# from providers/yfinance
uv build --no-sources # build sdist + wheel
uv pip install --group dev # install dev tooling
ruff check openbb_yfinance tests # lint
ruff format --check openbb_yfinance tests
ty check openbb_yfinance # type-check
pytest tests # unit tests
Tests replay recorded cassettes via pytest-recorder (markers record_curl and
record_http) so they run offline; tests marked integration make live calls to Yahoo
Finance and are excluded from CI.
This provider is developed and distributed from the openbb-danglewood repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openbb_yfinance-2.0.0rc2-py3-none-any.whl.
File metadata
- Download URL: openbb_yfinance-2.0.0rc2-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbaa4547637bf704a3a5f5ea1f8adf776f16cdd72507d97a496f36a83509fcf5
|
|
| MD5 |
ff5524499087a4f4a31b7d94fabb6731
|
|
| BLAKE2b-256 |
ae3ffac42255d969c2a556bdadd05c76c57dc46c884529ad605d06d1ca8a44ba
|
Provenance
The following attestation bundles were made for openbb_yfinance-2.0.0rc2-py3-none-any.whl:
Publisher:
publish-openbb-yfinance.yml on deeleeramone/openbb-danglewood
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openbb_yfinance-2.0.0rc2-py3-none-any.whl -
Subject digest:
bbaa4547637bf704a3a5f5ea1f8adf776f16cdd72507d97a496f36a83509fcf5 - Sigstore transparency entry: 2063116430
- Sigstore integration time:
-
Permalink:
deeleeramone/openbb-danglewood@47e09ee429719b5dc58624b88c06277b5285fae8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/deeleeramone
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-openbb-yfinance.yml@47e09ee429719b5dc58624b88c06277b5285fae8 -
Trigger Event:
workflow_dispatch
-
Statement type: