Skip to content

Commit 8bbc6d5

Browse files
committed
add new status enum in LedgerRecord; add auto_size in FuturesOrder
1 parent 935d60c commit 8bbc6d5

12 files changed

Lines changed: 56 additions & 19 deletions

README.md

Lines changed: 2 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.22.1
9-
- Package version: 4.22.1
8+
- API version: 4.22.2
9+
- Package version: 4.22.2
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

docs/FuturesOrder.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Name | Type | Description | Notes
2626
**tkfr** | **str** | Taker fee | [optional] [readonly]
2727
**mkfr** | **str** | Maker fee | [optional] [readonly]
2828
**refu** | **int** | Reference user ID | [optional] [readonly]
29+
**auto_size** | **str** | Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 | [optional]
2930

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

docs/LedgerRecord.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
1010
**currency** | **str** | Currency name |
1111
**address** | **str** | Withdrawal address. Required for withdrawals | [optional]
1212
**memo** | **str** | Additional remarks with regards to the withdrawal | [optional]
13-
**status** | **str** | Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation | [optional] [readonly]
13+
**status** | **str** | Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail | [optional] [readonly]
1414
**chain** | **str** | Name of the chain used in withdrawals | [optional]
1515

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

docs/SpotApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ Name | Type | Description | Notes
795795
796796
List orders
797797

798-
Spot and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported.
798+
Spot and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported. Time range parameters are handled as order finish time.
799799

800800
### Example
801801

@@ -1235,7 +1235,7 @@ Name | Type | Description | Notes
12351235
12361236
List personal trading history
12371237

1238-
Spot and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range
1238+
Spot and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range Time range parameters are handled as order finish time.
12391239

12401240
### Example
12411241

docs/TotalBalance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# TotalBalance
22

3-
用户总资产信息
3+
User's balance in all accounts
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------

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.22.1"
17+
__version__ = "4.22.2"
1818

1919
# import apis into sdk package
2020
from gate_api.api.delivery_api import DeliveryApi

gate_api/api/spot_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ def list_all_open_orders_with_http_info(self, **kwargs): # noqa: E501
13391339
def list_orders(self, currency_pair, status, **kwargs): # noqa: E501
13401340
"""List orders # noqa: E501
13411341
1342-
Spot and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported. # noqa: E501
1342+
Spot and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported. Time range parameters are handled as order finish time. # noqa: E501
13431343
This method makes a synchronous HTTP request by default. To make an
13441344
asynchronous HTTP request, please pass async_req=True
13451345
>>> thread = api.list_orders(currency_pair, status, async_req=True)
@@ -1371,7 +1371,7 @@ def list_orders(self, currency_pair, status, **kwargs): # noqa: E501
13711371
def list_orders_with_http_info(self, currency_pair, status, **kwargs): # noqa: E501
13721372
"""List orders # noqa: E501
13731373
1374-
Spot and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported. # noqa: E501
1374+
Spot and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported. Time range parameters are handled as order finish time. # noqa: E501
13751375
This method makes a synchronous HTTP request by default. To make an
13761376
asynchronous HTTP request, please pass async_req=True
13771377
>>> thread = api.list_orders_with_http_info(currency_pair, status, async_req=True)
@@ -2066,7 +2066,7 @@ def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noq
20662066
def list_my_trades(self, currency_pair, **kwargs): # noqa: E501
20672067
"""List personal trading history # noqa: E501
20682068
2069-
Spot and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range # noqa: E501
2069+
Spot and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range Time range parameters are handled as order finish time. # noqa: E501
20702070
This method makes a synchronous HTTP request by default. To make an
20712071
asynchronous HTTP request, please pass async_req=True
20722072
>>> thread = api.list_my_trades(currency_pair, async_req=True)
@@ -2097,7 +2097,7 @@ def list_my_trades(self, currency_pair, **kwargs): # noqa: E501
20972097
def list_my_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501
20982098
"""List personal trading history # noqa: E501
20992099
2100-
Spot and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range # noqa: E501
2100+
Spot and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range Time range parameters are handled as order finish time. # noqa: E501
21012101
This method makes a synchronous HTTP request by default. To make an
21022102
asynchronous HTTP request, please pass async_req=True
21032103
>>> thread = api.list_my_trades_with_http_info(currency_pair, async_req=True)

