Skip to content

Commit 0ef126e

Browse files
author
gate
committed
update to v7.2.177
1 parent a11bb64 commit 0ef126e

10 files changed

Lines changed: 119 additions & 171 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ APIv4 provides operations related to spot, margin, and contract trading, includi
44

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

7-
- API version: v4.106.176
8-
- Package version: 7.2.176
7+
- API version: v4.106.177
8+
- Package version: 7.2.177
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010
For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts)
1111

‎docs/CreateTrailOrder.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
**amount** | **str** | Trading quantity in contracts, positive for buy, negative for sell |
88
**activation_price** | **str** | Activation price, 0 means trigger immediately | [optional] [default to '0']
99
**is_gte** | **bool** | true: activate when market price >= activation price, false: <= activation price | [optional]
10-
**price_type** | **int** | Activation price type: 1-latest price, 2-index price, 3-mark price | [optional]
10+
**price_type** | **int** | Activation price type, required: 1-latest price, 2-index price, 3-mark price. The caller must specify it explicitly. |
1111
**price_offset** | **str** | Callback ratio or price distance, e.g., `0.1` or `0.1%` | [optional]
1212
**reduce_only** | **bool** | Whether reduce only | [optional] [default to False]
1313
**position_related** | **bool** | Whether bound to a position (if position_related = true (position-related), then reduce_only must also be true) | [optional] [default to False]

‎docs/TrailOrder.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Trail order details
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**id** | **int** | Order ID | [optional] [readonly]
8-
**user_id** | **int** | User ID | [optional] [readonly]
9-
**user** | **int** | User ID | [optional] [readonly]
7+
**id** | **str** | Order ID | [optional] [readonly]
8+
**user_id** | **str** | User ID | [optional] [readonly]
9+
**user** | **str** | User ID | [optional] [readonly]
1010
**contract** | **str** | Contract name | [optional]
1111
**settle** | **str** | Settle currency | [optional]
1212
**amount** | **str** | Trading quantity in contracts, positive for buy, negative for sell | [optional]
@@ -17,22 +17,22 @@ Name | Type | Description | Notes
1717
**text** | **str** | Custom field | [optional]
1818
**reduce_only** | **bool** | Reduce Position Only | [optional]
1919
**position_related** | **bool** | Whether bound to position | [optional]
20-
**created_at** | **int** | Created time | [optional] [readonly]
21-
**activated_at** | **int** | Activation time | [optional] [readonly]
22-
**finished_at** | **int** | End time | [optional] [readonly]
23-
**create_time** | **int** | Created time | [optional] [readonly]
24-
**active_time** | **int** | Activation time | [optional] [readonly]
25-
**finish_time** | **int** | End time | [optional] [readonly]
20+
**created_at** | **str** | Created time | [optional] [readonly]
21+
**activated_at** | **str** | Activation time | [optional] [readonly]
22+
**finished_at** | **str** | End time | [optional] [readonly]
23+
**create_time** | **str** | Created time | [optional] [readonly]
24+
**active_time** | **str** | Activation time | [optional] [readonly]
25+
**finish_time** | **str** | End time | [optional] [readonly]
2626
**reason** | **str** | End reason | [optional] [readonly]
2727
**suborder_text** | **str** | The child order's text field. | [optional] [readonly]
2828
**is_dual_mode** | **bool** | Whether dual position mode when creating order | [optional] [readonly]
2929
**trigger_price** | **str** | Trigger price | [optional] [readonly]
30-
**suborder_id** | **int** | Child order ID. | [optional] [readonly]
30+
**suborder_id** | **str** | Child order ID. | [optional] [readonly]
3131
**side_label** | **str** | Order direction label: long/short/open long/open short/close long/close short | [optional] [readonly]
3232
**original_status** | **int** | Order status | [optional] [readonly]
3333
**status** | **str** | Simplified order status: open/finished | [optional] [readonly]
3434
**position_side_output** | **str** | Same as side_label, client requires consistency with other order types | [optional] [readonly]
35-
**updated_at** | **int** | Update time | [optional] [readonly]
35+
**updated_at** | **str** | Update time | [optional] [readonly]
3636
**extremum_price** | **str** | Extremum price | [optional] [readonly]
3737
**status_code** | **str** | Status code value | [optional] [readonly]
3838
**created_at_precise** | **str** | Creation time (high precision, seconds.microseconds format) | [optional] [readonly]

