Metadata-Version: 2.4
Name: tvfinance
Version: 26.0.1
Summary: Market data tools for quotes, history, news, screeners, and research
Project-URL: Documentation, https://github.com/henrikxyz/tvfinance#readme
Project-URL: Issues, https://github.com/henrikxyz/tvfinance/issues
Project-URL: Source, https://github.com/henrikxyz/tvfinance
Project-URL: Provider policy, https://github.com/henrikxyz/tvfinance/blob/main/TRADINGVIEW_POLICY.md
Project-URL: TradingView terms, https://www.tradingview.com/policies/
Author-email: Henrik <295322314+henrikxyz@users.noreply.github.com>
License-Expression: MIT
License-File: LICENSE
Keywords: finance,market-data,tradingview
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: curl-cffi<1,>=0.15
Requires-Dist: lxml<7,>=5
Provides-Extra: mcp
Requires-Dist: fastmcp<4,>=3.4; extra == 'mcp'
Description-Content-Type: text/markdown

# TVFinance

[![PyPI](https://img.shields.io/pypi/v/tvfinance?logo=pypi&logoColor=white)](https://pypi.org/project/tvfinance/)
[![Python](https://img.shields.io/pypi/pyversions/tvfinance?logo=python&logoColor=white)](https://pypi.org/project/tvfinance/)
[![CI](https://img.shields.io/github/actions/workflow/status/henrikxyz/tvfinance/ci.yml?branch=main&logo=github&label=CI)](https://github.com/henrikxyz/tvfinance/actions/workflows/ci.yml)
[![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](https://github.com/henrikxyz/tvfinance/actions/workflows/ci.yml)
[![License](https://img.shields.io/pypi/l/tvfinance)](LICENSE)

> [!CAUTION]
> **STOP: TradingView legal and data-use restrictions.** TVFinance is an
> independent, unofficial project. It is not affiliated with,
> sponsored by, endorsed by, or vetted by TradingView. TradingView's terms
> describe market data as display-only and restrict non-display, automated,
> algorithmic, commercial, and redistribution uses, including third-party tools
> that enable restricted uses. TVFinance does not grant permission or a data
> license. Before using it, read the [TradingView policy notice](TRADINGVIEW_POLICY.md),
> the [official TradingView terms](https://www.tradingview.com/policies/), and
> the full [disclaimer](DISCLAIMER.md).

> [!WARNING]
> This project was substantially generated with help from large language
> models. Its code, tests, documentation, and output may contain mistakes and
> require independent human review. Market data may be delayed, incomplete, or
> incorrect. Do not use this software as financial or investment advice. Read
> the [AI disclosure](AI_DISCLOSURE.md) before using or contributing.

TVFinance is a Python library for looking up market information. You can search
for symbols, check current quotes, download price history, read company news,
and explore financial data without assembling several different tools.

It works in regular and async Python programs, from the command line, and as an
optional MCP server for AI applications. Python 3.10 through 3.14 are supported.

## Features

- Find stocks, ETFs, bonds, indexes, futures, currencies, and cryptocurrencies.
- Check one quote or follow live price updates.
- Download historical prices at different time intervals.
- Filter markets with screeners and explore option chains.
- Read company profiles, financials, forecasts, filings, and news.
- View earnings, dividend, revenue, IPO, and economic calendars.
- Use a simple Python API, async API, command-line tool, or optional MCP server.
- Cache results in memory or in a local SQLite file.

## Installation

~~~bash
pip install tvfinance
pip install "tvfinance[mcp]"
~~~

Install the MCP extra only when you need to connect TVFinance to an MCP client.

## Quick start

~~~python
import tvfinance

quote = tvfinance.quote("NASDAQ:AAPL")
bars = tvfinance.history("NASDAQ:AAPL", resolution="1D", count=30)
profile = tvfinance.profile("NASDAQ:AAPL")
~~~

For async applications, use `tvfinance.aio`:

~~~python
from tvfinance import aio

quote = await aio.quote("NASDAQ:AAPL")
bars = await aio.history("NASDAQ:AAPL", count=30)
~~~

For several requests, reuse one client connection:

~~~python
from tvfinance import AsyncClient

async with AsyncClient() as client:
    quote = await client.quote("NASDAQ:AAPL")
    news = await client.news("NASDAQ:AAPL", fetch_body=True)
~~~

Command-line and MCP entry points:

~~~bash
tvfinance --help
tvfinance history NASDAQ:AAPL --count 30
tvfinance-mcp
~~~

## Development

```bash
uv sync --group dev
uv run ruff format .
uv run ruff check .
uv run mypy src tests
uv run pytest
uv build
```

## Important information

Version 26.0.1 is the current stable release of the rebuilt package. Provider
endpoints are unofficial and may change. This project is for research and does
not provide financial advice.

## Legal and provider notice

TradingView and related names and marks belong to their respective owners.
TVFinance is not affiliated with, endorsed by, or vetted by TradingView. The
software uses unofficial interfaces and provides no rights to provider content
or market data.

Do not assume that research, educational, personal, internal, AI, or MCP use is
automatically permitted. You must determine whether your exact access, display,
storage, processing, and redistribution are authorized. If you need automated
trading, algorithmic processing, commercial use, redistribution, or another
non-display use, obtain explicit permission and a suitable licensed data feed.
See [TRADINGVIEW_POLICY.md](TRADINGVIEW_POLICY.md) for the provider-policy
summary and links to the controlling terms.
