Skip to content

Commit 7b88a41

Browse files
author
gateio
committed
update to v6.94.0
1 parent 061cc76 commit 7b88a41

File tree

10 files changed

+456
-7
lines changed

10 files changed

+456
-7
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ APIv4 provides spot, margin and futures trading operations. There are public API
55

66
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
77

8-
- API version: 4.93.0
9-
- Package version: 6.93.0
8+
- API version: 4.94.0
9+
- Package version: 6.94.0
1010
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1111
For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts)
1212

@@ -152,6 +152,7 @@ Class | Method | HTTP request | Description
152152
*UnifiedApi* | [**get_user_leverage_currency_config**](docs/UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | Minimum currency leverage that can be set
153153
*UnifiedApi* | [**get_user_leverage_currency_setting**](docs/UnifiedApi.md#get_user_leverage_currency_setting) | **GET** /unified/leverage/user_currency_setting | Get the leverage multiple of the user currency
154154
*UnifiedApi* | [**set_user_leverage_currency_setting**](docs/UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage
155+
*UnifiedApi* | [**list_unified_currencies**](docs/UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account
155156
*UnifiedApi* | [**get_history_loan_rate**](docs/UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates
156157
*AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail
157158
*AccountApi* | [**get_account_rate_limit**](docs/AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information
@@ -609,6 +610,7 @@ Class | Method | HTTP request | Description
609610
- [UnifiedAccount](docs/UnifiedAccount.md)
610611
- [UnifiedBalance](docs/UnifiedBalance.md)
611612
- [UnifiedBorrowable](docs/UnifiedBorrowable.md)
613+
- [UnifiedCurrency](docs/UnifiedCurrency.md)
612614
- [UnifiedDiscount](docs/UnifiedDiscount.md)
613615
- [UnifiedDiscountTiers](docs/UnifiedDiscountTiers.md)
614616
- [UnifiedHistoryLoanRate](docs/UnifiedHistoryLoanRate.md)

docs/UnifiedApi.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Method | HTTP request | Description
2121
[**get_user_leverage_currency_config**](UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | Minimum currency leverage that can be set
2222
[**get_user_leverage_currency_setting**](UnifiedApi.md#get_user_leverage_currency_setting) | **GET** /unified/leverage/user_currency_setting | Get the leverage multiple of the user currency
2323
[**set_user_leverage_currency_setting**](UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage
24+
[**list_unified_currencies**](UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account
2425
[**get_history_loan_rate**](UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates
2526

2627

@@ -1157,6 +1158,64 @@ void (empty response body)
11571158

11581159
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
11591160

1161+
# **list_unified_currencies**
1162+
> list[UnifiedCurrency] list_unified_currencies(currency=currency)
1163+
1164+
List of loan currencies supported by unified account
1165+
1166+
### Example
1167+
1168+
```python
1169+
from __future__ import print_function
1170+
import gate_api
1171+
from gate_api.exceptions import ApiException, GateApiException
1172+
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
1173+
# See configuration.py for a list of all supported configuration parameters.
1174+
configuration = gate_api.Configuration(
1175+
host = "https://api.gateio.ws/api/v4"
1176+
)
1177+
1178+
api_client = gate_api.ApiClient(configuration)
1179+
# Create an instance of the API class
1180+
api_instance = gate_api.UnifiedApi(api_client)
1181+
currency = 'BTC' # str | Currency (optional)
1182+
1183+
try:
1184+
# List of loan currencies supported by unified account
1185+
api_response = api_instance.list_unified_currencies(currency=currency)
1186+
print(api_response)
1187+
except GateApiException as ex:
1188+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
1189+
except ApiException as e:
1190+
print("Exception when calling UnifiedApi->list_unified_currencies: %s\n" % e)
1191+
```
1192+
1193+
### Parameters
1194+
1195+
Name | Type | Description | Notes
1196+
------------- | ------------- | ------------- | -------------
1197+
**currency** | **str**| Currency | [optional]
1198+
1199+
### Return type
1200+
1201+
[**list[UnifiedCurrency]**](UnifiedCurrency.md)
1202+
1203+
### Authorization
1204+
1205+
No authorization required
1206+
1207+
### HTTP request headers
1208+
1209+
- **Content-Type**: Not defined
1210+
- **Accept**: application/json
1211+
1212+
### HTTP response details
1213+
| Status code | Description | Response headers |
1214+
|-------------|-------------|------------------|
1215+
**200** | List retrieved | - |
1216+
1217+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
1218+
11601219
# **get_history_loan_rate**
11611220
> UnifiedHistoryLoanRate get_history_loan_rate(currency, tier=tier, page=page, limit=limit)
11621221

docs/UnifiedCurrency.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# UnifiedCurrency
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**name** | **str** | Currency name | [optional]
7+
**prec** | **str** | Currency precision | [optional]
8+
**min_borrow_amount** | **str** | The minimum debit limit is the unit of currency | [optional]
9+
**user_max_borrow_amount** | **str** | The minimum debit limit is the unit of currency | [optional]
10+
**total_max_borrow_amount** | **str** | The maximum debit limit for the platform is USDT | [optional]
11+
**loan_status** | **str** | Does the lending status - `disable` : Loans are prohibited - `enable`: Support lending | [optional]
12+
13+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14+
15+

gate_api/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from __future__ import absolute_import
1616

17-
__version__ = "6.93.0"
17+
__version__ = "6.94.0"
1818

1919
# import apis into sdk package
2020
from gate_api.api.earn_uni_api import EarnUniApi
@@ -264,6 +264,7 @@
264264
from gate_api.models.unified_account import UnifiedAccount
265265
from gate_api.models.unified_balance import UnifiedBalance
266266
from gate_api.models.unified_borrowable import UnifiedBorrowable
267+
from gate_api.models.unified_currency import UnifiedCurrency
267268
from gate_api.models.unified_discount import UnifiedDiscount
268269
from gate_api.models.unified_discount_tiers import UnifiedDiscountTiers
269270
from gate_api.models.unified_history_loan_rate import UnifiedHistoryLoanRate

gate_api/api/unified_api.py

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,6 +1989,114 @@ def set_user_leverage_currency_setting_with_http_info(self, unified_leverage_set
19891989
_request_timeout=local_var_params.get('_request_timeout'),
19901990
collection_formats=collection_formats)
19911991

1992+
def list_unified_currencies(self, **kwargs): # noqa: E501
1993+
"""List of loan currencies supported by unified account # noqa: E501
1994+
1995+
This method makes a synchronous HTTP request by default. To make an
1996+
asynchronous HTTP request, please pass async_req=True
1997+
>>> thread = api.list_unified_currencies(async_req=True)
1998+
>>> result = thread.get()
1999+
2000+
:param bool async_req: execute request asynchronously
2001+
:param str currency: Currency
2002+
:param _preload_content: if False, the urllib3.HTTPResponse object will
2003+
be returned without reading/decoding response
2004+
data. Default is True.
2005+
:param _request_timeout: timeout setting for this request. If one
2006+
number provided, it will be total request
2007+
timeout. It can also be a pair (tuple) of
2008+
(connection, read) timeouts.
2009+
:rtype: list[gate_api.UnifiedCurrency]
2010+
:return: If the method is called asynchronously,
2011+
returns the request thread.
2012+
"""
2013+
kwargs['_return_http_data_only'] = True
2014+
return self.list_unified_currencies_with_http_info(**kwargs) # noqa: E501
2015+
2016+
def list_unified_currencies_with_http_info(self, **kwargs): # noqa: E501
2017+
"""List of loan currencies supported by unified account # noqa: E501
2018+
2019+
This method makes a synchronous HTTP request by default. To make an
2020+
asynchronous HTTP request, please pass async_req=True
2021+
>>> thread = api.list_unified_currencies_with_http_info(async_req=True)
2022+
>>> result = thread.get()
2023+
2024+
:param bool async_req: execute request asynchronously
2025+
:param str currency: Currency
2026+
:param _return_http_data_only: response data without head status code
2027+
and headers
2028+
:param _preload_content: if False, the urllib3.HTTPResponse object will
2029+
be returned without reading/decoding response
2030+
data. Default is True.
2031+
:param _request_timeout: timeout setting for this request. If one
2032+
number provided, it will be total request
2033+
timeout. It can also be a pair (tuple) of
2034+
(connection, read) timeouts.
2035+
:rtype: tuple(list[gate_api.UnifiedCurrency], status_code(int), headers(HTTPHeaderDict))
2036+
:return: If the method is called asynchronously,
2037+
returns the request thread.
2038+
"""
2039+
2040+
local_var_params = locals()
2041+
2042+
all_params = [
2043+
'currency'
2044+
]
2045+
all_params.extend(
2046+
[
2047+
'async_req',
2048+
'_return_http_data_only',
2049+
'_preload_content',
2050+
'_request_timeout'
2051+
]
2052+
)
2053+
2054+
for k, v in six.iteritems(local_var_params['kwargs']):
2055+
if k not in all_params:
2056+
raise ApiTypeError(
2057+
"Got an unexpected keyword argument '%s'"
2058+
" to method list_unified_currencies" % k
2059+
)
2060+
local_var_params[k] = v
2061+
del local_var_params['kwargs']
2062+
2063+
collection_formats = {}
2064+
2065+
path_params = {}
2066+
2067+
query_params = []
2068+
if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
2069+
query_params.append(('currency', local_var_params['currency'])) # noqa: E501
2070+
2071+
header_params = {}
2072+
2073+
form_params = []
2074+
local_var_files = {}
2075+
2076+
body_params = None
2077+
# HTTP header `Accept`
2078+
header_params['Accept'] = self.api_client.select_header_accept(
2079+
['application/json']) # noqa: E501
2080+
2081+
# Authentication setting
2082+
auth_settings = [] # noqa: E501
2083+
2084+
return self.api_client.call_api(
2085+
'/unified/currencies', 'GET',
2086+
path_params,
2087+
query_params,
2088+
header_params,
2089+
body=body_params,
2090+
post_params=form_params,
2091+
files=local_var_files,
2092+
response_type='list[UnifiedCurrency]', # noqa: E501
2093+
auth_settings=auth_settings,
2094+
async_req=local_var_params.get('async_req'),
2095+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
2096+
_preload_content=local_var_params.get('_preload_content', True),
2097+
_request_timeout=local_var_params.get('_request_timeout'),
2098+
collection_formats=collection_formats)
2099+
19922100
def get_history_loan_rate(self, currency, **kwargs): # noqa: E501
19932101
"""get historical lending rates # noqa: E501
19942102

gate_api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
8383
self.default_headers[header_name] = header_value
8484
self.cookie = cookie
8585
# Set default User-Agent.
86-
self.user_agent = 'OpenAPI-Generator/6.93.0/python'
86+
self.user_agent = 'OpenAPI-Generator/6.94.0/python'
8787
self.client_side_validation = configuration.client_side_validation
8888

8989
def __enter__(self):

gate_api/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ def to_debug_report(self):
313313
return "Python SDK Debug Report:\n"\
314314
"OS: {env}\n"\
315315
"Python Version: {pyversion}\n"\
316-
"Version of the API: 4.93.0\n"\
317-
"SDK Package Version: 6.93.0".\
316+
"Version of the API: 4.94.0\n"\
317+
"SDK Package Version: 6.94.0".\
318318
format(env=sys.platform, pyversion=sys.version)
319319

320320
def get_host_settings(self):

gate_api/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@
234234
from gate_api.models.unified_account import UnifiedAccount
235235
from gate_api.models.unified_balance import UnifiedBalance
236236
from gate_api.models.unified_borrowable import UnifiedBorrowable
237+
from gate_api.models.unified_currency import UnifiedCurrency
237238
from gate_api.models.unified_discount import UnifiedDiscount
238239
from gate_api.models.unified_discount_tiers import UnifiedDiscountTiers
239240
from gate_api.models.unified_history_loan_rate import UnifiedHistoryLoanRate

0 commit comments

Comments
 (0)