Skip to content

Commit 6cead1c

Browse files
author
gateio
committed
update to v6.103.0
1 parent f561dc2 commit 6cead1c

File tree

10 files changed

+420
-11
lines changed

10 files changed

+420
-11
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ for implementing API-based automated trading.
55

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

8-
- API version: v4.102.6
9-
- Package version: 6.102.6
8+
- API version: v4.103.0
9+
- Package version: 6.103.0
1010
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1111
For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts)
1212

@@ -241,6 +241,7 @@ Class | Method | HTTP request | Description
241241
*FuturesApi* | [**update_position_margin**](docs/FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin.
242242
*FuturesApi* | [**update_position_leverage**](docs/FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage.
243243
*FuturesApi* | [**update_position_cross_mode**](docs/FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch to the full position-by-store mode.
244+
*FuturesApi* | [**update_dual_comp_position_cross_mode**](docs/FuturesApi.md#update_dual_comp_position_cross_mode) | **POST** /futures/{settle}/dual_comp/positions/cross_mode | 双仓模式下切换全逐仓模式
244245
*FuturesApi* | [**update_position_risk_limit**](docs/FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit.
245246
*FuturesApi* | [**set_dual_mode**](docs/FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode.
246247
*FuturesApi* | [**get_dual_mode_position**](docs/FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode.
@@ -485,6 +486,7 @@ Class | Method | HTTP request | Description
485486
- [FuturesTicker](docs/FuturesTicker.md)
486487
- [FuturesTrade](docs/FuturesTrade.md)
487488
- [IndexConstituent](docs/IndexConstituent.md)
489+
- [InlineObject](docs/InlineObject.md)
488490
- [InlineResponse200](docs/InlineResponse200.md)
489491
- [InlineResponse2001](docs/InlineResponse2001.md)
490492
- [InsuranceRecord](docs/InsuranceRecord.md)

docs/FuturesApi.md

Lines changed: 86 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Method | HTTP request | Description
2424
[**update_position_margin**](FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin.
2525
[**update_position_leverage**](FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage.
2626
[**update_position_cross_mode**](FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch to the full position-by-store mode.
27+
[**update_dual_comp_position_cross_mode**](FuturesApi.md#update_dual_comp_position_cross_mode) | **POST** /futures/{settle}/dual_comp/positions/cross_mode | 双仓模式下切换全逐仓模式
2728
[**update_position_risk_limit**](FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit.
2829
[**set_dual_mode**](FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode.
2930
[**get_dual_mode_position**](FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode.
@@ -1404,6 +1405,75 @@ Name | Type | Description | Notes
14041405

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

1408+
# **update_dual_comp_position_cross_mode**
1409+
> list[Position] update_dual_comp_position_cross_mode(settle, inline_object)
1410+
1411+
双仓模式下切换全逐仓模式
1412+
1413+
### Example
1414+
1415+
* Api Key Authentication (apiv4):
1416+
```python
1417+
from __future__ import print_function
1418+
import gate_api
1419+
from gate_api.exceptions import ApiException, GateApiException
1420+
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
1421+
# See configuration.py for a list of all supported configuration parameters.
1422+
# The client must configure the authentication and authorization parameters
1423+
# in accordance with the API server security policy.
1424+
# Examples for each auth method are provided below, use the example that
1425+
# satisfies your auth use case.
1426+
1427+
# Configure APIv4 key authorization
1428+
configuration = gate_api.Configuration(
1429+
host = "https://api.gateio.ws/api/v4",
1430+
key = "YOU_API_KEY",
1431+
secret = "YOUR_API_SECRET"
1432+
)
1433+
1434+
api_client = gate_api.ApiClient(configuration)
1435+
# Create an instance of the API class
1436+
api_instance = gate_api.FuturesApi(api_client)
1437+
settle = 'usdt' # str | Settle currency.
1438+
inline_object = gate_api.InlineObject() # InlineObject |
1439+
1440+
try:
1441+
# 双仓模式下切换全逐仓模式
1442+
api_response = api_instance.update_dual_comp_position_cross_mode(settle, inline_object)
1443+
print(api_response)
1444+
except GateApiException as ex:
1445+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
1446+
except ApiException as e:
1447+
print("Exception when calling FuturesApi->update_dual_comp_position_cross_mode: %s\n" % e)
1448+
```
1449+
1450+
### Parameters
1451+
1452+
Name | Type | Description | Notes
1453+
------------- | ------------- | ------------- | -------------
1454+
**settle** | **str**| Settle currency. |
1455+
**inline_object** | [**InlineObject**](InlineObject.md)| |
1456+
1457+
### Return type
1458+
1459+
[**list[Position]**](Position.md)
1460+
1461+
### Authorization
1462+
1463+
[apiv4](../README.md#apiv4)
1464+
1465+
### HTTP request headers
1466+
1467+
- **Content-Type**: application/json
1468+
- **Accept**: application/json
1469+
1470+
### HTTP response details
1471+
| Status code | Description | Response headers |
1472+
|-------------|-------------|------------------|
1473+
**200** | Successfully retrieved. | - |
1474+
1475+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
1476+
14071477
# **update_position_risk_limit**
14081478
> Position update_position_risk_limit(settle, contract, risk_limit)
14091479
@@ -2664,7 +2734,7 @@ Name | Type | Description | Notes
26642734
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
26652735

26662736
# **list_liquidates**
2667-
> list[FuturesLiquidate] list_liquidates(settle, contract=contract, limit=limit, at=at)
2737+
> list[FuturesLiquidate] list_liquidates(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at)
26682738
26692739
List liquidation history.
26702740

@@ -2695,11 +2765,14 @@ api_instance = gate_api.FuturesApi(api_client)
26952765
settle = 'usdt' # str | Settle currency.
26962766
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional)
26972767
limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100)
2768+
offset = 0 # int | List offset, starting from 0. (optional) (default to 0)
2769+
_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
2770+
to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
26982771
at = 0 # int | Specify a liquidation timestamp. (optional) (default to 0)
26992772

27002773
try:
27012774
# List liquidation history.
2702-
api_response = api_instance.list_liquidates(settle, contract=contract, limit=limit, at=at)
2775+
api_response = api_instance.list_liquidates(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at)
27032776
print(api_response)
27042777
except GateApiException as ex:
27052778
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -2714,6 +2787,9 @@ Name | Type | Description | Notes
27142787
**settle** | **str**| Settle currency. |
27152788
**contract** | **str**| Futures contract, return related data only if specified. | [optional]
27162789
**limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100]
2790+
**offset** | **int**| List offset, starting from 0. | [optional] [default to 0]
2791+
**_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
2792+
**to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
27172793
**at** | **int**| Specify a liquidation timestamp. | [optional] [default to 0]
27182794

27192795
### Return type
@@ -2737,7 +2813,7 @@ Name | Type | Description | Notes
27372813
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
27382814

27392815
# **list_auto_deleverages**
2740-
> list[FuturesAutoDeleverage] list_auto_deleverages(settle, contract=contract, limit=limit, at=at)
2816+
> list[FuturesAutoDeleverage] list_auto_deleverages(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at)
27412817
27422818
List Auto-Deleveraging History.
27432819

@@ -2768,11 +2844,14 @@ api_instance = gate_api.FuturesApi(api_client)
27682844
settle = 'usdt' # str | Settle currency.
27692845
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional)
27702846
limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100)
2847+
offset = 0 # int | List offset, starting from 0. (optional) (default to 0)
2848+
_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
2849+
to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
27712850
at = 0 # int | Specify an auto-deleveraging timestamp. (optional) (default to 0)
27722851

27732852
try:
27742853
# List Auto-Deleveraging History.
2775-
api_response = api_instance.list_auto_deleverages(settle, contract=contract, limit=limit, at=at)
2854+
api_response = api_instance.list_auto_deleverages(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at)
27762855
print(api_response)
27772856
except GateApiException as ex:
27782857
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -2787,6 +2866,9 @@ Name | Type | Description | Notes
27872866
**settle** | **str**| Settle currency. |
27882867
**contract** | **str**| Futures contract, return related data only if specified. | [optional]
27892868
**limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100]
2869+
**offset** | **int**| List offset, starting from 0. | [optional] [default to 0]
2870+
**_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
2871+
**to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
27902872
**at** | **int**| Specify an auto-deleveraging timestamp. | [optional] [default to 0]
27912873

27922874
### Return type

docs/InlineObject.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# InlineObject
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**mode** | **str** | Full position-by-position model, ISOLATED-by-position, CROSS-full position. |
7+
**contract** | **str** | Contract Market. |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

gate_api/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from __future__ import absolute_import
1616

17-
__version__ = "6.102.6"
17+
__version__ = "6.103.0"
1818

1919
# import apis into sdk package
2020
from gate_api.api.earn_uni_api import EarnUniApi
@@ -138,6 +138,7 @@
138138
from gate_api.models.futures_ticker import FuturesTicker
139139
from gate_api.models.futures_trade import FuturesTrade
140140
from gate_api.models.index_constituent import IndexConstituent
141+
from gate_api.models.inline_object import InlineObject
141142
from gate_api.models.inline_response200 import InlineResponse200
142143
from gate_api.models.inline_response2001 import InlineResponse2001
143144
from gate_api.models.insurance_record import InsuranceRecord

0 commit comments

Comments
 (0)