Skip to content

Commit 6a27f4f

Browse files
committed
fix mistaken position field dual_mode
1 parent 04b6f5a commit 6a27f4f

9 files changed

Lines changed: 41 additions & 43 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.16.0
7-
- Package version: 4.16.0
6+
- API version: 4.16.1
7+
- Package version: 4.16.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/DeliveryApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ api_client = gate_api.ApiClient(configuration)
16591659
api_instance = gate_api.DeliveryApi(api_client)
16601660
settle = 'usdt' # str | Settle currency
16611661
status = 'status_example' # str | List orders based on status
1662-
contract = 'BTC_USD' # str | Futures contract, return related data only if specified (optional)
1662+
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
16631663
limit = 100 # int | Maximum number of records returned in one list (optional) (default to 100)
16641664
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
16651665

@@ -1802,7 +1802,7 @@ api_client = gate_api.ApiClient(configuration)
18021802
# Create an instance of the API class
18031803
api_instance = gate_api.DeliveryApi(api_client)
18041804
settle = 'usdt' # str | Settle currency
1805-
contract = 'BTC_USD' # str | Futures contract
1805+
contract = 'BTC_USDT' # str | Futures contract
18061806

18071807
try:
18081808
# Cancel all open orders

docs/FuturesApi.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ api_client = gate_api.ApiClient(configuration)
182182
# Create an instance of the API class
183183
api_instance = gate_api.FuturesApi(api_client)
184184
settle = 'btc' # str | Settle currency (default to 'btc')
185-
contract = 'BTC_USD' # str | Futures contract
185+
contract = 'BTC_USDT' # str | Futures contract
186186
interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0')
187187
limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10)
188188

@@ -246,7 +246,7 @@ api_client = gate_api.ApiClient(configuration)
246246
# Create an instance of the API class
247247
api_instance = gate_api.FuturesApi(api_client)
248248
settle = 'btc' # str | Settle currency (default to 'btc')
249-
contract = 'BTC_USD' # str | Futures contract
249+
contract = 'BTC_USDT' # str | Futures contract
250250
limit = 100 # int | Maximum number of records returned in one list (optional) (default to 100)
251251
last_id = '12345' # str | Specify list staring point using the id of last record in previous list-query results This parameter is deprecated. Use `from` and `to` instead to limit time range (optional)
252252
_from = 1546905600 # int | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional)
@@ -316,7 +316,7 @@ api_client = gate_api.ApiClient(configuration)
316316
# Create an instance of the API class
317317
api_instance = gate_api.FuturesApi(api_client)
318318
settle = 'btc' # str | Settle currency (default to 'btc')
319-
contract = 'BTC_USD' # str | Futures contract
319+
contract = 'BTC_USDT' # str | Futures contract
320320
_from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional)
321321
to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional)
322322
limit = 100 # int | Maximum recent data points returned. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100)
@@ -384,7 +384,7 @@ api_client = gate_api.ApiClient(configuration)
384384
# Create an instance of the API class
385385
api_instance = gate_api.FuturesApi(api_client)
386386
settle = 'btc' # str | Settle currency (default to 'btc')
387-
contract = 'BTC_USD' # str | Futures contract, return related data only if specified (optional)
387+
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
388388

389389
try:
390390
# List futures tickers
@@ -444,7 +444,7 @@ api_client = gate_api.ApiClient(configuration)
444444
# Create an instance of the API class
445445
api_instance = gate_api.FuturesApi(api_client)
446446
settle = 'btc' # str | Settle currency (default to 'btc')
447-
contract = 'BTC_USD' # str | Futures contract
447+
contract = 'BTC_USDT' # str | Futures contract
448448
limit = 100 # int | Maximum number of records returned in one list (optional) (default to 100)
449449

