Skip to main content

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.

Metadata

Release files for finavis 0.0.37

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for finavis 0.0.37
File Interpreter ABI Platform
finavis-0.0.37-py3-none-any.whl Python 3 none any Details

Release files / finavis-0.0.37-py3-none-any.whl

Download URL finavis-0.0.37-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03caafbc35bef2c72ce56519b65d43fa38f7cecfbb3149a4593da1443da41809
BLAKE2b-256 checksum
How to use checksums
b9366568a0ddf03cd0f8cfe888168c7c7b6682707dda047ec9448659c864dd3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.12.12 Darwin/24.6.0

Release history Release notifications | RSS feed

This release

0.0.37 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page