Skip to main content

live Yahoo! Finance data streamer

Project description

yflive v1.0.0

Build Status DeepSource

yflive is a Yahoo! Finance live data streamer. Originally created as an alternative to scraping prices of Yahoo! Finance, yflive implements a websocket client for receiving live quotes from Yahoo! Finance directly.

For historic prices or other financial information, yfinance is recommended.

Installation

Use the package manager pip to install yflive.

pip install yflive

Usage

Quick start

The following example shows a simple setup, which subscribes to the tickers AAPL and TSLA and prints received quotes until interrupted.

from yflive import QuoteStreamer

qs = QuoteStreamer()
qs.subscribe(["AAPL", "TSLA"]) 

qs.on_quote = lambda qs, q: print(q)

# Non-blocking if should_thread=True (default is False)
qs.start(should_thread=False)

Quotes are in real time (with exceptions) and normally only available during trading hours.

For additional information regarding Yahoo! Finance data, please refer to their section on data accuracy found here.

Collaboration

This is very early stage

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

yflive is distributed under the Apache-2.0 License. Review LICENSE.txt for further information.

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

yflive-1.0.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

yflive-1.0.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file yflive-1.0.0.tar.gz.

File metadata

  • Download URL: yflive-1.0.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for yflive-1.0.0.tar.gz
Algorithm Hash digest
SHA256 dfb90d6a8aa36aa408cf7aca47394d6c49d6f3569599ac16ebd218b396ea5bd4
MD5 ebe18d1a34cd13b883a5aa4e7fe48f1a
BLAKE2b-256 c4ee4e80d980b120c4d4338136232c8ed5a95dc77654b7c25c22b31e0fe10cdb

See more details on using hashes here.

File details

Details for the file yflive-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: yflive-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for yflive-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94a22eaffe929f54611520bf07a02bf616c6dd0e7c75dde278606da205ded320
MD5 d95264a979f05472c229ca7ed4d204f7
BLAKE2b-256 67e4423f9f7e3d7391aeb0a1ae41aa774673a5a8632e87ec3f5a2b7f066a4b3d

See more details on using hashes here.

Supported by

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