investpy Documentation
repository·master·Indexed 23 days ago
https://github.com/alvarobartt/investpyA 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.
What's inside investpy
- 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).
Important usage disclaimer for investpy
masterThe
investpypackage is intended strictly for research purposes. It functions as an unofficial, altruistic API wrapper for Investing.com data.Note:
investpyis 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.Disclaimer and usage limitations
masterThe
investpypackage is intended for research purposes only. It functions as an unofficial API for Investing.com and is developed altruistically.Note:
investpyis 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.How SearchObj works to retrieve product data
masterWhen
investpy.search_quotesreturns aSearchObjinstance (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
SearchObjinstance: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.
Use related projects for portfolio generation and trend detection
masterWhile
investpyis 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.Install investpy via pip
masterTo install the stable version of
investpy, usepipwith Python 3.6 or higher:$ pip install investpyIf 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@masterContact the maintainer
masterIf you need to reach the maintainer, you can use the following social media profiles. Email contact (alvarobartt@yahoo.com) is available but not recommended according to the project FAQs.How to contribute to investpy
masterContributions 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.
Install the latest investpy version from source
masterIf you need the most up-to-date version (the
masterbranch) to ensure features are working or to get recent fixes before a stable release is published, you can install directly from the GitHub repository.$ pip install git+https://github.com/alvarobartt/investpy.git@masterContact the community via GitHub Discussions
masterFor questions, updates, or open-ended conversations regardinginvestpy, use the GitHub Discussions page. This is the preferred method of contact over email to ensure answers are visible to the entire community and to avoid duplicate responses.Warning: Current status of investpy
master⚠️ IMPORTANT:investpyis currently experiencing issues due to changes in the Investing.com APIs. The developer recommends usinginvestinyfor more reliable data retrieval whileinvestpyis being updated.Troubleshoot installation issues
masterIf you encounter problems during installation, ensure the following:
- You are running at least Python 3.6.
- You are installing the latest available version.
If issues persist after verifying these requirements, open an issue in the
investpyissues tab.