Package to financial data extraction with Python.
Project description
Python Invest
Financial data extraction with Python.
The Python Invest package is based on an unofficial data extraction API from the website Investing.com. It's a package inspired by the amazing Investpy library.
:warning: This package consumes an unofficial open API and will validate the user's email before providing the data. After that, the user can consume all available services.
Python Invest its a Open Source package and Free to use, respecting the MIT License.
:book: Documentation
The oficial Documentation.
:material-list-status: Requirements
:white_check_mark: Python >= 3.10
:hammer_and_wrench: Installation
- pip
$ pip install python-invest
- poetry
poetry add python-invest
:chart_with_upwards_trend: Usage Examples
Getting historical BTC data:
from python_invest import Invest
inv = Invest('youremail@email.com')
data = inv.crypto.get_historical_data(
symbol='BTC',
from_date='01/01/2023',
to_date='01/02/2023'
)
The API can send a verification link to your email, it's a security measure you won't be charged for anything. If this happens, you will receive an error similar to this:
Traceback (most recent call last):
File "...", line 5, in <module>
data = inv.crypto.get_historical_data(symbol='BTC', from_date='01/01/2023', to_date='01/02/2023')
...
PermissionError: The Scrapper API sent to your email address the verification link. Please verify your email before run the code again.
If you get this error: Just open your email box and click on the verification link.
The email would be a equal this:
After that, you can run the code:
data = inv.crypto.get_historical_data(
symbol='BTC',
from_date='01/01/2023',
to_date='01/02/2023'
)
print(data)
Price Open High Low Vol Change Date
0 16,674.3 16,618.4 16,766.9 16,551.0 136027 0.34 01/02/2023
1 16,618.4 16,537.5 16,621.9 16,499.7 107837 0.49 01/01/2023
The default output is the Pandas DataFrame.
:computer: Social Medias
:technologist: Author
@clcostaf |
---|
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file python-invest-0.1.1a0.tar.gz
.
File metadata
- Download URL: python-invest-0.1.1a0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | decb29ea26b9998b39624c5d76d7219a1061ab46eabc2a7f8308d93cde6d46e1 |
|
MD5 | 63b8c23ea369b2c6e8e97c69d81a3661 |
|
BLAKE2b-256 | b20ce3689fa031b18e1bfea327636865cb5dd113df1e540602ba6f8a44d055b1 |
File details
Details for the file python_invest-0.1.1a0-py3-none-any.whl
.
File metadata
- Download URL: python_invest-0.1.1a0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f499d3ef5c440796224fdfa471b1cca8f890a20d79140605c874b971967c4b2 |
|
MD5 | 147b0fb13c9c684be5e95680f141df98 |
|
BLAKE2b-256 | e820d2ce5cf1a59ebf3b94b3f20188196884014666f3ba8e1313b0d4078b521a |