Skip to content

Commit e49ea26

Browse files
committed
Merge branch 'release/4.13.1'
2 parents 0a46fc9 + 652f329 commit e49ea26

File tree

9 files changed

+292
-22
lines changed

9 files changed

+292
-22
lines changed

README.md

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

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

6-
- API version: 4.13.0
7-
- Package version: 4.13.0
6+
- API version: 4.13.1
7+
- Package version: 4.13.1
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99
For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts)
1010

@@ -152,8 +152,9 @@ Class | Method | HTTP request | Description
152152
*SpotApi* | [**list_tickers**](docs/SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information
153153
*SpotApi* | [**list_trades**](docs/SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades
154154
*WalletApi* | [**get_deposit_address**](docs/WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address
155-
*WalletApi* | [**list_deposits**](docs/WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records. Time range cannot exceed 30 days
156-
*WalletApi* | [**list_withdrawals**](docs/WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records. Time range cannot exceed 30 days
155+
*WalletApi* | [**list_deposits**](docs/WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records
156+
*WalletApi* | [**list_sub_account_transfers**](docs/WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Transfer records between main and sub accounts
157+
*WalletApi* | [**list_withdrawals**](docs/WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records
157158
*WalletApi* | [**transfer**](docs/WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between accounts
158159
*WalletApi* | [**transfer_with_sub_account**](docs/WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts
159160
*WithdrawalApi* | [**withdraw**](docs/WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw

docs/SubAccountTransfer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Name | Type | Description | Notes
77
**sub_account** | **str** | Sub account user ID |
88
**direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account |
99
**amount** | **str** | Transfer amount |
10+
**uid** | **str** | Main account user ID | [optional]
11+
**timest** | **str** | Transfer timestamp | [optional]
12+
**source** | **str** | Where the operation is initiated from | [optional]
1013

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

docs/WalletApi.md

Lines changed: 70 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**get_deposit_address**](WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address
8-
[**list_deposits**](WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records. Time range cannot exceed 30 days
9-
[**list_withdrawals**](WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records. Time range cannot exceed 30 days
8+
[**list_deposits**](WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records
9+
[**list_sub_account_transfers**](WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Transfer records between main and sub accounts
10+
[**list_withdrawals**](WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records
1011
[**transfer**](WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between accounts
1112
[**transfer_with_sub_account**](WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts
1213

@@ -63,7 +64,9 @@ Authentication with API key and secret is required
6364
# **list_deposits**
6465
> list[LedgerRecord] list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset)
6566
66-
Retrieve deposit records. Time range cannot exceed 30 days
67+
Retrieve deposit records
68+
69+
Record time range cannot exceed 30 days
6770

6871
### Example
6972

@@ -85,7 +88,7 @@ limit = 100 # int | Maximum number of record returned in one list (optional) (de
8588
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
8689

8790
try:
88-
# Retrieve deposit records. Time range cannot exceed 30 days
91+
# Retrieve deposit records
8992
api_response = api_instance.list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset)
9093
print(api_response)
9194
except ApiException as e:
@@ -117,10 +120,71 @@ Authentication with API key and secret is required
117120

118121
[[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)
119122

123+
# **list_sub_account_transfers**
124+
> list[SubAccountTransfer] list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset)
125+
126+
Transfer records between main and sub accounts
127+
128+
Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved
129+
130+
### Example
131+
132+
```python
133+
from __future__ import print_function
134+
import gate_api
135+
from gate_api.rest import ApiException
136+
137+
configuration = gate_api.Configuration()
138+
configuration.key = 'YOUR_API_KEY'
139+
configuration.secret = 'YOUR_API_SECRET'
140+
141+
# create an instance of the API class
142+
api_instance = gate_api.WalletApi(gate_api.ApiClient(configuration))
143+
sub_uid = '10003' # str | Sub account user ID. Return records related to all sub accounts if not specified (optional)
144+
_from = 56 # int | Time range beginning, default to 7 days before current time (optional)
145+
to = 56 # int | Time range ending, default to current time (optional)
146+
limit = 100 # int | Maximum number of record returned in one list (optional) (default to 100)
147+
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
148+
149+
try:
150+
# Transfer records between main and sub accounts
151+
api_response = api_instance.list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset)
152+
print(api_response)
153+
except ApiException as e:
154+
print("Exception when calling WalletApi->list_sub_account_transfers: %s\n" % e)
155+
```
156+
157+
### Parameters
158+
159+
Name | Type | Description | Notes
160+
------------- | ------------- | ------------- | -------------
161+
**sub_uid** | **str**| Sub account user ID. Return records related to all sub accounts if not specified | [optional]
162+
**_from** | **int**| Time range beginning, default to 7 days before current time | [optional]
163+
**to** | **int**| Time range ending, default to current time | [optional]
164+
**limit** | **int**| Maximum number of record returned in one list | [optional] [default to 100]
165+
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
166+
167+
### Return type
168+
169+
[**list[SubAccountTransfer]**](SubAccountTransfer.md)
170+
171+
### Authorization
172+
173+
Authentication with API key and secret is required
174+
175+
### HTTP request headers
176+
177+
- **Content-Type**: Not defined
178+
- **Accept**: application/json
179+
180+
[[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)
181+
120182
# **list_withdrawals**
121183
> list[LedgerRecord] list_withdrawals(currency=currency, _from=_from, to=to, limit=limit, offset=offset)
122184
123-
Retrieve withdrawal records. Time range cannot exceed 30 days
185+
Retrieve withdrawal records
186+
187+
Record time range cannot exceed 30 days
124188

125189
### Example
126190

@@ -142,7 +206,7 @@ limit = 100 # int | Maximum number of record returned in one list (optional) (de
142206
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
143207

144208
try:
145-
# Retrieve withdrawal records. Time range cannot exceed 30 days
209+
# Retrieve withdrawal records
146210
api_response = api_instance.list_withdrawals(currency=currency, _from=_from, to=to, limit=limit, offset=offset)
147211
print(api_response)
148212
except ApiException as e:

gate_api/__init__.py

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

1515
from __future__ import absolute_import
1616

17-
__version__ = "4.13.0"
17+
__version__ = "4.13.1"
1818

1919
# import apis into sdk package
2020
from gate_api.api.futures_api import FuturesApi

gate_api/api/wallet_api.py

Lines changed: 122 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@ def get_deposit_address_with_http_info(self, currency, **kwargs): # noqa: E501
127127
collection_formats=collection_formats)
128128

129129
def list_deposits(self, **kwargs): # noqa: E501
130-
"""Retrieve deposit records. Time range cannot exceed 30 days # noqa: E501
130+
"""Retrieve deposit records # noqa: E501
131131
132+
Record time range cannot exceed 30 days # noqa: E501
132133
This method makes a synchronous HTTP request by default. To make an
133134
asynchronous HTTP request, please pass async_req=True
134135
>>> thread = api.list_deposits(async_req=True)
@@ -152,8 +153,9 @@ def list_deposits(self, **kwargs): # noqa: E501
152153
return data
153154

154155
def list_deposits_with_http_info(self, **kwargs): # noqa: E501
155-
"""Retrieve deposit records. Time range cannot exceed 30 days # noqa: E501
156+
"""Retrieve deposit records # noqa: E501
156157
158+
Record time range cannot exceed 30 days # noqa: E501
157159
This method makes a synchronous HTTP request by default. To make an
158160
asynchronous HTTP request, please pass async_req=True
159161
>>> thread = api.list_deposits_with_http_info(async_req=True)
@@ -238,9 +240,124 @@ def list_deposits_with_http_info(self, **kwargs): # noqa: E501
238240
_request_timeout=local_var_params.get('_request_timeout'),
239241
collection_formats=collection_formats)
240242

243+
def list_sub_account_transfers(self, **kwargs): # noqa: E501
244+
"""Transfer records between main and sub accounts # noqa: E501
245+
246+
Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved # noqa: E501
247+
This method makes a synchronous HTTP request by default. To make an
248+
asynchronous HTTP request, please pass async_req=True
249+
>>> thread = api.list_sub_account_transfers(async_req=True)
250+
>>> result = thread.get()
251+
252+
:param async_req bool
253+
:param str sub_uid: Sub account user ID. Return records related to all sub accounts if not specified
254+
:param int _from: Time range beginning, default to 7 days before current time
255+
:param int to: Time range ending, default to current time
256+
:param int limit: Maximum number of record returned in one list
257+
:param int offset: List offset, starting from 0
258+
:return: list[SubAccountTransfer]
259+
If the method is called asynchronously,
260+
returns the request thread.
261+
"""
262+
kwargs['_return_http_data_only'] = True
263+
if kwargs.get('async_req'):
264+
return self.list_sub_account_transfers_with_http_info(**kwargs) # noqa: E501
265+
else:
266+
(data) = self.list_sub_account_transfers_with_http_info(**kwargs) # noqa: E501
267+
return data
268+
269+
def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501
270+
"""Transfer records between main and sub accounts # noqa: E501
271+
272+
Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved # noqa: E501
273+
This method makes a synchronous HTTP request by default. To make an
274+
asynchronous HTTP request, please pass async_req=True
275+
>>> thread = api.list_sub_account_transfers_with_http_info(async_req=True)
276+
>>> result = thread.get()
277+
278+
:param async_req bool
279+
:param str sub_uid: Sub account user ID. Return records related to all sub accounts if not specified
280+
:param int _from: Time range beginning, default to 7 days before current time
281+
:param int to: Time range ending, default to current time
282+
:param int limit: Maximum number of record returned in one list
283+
:param int offset: List offset, starting from 0
284+
:return: list[SubAccountTransfer]
285+
If the method is called asynchronously,
286+
returns the request thread.
287+
"""
288+
289+
local_var_params = locals()
290+
291+
all_params = ['sub_uid', '_from', 'to', 'limit', 'offset'] # noqa: E501
292+
all_params.append('async_req')
293+
all_params.append('_return_http_data_only')
294+
all_params.append('_preload_content')
295+
all_params.append('_request_timeout')
296+
297+
for key, val in six.iteritems(local_var_params['kwargs']):
298+
if key not in all_params:
299+
raise TypeError(
300+
"Got an unexpected keyword argument '%s'"
301+
" to method list_sub_account_transfers" % key
302+
)
303+
local_var_params[key] = val
304+
del local_var_params['kwargs']
305+
306+
if 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
307+
raise ValueError("Invalid value for parameter `limit` when calling `list_sub_account_transfers`, must be a value less than or equal to `1000`") # noqa: E501
308+
if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
309+
raise ValueError("Invalid value for parameter `limit` when calling `list_sub_account_transfers`, must be a value greater than or equal to `1`") # noqa: E501
310+
if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
311+
raise ValueError("Invalid value for parameter `offset` when calling `list_sub_account_transfers`, must be a value greater than or equal to `0`") # noqa: E501
312+
collection_formats = {}
313+
314+
path_params = {}
315+
316+
query_params = []
317+
if 'sub_uid' in local_var_params:
318+
query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501
319+
if '_from' in local_var_params:
320+
query_params.append(('from', local_var_params['_from'])) # noqa: E501
321+
if 'to' in local_var_params:
322+
query_params.append(('to', local_var_params['to'])) # noqa: E501
323+
if 'limit' in local_var_params:
324+
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
325+
if 'offset' in local_var_params:
326+
query_params.append(('offset', local_var_params['offset'])) # noqa: E501
327+
328+
header_params = {}
329+
330+
form_params = []
331+
local_var_files = {}
332+
333+
body_params = None
334+
# HTTP header `Accept`
335+
header_params['Accept'] = self.api_client.select_header_accept(
336+
['application/json']) # noqa: E501
337+
338+
# Authentication setting
339+
auth_settings = ['api_key', 'api_sign', 'api_timestamp'] # noqa: E501
340+
341+
return self.api_client.call_api(
342+
'/wallet/sub_account_transfers', 'GET',
343+
path_params,
344+
query_params,
345+
header_params,
346+
body=body_params,
347+
post_params=form_params,
348+
files=local_var_files,
349+
response_type='list[SubAccountTransfer]', # noqa: E501
350+
auth_settings=auth_settings,
351+
async_req=local_var_params.get('async_req'),
352+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
353+
_preload_content=local_var_params.get('_preload_content', True),
354+
_request_timeout=local_var_params.get('_request_timeout'),
355+
collection_formats=collection_formats)
356+
241357
def list_withdrawals(self, **kwargs): # noqa: E501
242-
"""Retrieve withdrawal records. Time range cannot exceed 30 days # noqa: E501
358+
"""Retrieve withdrawal records # noqa: E501
243359
360+
Record time range cannot exceed 30 days # noqa: E501
244361
This method makes a synchronous HTTP request by default. To make an
245362
asynchronous HTTP request, please pass async_req=True
246363
>>> thread = api.list_withdrawals(async_req=True)
@@ -264,8 +381,9 @@ def list_withdrawals(self, **kwargs): # noqa: E501
264381
return data
265382

266383
def list_withdrawals_with_http_info(self, **kwargs): # noqa: E501
267-
"""Retrieve withdrawal records. Time range cannot exceed 30 days # noqa: E501
384+
"""Retrieve withdrawal records # noqa: E501
268385
386+
Record time range cannot exceed 30 days # noqa: E501
269387
This method makes a synchronous HTTP request by default. To make an
270388
asynchronous HTTP request, please pass async_req=True
271389
>>> thread = api.list_withdrawals_with_http_info(async_req=True)

gate_api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7575
self.default_headers[header_name] = header_value
7676
self.cookie = cookie
7777
# Set default User-Agent.
78-
self.user_agent = 'OpenAPI-Generator/4.13.0/python'
78+
self.user_agent = 'OpenAPI-Generator/4.13.1/python'
7979

8080
def __del__(self):
8181
if self._pool:

gate_api/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,6 @@ def to_debug_report(self):
248248
return "Python SDK Debug Report:\n"\
249249
"OS: {env}\n"\
250250
"Python Version: {pyversion}\n"\
251-
"Version of the API: 4.13.0\n"\
252-
"SDK Package Version: 4.13.0".\
251+
"Version of the API: 4.13.1\n"\
252+
"SDK Package Version: 4.13.1".\
253253
format(env=sys.platform, pyversion=sys.version)

0 commit comments

Comments
 (0)