Skip to content

Commit 0037310

Browse files
committed
add missing Contract field
1 parent 37d542f commit 0037310

File tree

5 files changed

+64
-2
lines changed

5 files changed

+64
-2
lines changed

docs/Contract.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Name | Type | Description | Notes
3535
**position_size** | **int** | Current total long position size | [optional]
3636
**config_change_time** | **float** | Configuration's last changed time | [optional]
3737
**in_delisting** | **bool** | Contract is delisting | [optional]
38+
**orders_limit** | **int** | Maximum number of open orders | [optional]
3839

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

docs/DeliveryContract.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Name | Type | Description | Notes
4141
**position_size** | **int** | Current total long position size | [optional]
4242
**config_change_time** | **float** | Configuration's last changed time | [optional]
4343
**in_delisting** | **bool** | Contract is delisting | [optional]
44+
**orders_limit** | **int** | Maximum number of open orders | [optional]
4445

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

gate_api/api_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ def __call_api(
204204
except ValueError:
205205
raise e
206206
else:
207+
if not err.get('label'):
208+
raise e
207209
raise GateApiException(err.get('label'), err.get('message'), err.get('detail'), e)
208210

209211
content_type = response_data.getheader('content-type')

gate_api/models/contract.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class Contract(object):
6464
'position_size': 'int',
6565
'config_change_time': 'float',
6666
'in_delisting': 'bool',
67+
'orders_limit': 'int',
6768
}
6869

6970
attribute_map = {
@@ -98,6 +99,7 @@ class Contract(object):
9899
'position_size': 'position_size',
99100
'config_change_time': 'config_change_time',
100101
'in_delisting': 'in_delisting',
102+
'orders_limit': 'orders_limit',
101103
}
102104

103105
def __init__(
@@ -133,9 +135,10 @@ def __init__(
133135
position_size=None,
134136
config_change_time=None,
135137
in_delisting=None,
138+
orders_limit=None,
136139
local_vars_configuration=None,
137140
): # noqa: E501
138-
# type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, float, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, Configuration) -> None
141+
# type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, float, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, Configuration) -> None
139142
"""Contract - a model defined in OpenAPI""" # noqa: E501
140143
if local_vars_configuration is None:
141144
local_vars_configuration = Configuration()
@@ -172,6 +175,7 @@ def __init__(
172175
self._position_size = None
173176
self._config_change_time = None
174177
self._in_delisting = None
178+
self._orders_limit = None
175179
self.discriminator = None
176180

177181
if name is not None:
@@ -236,6 +240,8 @@ def __init__(
236240
self.config_change_time = config_change_time
237241
if in_delisting is not None:
238242
self.in_delisting = in_delisting
243+
if orders_limit is not None:
244+
self.orders_limit = orders_limit
239245

240246
@property
241247
def name(self):
@@ -962,6 +968,29 @@ def in_delisting(self, in_delisting):
962968

963969
self._in_delisting = in_delisting
964970

971+
@property
972+
def orders_limit(self):
973+
"""Gets the orders_limit of this Contract. # noqa: E501
974+
975+
Maximum number of open orders # noqa: E501
976+
977+
:return: The orders_limit of this Contract. # noqa: E501
978+
:rtype: int
979+
"""
980+
return self._orders_limit
981+
982+
@orders_limit.setter
983+
def orders_limit(self, orders_limit):
984+
"""Sets the orders_limit of this Contract.
985+
986+
Maximum number of open orders # noqa: E501
987+
988+
:param orders_limit: The orders_limit of this Contract. # noqa: E501
989+
:type: int
990+
"""
991+
992+
self._orders_limit = orders_limit
993+
965994
def to_dict(self):
966995
"""Returns the model properties as a dict"""
967996
result = {}

gate_api/models/delivery_contract.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class DeliveryContract(object):
7070
'position_size': 'int',
7171
'config_change_time': 'float',
7272
'in_delisting': 'bool',
73+
'orders_limit': 'int',
7374
}
7475

7576
attribute_map = {
@@ -110,6 +111,7 @@ class DeliveryContract(object):
110111
'position_size': 'position_size',
111112
'config_change_time': 'config_change_time',
112113
'in_delisting': 'in_delisting',
114+
'orders_limit': 'orders_limit',
113115
}
114116

115117
def __init__(
@@ -151,9 +153,10 @@ def __init__(
151153
position_size=None,
152154
config_change_time=None,
153155
in_delisting=None,
156+
orders_limit=None,
154157
local_vars_configuration=None,
155158
): # noqa: E501
156-
# type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, int, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, Configuration) -> None
159+
# type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, int, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, Configuration) -> None
157160
"""DeliveryContract - a model defined in OpenAPI""" # noqa: E501
158161
if local_vars_configuration is None:
159162
local_vars_configuration = Configuration()
@@ -196,6 +199,7 @@ def __init__(
196199
self._position_size = None
197200
self._config_change_time = None
198201
self._in_delisting = None
202+
self._orders_limit = None
199203
self.discriminator = None
200204

201205
if name is not None:
@@ -272,6 +276,8 @@ def __init__(
272276
self.config_change_time = config_change_time
273277
if in_delisting is not None:
274278
self.in_delisting = in_delisting
279+
if orders_limit is not None:
280+
self.orders_limit = orders_limit
275281

276282
@property
277283
def name(self):
@@ -1141,6 +1147,29 @@ def in_delisting(self, in_delisting):
11411147

11421148
self._in_delisting = in_delisting
11431149

1150+
@property
1151+
def orders_limit(self):
1152+
"""Gets the orders_limit of this DeliveryContract. # noqa: E501
1153+
1154+
Maximum number of open orders # noqa: E501
1155+
1156+
:return: The orders_limit of this DeliveryContract. # noqa: E501
1157+
:rtype: int
1158+
"""
1159+
return self._orders_limit
1160+
1161+
@orders_limit.setter
1162+
def orders_limit(self, orders_limit):
1163+
"""Sets the orders_limit of this DeliveryContract.
1164+
1165+
Maximum number of open orders # noqa: E501
1166+
1167+
:param orders_limit: The orders_limit of this DeliveryContract. # noqa: E501
1168+
:type: int
1169+
"""
1170+
1171+
self._orders_limit = orders_limit
1172+
11441173
def to_dict(self):
11451174
"""Returns the model properties as a dict"""
11461175
result = {}

0 commit comments

Comments
 (0)