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.1.tar.gz (22.8 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.1-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yfin-0.1.1.tar.gz
  • Upload date:
  • Size: 22.8 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.1.tar.gz
Algorithm Hash digest
SHA256 9be2db215653cfef105fd9da18657b3ff6e5519dc2f84a45cb9baa59d1f21c5e
MD5 e0e2b720574ea83a75d6326d1fd7cb74
BLAKE2b-256 30f91521eac3e6a3691ae63a44844b640ffb5f873e565288bd8ddb8b8e3c63a2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: yfin-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e5455fd516f2d3c2d10a8e9d3a7e9359febcd141e5576442ed0b26aeaa258c6
MD5 bedea82b309c8d76b1b7dfeaf1a89837
BLAKE2b-256 1de2749ba5e5697b364f0bda10ea095460e9689fee56236c6e33a41148bdc821

See more details on using hashes here.

Provenance

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