Skip to content

Commit 64bdf87

Browse files
author
gate
committed
update to v7.2.181
1 parent 6ce5279 commit 64bdf87

823 files changed

Lines changed: 7532 additions & 72 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ APIv4 provides operations related to spot, margin, and contract trading, includi
44

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

7-
- API version: v4.106.179
8-
- Package version: 7.2.179
9-
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
7+
- API version: v4.106.181
8+
- Package version: 7.2.181
9+
- Build package: io.gate.codegen.PrecisePythonClientCodegen
1010
For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts)
1111

1212
## Versioning
@@ -138,6 +138,7 @@ Class | Method | HTTP request | Description
138138
*CFDApi* | [**close_position**](docs/CFDApi.md#close_position) | **POST** /tradfi/positions/{position_id}/close | Close position
139139
*CFDApi* | [**query_position_history_list**](docs/CFDApi.md#query_position_history_list) | **GET** /tradfi/positions/history | Query historical position list
140140
*CrossExApi* | [**list_crossex_rule_symbols**](docs/CrossExApi.md#list_crossex_rule_symbols) | **GET** /crossex/rule/symbols | Query symbol information
141+
*CrossExApi* | [**list_crossex_rule_open_capacity**](docs/CrossExApi.md#list_crossex_rule_open_capacity) | **GET** /crossex/rule/open_capacity | Query remaining platform opening capacity
141142
*CrossExApi* | [**list_crossex_rule_risk_limits**](docs/CrossExApi.md#list_crossex_rule_risk_limits) | **GET** /crossex/rule/risk_limits | Query risk limit information
142143
*CrossExApi* | [**list_crossex_transfer_coins**](docs/CrossExApi.md#list_crossex_transfer_coins) | **GET** /crossex/transfers/coin | Query supported transfer currencies
143144
*CrossExApi* | [**list_crossex_transfers**](docs/CrossExApi.md#list_crossex_transfers) | **GET** /crossex/transfers | Query Fund Transfer History
@@ -211,19 +212,22 @@ Class | Method | HTTP request | Description
211212
*OTCApi* | [**list_stable_coin_orders**](docs/OTCApi.md#list_stable_coin_orders) | **GET** /otc/stable_coin/order/list | Stablecoin order list
212213
*OTCApi* | [**get_otc_order_detail**](docs/OTCApi.md#get_otc_order_detail) | **GET** /otc/order/detail | Fiat order details
213214
*StockApi* | [**query_stock_user_assets**](docs/StockApi.md#query_stock_user_assets) | **GET** /stock/users/assets | Query user assets
215+
*StockApi* | [**set_stock_margin_feature**](docs/StockApi.md#set_stock_margin_feature) | **PUT** /stock/users/margin-feature | Set margin financing availability
214216
*StockApi* | [**query_stock_symbols**](docs/StockApi.md#query_stock_symbols) | **GET** /stock/symbols | Query symbol list
215217
*StockApi* | [**query_stock_symbol_detail**](docs/StockApi.md#query_stock_symbol_detail) | **GET** /stock/symbols/detail | Query symbol details
216218
*StockApi* | [**query_stock_order_book**](docs/StockApi.md#query_stock_order_book) | **GET** /stock/market/{symbol}/orderbook | Query market order book
217219
*StockApi* | [**query_stock_order_list**](docs/StockApi.md#query_stock_order_list) | **GET** /stock/orders | Query open order list
218220
*StockApi* | [**create_stock_order**](docs/StockApi.md#create_stock_order) | **POST** /stock/orders | Create order
219221
*StockApi* | [**delete_all_stock_orders**](docs/StockApi.md#delete_all_stock_orders) | **DELETE** /stock/orders | Cancel all open orders
220222
*StockApi* | [**query_stock_order_history**](docs/StockApi.md#query_stock_order_history) | **GET** /stock/orders/history | Query historical order list
223+
*StockApi* | [**query_stock_order_deals**](docs/StockApi.md#query_stock_order_deals) | **GET** /stock/orders/deals | Query order trade records
221224
*StockApi* | [**update_stock_order**](docs/StockApi.md#update_stock_order) | **PUT** /stock/orders/{order_id} | Modify order
222225
*StockApi* | [**delete_stock_order**](docs/StockApi.md#delete_stock_order) | **DELETE** /stock/orders/{order_id} | Cancel order
223226
*StockApi* | [**query_stock_positions**](docs/StockApi.md#query_stock_positions) | **GET** /stock/positions | Query current position list
224227
*StockApi* | [**close_stock_position**](docs/StockApi.md#close_stock_position) | **POST** /stock/positions/close | Close position
225228
*StockApi* | [**query_stock_transactions**](docs/StockApi.md#query_stock_transactions) | **GET** /stock/transactions | Query transaction records
226229
*StockApi* | [**create_stock_transaction**](docs/StockApi.md#create_stock_transaction) | **POST** /stock/transactions | Fund transfer
230+
*StockApi* | [**query_stock_balance_records**](docs/StockApi.md#query_stock_balance_records) | **GET** /stock/users/balance-records | Query user balance records
227231
*StockApi* | [**query_stock_exchanges**](docs/StockApi.md#query_stock_exchanges) | **GET** /stock/exchanges | Query supported exchanges
228232
*StockApi* | [**query_stock_fee_rate**](docs/StockApi.md#query_stock_fee_rate) | **GET** /stock/fee-rate | Query fee rates for Japanese and Korean stocks
229233
*SubAccountApi* | [**list_sub_accounts**](docs/SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts
@@ -377,6 +381,7 @@ Class | Method | HTTP request | Description
377381
*FlashSwapApi* | [**create_flash_swap_order**](docs/FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order
378382
*FlashSwapApi* | [**get_flash_swap_order**](docs/FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Query single flash swap order
379383
*FlashSwapApi* | [**preview_flash_swap_order**](docs/FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Flash swap order preview
384+
*FlashSwapApi* | [**list_flash_swap_currency_pair_v1**](docs/FlashSwapApi.md#list_flash_swap_currency_pair_v1) | **GET** /flash-swap/v1/currency-pair | List Flash Swap currency pairs
380385
*FlashSwapApi* | [**create_flash_swap_multi_currency_many_to_one_order**](docs/FlashSwapApi.md#create_flash_swap_multi_currency_many_to_one_order) | **POST** /flash_swap/multi-currency/many-to-one/order/create | Flash Swap - Multi-currency exchange - Place order (many-to-one)
381386
*FlashSwapApi* | [**preview_flash_swap_multi_currency_many_to_one_order**](docs/FlashSwapApi.md#preview_flash_swap_multi_currency_many_to_one_order) | **POST** /flash_swap/multi-currency/many-to-one/order/preview | Flash Swap - Multi-currency exchange - Preview (many-to-one)
382387
*FlashSwapApi* | [**create_flash_swap_order_v1**](docs/FlashSwapApi.md#create_flash_swap_order_v1) | **POST** /flash_swap/order/create | Flash Swap - Place order (one-to-one)
@@ -715,6 +720,9 @@ Class | Method | HTTP request | Description
715720
- [AutoRepaySetting](docs/AutoRepaySetting.md)
716721
- [AwardListStruct](docs/AwardListStruct.md)
717722
- [AwardListStructList](docs/AwardListStructList.md)
723+
- [BalanceRecordItem](docs/BalanceRecordItem.md)
724+
- [BalanceRecordList](docs/BalanceRecordList.md)
725+
- [BalanceRecordListData](docs/BalanceRecordListData.md)
718726
- [BaseResponse](docs/BaseResponse.md)
719727
- [BatchAmendItem](docs/BatchAmendItem.md)
720728
- [BatchAmendOrderReq](docs/BatchAmendOrderReq.md)
@@ -823,6 +831,7 @@ Class | Method | HTTP request | Description
823831
- [CrossexMarginModeRequest](docs/CrossexMarginModeRequest.md)
824832
- [CrossexMarginModeResponse](docs/CrossexMarginModeResponse.md)
825833
- [CrossexMarginPosition](docs/CrossexMarginPosition.md)
834+
- [CrossexOpenCapacity](docs/CrossexOpenCapacity.md)
826835
- [CrossexOrder](docs/CrossexOrder.md)
827836
- [CrossexOrderActionResponse](docs/CrossexOrderActionResponse.md)
828837
- [CrossexOrderRequest](docs/CrossexOrderRequest.md)
@@ -922,6 +931,8 @@ Class | Method | HTTP request | Description
922931
- [FlashSwapOrderPreviewRespData](docs/FlashSwapOrderPreviewRespData.md)
923932
- [FlashSwapOrderRequest](docs/FlashSwapOrderRequest.md)
924933
- [FlashSwapPreviewRequest](docs/FlashSwapPreviewRequest.md)
934+
- [FlashSwapV1CurrencyPair](docs/FlashSwapV1CurrencyPair.md)
935+
- [FlashSwapV1CurrencyPairListResp](docs/FlashSwapV1CurrencyPairListResp.md)
925936
- [FundingAccount](docs/FundingAccount.md)
926937
- [FundingRateRecord](docs/FundingRateRecord.md)
927938
- [FutureCancelOrderResult](docs/FutureCancelOrderResult.md)
@@ -1091,6 +1102,9 @@ Class | Method | HTTP request | Description
10911102
- [OrderCancel](docs/OrderCancel.md)
10921103
- [OrderCreateV1Req](docs/OrderCreateV1Req.md)
10931104
- [OrderCreateV1Resp](docs/OrderCreateV1Resp.md)
1105+
- [OrderDealItem](docs/OrderDealItem.md)
1106+
- [OrderDealList](docs/OrderDealList.md)
1107+
- [OrderDealListData](docs/OrderDealListData.md)
10941108
- [OrderHistoryList](docs/OrderHistoryList.md)
10951109
- [OrderHistoryList2](docs/OrderHistoryList2.md)
10961110
- [OrderHistoryList2Data](docs/OrderHistoryList2Data.md)
@@ -1250,6 +1264,7 @@ Class | Method | HTTP request | Description
12501264
- [RiskUnits](docs/RiskUnits.md)
12511265
- [SavedAddress](docs/SavedAddress.md)
12521266
- [SendChatMessageRequest](docs/SendChatMessageRequest.md)
1267+
- [SetMarginFeature](docs/SetMarginFeature.md)
12531268
- [SetMerchantWorkHoursRequest](docs/SetMerchantWorkHoursRequest.md)
12541269
- [SmallBalance](docs/SmallBalance.md)
12551270
- [SmallBalanceHistory](docs/SmallBalanceHistory.md)
@@ -1319,6 +1334,7 @@ Class | Method | HTTP request | Description
13191334
- [TradFiSpotError](docs/TradFiSpotError.md)
13201335
- [TradFiSpotOrderRequest](docs/TradFiSpotOrderRequest.md)
13211336
- [TradFiSpotOrderUpdateRequest](docs/TradFiSpotOrderUpdateRequest.md)
1337+
- [TradFiSpotSetMarginFeatureRequest](docs/TradFiSpotSetMarginFeatureRequest.md)
13221338
- [TradFiSpotTransactionRequest](docs/TradFiSpotTransactionRequest.md)
13231339
- [TradFiTicker](docs/TradFiTicker.md)
13241340
- [TradFiTickerData](docs/TradFiTickerData.md)

‎docs/BalanceRecordItem.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# BalanceRecordItem
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **int** | Balance record primary key ID | [optional]
7+
**user_id** | **int** | User ID | [optional]
8+
**change** | **str** | Cash amount change. Positive values are credits; negative values are debits. | [optional]
9+
**balance** | **str** | Cash balance snapshot after the change | [optional]
10+
**stock_change** | **str** | Stock quantity change, parsed from detail.amount for stock quantity records; may be an empty string for other records | [optional]
11+
**type** | **str** | Raw record type. Common values include: - deposit: Funds transferred in. - withdraw: Funds transferred out. - fee: Trading fee. - dividend: Dividend payment. - sell: Proceeds from selling stocks. - buy: Payment for buying stocks. - award: Airdrop reward. - stock_transfer_in: Stocks transferred in. - stock_transfer_out: Stocks transferred out. | [optional]
12+
**business** | **str** | Business identifier | [optional]
13+
**business_id** | **int** | Related business ID | [optional]
14+
**symbol** | **str** | Symbol | [optional]
15+
**detail** | **str** | Raw business details as a JSON string; returned only when include_detail=true is requested | [optional]
16+
**version** | **int** | Record version | [optional]
17+
**time_create** | **int** | Business event time (Unix timestamp in seconds) | [optional]
18+
**create_time** | **int** | Record creation time (Unix timestamp in seconds) | [optional]
19+
20+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
21+
22+

‎docs/BalanceRecordList.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# BalanceRecordList
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**data** | [**BalanceRecordListData**](BalanceRecordListData.md) | | [optional]
7+
**timestamp** | **int** | | [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/BalanceRecordListData.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# BalanceRecordListData
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**total** | **int** | Total quantity | [optional]
7+
**total_page** | **int** | Total pages | [optional]
8+
**list** | [**list[BalanceRecordItem]**](BalanceRecordItem.md) | Balance record details | [optional]
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+

‎docs/BatchFuturesOrder.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ Name | Type | Description | Notes
1010
**id** | **int** | Futures order ID | [optional] [readonly]
1111
**user** | **int** | User ID | [optional] [readonly]
1212
**create_time** | **float** | Creation time of order | [optional] [readonly]
13+
**create_time_us** | **int** | Order creation time as a Unix timestamp in microseconds; omitted when unavailable | [optional] [readonly]
14+
**update_time** | **float** | OrderUpdateTime | [optional] [readonly]
15+
**update_time_us** | **int** | Order update time as a Unix timestamp in microseconds; omitted when unavailable | [optional] [readonly]
1316
**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly]
17+
**finish_time_us** | **int** | Order finish time as a Unix timestamp in microseconds; omitted if the order has not finished or the timestamp is unavailable | [optional] [readonly]
1418
**finish_as** | **str** | How the order was finished: - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set - position_closed: cancelled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly]
1519
**status** | **str** | Order status - `open`: Pending - `finished`: Completed | [optional] [readonly]
1620
**contract** | **str** | Futures contract | [optional]

‎docs/CrossExApi.md‎

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**list_crossex_rule_symbols**](CrossExApi.md#list_crossex_rule_symbols) | **GET** /crossex/rule/symbols | Query symbol information
8+
[**list_crossex_rule_open_capacity**](CrossExApi.md#list_crossex_rule_open_capacity) | **GET** /crossex/rule/open_capacity | Query remaining platform opening capacity
89
[**list_crossex_rule_risk_limits**](CrossExApi.md#list_crossex_rule_risk_limits) | **GET** /crossex/rule/risk_limits | Query risk limit information
910
[**list_crossex_transfer_coins**](CrossExApi.md#list_crossex_transfer_coins) | **GET** /crossex/transfers/coin | Query supported transfer currencies
1011
[**list_crossex_transfers**](CrossExApi.md#list_crossex_transfers) | **GET** /crossex/transfers | Query Fund Transfer History
@@ -104,6 +105,62 @@ No authorization required
104105

105106
[[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)
106107

108+
# **list_crossex_rule_open_capacity**
109+
> list[CrossexOpenCapacity] list_crossex_rule_open_capacity()
110+
111+
Query remaining platform opening capacity
112+
113+
Query the current maximum remaining opening notional value for each futures trading pair in the LONG and SHORT directions. Only trading pairs and position sides with remaining opening capacity below the threshold are returned; omission means the remaining capacity is at least the threshold. When `available_to_open_notional` is `0`, no position can currently be opened for that trading pair and position side. Closing positions is not affected by this rule.
114+
115+
### Example
116+
117+
```python
118+
from __future__ import print_function
119+
import gate_api
120+
from gate_api.exceptions import ApiException, GateApiException
121+
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
122+
# See configuration.py for a list of all supported configuration parameters.
123+
configuration = gate_api.Configuration(
124+
host = "https://api.gateio.ws/api/v4"
125+
)
126+
127+
api_client = gate_api.ApiClient(configuration)
128+
# Create an instance of the API class
129+
api_instance = gate_api.CrossExApi(api_client)
130+
131+
try:
132+
# Query remaining platform opening capacity
133+
api_response = api_instance.list_crossex_rule_open_capacity()
134+
print(api_response)
135+
except GateApiException as ex:
136+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
137+
except ApiException as e:
138+
print("Exception when calling CrossExApi->list_crossex_rule_open_capacity: %s\n" % e)
139+
```
140+
141+
### Parameters
142+
This endpoint does not need any parameter.
143+
144+
### Return type
145+
146+
[**list[CrossexOpenCapacity]**](CrossexOpenCapacity.md)
147+
148+
### Authorization
149+
150+
No authorization required
151+
152+
### HTTP request headers
153+
154+
- **Content-Type**: Not defined
155+
- **Accept**: application/json
156+
157+
### HTTP response details
158+
| Status code | Description | Response headers |
159+
|-------------|-------------|------------------|
160+
**200** | Query successful | - |
161+
162+
[[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)
163+
107164
# **list_crossex_rule_risk_limits**
108165
> list[CrossexRiskLimit] list_crossex_rule_risk_limits(symbols)
109166
@@ -308,7 +365,7 @@ Name | Type | Description | Notes
308365
309366
Fund Transfer
310367

311-
Rate limit: 10 requests per 10 seconds - In cross-exchange mode, when transferring USDT, either `from` or `to` must be `SPOT`, and the other side must be `CROSSEX`. If `CROSSEX_${exchange_type}` (e.g. `CROSSEX_GATE`) is provided, it will be automatically treated as `CROSSEX`. - In isolated exchange mode, when transferring USDT, either `from` or `to` must be `CROSSEX_${exchange_type}`, and the other side must be `SPOT` or `CROSSEX_${exchange_type}`. If `CROSSEX` is provided, it will be automatically treated as `CROSSEX_GATE`. - When transferring non-USDT assets to or from CrossEx, neither `from` nor `to` can be `CROSSEX`; `CROSSEX_${exchange_type}` must be explicitly specified. - When transferring non-USDT assets, transfers between `CROSSEX_{exchange_type}` accounts are supported, for example: from = `CROSSEX_BINANCE`, to = `CROSSEX_GATE` - When either side of the transfer is `CROSSEX_KRAKEN`, only USDT is supported for now. - When either side of the transfer is `CROSSEX_HYPERLIQUID`, the other side must be `SPOT`, and only USDC is supported. - When either side of the transfer is `CROSSEX_LIGHTER`, the other side must be `SPOT`, and only USDC is supported.
368+
Rate limit: 10 requests per 10 seconds - In cross-exchange mode, when transferring USDT, either `from` or `to` must be `SPOT`, and the other side must be `CROSSEX`. If `CROSSEX_${exchange_type}` (e.g. `CROSSEX_GATE`) is provided, it will be automatically treated as `CROSSEX`. - In isolated exchange mode, when transferring USDT, either `from` or `to` must be `CROSSEX_${exchange_type}`, and the other side must be `SPOT` or `CROSSEX_${exchange_type}`. If `CROSSEX` is provided, it will be automatically treated as `CROSSEX_GATE`. - When transferring non-USDT assets to or from CrossEx, neither `from` nor `to` can be `CROSSEX`; `CROSSEX_${exchange_type}` must be explicitly specified. - When transferring non-USDT assets, transfers between `CROSSEX_{exchange_type}` accounts are supported, for example: from = `CROSSEX_BINANCE`, to = `CROSSEX_GATE` - When either side of the transfer is `CROSSEX_KRAKEN`, only USDT is supported for now. - When either side of the transfer is `CROSSEX_DERIBIT`, only USDC is currently supported. - When either side of the transfer is `CROSSEX_HYPERLIQUID`, the other side must be `SPOT`, and only USDC is supported. - When either side of the transfer is `CROSSEX_LIGHTER`, the other side must be `SPOT`, and only USDC is supported.
312369

313370
### Example
314371

‎docs/CrossexOpenCapacity.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# CrossexOpenCapacity
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**symbol** | **str** | Futures trading pair |
7+
**position_side** | **str** | Position side (LONG for long positions / SHORT for short positions) |
8+
**available_to_open_notional** | **Decimal** | Current maximum remaining opening notional value for the position side; 0 means no position can currently be opened |
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)