Skip to main content

Yahoo Finance Tool

This tool connects to Yahoo Finance and allows an Agent to access stock, news, and financial data of a company.

Installation

pip install llama-index-tools-yahoo-finance

Usage

Here's an example of how to use this tool:

from llama_index.tools.yahoo_finance import YahooFinanceToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

tool_spec = YahooFinanceToolSpec()
agent = FunctionAgent(
    tools=tool_spec.to_tool_list(),
    llm=OpenAI(model="gpt-4.1"),
)

print(await agent.run("What is the price of Apple stock?"))
print(await agent.run("What is the latest news about Apple?"))

The tools available are:

balance_sheet: A tool that returns the balance sheet of a company.

income_statement: A tool that returns the income statement of a company.

cash_flow: A tool that returns the cash flow of a company.

stock_news: A tool that returns the latest news about a company.

stock_basic_info: A tool that returns basic information about a company including price.

stock_analyst_recommendations: A tool that returns analyst recommendations for a company.

This loader is designed to be used as a way to load data as a Tool in a Agent.

Metadata

Release files for llama-index-tools-yahoo-finance 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-tools-yahoo-finance 0.7.0
File Size Uploaded Provenance Actions
llama_index_tools_yahoo_finance-0.7.0.tar.gz 3.9 kB Without provenance Details for llama_index_tools_yahoo_finance-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-tools-yahoo-finance 0.7.0
File Interpreter ABI Platform Actions
llama_index_tools_yahoo_finance-0.7.0-py3-none-any.whl Python 3 none any Details for llama_index_tools_yahoo_finance-0.7.0-py3-none-any.whl

Total release size: 7.5 kB

Release files / llama_index_tools_yahoo_finance-0.7.0.tar.gz

Download URL llama_index_tools_yahoo_finance-0.7.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b0d8866a0c9dfd11760e02c4adf3c9dd169742349ed367ab89bd9fda6eb461f0
BLAKE2b-256 checksum
How to use checksums
4184eda2e1dffb64e604755a6f04b1dc8b22e9de4d91c72402c42b43d47b042c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / llama_index_tools_yahoo_finance-0.7.0-py3-none-any.whl

Download URL llama_index_tools_yahoo_finance-0.7.0-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a964cdfe82fac0855e32fb706c11959149f842a217dd473a88152e5b8a0e0227
BLAKE2b-256 checksum
How to use checksums
b81f476135e18cd557e65548c81e1bed0e4c8f8177ff9b31c013a191a75ff524
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for llama-index-tools-yahoo-finance 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page