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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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