‎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__ = "7.2.176"
17+
__version__ = "7.2.177"
1818

1919
# import apis into sdk package
2020
from gate_api.api.activity_api import ActivityApi

‎gate_api/api_client.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
8484
self.default_headers[header_name] = header_value
8585
self.cookie = cookie
8686
# Set default User-Agent.
87-
self.user_agent = 'OpenAPI-Generator/7.2.176/python'
87+
self.user_agent = 'OpenAPI-Generator/7.2.177/python'
8888
# Set default X-Gate-Size-Decimal header for futures API
8989
self.default_headers['X-Gate-Size-Decimal'] = '1'
9090
self.client_side_validation = configuration.client_side_validation

‎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: v4.106.176\n"\
317-
"SDK Package Version: 7.2.176".\
316+
"Version of the API: v4.106.177\n"\
317+
"SDK Package Version: 7.2.177".\
318318
format(env=sys.platform, pyversion=sys.version)
319319

320320
def get_host_settings(self):

‎gate_api/models/create_trail_order.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ def __init__(self, contract=None, amount=None, activation_price='0', is_gte=None
8686
self.activation_price = activation_price
8787
if is_gte is not None:
8888
self.is_gte = is_gte
89-
if price_type is not None:
90-
self.price_type = price_type
89+
self.price_type = price_type
9190
if price_offset is not None:
9291
self.price_offset = price_offset
9392
if reduce_only is not None:
@@ -201,7 +200,7 @@ def is_gte(self, is_gte):
201200
def price_type(self):
202201
"""Gets the price_type of this CreateTrailOrder. # noqa: E501
203202
204-
Activation price type: 1-latest price, 2-index price, 3-mark price # noqa: E501
203+
Activation price type, required: 1-latest price, 2-index price, 3-mark price. The caller must specify it explicitly. # noqa: E501
205204
206205
:return: The price_type of this CreateTrailOrder. # noqa: E501
207206
:rtype: int
@@ -212,11 +211,13 @@ def price_type(self):
212211
def price_type(self, price_type):
213212
"""Sets the price_type of this CreateTrailOrder.
214213
215-
Activation price type: 1-latest price, 2-index price, 3-mark price # noqa: E501
214+
Activation price type, required: 1-latest price, 2-index price, 3-mark price. The caller must specify it explicitly. # noqa: E501
216215
217216
:param price_type: The price_type of this CreateTrailOrder. # noqa: E501
218217
:type: int
219218
"""
219+
if self.local_vars_configuration.client_side_validation and price_type is None: # noqa: E501
220+
raise ValueError("Invalid value for `price_type`, must not be `None`") # noqa: E501
220221
allowed_values = [1, 2, 3] # noqa: E501
221222
if self.local_vars_configuration.client_side_validation and price_type not in allowed_values: # noqa: E501
222223
raise ValueError(

‎gate_api/models/trail_order.py‎

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ class TrailOrder(object):
3333
and the value is json key in definition.
3434
"""
3535
openapi_types = {
36-
'id': 'int',
37-
'user_id': 'int',
38-
'user': 'int',
36+
'id': 'str',
37+
'user_id': 'str',
38+
'user': 'str',
3939
'contract': 'str',
4040
'settle': 'str',
4141
'amount': 'str',
@@ -46,22 +46,22 @@ class TrailOrder(object):
4646
'text': 'str',
4747
'reduce_only': 'bool',
4848
'position_related': 'bool',
49-
'created_at': 'int',
50-
'activated_at': 'int',
51-
'finished_at': 'int',
52-
'create_time': 'int',
53-
'active_time': 'int',
54-
'finish_time': 'int',
49+
'created_at': 'str',
50+
'activated_at': 'str',
51+
'finished_at': 'str',
52+
'create_time': 'str',
53+
'active_time': 'str',
54+
'finish_time': 'str',
5555
'reason': 'str',
5656
'suborder_text': 'str',
5757
'is_dual_mode': 'bool',
5858
'trigger_price': 'str',
59-
'suborder_id': 'int',
59+
'suborder_id': 'str',
6060
'side_label': 'str',
6161
'original_status': 'int',
6262
'status': 'str',
6363
'position_side_output': 'str',
64-
'updated_at': 'int',
64+
'updated_at': 'str',
6565
'extremum_price': 'str',
6666
'status_code': 'str',
6767
'created_at_precise': 'str',
@@ -117,7 +117,7 @@ class TrailOrder(object):
117117
}
118118

119119
def __init__(self, id=None, user_id=None, user=None, contract=None, settle=None, amount=None, is_gte=None, activation_price=None, price_type=None, price_offset=None, text=None, reduce_only=None, position_related=None, created_at=None, activated_at=None, finished_at=None, create_time=None, active_time=None, finish_time=None, reason=None, suborder_text=None, is_dual_mode=None, trigger_price=None, suborder_id=None, side_label=None, original_status=None, status=None, position_side_output=None, updated_at=None, extremum_price=None, status_code=None, created_at_precise=None, finished_at_precise=None, activated_at_precise=None, status_label=None, pos_margin_mode=None, position_mode=None, error_label=None, leverage=None, local_vars_configuration=None): # noqa: E501
120-
# type: (int, int, int, str, str, str, bool, str, int, str, str, bool, bool, int, int, int, int, int, int, str, str, bool, str, int, str, int, str, str, int, str, str, str, str, str, str, str, str, str, str, Configuration) -> None
120+
# type: (str, str, str, str, str, str, bool, str, int, str, str, bool, bool, str, str, str, str, str, str, str, str, bool, str, str, str, int, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None
121121
"""TrailOrder - a model defined in OpenAPI""" # noqa: E501
122122
if local_vars_configuration is None:
123123
local_vars_configuration = Configuration()
@@ -250,7 +250,7 @@ def id(self):
250250
Order ID # noqa: E501
251251
252252
:return: The id of this TrailOrder. # noqa: E501
253-
:rtype: int
253+
:rtype: str
254254
"""
255255
return self._id
256256

@@ -261,7 +261,7 @@ def id(self, id):
261261
Order ID # noqa: E501
262262
263263
:param id: The id of this TrailOrder. # noqa: E501
264-
:type: int
264+
:type: str
265265
"""
266266

267267
self._id = id
@@ -273,7 +273,7 @@ def user_id(self):
273273
User ID # noqa: E501
274274
275275
:return: The user_id of this TrailOrder. # noqa: E501
276-
:rtype: int
276+
:rtype: str
277277
"""
278278
return self._user_id
279279

@@ -284,7 +284,7 @@ def user_id(self, user_id):
284284
User ID # noqa: E501
285285
286286
:param user_id: The user_id of this TrailOrder. # noqa: E501
287-
:type: int
287+
:type: str
288288
"""
289289

290290
self._user_id = user_id
@@ -296,7 +296,7 @@ def user(self):
296296
User ID # noqa: E501
297297
298298
:return: The user of this TrailOrder. # noqa: E501
299-
:rtype: int
299+
:rtype: str
300300
"""
301301
return self._user
302302

@@ -307,7 +307,7 @@ def user(self, user):
307307
User ID # noqa: E501
308308
309309
:param user: The user of this TrailOrder. # noqa: E501
310-
:type: int
310+
:type: str
311311
"""
312312

313313
self._user = user
@@ -555,7 +555,7 @@ def created_at(self):
555555
Created time # noqa: E501
556556
557557
:return: The created_at of this TrailOrder. # noqa: E501
558-
:rtype: int
558+
:rtype: str
559559
"""
560560
return self._created_at
561561

@@ -566,7 +566,7 @@ def created_at(self, created_at):
566566
Created time # noqa: E501
567567
568568
:param created_at: The created_at of this TrailOrder. # noqa: E501
569-
:type: int
569+
:type: str
570570
"""
571571

572572
self._created_at = created_at
@@ -578,7 +578,7 @@ def activated_at(self):
578578
Activation time # noqa: E501
579579
580580
:return: The activated_at of this TrailOrder. # noqa: E501
581-
:rtype: int
581+
:rtype: str
582582
"""
583583
return self._activated_at
584584

@@ -589,7 +589,7 @@ def activated_at(self, activated_at):
589589
Activation time # noqa: E501
590590
591591
:param activated_at: The activated_at of this TrailOrder. # noqa: E501
592-
:type: int
592+
:type: str
593593
"""
594594

595595
self._activated_at = activated_at
@@ -601,7 +601,7 @@ def finished_at(self):
601601
End time # noqa: E501
602602
603603
:return: The finished_at of this TrailOrder. # noqa: E501
604-
:rtype: int
604+
:rtype: str
605605
"""
606606
return self._finished_at
607607

@@ -612,7 +612,7 @@ def finished_at(self, finished_at):
612612
End time # noqa: E501
613613
614614
:param finished_at: The finished_at of this TrailOrder. # noqa: E501
615-
:type: int
615+
:type: str
616616
"""
617617

618618
self._finished_at = finished_at
@@ -624,7 +624,7 @@ def create_time(self):
624624
Created time # noqa: E501
625625
626626
:return: The create_time of this TrailOrder. # noqa: E501
627-
:rtype: int
627+
:rtype: str
628628
"""
629629
return self._create_time
630630

@@ -635,7 +635,7 @@ def create_time(self, create_time):
635635
Created time # noqa: E501
636636
637637
:param create_time: The create_time of this TrailOrder. # noqa: E501
638-
:type: int
638+
:type: str
639639
"""
640640

641641
self._create_time = create_time
@@ -647,7 +647,7 @@ def active_time(self):
647647
Activation time # noqa: E501
648648
649649
:return: The active_time of this TrailOrder. # noqa: E501
650-
:rtype: int
650+
:rtype: str
651651
"""
652652
return self._active_time
653653

@@ -658,7 +658,7 @@ def active_time(self, active_time):
658658
Activation time # noqa: E501
659659
660660
:param active_time: The active_time of this TrailOrder. # noqa: E501
661-
:type: int
661+
:type: str
662662
"""
663663

664664
self._active_time = active_time
@@ -670,7 +670,7 @@ def finish_time(self):
670670
End time # noqa: E501
671671
672672
:return: The finish_time of this TrailOrder. # noqa: E501
673-
:rtype: int
673+
:rtype: str
674674
"""
675675
return self._finish_time
676676

@@ -681,7 +681,7 @@ def finish_time(self, finish_time):
681681
End time # noqa: E501
682682
683683
:param finish_time: The finish_time of this TrailOrder. # noqa: E501
684-
:type: int
684+
:type: str
685685
"""
686686

687687
self._finish_time = finish_time
@@ -785,7 +785,7 @@ def suborder_id(self):
785785
Child order ID. # noqa: E501
786786
787787
:return: The suborder_id of this TrailOrder. # noqa: E501
788-
:rtype: int
788+
:rtype: str
789789
"""
790790
return self._suborder_id
791791

@@ -796,7 +796,7 @@ def suborder_id(self, suborder_id):
796796
Child order ID. # noqa: E501
797797
798798
:param suborder_id: The suborder_id of this TrailOrder. # noqa: E501
799-
:type: int
799+
:type: str
800800
"""
801801

802802
self._suborder_id = suborder_id
@@ -906,7 +906,7 @@ def updated_at(self):
906906
Update time # noqa: E501
907907
908908
:return: The updated_at of this TrailOrder. # noqa: E501
909-
:rtype: int
909+
:rtype: str
910910
"""
911911
return self._updated_at
912912

@@ -917,7 +917,7 @@ def updated_at(self, updated_at):
917917
Update time # noqa: E501
918918
919919
:param updated_at: The updated_at of this TrailOrder. # noqa: E501
920-
:type: int
920+
:type: str
921921
"""
922922

923923
self._updated_at = updated_at

0 commit comments

Comments
 (0)