Skip to main content

Python SDK for the hosted yfin Yahoo Finance API, with yfinance-compatible data access.

Project description

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.

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:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yfin-0.1.2.tar.gz (37.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yfin-0.1.2-py3-none-any.whl (35.6 kB view details)

Uploaded Python 3

File details

Details for the file yfin-0.1.2.tar.gz.

File metadata

  • Download URL: yfin-0.1.2.tar.gz
  • Upload date:
  • Size: 37.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for yfin-0.1.2.tar.gz
Algorithm Hash digest
SHA256 976e399fd59dea531284ce58c10e0f8bcb67bd1c48d0ab8583c523e714c0f947
MD5 6fb919dbe6da3cb0c757f55b7ddb124f
BLAKE2b-256 b4a850e268696564e6ffec132757f1c1a667e514c351282e6de947803cbcfb39

See more details on using hashes here.

Provenance

The following attestation bundles were made for yfin-0.1.2.tar.gz:

Publisher: publish-yfin-python.yml on bluedoor-ai/yfin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file yfin-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: yfin-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 35.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for yfin-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 318b8ba914f2d376cdebc79b98998dd577272fe7cee2c145d38c41695023f2f3
MD5 de9203b1683ee3b9cd6b4dd59b4e5bd2
BLAKE2b-256 97f05f65bc2778e6dcd79b673cfd6c252949c21c3302e383909b1132c999a229

See more details on using hashes here.

Provenance

The following attestation bundles were made for yfin-0.1.2-py3-none-any.whl:

Publisher: publish-yfin-python.yml on bluedoor-ai/yfin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page