Skip to content

Commit 3838f4d

Browse files
committed
add spot iceberg order support; fix incorrect ContractStats fields' type
1 parent 5d8c608 commit 3838f4d

11 files changed

Lines changed: 78 additions & 18 deletions

File tree

README.md

Lines changed: 2 additions & 2 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.18.0
7-
- Package version: 4.18.0
6+
- API version: 4.18.1
7+
- Package version: 4.18.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

docs/BatchOrder.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Name | Type | Description | Notes
1919
**amount** | **str** | Trade amount | [optional]
2020
**price** | **str** | Order price | [optional]
2121
**time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee | [optional] [default to 'gtc']
22+
**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders | [optional]
2223
**auto_borrow** | **bool** | Used in margin trading(i.e. `account` is `margin`) to allow automatic loan of insufficient part if balance is not enough. | [optional]
2324
**left** | **str** | Amount left to fill | [optional] [readonly]
2425
**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly]

docs/ContractStat.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Name | Type | Description | Notes
1414
**short_liq_usd** | **float** | Short liquidation volume(quote currency) | [optional]
1515
**open_interest** | **int** | Open interest size | [optional]
1616
**open_interest_usd** | **float** | Open interest volume(quote currency) | [optional]
17-
**top_lsr_account** | **str** | Top trader long/short account ratio | [optional]
18-
**top_lsr_size** | **str** | Top trader long/short position ratio | [optional]
17+
**top_lsr_account** | **float** | Top trader long/short account ratio | [optional]
18+
**top_lsr_size** | **float** | Top trader long/short position ratio | [optional]
1919

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

docs/Order.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
1616
**amount** | **str** | Trade amount |
1717
**price** | **str** | Order price |
1818
**time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee | [optional] [default to 'gtc']
19+
**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders | [optional]
1920
**auto_borrow** | **bool** | Used in margin trading(i.e. `account` is `margin`) to allow automatic loan of insufficient part if balance is not enough. | [optional]
2021
**left** | **str** | Amount left to fill | [optional] [readonly]
2122
**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [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__ = "4.18.0"
17+
__version__ = "4.18.1"
1818

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

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.18.0/python'
85+
self.user_agent = 'OpenAPI-Generator/4.18.1/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.18.0\n"
320-
"SDK Package Version: 4.18.0".format(env=sys.platform, pyversion=sys.version)
319+
"Version of the API: 4.18.1\n"
320+
"SDK Package Version: 4.18.1".format(env=sys.platform, pyversion=sys.version)
321321
)
322322

323323
def get_host_settings(self):

