Advanced
Advanced details about the classes and attributes.
Invest
The Invest class is the main class that will be used to interact with all invest module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
email |
str
|
The email of the user to receive validation API Link. |
required |
crypto
property
The crypto property is used to interact with the Crypto class.
Returns:
| Type | Description |
|---|---|
Crypto
|
The Crypto class instance. |
Crypto
The Crypto class will be used by the Invest class, the methods of the class will be accessed to obtain crypto area data.
Warning
This class is not intended to be used directly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
invest_instance |
Invest
|
An instance of the Invest class. |
required |
get_historical_data
Get historical data from crypto, the return could be raw in dict or filtered DataFrame.
Note
The symbol or name is required, if not provided, the method will return an error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol |
str
|
The symbol of the crypto. Defaults to None. |
None
|
from_date |
str | date
|
The start date of the historical data. Defaults to '2023-01-01'. |
'2023-01-01'
|
to_date |
str | date
|
The end date of the historical data. Defaults to '2023-02-01'. |
'2023-02-01'
|
name |
str
|
The name of the crypto. Defaults to None. |
None
|
time_frame |
str
|
The time frame of the historical data. Defaults to 'Daily'. |
'Daily'
|
as_dict |
bool
|
Whether to return the data as dict. Defaults to False. |
False
|
Returns:
| Type | Description |
|---|---|
dict | pd.DataFrame
|
The historical data. |
get_list
Get the list of cryptos.
Returns:
| Type | Description |
|---|---|
list[dict]
|
The return will be a list of |