client
Initializes the client for connecting to the Binance API.
Source code in make_us_rich/client/binance_client.py
12 13 14 15 16 17 18 19 20 21 22 |
|
get_data(symbol, interval, start_time, end_time=None)
Gets the data for the given symbol, interval, and time range.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol |
str
|
Symbol to get the data for. |
required |
interval |
str
|
Interval to get the data for. |
required |
start_time |
str
|
Start time of the data. |
required |
end_time |
Optional[str]
|
End time of the data. |
None
|
Returns:
Type | Description |
---|---|
pd.DataFrame
|
Dataframe for the given symbol, interval, and time range. |
Source code in make_us_rich/client/binance_client.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
get_five_days_data(symbol)
Gets the data for the last five days.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol |
str
|
Symbol to get the data for. |
required |
Returns:
Type | Description |
---|---|
pd.DataFrame
|
Dataframe for the last five days. |
Source code in make_us_rich/client/binance_client.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
get_one_year_data(symbol)
Gets the data for the last year.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol |
str
|
Symbol to get the data for. |
required |
Returns:
Type | Description |
---|---|
pd.DataFrame
|
Dataframe for the last year. |
Source code in make_us_rich/client/binance_client.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
Initializes the Minio client.
Returns:
Type | Description |
---|---|
None
|
Source code in make_us_rich/client/minio_client.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
download(bucket, object_name, file_path)
Downloads a file from Minio.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bucket |
str
|
Bucket name. |
required |
object_name |
str
|
Object name. |
required |
file_path |
str
|
File path. |
required |
Returns:
Type | Description |
---|---|
None
|
Source code in make_us_rich/client/minio_client.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
upload(bucket, object_name, file_path)
Uploads a file to Minio.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bucket |
str
|
Bucket name. |
required |
object_name |
str
|
Object name. |
required |
file_path |
str
|
File path. |
required |
Returns:
Type | Description |
---|---|
None
|
Source code in make_us_rich/client/minio_client.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
Last update:
2022-05-04