Skip to content

Commit 9f0448c

Browse files
author
gateio
committed
update to v6.95.0
1 parent 74aeb56 commit 9f0448c

28 files changed

+1600
-25
lines changed

README.md

Lines changed: 10 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.94.2
9-
- Package version: 6.94.2
8+
- API version: 4.95.0
9+
- Package version: 6.95.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

@@ -138,6 +138,7 @@ Class | Method | HTTP request | Description
138138
*UnifiedApi* | [**list_unified_accounts**](docs/UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information
139139
*UnifiedApi* | [**get_unified_borrowable**](docs/UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account
140140
*UnifiedApi* | [**get_unified_transferable**](docs/UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account
141+
*UnifiedApi* | [**get_unified_transferables**](docs/UnifiedApi.md#get_unified_transferables) | **GET** /unified/transferables | Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed.
141142
*UnifiedApi* | [**list_unified_loans**](docs/UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | List loans
142143
*UnifiedApi* | [**create_unified_loan**](docs/UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay
143144
*UnifiedApi* | [**list_unified_loan_records**](docs/UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Get load records
@@ -281,6 +282,10 @@ Class | Method | HTTP request | Description
281282
*MarginApi* | [**get_cross_margin_transferable**](docs/MarginApi.md#get_cross_margin_transferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency. (deprecated)
282283
*MarginApi* | [**get_cross_margin_estimate_rate**](docs/MarginApi.md#get_cross_margin_estimate_rate) | **GET** /margin/cross/estimate_rate | Estimated interest rates. (deprecated)
283284
*MarginApi* | [**get_cross_margin_borrowable**](docs/MarginApi.md#get_cross_margin_borrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency. (deprecated)
285+
*MarginApi* | [**get_user_margin_tier**](docs/MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market
286+
*MarginApi* | [**get_market_margin_tier**](docs/MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient
287+
*MarginApi* | [**set_user_market_leverage**](docs/MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple
288+
*MarginApi* | [**list_margin_user_account**](docs/MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list
284289
*MultiCollateralLoanApi* | [**list_multi_collateral_orders**](docs/MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | List Multi-Collateral Orders
285290
*MultiCollateralLoanApi* | [**create_multi_collateral**](docs/MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Create Multi-Collateral Order
286291
*MultiCollateralLoanApi* | [**get_multi_collateral_order_detail**](docs/MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail
@@ -490,6 +495,8 @@ Class | Method | HTTP request | Description
490495
- [MarginAccount](docs/MarginAccount.md)
491496
- [MarginAccountBook](docs/MarginAccountBook.md)
492497
- [MarginAccountCurrency](docs/MarginAccountCurrency.md)
498+
- [MarginLeverageTier](docs/MarginLeverageTier.md)
499+
- [MarginMarketLeverage](docs/MarginMarketLeverage.md)
493500
- [MarginTiers](docs/MarginTiers.md)
494501
- [MarginTransferable](docs/MarginTransferable.md)
495502
- [MaxUniBorrowable](docs/MaxUniBorrowable.md)
@@ -591,6 +598,7 @@ Class | Method | HTTP request | Description
591598
- [TransactionID](docs/TransactionID.md)
592599
- [Transfer](docs/Transfer.md)
593600
- [TransferOrderStatus](docs/TransferOrderStatus.md)
601+
- [TransferablesResult](docs/TransferablesResult.md)
594602
- [TriggerOrderResponse](docs/TriggerOrderResponse.md)
595603
- [TriggerTime](docs/TriggerTime.md)
596604
- [UidPushOrder](docs/UidPushOrder.md)

docs/CancelBatchOrder.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**currency_pair** | **str** | Order currency pair |
88
**id** | **str** | Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation |
9+
**account** | **str** | If the canceled order is a unified account apikey, this field must be specified and set to `unified` | [optional]
910
**action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [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)

docs/FuturesApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1845,7 +1845,7 @@ Name | Type | Description | Notes
18451845
18461846
Create a futures order
18471847

1848-
- Creating futures orders requires `size`, which is number of contracts instead of currency amount. You can use `quanto_multiplier` in contract detail response to know how much currency 1 size contract represents - Zero-filled order cannot be retrieved 10 minutes after order cancellation. You will get a 404 not found for such orders - Set `reduce_only` to `true` can keep the position from changing side when reducing position size - In single position mode, to close a position, you need to set `size` to 0 and `close` to `true` - In dual position mode, to close one side position, you need to set `auto_size` side, `reduce_only` to true and `size` to 0 - Set `stp_act` to decide the strategy of self-trade prevention. For detailed usage, refer to the `stp_act` parameter in request body
1848+
- When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add position: reduce_only=false, size is a positive number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act`
18491849

18501850
### Example
18511851

docs/MarginAccount.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ Margin account detail. `base` refers to base currency, while `quotes to quote cu
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**currency_pair** | **str** | Currency pair | [optional]
8+
**account_type** | **str** | Account type, risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated | [optional]
9+
**leverage** | **str** | User current market leverage multiple | [optional]
810
**locked** | **bool** | Whether account is locked | [optional]
9-
**risk** | **str** | Current risk rate of margin account | [optional]
11+
**risk** | **str** | Leveraged Account Current Risk Rate (Returned when the Account is a Risk Rate Account) | [optional]
12+
**mmr** | **str** | Leveraged Account Current Maintenance Margin Rate (returned when the Account is a Maintenance Margin Rate Account) | [optional]
1013
**base** | [**MarginAccountCurrency**](MarginAccountCurrency.md) | | [optional]
1114
**quote** | [**MarginAccountCurrency**](MarginAccountCurrency.md) | | [optional]
1215

docs/MarginApi.md

Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ Method | HTTP request | Description
2323
[**get_cross_margin_transferable**](MarginApi.md#get_cross_margin_transferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency. (deprecated)
2424
[**get_cross_margin_estimate_rate**](MarginApi.md#get_cross_margin_estimate_rate) | **GET** /margin/cross/estimate_rate | Estimated interest rates. (deprecated)
2525
[**get_cross_margin_borrowable**](MarginApi.md#get_cross_margin_borrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency. (deprecated)
26+
[**get_user_margin_tier**](MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market
27+
[**get_market_margin_tier**](MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient
28+
[**set_user_market_leverage**](MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple
29+
[**list_margin_user_account**](MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list
2630

2731

2832
# **list_margin_accounts**
@@ -1330,3 +1334,263 @@ Name | Type | Description | Notes
13301334

13311335
[[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)
13321336

1337+
# **get_user_margin_tier**
1338+
> list[MarginLeverageTier] get_user_margin_tier(currency_pair)
1339+
1340+
Check the user's own leverage lending gradient in the current market
1341+
1342+
### Example
1343+
1344+
* Api Key Authentication (apiv4):
1345+
```python
1346+
from __future__ import print_function
1347+
import gate_api
1348+
from gate_api.exceptions import ApiException, GateApiException
1349+
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
1350+
# See configuration.py for a list of all supported configuration parameters.
1351+
# The client must configure the authentication and authorization parameters
1352+
# in accordance with the API server security policy.
1353+
# Examples for each auth method are provided below, use the example that
1354+
# satisfies your auth use case.
1355+
1356+
# Configure APIv4 key authorization
1357+
configuration = gate_api.Configuration(
1358+
host = "https://api.gateio.ws/api/v4",
1359+
key = "YOU_API_KEY",
1360+
secret = "YOUR_API_SECRET"
1361+
)
1362+
1363+
api_client = gate_api.ApiClient(configuration)
1364+
# Create an instance of the API class
1365+
api_instance = gate_api.MarginApi(api_client)
1366+
currency_pair = 'BTC_USDT' # str | Currency pair
1367+
1368+
try:
1369+
# Check the user's own leverage lending gradient in the current market
1370+
api_response = api_instance.get_user_margin_tier(currency_pair)
1371+
print(api_response)
1372+
except GateApiException as ex:
1373+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
1374+
except ApiException as e:
1375+
print("Exception when calling MarginApi->get_user_margin_tier: %s\n" % e)
1376+
```
1377+
1378+
### Parameters
1379+
1380+
Name | Type | Description | Notes
1381+
------------- | ------------- | ------------- | -------------
1382+
**currency_pair** | **str**| Currency pair |
1383+
1384+
### Return type
1385+
1386+
[**list[MarginLeverageTier]**](MarginLeverageTier.md)
1387+
1388+
### Authorization
1389+
1390+
[apiv4](../README.md#apiv4)
1391+
1392+
### HTTP request headers
1393+
1394+
- **Content-Type**: Not defined
1395+
- **Accept**: application/json
1396+
1397+
### HTTP response details
1398+
| Status code | Description | Response headers |
1399+
|-------------|-------------|------------------|
1400+
**200** | Successfully retrieved | - |
1401+
1402+
[[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)
1403+
1404+
# **get_market_margin_tier**
1405+
> list[MarginLeverageTier] get_market_margin_tier(currency_pair)
1406+
1407+
Query the current market leverage lending gradient
1408+
1409+
### Example
1410+
1411+
```python
1412+
from __future__ import print_function
1413+
import gate_api
1414+
from gate_api.exceptions import ApiException, GateApiException
1415+
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
1416+
# See configuration.py for a list of all supported configuration parameters.
1417+
configuration = gate_api.Configuration(
1418+
host = "https://api.gateio.ws/api/v4"
1419+
)
1420+
1421+
api_client = gate_api.ApiClient(configuration)
1422+
# Create an instance of the API class
1423+
api_instance = gate_api.MarginApi(api_client)
1424+
currency_pair = 'BTC_USDT' # str | Currency pair
1425+
1426+
try:
1427+
# Query the current market leverage lending gradient
1428+
api_response = api_instance.get_market_margin_tier(currency_pair)
1429+
print(api_response)
1430+
except GateApiException as ex:
1431+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
1432+
except ApiException as e:
1433+
print("Exception when calling MarginApi->get_market_margin_tier: %s\n" % e)
1434+
```
1435+
1436+
### Parameters
1437+
1438+
Name | Type | Description | Notes
1439+
------------- | ------------- | ------------- | -------------
1440+
**currency_pair** | **str**| Currency pair |
1441+
1442+
### Return type
1443+
1444+
[**list[MarginLeverageTier]**](MarginLeverageTier.md)
1445+
1446+
### Authorization
1447+
1448+
No authorization required
1449+
1450+
### HTTP request headers
1451+
1452+
- **Content-Type**: Not defined
1453+
- **Accept**: application/json
1454+
1455+
### HTTP response details
1456+
| Status code | Description | Response headers |
1457+
|-------------|-------------|------------------|
1458+
**200** | Successfully retrieved | - |
1459+
1460+
[[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)
1461+
1462+
# **set_user_market_leverage**
1463+
> set_user_market_leverage(margin_market_leverage)
1464+
1465+
Set the user market leverage multiple
1466+
1467+
### Example
1468+
1469+
* Api Key Authentication (apiv4):
1470+
```python
1471+
from __future__ import print_function
1472+
import gate_api
1473+
from gate_api.exceptions import ApiException, GateApiException
1474+
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
1475+
# See configuration.py for a list of all supported configuration parameters.
1476+
# The client must configure the authentication and authorization parameters
1477+
# in accordance with the API server security policy.
1478+
# Examples for each auth method are provided below, use the example that
1479+
# satisfies your auth use case.
1480+
1481+
# Configure APIv4 key authorization
1482+
configuration = gate_api.Configuration(
1483+
host = "https://api.gateio.ws/api/v4",
1484+
key = "YOU_API_KEY",
1485+
secret = "YOUR_API_SECRET"
1486+
)
1487+
1488+
api_client = gate_api.ApiClient(configuration)
1489+
# Create an instance of the API class
1490+
api_instance = gate_api.MarginApi(api_client)
1491+
margin_market_leverage = gate_api.MarginMarketLeverage() # MarginMarketLeverage |
1492+
1493+
try:
1494+
# Set the user market leverage multiple
1495+
api_instance.set_user_market_leverage(margin_market_leverage)
1496+
except GateApiException as ex:
1497+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
1498+
except ApiException as e:
1499+
print("Exception when calling MarginApi->set_user_market_leverage: %s\n" % e)
1500+
```
1501+
1502+
### Parameters
1503+
1504+
Name | Type | Description | Notes
1505+
------------- | ------------- | ------------- | -------------
1506+
**margin_market_leverage** | [**MarginMarketLeverage**](MarginMarketLeverage.md)| |
1507+
1508+
### Return type
1509+
1510+
void (empty response body)
1511+
1512+
### Authorization
1513+
1514+
[apiv4](../README.md#apiv4)
1515+
1516+
### HTTP request headers
1517+
1518+
- **Content-Type**: application/json
1519+
- **Accept**: Not defined
1520+
1521+
### HTTP response details
1522+
| Status code | Description | Response headers |
1523+
|-------------|-------------|------------------|
1524+
**204** | Success | - |
1525+
1526+
[[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)
1527+
1528+
# **list_margin_user_account**
1529+
> list[MarginAccount] list_margin_user_account(currency_pair=currency_pair)
1530+
1531+
Query the user's leverage account list
1532+
1533+
Support querying risk rate per position account and margin rate per position account
1534+
1535+
### Example
1536+
1537+
* Api Key Authentication (apiv4):
1538+
```python
1539+
from __future__ import print_function
1540+
import gate_api
1541+
from gate_api.exceptions import ApiException, GateApiException
1542+
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
1543+
# See configuration.py for a list of all supported configuration parameters.
1544+
# The client must configure the authentication and authorization parameters
1545+
# in accordance with the API server security policy.
1546+
# Examples for each auth method are provided below, use the example that
1547+
# satisfies your auth use case.
1548+
1549+
# Configure APIv4 key authorization
1550+
configuration = gate_api.Configuration(
1551+
host = "https://api.gateio.ws/api/v4",
1552+
key = "YOU_API_KEY",
1553+
secret = "YOUR_API_SECRET"
1554+
)
1555+
1556+
api_client = gate_api.ApiClient(configuration)
1557+
# Create an instance of the API class
1558+
api_instance = gate_api.MarginApi(api_client)
1559+
currency_pair = 'BTC_USDT' # str | Currency pair (optional)
1560+
1561+
try:
1562+
# Query the user's leverage account list
1563+
api_response = api_instance.list_margin_user_account(currency_pair=currency_pair)
1564+
print(api_response)
1565+
except GateApiException as ex:
1566+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
1567+
except ApiException as e:
1568+
print("Exception when calling MarginApi->list_margin_user_account: %s\n" % e)
1569+
```
1570+
1571+
### Parameters
1572+
1573+
Name | Type | Description | Notes
1574+
------------- | ------------- | ------------- | -------------
1575+
**currency_pair** | **str**| Currency pair | [optional]
1576+
1577+
### Return type
1578+
1579+
[**list[MarginAccount]**](MarginAccount.md)
1580+
1581+
### Authorization
1582+
1583+
[apiv4](../README.md#apiv4)
1584+
1585+
### HTTP request headers
1586+
1587+
- **Content-Type**: Not defined
1588+
- **Accept**: application/json
1589+
1590+
### HTTP response details
1591+
| Status code | Description | Response headers |
1592+
|-------------|-------------|------------------|
1593+
**200** | List retrieved | - |
1594+
1595+
[[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)
1596+

docs/MarginLeverageTier.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# MarginLeverageTier
2+
3+
Market gradient information
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**upper_limit** | **str** | Maximum loan limit | [optional]
8+
**mmr** | **str** | Maintenance margin rate | [optional]
9+
**leverage** | **str** | Maximum leverage multiple | [optional]
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+
13+

docs/MarginMarketLeverage.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# MarginMarketLeverage
2+
3+
Market leverage settings
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**currency_pair** | **str** | Currency pair | [optional]
8+
**leverage** | **str** | Position leverage |
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

0 commit comments

Comments
 (0)