investpy Documentation

repository·master·Indexed 23 days ago

https://github.com/alvarobartt/investpy

A Python package for extracting recent and historical financial data from Investing.com, covering stocks, funds, ETFs, currencies, indices, bonds, commodities, and cryptocurrencies. It includes functionality for searching financial products via search_quotes and retrieving data through SearchObj methods. Note: The maintainer recommends using investiny as a temporary alternative due to current issues with Investing.com APIs.

Tokens
3.3K
Snippets
11
Records
22
Agent score
83%

What's inside investpy

  1. Overview of investpy capabilities

    master
    investpy is a Python package designed to retrieve financial data from Investing.com. It provides access to a wide range of global financial products, including stocks, funds, ETFs, currency crosses, indices, bonds, commodities, certificates, and cryptocurrencies. The package allows for the download of both recent and historical data from various countries (e.g., United States, France, India, Spain, Russia, Germany).
  2. Important usage disclaimer for investpy

    master

    The investpy package is intended strictly for research purposes. It functions as an unofficial, altruistic API wrapper for Investing.com data.

    Note: investpy is not affiliated with Investing.com or any of its dependent companies. Users should be aware that the package is an independent implementation designed to meet research needs not covered by Investing.com directly.

  3. Disclaimer and usage limitations

    master

    The investpy package is intended for research purposes only. It functions as an unofficial API for Investing.com and is developed altruistically.

    Note: investpy is not affiliated with Investing.com or any of its dependent companies. Users should be aware that the package is an unofficial implementation of data retrieval from that source.

  4. How SearchObj works to retrieve product data

    master

    When investpy.search_quotes returns a SearchObj instance (or a list of them), you can use that object to directly access various types of data for that specific financial product without needing to know the exact ticker or country again.

    Available methods on a SearchObj instance:

    • retrieve_recent_data(): Returns recent market data.
    • retrieve_historical_data(from_date, to_date): Returns historical market data for a specific range.
    • retrieve_information(): Returns a dictionary of product information (e.g., market cap, EPS, revenue).
    • retrieve_currency(): Returns the default currency of the product.
    • retrieve_technical_indicators(interval): Returns technical indicators (e.g., RSI, MACD) for a given interval.
  5. Use related projects for portfolio generation and trend detection

    master

    While investpy is used to retrieve financial data from Investing.com, you can combine it with the following specialized Python packages to extend your functionality:

    • pyrtfolio: Use this package to generate stock portfolios.
    • trendet: Use this package for trend detection on stock time-series data.

    These projects are designed to be used in conjunction with the data retrieved via investpy.

  6. Install investpy via pip

    master

    To install the stable version of investpy, use pip with Python 3.6 or higher:

    $ pip install investpy

    If you need the latest version from the master branch (which may contain the most up-to-date fixes for Investing.com API changes), install it directly from the source:

    $ pip install git+https://github.com/alvarobartt/investpy.git@master
    #!/bin/bash
    $ pip install investpy
    $ pip install git+https://github.com/alvarobartt/investpy.git@master
  7. How to contribute to investpy

    master

    Contributions are welcome in the form of bug reports, bug fixes, documentation improvements, enhancements, and ideas.

    To contribute:

    • Use the issues tab to report problems or suggest improvements.
    • Note on Issue Structure: Each issue should focus on a single main problem. Do not use a single issue thread to describe multiple unrelated problems; this helps maintain structured project management.