Metadata-Version: 2.4
Name: fd-yfinance
Version: 0.1.0
Summary: CLI for yfinance global / Yahoo Finance market data library
Author: FindDataOfficial
License: MIT
Project-URL: Repository, https://github.com/FindDataOfficial/DAAS
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Requires-Dist: pandas>=1.0
Requires-Dist: yfinance>=0.2.0
Requires-Dist: sqlalchemy>=1.4
Provides-Extra: repl
Requires-Dist: prompt_toolkit>=3.0; extra == "repl"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Dynamic: license-file

# fd-yfinance

A CLI for querying global / US-market financial data via [yfinance](https://github.com/ranaroussi/yfinance) (Yahoo Finance).

Part of the cli-anything fork. Mirrors the `fd-akshare` harness layout.

## Prerequisites

- Python 3.10+
- `pip install yfinance`

## Installation

```bash
# from fd-yfinance/
uv pip install -e ".[dev,repl]"
```

## Quick Start

```bash
# List all available functions
fd-yfinance list

# Search for functions by keyword
fd-yfinance search history

# Get function details including parameters
fd-yfinance info ticker_history

# Call a function (one-shot)
fd-yfinance call ticker_history symbol=AAPL period=1mo

# JSON output for machine consumption
fd-yfinance --json call ticker_history symbol=AAPL period=1mo

# Interactive REPL (default when no subcommand given)
fd-yfinance
```

## Command conventions

yfinance centers on the `Ticker` object. This harness flattens it into a registry of commands:

- `ticker_<method>` — calls `yfinance.Ticker(symbol).<method>(...)`, e.g. `ticker_history`, `ticker_info`, `ticker_financials`.
- Top-level functions keep their names, e.g. `download`, `search`.

## Notes

- Yahoo may rate-limit heavy automated use; yfinance retries/caches internally.
- Output-column metadata in the registry is representative, not exhaustive.
