Skip to main content

Finviz extension for OpenBB

Project description

OpenBB Finviz Data Provider Extension

This extension integrates the Finviz data provider into the OpenBB Platform.

It will install, finvizfinance, to power the functions.

Installation

To install the extension:

pip install openbb-finviz

Endpoints

  • obb.equity.compare.groups
  • obb.equity.estimates.price_target
  • obb.equity.fundamental.metrics
  • obb.equity.profile
  • obb.equity.price.performance
  • obb.equity.screener

Screener

The screener is a faithful replication of the public-facing stock screener - https://finviz.com/screener.ashx?

Some options are directly accessible through the function parameters, all others are exposed via presets or filters_dict. The filters list below are exposed in the function, with choices visible in the docstring:

  • exchange
  • index
  • sector
  • industry
  • mktcap
  • recommendation (analyst's mean score from 1-5)
  • signal (same as the "Signal" on the Finviz page)

When the function is run without any parameters, it will default to the "top_gainers" signal.

res = obb.equity.screener(provider="finviz")

Metric

The metric parameter defines the type of data fields to return. Choices are:

  • overview
  • ownership
  • performance
  • technical
  • valuation

Default is, "overview".

res = obb.equity.screener(provider="finviz", metric="performance")

Preset Files

Presets can be created and customized in the "OpenBBUserData" folder. Template and default presets are created on the first run of the function.

Files are loaded on runtime, changes are effective without restarting the Python interpreter.

The preset parameter will override all others, except metric and limit.

Run the function to create the template and default presets in your OpenBBUserData folder.

Presets from the legacy OpenBB Terminal will continue to work, simply move your presets into the folder below.

res = obb.equity.screener(provider="finviz", index="nasdaq")

Then find the presets here: $HOME/OpenBBUserData/presets/finviz

res = obb.equity.screener(provider="finviz", preset="short_squeeze")

Filters Dict

The filters_dict parameter acts as an alternative to preset, accepting a dictionary or JSON encoded string.

res = obb.equity.screener(provider="finviz", filters_dict={"Index": "NASDAQ 100"})

Or as a JSON:

res = obb.equity.screener(provider="finviz", filters_dict='{"Index": "NASDAQ 100"}')

When using the Fast API, this is sent in the request body.

Error Messages

All parameters are validated, incorrect keys and choices will raise an error with information to help correct. For example:

obb.equity.screener(provider="finviz", filters_dict='{"Index": "NASDAQ"}')
Invalid filter option 'NASDAQ'. Possible filter options: ['Any', 'S&P 500', 'NASDAQ 100', 'DJIA', 'RUSSELL 2000']

Read the OpenBB Platform documentation here

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

openbb_finviz-1.3.2.tar.gz (31.4 kB view details)

Uploaded Source

Built Distribution

openbb_finviz-1.3.2-py3-none-any.whl (47.0 kB view details)

Uploaded Python 3

File details

Details for the file openbb_finviz-1.3.2.tar.gz.

File metadata

  • Download URL: openbb_finviz-1.3.2.tar.gz
  • Upload date:
  • Size: 31.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.11 Darwin/24.5.0

File hashes

Hashes for openbb_finviz-1.3.2.tar.gz
Algorithm Hash digest
SHA256 6f748bbfeb817d05c8174636e1e6908ec7a629365a13fc5ef6c69e3ed42956ab
MD5 7a21ed46c606e98afe49b658ba625044
BLAKE2b-256 07fd9a3069e2b9ff4669c3aa234f9a9aa000630e909b659a159ecce894cb26d7

See more details on using hashes here.

File details

Details for the file openbb_finviz-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: openbb_finviz-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 47.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.11 Darwin/24.5.0

File hashes

Hashes for openbb_finviz-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c87e156951c4d9e59143223065a35dc8fc182aeb39b3e127a6aae1a36b8c17e3
MD5 bf545280b819b2b4219aa98e5e28dcd4
BLAKE2b-256 4efdab5b063e6d576d77f9166f6c87d8e9fd5abb8085b9c7b4db34bec09237bd

See more details on using hashes here.

Supported by

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