450450
try:
@@ -566,7 +566,7 @@ api_client = gate_api.ApiClient(configuration)
566566
# Create an instance of the API class
567567
api_instance = gate_api.FuturesApi(api_client)
568568
settle = 'btc' # str | Settle currency (default to 'btc')
569-
contract = 'BTC_USD' # str | Futures contract
569+
contract = 'BTC_USDT' # str | Futures contract
570570
_from = 1604561000 # int | Start timestamp (optional)
571571
interval = '5m' # str | (optional) (default to '5m')
572572
limit = 30 # int | (optional) (default to 30)
@@ -634,7 +634,7 @@ api_client = gate_api.ApiClient(configuration)
634634
# Create an instance of the API class
635635
api_instance = gate_api.FuturesApi(api_client)
636636
settle = 'btc' # str | Settle currency (default to 'btc')
637-
contract = 'BTC_USD' # str | Futures contract, return related data only if specified (optional)
637+
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
638638
_from = 1547706332 # int | Start timestamp (optional)
639639
to = 1547706332 # int | End timestamp (optional)
640640
limit = 100 # int | Maximum number of records returned in one list (optional) (default to 100)
@@ -1555,7 +1555,7 @@ api_client = gate_api.ApiClient(configuration)
15551555
# Create an instance of the API class
15561556
api_instance = gate_api.FuturesApi(api_client)
15571557
settle = 'btc' # str | Settle currency (default to 'btc')
1558-
contract = 'BTC_USD' # str | Futures contract
1558+
contract = 'BTC_USDT' # str | Futures contract
15591559
status = 'open' # str | List orders based on status
15601560
limit = 100 # int | Maximum number of records returned in one list (optional) (default to 100)
15611561
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
@@ -1707,7 +1707,7 @@ api_client = gate_api.ApiClient(configuration)
17071707
# Create an instance of the API class
17081708
api_instance = gate_api.FuturesApi(api_client)
17091709
settle = 'btc' # str | Settle currency (default to 'btc')
1710-
contract = 'BTC_USD' # str | Futures contract
1710+
contract = 'BTC_USDT' # str | Futures contract
17111711
side = 'ask' # str | All bids or asks. Both included in not specified (optional)
17121712

17131713
try:
@@ -1918,7 +1918,7 @@ api_client = gate_api.ApiClient(configuration)
19181918
# Create an instance of the API class
19191919
api_instance = gate_api.FuturesApi(api_client)
19201920
settle = 'btc' # str | Settle currency (default to 'btc')
1921-
contract = 'BTC_USD' # str | Futures contract, return related data only if specified (optional)
1921+
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
19221922
order = 12345 # int | Futures order ID, return related data only if specified (optional)
19231923
limit = 100 # int | Maximum number of records returned in one list (optional) (default to 100)
19241924
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
@@ -1997,7 +1997,7 @@ api_client = gate_api.ApiClient(configuration)
19971997
# Create an instance of the API class
19981998
api_instance = gate_api.FuturesApi(api_client)
19991999
settle = 'btc' # str | Settle currency (default to 'btc')
2000-
contract = 'BTC_USD' # str | Futures contract, return related data only if specified (optional)
2000+
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
20012001
limit = 100 # int | Maximum number of records returned in one list (optional) (default to 100)
20022002

20032003
try:
@@ -2068,7 +2068,7 @@ api_client = gate_api.ApiClient(configuration)
20682068
# Create an instance of the API class
20692069
api_instance = gate_api.FuturesApi(api_client)
20702070
settle = 'btc' # str | Settle currency (default to 'btc')
2071-
contract = 'BTC_USD' # str | Futures contract, return related data only if specified (optional)
2071+
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
20722072
limit = 100 # int | Maximum number of records returned in one list (optional) (default to 100)
20732073
at = 0 # int | Specify a liquidation timestamp (optional) (default to 0)
20742074

@@ -2142,7 +2142,7 @@ api_client = gate_api.ApiClient(configuration)
21422142
api_instance = gate_api.FuturesApi(api_client)
21432143
settle = 'btc' # str | Settle currency (default to 'btc')
21442144
status = 'status_example' # str | List orders based on status
2145-
contract = 'BTC_USD' # str | Futures contract, return related data only if specified (optional)
2145+
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
21462146
limit = 100 # int | Maximum number of records returned in one list (optional) (default to 100)
21472147
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
21482148

@@ -2285,7 +2285,7 @@ api_client = gate_api.ApiClient(configuration)
22852285
# Create an instance of the API class
22862286
api_instance = gate_api.FuturesApi(api_client)
22872287
settle = 'btc' # str | Settle currency (default to 'btc')
2288-
contract = 'BTC_USD' # str | Futures contract
2288+
contract = 'BTC_USDT' # str | Futures contract
22892289

