Metadata-Version: 2.4
Name: yfin
Version: 0.1.2
Summary: Python SDK for the hosted yfin Yahoo Finance API, with yfinance-compatible data access.
Project-URL: Homepage, https://yfin.dev
Project-URL: API, https://api.yfin.dev/v1/openapi.json
Project-URL: Documentation, https://yfin.dev
Project-URL: Source, https://github.com/bluedoor-ai/yfin
Author-email: yfin <sam@bluedoor.sh>
License: MIT
Keywords: finance,market-data,stocks,yahoo-finance,yfinance
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: beautifulsoup4>=4.11.1
Requires-Dist: certifi>=2024.2.2
Requires-Dist: curl-cffi>=0.15
Requires-Dist: pandas>=2.0
Requires-Dist: websockets>=13.0
Description-Content-Type: text/markdown

# yfin Python SDK

Python SDK for the hosted yfin API. The hosted API handles Yahoo Finance
contracts, crumb bootstrap, caching, request coalescing, and origin budgets.
The SDK adds a yfinance-compatible facade on top.

```python
import yfin as yf

aapl = yf.Ticker("AAPL")

print(aapl.history(period="5d", interval="1d"))
print(aapl.fast_info)
print(aapl.info)
print(aapl.option_chain())
print(aapl.funds_data.top_holdings)
print(aapl.valuation)
print(yf.download(["AAPL", "MSFT"], period="5d"))

ws = yf.WebSocket(verbose=False)
ws.subscribe("BTC-USD")
```

Low-level REST-envelope client:

```python
import yfin

client = yfin.Client(contact="you@example.com")
print(client.quote(["AAPL", "MSFT"]))
print(client.history("NVDA", range="5d", interval="1h"))
```

Set `YFIN_BASE_URL` to override the hosted API URL.
