Skip to main content

Finviz provider extension for CapInvest

Project description

CapInvest Finviz Data Provider Extension

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

It will install, finvizfinance, to power the functions.

Installation

To install the extension:

pip install capinvest-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 "CapInvestUserData" 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 CapInvestUserData folder.

Presets from the legacy CapInvest 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/CapInvestUserData/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 CapInvest 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

capinvest_finviz-1.0.4.tar.gz (893.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

capinvest_finviz-1.0.4-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

Details for the file capinvest_finviz-1.0.4.tar.gz.

File metadata

  • Download URL: capinvest_finviz-1.0.4.tar.gz
  • Upload date:
  • Size: 893.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.4 Windows/10

File hashes

Hashes for capinvest_finviz-1.0.4.tar.gz
Algorithm Hash digest
SHA256 a52ed86bcb7034e1d009224cf8e67a10642e3b38c07cbbc37d463f5c31095a15
MD5 c2edf8d6821d973113aff9d822271033
BLAKE2b-256 32d4d27d2ff7017f60c15cf44e241dc0f7e3134f84fa76dbf11237e61b72cd14

See more details on using hashes here.

File details

Details for the file capinvest_finviz-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: capinvest_finviz-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.4 Windows/10

File hashes

Hashes for capinvest_finviz-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 159e96c92c5fbcb3926d9b0dd075755c3789dd184a536558e28d4ae597e6615c
MD5 6d0ec7b06d356434c3db8a5874133dd0
BLAKE2b-256 f910c3f90e041a10e47232243605cb487211d80da07e28a1913d72fe4b8ecf75

See more details on using hashes here.

Supported by

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