Skip to main content

another unofficial api for some financial visualization website

Project description

another unofficial api for finviz.com

python-latest pypi status pypi_downloads license

installation

# via pypi (recommended)
$ python -m pip install -U finavis

# or using github w/ pip
$ python -m pip install git+https://github.com/rdnve/finavis.git

# or using github w/ poetry
$ poetry add git+https://github.com/rdnve/finavis.git

getting a single quote

import typing as ty

from finavis import get_quote
from finavis.library import Quote

quote: Quote = get_quote(ticker="AAPL")

# accessing to attributes: type help(quote) for more
print(f"Ticker: {quote.ticker}, price: {quote.price}, w/ EPS {quote.eps_ttm}")

# extract attributes to dictionary
data: ty.Dict[str, str] = quote.to_dict()

getting a several quotes

import typing as ty

from finavis import get_quotes

tickers: ty.Tuple[str, ...] = ("AAPL", "INTC", "QCOM")
for quote in get_quotes(tickers=tickers):
    print(f"Ticker: {quote.ticker}, price: {quote.price}, w/ EPS {quote.eps_ttm}")

getting a screener w/ objects

from finavis import Screener
from finavis.library import Exchange, Index, Order

screener: Screener = Screener(
    exchange=Exchange.NASDAQ,
    index=Index.SP500,
    order_by=Order.CHANGE_ASC,
)

for index, overview in enumerate(screener()):
    print(f"Ticker: {overview.ticker}, price: {overview.price} - change: {overview.change}")

disclaimer

using this library to acquire data from some website is against their "terms of service" and robots.txt; use it responsibly and at your own risk, this library was built purely for educational purposes.

important information

any quote data displayed on the finviz.com website is delayed by 15 minutes for nasdaq/nyse/amex; this api should NOT be used for real-time trading, it's primary purpose for research in educational purposes.

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

finavis-0.0.36.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

finavis-0.0.36-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file finavis-0.0.36.tar.gz.

File metadata

  • Download URL: finavis-0.0.36.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.12.1 Darwin/22.6.0

File hashes

Hashes for finavis-0.0.36.tar.gz
Algorithm Hash digest
SHA256 7786761ed8cf27182a3b25f28012bb5fd1dbe19f31f651e263315b092013f6be
MD5 9ce2ca8c3e64c025be6c6bda9980594e
BLAKE2b-256 5ce9af0c69011dd91d18c7d4b0cee8d2334ae4a7c9fd7009812a9d9e4fd0eea0

See more details on using hashes here.

File details

Details for the file finavis-0.0.36-py3-none-any.whl.

File metadata

  • Download URL: finavis-0.0.36-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.12.1 Darwin/22.6.0

File hashes

Hashes for finavis-0.0.36-py3-none-any.whl
Algorithm Hash digest
SHA256 d28e06b1552ff775938d5668b21037794ca0b415a0395eead9799db04629d860
MD5 933cae991a162748d85282e8be593397
BLAKE2b-256 879e59b8633c99754786b6708add2d48abbeb63585d6c3bf4d04b7fad373a37e

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