gate_api/models/batch_order.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class BatchOrder(object):
4848
'amount': 'str',
4949
'price': 'str',
5050
'time_in_force': 'str',
51+
'iceberg': 'str',
5152
'auto_borrow': 'bool',
5253
'left': 'str',
5354
'fill_price': 'str',
@@ -77,6 +78,7 @@ class BatchOrder(object):
7778
'amount': 'amount',
7879
'price': 'price',
7980
'time_in_force': 'time_in_force',
81+
'iceberg': 'iceberg',
8082
'auto_borrow': 'auto_borrow',
8183
'left': 'left',
8284
'fill_price': 'fill_price',
@@ -107,6 +109,7 @@ def __init__(
107109
amount=None,
108110
price=None,
109111
time_in_force='gtc',
112+
iceberg=None,
110113
auto_borrow=None,
111114
left=None,
112115
fill_price=None,
@@ -120,7 +123,7 @@ def __init__(
120123
rebated_fee_currency=None,
121124
local_vars_configuration=None,
122125
): # noqa: E501
123-
# type: (str, bool, str, str, str, str, str, str, str, str, str, str, str, str, str, bool, str, str, str, str, str, str, str, bool, str, str, Configuration) -> None
126+
# type: (str, bool, str, str, str, str, str, str, str, str, str, str, str, str, str, str, bool, str, str, str, str, str, str, str, bool, str, str, Configuration) -> None
124127
"""BatchOrder - a model defined in OpenAPI""" # noqa: E501
125128
if local_vars_configuration is None:
126129
local_vars_configuration = Configuration()
@@ -141,6 +144,7 @@ def __init__(
141144
self._amount = None
142145
self._price = None
143146
self._time_in_force = None
147+
self._iceberg = None
144148
self._auto_borrow = None
145149
self._left = None
146150
self._fill_price = None
@@ -184,6 +188,8 @@ def __init__(
184188
self.price = price
185189
if time_in_force is not None:
186190
self.time_in_force = time_in_force
191+
if iceberg is not None:
192+
self.iceberg = iceberg
187193
if auto_borrow is not None:
188194
self.auto_borrow = auto_borrow
189195
if left is not None:
@@ -579,6 +585,29 @@ def time_in_force(self, time_in_force):
579585

580586
self._time_in_force = time_in_force
581587

588+
@property
589+
def iceberg(self):
590+
"""Gets the iceberg of this BatchOrder. # noqa: E501
591+
592+
Amount to display for the iceberg order. Null or 0 for normal orders # noqa: E501
593+
594+
:return: The iceberg of this BatchOrder. # noqa: E501
595+
:rtype: str
596+
"""
597+
return self._iceberg
598+
599+
@iceberg.setter
600+
def iceberg(self, iceberg):
601+
"""Sets the iceberg of this BatchOrder.
602+
603+
Amount to display for the iceberg order. Null or 0 for normal orders # noqa: E501
604+
605+
:param iceberg: The iceberg of this BatchOrder. # noqa: E501
606+
:type: str
607+
"""
608+
609+
self._iceberg = iceberg
610+
582611
@property
583612
def auto_borrow(self):
584613
"""Gets the auto_borrow of this BatchOrder. # noqa: E501

gate_api/models/contract_stat.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class ContractStat(object):
4444
'short_liq_usd': 'float',
4545
'open_interest': 'int',
4646
'open_interest_usd': 'float',
47-
'top_lsr_account': 'str',
48-
'top_lsr_size': 'str',
47+
'top_lsr_account': 'float',
48+
'top_lsr_size': 'float',
4949
}
5050

5151
attribute_map = {
@@ -81,7 +81,7 @@ def __init__(
8181
top_lsr_size=None,
8282
local_vars_configuration=None,
8383
): # noqa: E501
84-
# type: (int, float, float, int, float, float, int, float, float, int, float, str, str, Configuration) -> None
84+
# type: (int, float, float, int, float, float, int, float, float, int, float, float, float, Configuration) -> None
8585
"""ContractStat - a model defined in OpenAPI""" # noqa: E501
8686
if local_vars_configuration is None:
8787
local_vars_configuration = Configuration()
@@ -389,7 +389,7 @@ def top_lsr_account(self):
389389
Top trader long/short account ratio # noqa: E501
390390
391391
:return: The top_lsr_account of this ContractStat. # noqa: E501
392-
:rtype: str
392+
:rtype: float
393393
"""
394394
return self._top_lsr_account
395395

@@ -400,7 +400,7 @@ def top_lsr_account(self, top_lsr_account):
400400
Top trader long/short account ratio # noqa: E501
401401
402402
:param top_lsr_account: The top_lsr_account of this ContractStat. # noqa: E501
403-
:type: str
403+
:type: float
404404
"""
405405

406406
self._top_lsr_account = top_lsr_account
@@ -412,7 +412,7 @@ def top_lsr_size(self):
412412
Top trader long/short position ratio # noqa: E501
413413
414414
:return: The top_lsr_size of this ContractStat. # noqa: E501
415-
:rtype: str
415+
:rtype: float
416416
"""
417417
return self._top_lsr_size
418418

@@ -423,7 +423,7 @@ def top_lsr_size(self, top_lsr_size):
423423
Top trader long/short position ratio # noqa: E501
424424
425425
:param top_lsr_size: The top_lsr_size of this ContractStat. # noqa: E501
426-
:type: str
426+
:type: float
427427
"""
428428

429429
self._top_lsr_size = top_lsr_size

gate_api/models/order.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class Order(object):
4545
'amount': 'str',
4646
'price': 'str',
4747
'time_in_force': 'str',
48+
'iceberg': 'str',
4849
'auto_borrow': 'bool',
4950
'left': 'str',
5051
'fill_price': 'str',
@@ -71,6 +72,7 @@ class Order(object):
7172
'amount': 'amount',
7273
'price': 'price',
7374
'time_in_force': 'time_in_force',
75+
'iceberg': 'iceberg',
7476
'auto_borrow': 'auto_borrow',
7577
'left': 'left',
7678
'fill_price': 'fill_price',
@@ -98,6 +100,7 @@ def __init__(
98100
amount=None,
99101
price=None,
100102
time_in_force='gtc',
103+
iceberg=None,
101104
auto_borrow=None,
102105
left=None,
103106
fill_price=None,
@@ -111,7 +114,7 @@ def __init__(
111114
rebated_fee_currency=None,
112115
local_vars_configuration=None,
113116
): # noqa: E501
114-
# type: (str, str, str, str, str, str, str, str, str, str, str, str, bool, str, str, str, str, str, str, str, bool, str, str, Configuration) -> None
117+
# type: (str, str, str, str, str, str, str, str, str, str, str, str, str, bool, str, str, str, str, str, str, str, bool, str, str, Configuration) -> None
115118
"""Order - a model defined in OpenAPI""" # noqa: E501
116119
if local_vars_configuration is None:
117120
local_vars_configuration = Configuration()
@@ -129,6 +132,7 @@ def __init__(
129132
self._amount = None
130133
self._price = None
131134
self._time_in_force = None
135+
self._iceberg = None
132136
self._auto_borrow = None
133137
self._left = None
134138
self._fill_price = None
@@ -162,6 +166,8 @@ def __init__(
162166
self.price = price
163167
if time_in_force is not None:
164168
self.time_in_force = time_in_force
169+
if iceberg is not None:
170+
self.iceberg = iceberg
165171
if auto_borrow is not None:
166172
self.auto_borrow = auto_borrow
167173
if left is not None:
@@ -496,6 +502,29 @@ def time_in_force(self, time_in_force):
496502

497503
self._time_in_force = time_in_force
498504

505+
@property
506+
def iceberg(self):
507+
"""Gets the iceberg of this Order. # noqa: E501
508+
509+
Amount to display for the iceberg order. Null or 0 for normal orders # noqa: E501
510+
511+
:return: The iceberg of this Order. # noqa: E501
512+
:rtype: str
513+
"""
514+
return self._iceberg
515+
516+
@iceberg.setter
517+
def iceberg(self, iceberg):
518+
"""Sets the iceberg of this Order.
519+
520+
Amount to display for the iceberg order. Null or 0 for normal orders # noqa: E501
521+
522+
:param iceberg: The iceberg of this Order. # noqa: E501
523+
:type: str
524+
"""
525+
526+
self._iceberg = iceberg
527+
499528
@property
500529
def auto_borrow(self):
501530
"""Gets the auto_borrow of this Order. # noqa: E501

0 commit comments

Comments
 (0)