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.3.tar.gz (37.5 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.3-py3-none-any.whl (36.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yfin-0.1.3.tar.gz
  • Upload date:
  • Size: 37.5 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.3.tar.gz
Algorithm Hash digest
SHA256 c906ab43e95d5dd96d7ac729cb162418d6af89bf22c25d119d1a2532ac879b88
MD5 bcf6343a7f41aac52216dc46c912c191
BLAKE2b-256 226786016d63bad0e0d29e1e3d3cf0e1ecc1506391248e7516a1a31aeb062a20

See more details on using hashes here.

Provenance

The following attestation bundles were made for yfin-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: yfin-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 36.1 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c96574350feb331e2015f08674a7a0ccb5134ccb474108c0036409d31c9e15fe
MD5 25e9a3a342244a3b298f504a78dda364
BLAKE2b-256 c9c8862448775486f0a4c919ac87268531f1e924ca3da6ae43de8d5adb1e083b

See more details on using hashes here.

Provenance

The following attestation bundles were made for yfin-0.1.3-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