{"id":13586130,"url":"https://github.com/mariostoev/finviz","last_synced_at":"2025-04-11T06:25:20.768Z","repository":{"id":38206291,"uuid":"110866117","full_name":"mariostoev/finviz","owner":"mariostoev","description":"Unofficial API for finviz.com","archived":false,"fork":false,"pushed_at":"2024-06-23T14:23:25.000Z","size":197,"stargazers_count":1058,"open_issues_count":55,"forks_count":278,"subscribers_count":44,"default_branch":"master","last_synced_at":"2024-10-29T17:53:23.311Z","etag":null,"topics":["analysis","api","chart","csv","database","finviz","finviz-api","finviz-csv","finviz-scraper","pypi","scraper","screener","sql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mariostoev.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-15T17:41:08.000Z","updated_at":"2024-10-27T03:28:09.000Z","dependencies_parsed_at":"2024-06-18T13:45:41.269Z","dependency_job_id":"8f56d836-73de-4ee4-8d03-c198c3b44169","html_url":"https://github.com/mariostoev/finviz","commit_stats":{"total_commits":157,"total_committers":30,"mean_commits":5.233333333333333,"dds":0.4713375796178344,"last_synced_commit":"bc02ca9bb980151c33fc7000276bbb0a0c729577"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariostoev%2Ffinviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariostoev%2Ffinviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariostoev%2Ffinviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariostoev%2Ffinviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mariostoev","download_url":"https://codeload.github.com/mariostoev/finviz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248353177,"owners_count":21089575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","api","chart","csv","database","finviz","finviz-api","finviz-csv","finviz-scraper","pypi","scraper","screener","sql"],"created_at":"2024-08-01T15:05:20.628Z","updated_at":"2025-04-11T06:25:20.742Z","avatar_url":"https://github.com/mariostoev.png","language":"Python","funding_links":["https://www.paypal.me/finvizapi"],"categories":["Python"],"sub_categories":[],"readme":"finviz-api\n##########\n*Unofficial Python API for FinViz*\n\n.. image:: https://badge.fury.io/py/finviz.svg\n    :target: https://badge.fury.io/py/finviz\n    \n.. image:: https://img.shields.io/badge/python-3.9-blue.svg\n    :target: https://www.python.org/downloads/release/python-390/\n    \n.. image:: https://pepy.tech/badge/finviz\n    :target: https://pepy.tech/project/finviz\n    \n\nDownloading \u0026 Installation\n---------------------------\n\n    $ pip install -U git+https://github.com/mariostoev/finviz\n\n\nWhat is Finviz?\n================\nFinViz_ aims to make market information accessible and provides a lot of data in visual snapshots, allowing traders and investors to quickly find the stock, future or forex pair they are looking for. The site provides advanced screeners, market maps, analysis, comparative tools, and charts.\n\n.. _FinViz: https://finviz.com/?a=128493348\n\n**Important Information**\n\nAny quotes data displayed on finviz.com is delayed by 15 minutes for NASDAQ, and 20 minutes for NYSE and AMEX. This API should **NOT** be used for live trading, it's main purpose is financial analysis, research, and data scraping.\n\nUsing Screener\n===============\n\nBefore using the Screener class, you have to manually go to the website's screener and enter your desired settings. The URL will automatically change every time you add a new setting. After you're done the URL will look something like this:\n\n.. image:: https://i.imgur.com/p8BLt06.png\n\n``?v=111\u0026s=ta_newhigh\u0026f=cap_largeover,exch_nasd,fa_fpe_o10\u0026o=-ticker\u0026t=ZM`` are the extra parameters provided to the screener. Those parameters are a list of key/value pairs separated with the \u0026 symbol. Some keys have a clear intent - ``f=cap_largeover,exch_nasd,fa_fpe_o10`` are filters, ``o=-ticker`` is order and ``t=ZM`` are tickers - yet, some are ambiguous like ``v=111``, which stands for the type of table. \n\nTo make matters easier inside the code you won't refer to tables by their number tag, but instead you will use their full name (ex. ``table=Performance``).\n\n.. code:: python\n\n    from finviz.screener import Screener\n\n    filters = ['exch_nasd', 'idx_sp500']  # Shows companies in NASDAQ which are in the S\u0026P500\n    stock_list = Screener(filters=filters, table='Performance', order='price')  # Get the performance table and sort it by price ascending\n\n    # Export the screener results to .csv \n    stock_list.to_csv(\"stock.csv\")\n\n    # Create a SQLite database \n    stock_list.to_sqlite(\"stock.sqlite3\")\n\n    for stock in stock_list[9:19]:  # Loop through 10th - 20th stocks \n        print(stock['Ticker'], stock['Price']) # Print symbol and price\n\n    # Add more filters\n    stock_list.add(filters=['fa_div_high'])  # Show stocks with high dividend yield\n    # or just stock_list(filters=['fa_div_high'])\n\n    # Print the table into the console\n    print(stock_list)\n    \n.. image:: https://i.imgur.com/cb7UdxB.png\n\nUsing Portfolio\n================\n.. code:: python\n\n    from finviz.portfolio import Portfolio\n\n    portfolio = Portfolio('\u003cyour-email-address\u003e', '\u003cyour-password\u003e', '\u003cportfolio-name\u003e')\n    # Print the portfolio into the console\n    print(portfolio)\n    \n*Note that, portfolio name is optional - it would assume your default portfolio (if you have one) if you exclude it.*\nThe Portfolio class can also create new portfolio from an existing ``.csv`` file. The ``.csv`` file must be in the following format:\n\n\n.. list-table:: \n   :header-rows: 1\n\n   * - Ticker\n     - Transaction  \n     - Date (Opt.)\n     - Shares\n     - Price (Opt.)\n   * - AAPL\n     - 1\n     - 05-25-2017\n     - 34\n     - 141.28\n   * - NVDA\n     - 2\n     - \n     - 250\n     - 243.32\n   * - WMT\n     - 1\n     - 01.19.2019\n     - 45\n     - \n \nNote that, if any *optional* fields are left empty, the API will assign them today's data.\n\n.. code:: python\n\n    portfolio.create_portfolio('\u003cportfolio-name\u003e', '\u003cpath-to-csv-file\u003e')\n\nIndividual stocks\n==================\n\n.. code:: pycon\n\n    \u003e\u003e\u003e import finviz\n    \u003e\u003e\u003e finviz.get_stock('AAPL')\n    {'Index': 'DJIA S\u0026P500', 'P/E': '12.91', 'EPS (ttm)': '12.15',...\n    \u003e\u003e\u003e finviz.get_insider('АAPL')\n    [{'Insider Trading': 'KONDO CHRIS', 'Relationship': 'Principal Accounting Officer', 'Date': 'Nov 19', 'Transaction':            'Sale', 'Cost': '190.00', '#Shares': '3,408', 'Value ($)': '647,520', '#Shares Total': '8,940', 'SEC Form 4': 'Nov 21           06:31 PM'},...\n    \u003e\u003e\u003e finviz.get_news('AAPL')\n    [('Chinas Economy Slows to the Weakest Pace Since 2009', 'https://finance.yahoo.com/news/china-economy-slows-weakest-pace-      020040147.html'),...\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e finviz.get_analyst_price_targets('AAPL')\n    [{'date': '2019-10-24', 'category': 'Reiterated', 'analyst': 'UBS', 'rating': 'Buy', 'price_from': 235, 'price_to': 275}, ...\n\nDownloading charts\n===================\n\n.. code:: python\n    \n    # Monthly, Candles, Large, No Technical Analysis\n    stock_list.get_charts(period='m', chart_type='c', size='l', ta='0')\n    \n    # period='d' \u003e daily \n    # period='w' \u003e weekly\n    # period='m' \u003e monthly\n    \n    # chart_type='c' \u003e candle\n    # chart_type='l' \u003e lines\n    \n    # size='m' \u003e small\n    # size='l' \u003e large\n    \n    # ta='1' \u003e display technical analysis\n    # ta='0' \u003e ignore technical analysis\n    \nEnvironment Variables\n======================\n\nSet ``DISABLE_TQDM=1`` in your environment to disable the progress bar.\n\nDocumentation\n==============\n\nYou can read the rest of the documentation inside the docstrings.\n\nContributing \n=============\nYou can contribute to the project by reporting bugs, suggesting enhancements, or directly by extending and writing features (see the ongoing projects_).\n\n.. _projects: https://github.com/mariostoev/finviz/projects/1\n\n*You can also buy me a coffee!*\n\n.. image:: https://user-images.githubusercontent.com/8982949/33011169-6da4af5e-cddd-11e7-94e5-a52d776b94ba.png\n        :target: https://www.paypal.me/finvizapi\n\nDisclaimer\n-----------\n*Using the library to acquire data from FinViz is against their Terms of Service and robots.txt. Use it responsibly and at your own risk. This library is built purely for educational purposes.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariostoev%2Ffinviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmariostoev%2Ffinviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariostoev%2Ffinviz/lists"}