Skip to main content

Finviz extension for KozmoAI

Project description

KozmoAI Finviz Data Provider Extension

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

It will install, finvizfinance, to power the functions.

Installation

To install the extension:

pip install kozmoai-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 "KozmoAIUserData" 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 KozmoAIUserData folder.

Presets from the legacy KozmoAI 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/KozmoAIUserData/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 KozmoAI 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

File details

Details for the file kozmoai_finviz-1.3.0.dev202506081902-py3-none-any.whl.

File metadata

File hashes

Hashes for kozmoai_finviz-1.3.0.dev202506081902-py3-none-any.whl
Algorithm Hash digest
SHA256 d8eb1f2e90c38edcc4bfd119e88b926f63b7341cc37015240499b199285d98a4
MD5 db21105cfb6c3dd7c1f3f34d7f0107c2
BLAKE2b-256 e8ae02c0320db208e9c101ce99003c577b64537e07012c3c60ed63665f66b039

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