Skip to content

Commit 42f2540

Browse files
committed
release 4.83.0
1 parent 40cb7f4 commit 42f2540

22 files changed

Lines changed: 1112 additions & 43 deletions

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ APIv4 provides spot, margin and futures trading operations. There are public API
55

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

8-
- API version: 4.82.0
9-
- Package version: 4.82.0
8+
- API version: 4.83.0
9+
- Package version: 4.83.0
1010
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1111
For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts)
1212

@@ -151,6 +151,9 @@ Class | Method | HTTP request | Description
151151
*UnifiedApi* | [**list_currency_discount_tiers**](docs/UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers
152152
*UnifiedApi* | [**list_loan_margin_tiers**](docs/UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers
153153
*UnifiedApi* | [**calculate_portfolio_margin**](docs/UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator
154+
*UnifiedApi* | [**get_user_leverage_currency_config**](docs/UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | The maximum and minimum leverage multiples that users can set for a currency type are:
155+
*UnifiedApi* | [**get_user_leverage_currency_setting**](docs/UnifiedApi.md#get_user_leverage_currency_setting) | **GET** /unified/leverage/user_currency_setting | Get the user's currency leverage. If currency is not passed, query all currencies.
156+
*UnifiedApi* | [**set_user_leverage_currency_setting**](docs/UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the currency leverage ratio
154157
*AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail
155158
*AccountApi* | [**get_account_rate_limit**](docs/AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information
156159
*AccountApi* | [**list_stp_groups**](docs/AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups
@@ -625,6 +628,8 @@ Class | Method | HTTP request | Description
625628
- [UnifiedBorrowable](docs/UnifiedBorrowable.md)
626629
- [UnifiedDiscount](docs/UnifiedDiscount.md)
627630
- [UnifiedDiscountTiers](docs/UnifiedDiscountTiers.md)
631+
- [UnifiedLeverageConfig](docs/UnifiedLeverageConfig.md)
632+
- [UnifiedLeverageSetting](docs/UnifiedLeverageSetting.md)
628633
- [UnifiedLoan](docs/UnifiedLoan.md)
629634
- [UnifiedLoanRecord](docs/UnifiedLoanRecord.md)
630635
- [UnifiedMarginTiers](docs/UnifiedMarginTiers.md)

docs/FuturesAccountBook.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**text** | **str** | Comment | [optional]
1111
**contract** | **str** | Futures contract, the field is only available for data after 2023-10-30. | [optional]
1212
**trade_id** | **str** | trade id | [optional]
13+
**id** | **str** | 账户变更记录 id | [optional]
1314

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

docs/MarginTiers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**margin_rate** | **str** | Discount | [optional]
88
**lower_limit** | **str** | Lower limit | [optional]
99
**upper_limit** | **str** | Upper limit, \"\" indicates greater than (the last tier) | [optional]
10+
**leverage** | **str** | Position leverage | [optional]
1011

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

docs/SubAccountKeyPerms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**name** | **str** | Permission name (all permissions will be removed if no value is passed) - wallet: wallet - spot: spot/margin - futures: perpetual contract - delivery: delivery - earn: earn - options: options\\m- account: Account - unified: unified - loan: Loan | [optional]
6+
**name** | **str** | Permission name (all permissions will be removed if no value is passed) - wallet: wallet - spot: spot/margin - futures: perpetual contract - delivery: delivery - earn: earn - custody: custody - options: options - account: Account - unified: unified - loan: Loan - margin: margin - unified: unified - copy: copy - pilot:pilot | [optional]
77
**read_only** | **bool** | read only | [optional]
88

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

docs/UnifiedApi.md

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ Method | HTTP request | Description
2020
[**list_currency_discount_tiers**](UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers
2121
[**list_loan_margin_tiers**](UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers
2222
[**calculate_portfolio_margin**](UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator
23+
[**get_user_leverage_currency_config**](UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | The maximum and minimum leverage multiples that users can set for a currency type are:
24+
[**get_user_leverage_currency_setting**](UnifiedApi.md#get_user_leverage_currency_setting) | **GET** /unified/leverage/user_currency_setting | Get the user's currency leverage. If currency is not passed, query all currencies.
25+
[**set_user_leverage_currency_setting**](UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the currency leverage ratio
2326

2427

2528
# **list_unified_accounts**
@@ -1081,3 +1084,203 @@ No authorization required
10811084

10821085
[[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)
10831086

1087+
# **get_user_leverage_currency_config**
1088+
> UnifiedLeverageConfig get_user_leverage_currency_config(currency)
1089+
1090+
The maximum and minimum leverage multiples that users can set for a currency type are:
1091+
1092+
### Example
1093+
1094+
* Api Key Authentication (apiv4):
1095+
```python
1096+
from __future__ import print_function
1097+
import gate_api
1098+
from gate_api.exceptions import ApiException, GateApiException
1099+
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
1100+
# See configuration.py for a list of all supported configuration parameters.
1101+
# The client must configure the authentication and authorization parameters
1102+
# in accordance with the API server security policy.
1103+
# Examples for each auth method are provided below, use the example that
1104+
# satisfies your auth use case.
1105+
1106+
# Configure APIv4 key authorization
1107+
configuration = gate_api.Configuration(
1108+
host = "https://api.gateio.ws/api/v4",
1109+
key = "YOU_API_KEY",
1110+
secret = "YOUR_API_SECRET"
1111+
)
1112+
1113+
api_client = gate_api.ApiClient(configuration)
1114+
# Create an instance of the API class
1115+
api_instance = gate_api.UnifiedApi(api_client)
1116+
currency = 'BTC' # str | Currency
1117+
1118+
try:
1119+
# The maximum and minimum leverage multiples that users can set for a currency type are:
1120+
api_response = api_instance.get_user_leverage_currency_config(currency)
1121+
print(api_response)
1122+
except GateApiException as ex:
1123+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
1124+
except ApiException as e:
1125+
print("Exception when calling UnifiedApi->get_user_leverage_currency_config: %s\n" % e)
1126+
```
1127+
1128+
### Parameters
1129+
1130+
Name | Type | Description | Notes
1131+
------------- | ------------- | ------------- | -------------
1132+
**currency** | **str**| Currency |
1133+
1134+
### Return type
1135+
1136+
[**UnifiedLeverageConfig**](UnifiedLeverageConfig.md)
1137+
1138+
### Authorization
1139+
1140+
[apiv4](../README.md#apiv4)
1141+
1142+
### HTTP request headers
1143+
1144+
- **Content-Type**: Not defined
1145+
- **Accept**: application/json
1146+
1147+
### HTTP response details
1148+
| Status code | Description | Response headers |
1149+
|-------------|-------------|------------------|
1150+
**200** | Successfully retrieved | - |
1151+
1152+
[[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)
1153+
1154+
# **get_user_leverage_currency_setting**
1155+
> UnifiedLeverageSetting get_user_leverage_currency_setting(currency=currency)
1156+
1157+
Get the user's currency leverage. If currency is not passed, query all currencies.
1158+
1159+
### Example
1160+
1161+
* Api Key Authentication (apiv4):
1162+
```python
1163+
from __future__ import print_function
1164+
import gate_api
1165+
from gate_api.exceptions import ApiException, GateApiException
1166+
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
1167+
# See configuration.py for a list of all supported configuration parameters.
1168+
# The client must configure the authentication and authorization parameters
1169+
# in accordance with the API server security policy.
1170+
# Examples for each auth method are provided below, use the example that
1171+
# satisfies your auth use case.
1172+
1173+
# Configure APIv4 key authorization
1174+
configuration = gate_api.Configuration(
1175+
host = "https://api.gateio.ws/api/v4",
1176+
key = "YOU_API_KEY",
1177+
secret = "YOUR_API_SECRET"
1178+
)
1179+
1180+
api_client = gate_api.ApiClient(configuration)
1181+
# Create an instance of the API class
1182+
api_instance = gate_api.UnifiedApi(api_client)
1183+
currency = 'BTC' # str | Currency (optional)
1184+
1185+
try:
1186+
# Get the user's currency leverage. If currency is not passed, query all currencies.
1187+
api_response = api_instance.get_user_leverage_currency_setting(currency=currency)
1188+
print(api_response)
1189+
except GateApiException as ex:
1190+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
1191+
except ApiException as e:
1192+
print("Exception when calling UnifiedApi->get_user_leverage_currency_setting: %s\n" % e)
1193+
```
1194+
1195+
### Parameters
1196+
1197+
Name | Type | Description | Notes
1198+
------------- | ------------- | ------------- | -------------
1199+
**currency** | **str**| Currency | [optional]
1200+
1201+
### Return type
1202+
1203+
[**UnifiedLeverageSetting**](UnifiedLeverageSetting.md)
1204+
1205+
### Authorization
1206+
1207+
[apiv4](../README.md#apiv4)
1208+
1209+
### HTTP request headers
1210+
1211+
- **Content-Type**: Not defined
1212+
- **Accept**: application/json
1213+
1214+
### HTTP response details
1215+
| Status code | Description | Response headers |
1216+
|-------------|-------------|------------------|
1217+
**200** | Successfully retrieved | - |
1218+
1219+
[[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)
1220+
1221+
# **set_user_leverage_currency_setting**
1222+
> set_user_leverage_currency_setting(unified_leverage_setting=unified_leverage_setting)
1223+
1224+
Set the currency leverage ratio
1225+
1226+
### Example
1227+
1228+
* Api Key Authentication (apiv4):
1229+
```python
1230+
from __future__ import print_function
1231+
import gate_api
1232+
from gate_api.exceptions import ApiException, GateApiException
1233+
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
1234+
# See configuration.py for a list of all supported configuration parameters.
1235+
# The client must configure the authentication and authorization parameters
1236+
# in accordance with the API server security policy.
1237+
# Examples for each auth method are provided below, use the example that
1238+
# satisfies your auth use case.
1239+
1240+
# Configure APIv4 key authorization
1241+
configuration = gate_api.Configuration(
1242+
host = "https://api.gateio.ws/api/v4",
1243+
key = "YOU_API_KEY",
1244+
secret = "YOUR_API_SECRET"
1245+
)
1246+
1247+
api_client = gate_api.ApiClient(configuration)
1248+
# Create an instance of the API class
1249+
api_instance = gate_api.UnifiedApi(api_client)
1250+
unified_leverage_setting = gate_api.UnifiedLeverageSetting() # UnifiedLeverageSetting | (optional)
1251+
1252+
try:
1253+
# Set the currency leverage ratio
1254+
api_instance.set_user_leverage_currency_setting(unified_leverage_setting=unified_leverage_setting)
1255+
except GateApiException as ex:
1256+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
1257+
except ApiException as e:
1258+
print("Exception when calling UnifiedApi->set_user_leverage_currency_setting: %s\n" % e)
1259+
```
1260+
1261+
### Parameters
1262+
1263+
Name | Type | Description | Notes
1264+
------------- | ------------- | ------------- | -------------
1265+
**unified_leverage_setting** | [**UnifiedLeverageSetting**](UnifiedLeverageSetting.md)| | [optional]
1266+
1267+
### Return type
1268+
1269+
void (empty response body)
1270+
1271+
### Authorization
1272+
1273+
[apiv4](../README.md#apiv4)
1274+
1275+
### HTTP request headers
1276+
1277+
- **Content-Type**: application/json
1278+
- **Accept**: Not defined
1279+
1280+
### HTTP response details
1281+
| Status code | Description | Response headers |
1282+
|-------------|-------------|------------------|
1283+
**204** | Success | - |
1284+
1285+
[[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)
1286+

docs/UnifiedDiscountTiers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**discount** | **str** | Discount | [optional]
88
**lower_limit** | **str** | Lower limit | [optional]
99
**upper_limit** | **str** | Upper limit,+ indicates positive infinity | [optional]
10+
**leverage** | **str** | Position leverage | [optional]
1011

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

docs/UnifiedLeverageConfig.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# UnifiedLeverageConfig
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**current_leverage** | **str** | Current leverage ratio | [optional]
7+
**min_leverage** | **str** | Minimum adjustable leverage ratio | [optional]
8+
**max_leverage** | **str** | Maximum adjustable leverage ratio | [optional]
9+
**debit** | **str** | Current liabilities | [optional]
10+
**available_margin** | **str** | Available Margin | [optional]
11+
**borrowable** | **str** | The current leverage you can choose is | [optional]
12+
**except_leverage_borrowable** | **str** | The maximum amount of margin that can be borrowed and the maximum amount of Yubibao that can be borrowed, whichever is smaller | [optional]
13+
14+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15+
16+

docs/UnifiedLeverageSetting.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# UnifiedLeverageSetting
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**currency** | **str** | Currency name | [optional]
7+
**leverage** | **str** | multiple | [optional]
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+

docs/WalletApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ Name | Type | Description | Notes
11381138
[[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)
11391139

11401140
# **list_small_balance**
1141-
> SmallBalance list_small_balance()
1141+
> list[SmallBalance] list_small_balance()
11421142
11431143
List small balance
11441144

@@ -1182,7 +1182,7 @@ This endpoint does not need any parameter.
11821182

11831183
### Return type
11841184

1185-
[**SmallBalance**](SmallBalance.md)
1185+
[**list[SmallBalance]**](SmallBalance.md)
11861186

11871187
### Authorization
11881188

@@ -1267,7 +1267,7 @@ void (empty response body)
12671267
[[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)
12681268

12691269
# **list_small_balance_history**
1270-
> SmallBalanceHistory list_small_balance_history(currency=currency, page=page, limit=limit)
1270+
> list[SmallBalanceHistory] list_small_balance_history(currency=currency, page=page, limit=limit)
12711271
12721272
List small balance history
12731273

@@ -1319,7 +1319,7 @@ Name | Type | Description | Notes
13191319

13201320
### Return type
13211321

1322-
[**SmallBalanceHistory**](SmallBalanceHistory.md)
1322+
[**list[SmallBalanceHistory]**](SmallBalanceHistory.md)
13231323

13241324
### Authorization
13251325

gate_api/__init__.py

Lines changed: 3 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__ = "4.82.0"
17+
__version__ = "4.83.0"
1818

1919
# import apis into sdk package
2020
from gate_api.api.earn_uni_api import EarnUniApi
@@ -272,6 +272,8 @@
272272
from gate_api.models.unified_borrowable import UnifiedBorrowable
273273
from gate_api.models.unified_discount import UnifiedDiscount
274274
from gate_api.models.unified_discount_tiers import UnifiedDiscountTiers
275+
from gate_api.models.unified_leverage_config import UnifiedLeverageConfig
276+
from gate_api.models.unified_leverage_setting import UnifiedLeverageSetting
275277
from gate_api.models.unified_loan import UnifiedLoan
276278
from gate_api.models.unified_loan_record import UnifiedLoanRecord
277279
from gate_api.models.unified_margin_tiers import UnifiedMarginTiers

0 commit comments

Comments
 (0)