22902290
try:
22912291
# Cancel all open orders

docs/Position.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Name | Type | Description | Notes
2525
**adl_ranking** | **int** | ADL ranking, range from 1 to 5 | [optional] [readonly]
2626
**pending_orders** | **int** | Current open orders | [optional] [readonly]
2727
**close_order** | [**PositionCloseOrder**](PositionCloseOrder.md) | | [optional]
28-
**dual_mode** | **str** | Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode | [optional]
28+
**mode** | **str** | Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode | [optional]
2929

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

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

323323
def get_host_settings(self):

gate_api/models/position.py

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Position(object):
5454
'adl_ranking': 'int',
5555
'pending_orders': 'int',
5656
'close_order': 'PositionCloseOrder',
57-
'dual_mode': 'str',
57+
'mode': 'str',
5858
}
5959

6060
attribute_map = {
@@ -79,7 +79,7 @@ class Position(object):
7979
'adl_ranking': 'adl_ranking',
8080
'pending_orders': 'pending_orders',
8181
'close_order': 'close_order',
82-
'dual_mode': 'dual_mode',
82+
'mode': 'mode',
8383
}
8484

8585
def __init__(
@@ -105,7 +105,7 @@ def __init__(
105105
adl_ranking=None,
106106
pending_orders=None,
107107
close_order=None,
108-
dual_mode=None,
108+
mode=None,
109109
local_vars_configuration=None,
110110
): # noqa: E501
111111
# type: (int, str, int, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, PositionCloseOrder, str, Configuration) -> None
@@ -135,7 +135,7 @@ def __init__(
135135
self._adl_ranking = None
136136
self._pending_orders = None
137137
self._close_order = None
138-
self._dual_mode = None
138+
self._mode = None
139139
self.discriminator = None
140140

141141
if user is not None:
@@ -180,8 +180,8 @@ def __init__(
180180
self.pending_orders = pending_orders
181181
if close_order is not None:
182182
self.close_order = close_order
183-
if dual_mode is not None:
184-
self.dual_mode = dual_mode
183+
if mode is not None:
184+
self.mode = mode
185185

186186
@property
187187
def user(self):
@@ -665,34 +665,32 @@ def close_order(self, close_order):
665665
self._close_order = close_order
666666

667667
@property
668-
def dual_mode(self):
669-
"""Gets the dual_mode of this Position. # noqa: E501
668+
def mode(self):
669+
"""Gets the mode of this Position. # noqa: E501
670670
671671
Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode # noqa: E501
672672
673-
:return: The dual_mode of this Position. # noqa: E501
673+
:return: The mode of this Position. # noqa: E501
674674
:rtype: str
675675
"""
676-
return self._dual_mode
676+
return self._mode
677677

678-
@dual_mode.setter
679-
def dual_mode(self, dual_mode):
680-
"""Sets the dual_mode of this Position.
678+
@mode.setter
679+
def mode(self, mode):
680+
"""Sets the mode of this Position.
681681
682682
Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode # noqa: E501
683683
684-
:param dual_mode: The dual_mode of this Position. # noqa: E501
684+
:param mode: The mode of this Position. # noqa: E501
685685
:type: str
686686
"""
687687
allowed_values = ["single", "dual_long", "dual_short"] # noqa: E501
688-
if self.local_vars_configuration.client_side_validation and dual_mode not in allowed_values: # noqa: E501
688+
if self.local_vars_configuration.client_side_validation and mode not in allowed_values: # noqa: E501
689689
raise ValueError(
690-
"Invalid value for `dual_mode` ({0}), must be one of {1}".format( # noqa: E501
691-
dual_mode, allowed_values
692-
)
690+
"Invalid value for `mode` ({0}), must be one of {1}".format(mode, allowed_values) # noqa: E501
693691
)
694692

695-
self._dual_mode = dual_mode
693+
self._mode = mode
696694

697695
def to_dict(self):
698696
"""Returns the model properties as a dict"""

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from setuptools import setup, find_packages # noqa: H301
1414

1515
NAME = "gate-api"
16-
VERSION = "4.16.0"
16+
VERSION = "4.16.1"
1717
# To install the library, run the following
1818
#
1919
# python setup.py install

0 commit comments

Comments
 (0)