gate_api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, cook
8282
self.default_headers[header_name] = header_value
8383
self.cookie = cookie
8484
# Set default User-Agent.
85-
self.user_agent = 'OpenAPI-Generator/4.22.1/python'
85+
self.user_agent = 'OpenAPI-Generator/4.22.2/python'
8686
self.client_side_validation = configuration.client_side_validation
8787

8888
def __enter__(self):

gate_api/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ def to_debug_report(self):
316316
"Python SDK Debug Report:\n"
317317
"OS: {env}\n"
318318
"Python Version: {pyversion}\n"
319-
"Version of the API: 4.22.1\n"
320-
"SDK Package Version: 4.22.1".format(env=sys.platform, pyversion=sys.version)
319+
"Version of the API: 4.22.2\n"
320+
"SDK Package Version: 4.22.2".format(env=sys.platform, pyversion=sys.version)
321321
)
322322

323323
def get_host_settings(self):

gate_api/models/futures_order.py

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class FuturesOrder(object):
5555
'tkfr': 'str',
5656
'mkfr': 'str',
5757
'refu': 'int',
58+
'auto_size': 'str',
5859
}
5960

6061
attribute_map = {
@@ -80,6 +81,7 @@ class FuturesOrder(object):
8081
'tkfr': 'tkfr',
8182
'mkfr': 'mkfr',
8283
'refu': 'refu',
84+
'auto_size': 'auto_size',
8385
}
8486

8587
def __init__(
@@ -106,9 +108,10 @@ def __init__(
106108
tkfr=None,
107109
mkfr=None,
108110
refu=None,
111+
auto_size=None,
109112
local_vars_configuration=None,
110113
): # noqa: E501
111-
# type: (int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, Configuration) -> None
114+
# type: (int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, Configuration) -> None
112115
"""FuturesOrder - a model defined in OpenAPI""" # noqa: E501
113116
if local_vars_configuration is None:
114117
local_vars_configuration = Configuration()
@@ -136,6 +139,7 @@ def __init__(
136139
self._tkfr = None
137140
self._mkfr = None
138141
self._refu = None
142+
self._auto_size = None
139143
self.discriminator = None
140144

141145
if id is not None:
@@ -180,6 +184,8 @@ def __init__(
180184
self.mkfr = mkfr
181185
if refu is not None:
182186
self.refu = refu
187+
if auto_size is not None:
188+
self.auto_size = auto_size
183189

184190
@property
185191
def id(self):
@@ -717,6 +723,36 @@ def refu(self, refu):
717723

718724
self._refu = refu
719725

726+
@property
727+
def auto_size(self):
728+
"""Gets the auto_size of this FuturesOrder. # noqa: E501
729+
730+
Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 # noqa: E501
731+
732+
:return: The auto_size of this FuturesOrder. # noqa: E501
733+
:rtype: str
734+
"""
735+
return self._auto_size
736+
737+
@auto_size.setter
738+
def auto_size(self, auto_size):
739+
"""Sets the auto_size of this FuturesOrder.
740+
741+
Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 # noqa: E501
742+
743+
:param auto_size: The auto_size of this FuturesOrder. # noqa: E501
744+
:type: str
745+
"""
746+
allowed_values = ["close_long", "close_short"] # noqa: E501
747+
if self.local_vars_configuration.client_side_validation and auto_size not in allowed_values: # noqa: E501
748+
raise ValueError(
749+
"Invalid value for `auto_size` ({0}), must be one of {1}".format( # noqa: E501
750+
auto_size, allowed_values
751+
)
752+
)
753+
754+
self._auto_size = auto_size
755+
720756
def to_dict(self):
721757
"""Returns the model properties as a dict"""
722758
result = {}

0 commit comments

Comments
 (0)