Skip to content

Commit 121342d

Browse files
committed
release 4.45.0
1 parent 98884bc commit 121342d

51 files changed

Lines changed: 2252 additions & 983 deletions

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: 21 additions & 17 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.42.0
9-
- Package version: 4.42.0
8+
- API version: 4.45.0
9+
- Package version: 4.45.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

@@ -131,6 +131,7 @@ Class | Method | HTTP request | Description
131131
*SubAccountApi* | [**delete_sub_account_keys**](docs/SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account
132132
*SubAccountApi* | [**lock_sub_account**](docs/SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account
133133
*SubAccountApi* | [**unlock_sub_account**](docs/SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account
134+
*AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail
134135
*DeliveryApi* | [**list_delivery_contracts**](docs/DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | List all futures contracts
135136
*DeliveryApi* | [**get_delivery_contract**](docs/DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract
136137
*DeliveryApi* | [**list_delivery_order_book**](docs/DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Futures order book
@@ -206,27 +207,27 @@ Class | Method | HTTP request | Description
206207
*FuturesApi* | [**cancel_price_triggered_order_list**](docs/FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel all open orders
207208
*FuturesApi* | [**get_price_triggered_order**](docs/FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order
208209
*FuturesApi* | [**cancel_price_triggered_order**](docs/FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order
209-
*MarginApi* | [**list_margin_currency_pairs**](docs/MarginApi.md#list_margin_currency_pairs) | **GET** /margin/currency_pairs | List all supported currency pairs supported in margin trading
210-
*MarginApi* | [**get_margin_currency_pair**](docs/MarginApi.md#get_margin_currency_pair) | **GET** /margin/currency_pairs/{currency_pair} | Query one single margin currency pair
211-
*MarginApi* | [**list_funding_book**](docs/MarginApi.md#list_funding_book) | **GET** /margin/funding_book | Order book of lending loans
212210
*MarginApi* | [**list_margin_accounts**](docs/MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list
213211
*MarginApi* | [**list_margin_account_book**](docs/MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history
214212
*MarginApi* | [**list_funding_accounts**](docs/MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list
215-
*MarginApi* | [**list_loans**](docs/MarginApi.md#list_loans) | **GET** /margin/loans | List all loans
216-
*MarginApi* | [**create_loan**](docs/MarginApi.md#create_loan) | **POST** /margin/loans | Lend or borrow
217-
*MarginApi* | [**merge_loans**](docs/MarginApi.md#merge_loans) | **POST** /margin/merged_loans | Merge multiple lending loans
218-
*MarginApi* | [**get_loan**](docs/MarginApi.md#get_loan) | **GET** /margin/loans/{loan_id} | Retrieve one single loan detail
219-
*MarginApi* | [**cancel_loan**](docs/MarginApi.md#cancel_loan) | **DELETE** /margin/loans/{loan_id} | Cancel lending loan
220-
*MarginApi* | [**update_loan**](docs/MarginApi.md#update_loan) | **PATCH** /margin/loans/{loan_id} | Modify a loan
221-
*MarginApi* | [**list_loan_repayments**](docs/MarginApi.md#list_loan_repayments) | **GET** /margin/loans/{loan_id}/repayment | List loan repayment records
222-
*MarginApi* | [**repay_loan**](docs/MarginApi.md#repay_loan) | **POST** /margin/loans/{loan_id}/repayment | Repay a loan
223-
*MarginApi* | [**list_loan_records**](docs/MarginApi.md#list_loan_records) | **GET** /margin/loan_records | List repayment records of a specific loan
224-
*MarginApi* | [**get_loan_record**](docs/MarginApi.md#get_loan_record) | **GET** /margin/loan_records/{loan_record_id} | Get one single loan record
225-
*MarginApi* | [**update_loan_record**](docs/MarginApi.md#update_loan_record) | **PATCH** /margin/loan_records/{loan_record_id} | Modify a loan record
226213
*MarginApi* | [**get_auto_repay_status**](docs/MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting
227214
*MarginApi* | [**set_auto_repay**](docs/MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting
228215
*MarginApi* | [**get_margin_transferable**](docs/MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency
229-
*MarginApi* | [**get_margin_borrowable**](docs/MarginApi.md#get_margin_borrowable) | **GET** /margin/borrowable | Get the max borrowable amount for a specific margin currency
216+
*MarginApi* | [**list_margin_currency_pairs**](docs/MarginApi.md#list_margin_currency_pairs) | **GET** /margin/currency_pairs | List all supported currency pairs supported in margin trading(Deprecated)
217+
*MarginApi* | [**get_margin_currency_pair**](docs/MarginApi.md#get_margin_currency_pair) | **GET** /margin/currency_pairs/{currency_pair} | Query one single margin currency pair(Deprecated)
218+
*MarginApi* | [**list_funding_book**](docs/MarginApi.md#list_funding_book) | **GET** /margin/funding_book | Order book of lending loans(Deprecated)
219+
*MarginApi* | [**list_loans**](docs/MarginApi.md#list_loans) | **GET** /margin/loans | List all loans(Deprecated)
220+
*MarginApi* | [**create_loan**](docs/MarginApi.md#create_loan) | **POST** /margin/loans | Lend or borrow(Deprecated)
221+
*MarginApi* | [**merge_loans**](docs/MarginApi.md#merge_loans) | **POST** /margin/merged_loans | Merge multiple lending loans(Deprecated)
222+
*MarginApi* | [**get_loan**](docs/MarginApi.md#get_loan) | **GET** /margin/loans/{loan_id} | Retrieve one single loan detail(Deprecated)
223+
*MarginApi* | [**cancel_loan**](docs/MarginApi.md#cancel_loan) | **DELETE** /margin/loans/{loan_id} | Cancel lending loan(Deprecated)
224+
*MarginApi* | [**update_loan**](docs/MarginApi.md#update_loan) | **PATCH** /margin/loans/{loan_id} | Modify a loan(Deprecated)
225+
*MarginApi* | [**list_loan_repayments**](docs/MarginApi.md#list_loan_repayments) | **GET** /margin/loans/{loan_id}/repayment | List loan repayment records(Deprecated)
226+
*MarginApi* | [**repay_loan**](docs/MarginApi.md#repay_loan) | **POST** /margin/loans/{loan_id}/repayment | Repay a loan(Deprecated)
227+
*MarginApi* | [**list_loan_records**](docs/MarginApi.md#list_loan_records) | **GET** /margin/loan_records | List repayment records of a specific loan(Deprecated)
228+
*MarginApi* | [**get_loan_record**](docs/MarginApi.md#get_loan_record) | **GET** /margin/loan_records/{loan_record_id} | Get one single loan record(Deprecated)
229+
*MarginApi* | [**update_loan_record**](docs/MarginApi.md#update_loan_record) | **PATCH** /margin/loan_records/{loan_record_id} | Modify a loan record(Deprecated)
230+
*MarginApi* | [**get_margin_borrowable**](docs/MarginApi.md#get_margin_borrowable) | **GET** /margin/borrowable | Get the max borrowable amount for a specific margin currency(Deprecated)
230231
*MarginApi* | [**list_cross_margin_currencies**](docs/MarginApi.md#list_cross_margin_currencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin.
231232
*MarginApi* | [**get_cross_margin_currency**](docs/MarginApi.md#get_cross_margin_currency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin
232233
*MarginApi* | [**get_cross_margin_account**](docs/MarginApi.md#get_cross_margin_account) | **GET** /margin/cross/accounts | Retrieve cross margin account
@@ -236,6 +237,7 @@ Class | Method | HTTP request | Description
236237
*MarginApi* | [**get_cross_margin_loan**](docs/MarginApi.md#get_cross_margin_loan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail
237238
*MarginApi* | [**list_cross_margin_repayments**](docs/MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments
238239
*MarginApi* | [**repay_cross_margin_loan**](docs/MarginApi.md#repay_cross_margin_loan) | **POST** /margin/cross/repayments | Cross margin repayments
240+
*MarginApi* | [**get_cross_margin_interest_records**](docs/MarginApi.md#get_cross_margin_interest_records) | **GET** /margin/cross/interest_records | Interest records for the cross margin account
239241
*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
240242
*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
241243
*OptionsApi* | [**list_options_underlyings**](docs/OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlyings
@@ -316,6 +318,7 @@ Class | Method | HTTP request | Description
316318
## Documentation For Models
317319

318320
- [AccountBalance](docs/AccountBalance.md)
321+
- [AccountDetail](docs/AccountDetail.md)
319322
- [AgencyCommission](docs/AgencyCommission.md)
320323
- [AgencyCommissionHistory](docs/AgencyCommissionHistory.md)
321324
- [AgencyTransaction](docs/AgencyTransaction.md)
@@ -352,6 +355,7 @@ Class | Method | HTTP request | Description
352355
- [FlashSwapOrder](docs/FlashSwapOrder.md)
353356
- [FlashSwapOrderPreview](docs/FlashSwapOrderPreview.md)
354357
- [FlashSwapOrderRequest](docs/FlashSwapOrderRequest.md)
358+
- [FlashSwapPreviewRequest](docs/FlashSwapPreviewRequest.md)
355359
- [FundingAccount](docs/FundingAccount.md)
356360
- [FundingBookItem](docs/FundingBookItem.md)
357361
- [FundingRateRecord](docs/FundingRateRecord.md)

docs/AccountApi.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# gate_api.AccountApi
2+
3+
All URIs are relative to *https://api.gateio.ws/api/v4*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**get_account_detail**](AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail
8+
9+
10+
# **get_account_detail**
11+
> AccountDetail get_account_detail()
12+
13+
Get account detail
14+
15+
### Example
16+
17+
* Api Key Authentication (apiv4):
18+
```python
19+
from __future__ import print_function
20+
import gate_api
21+
from gate_api.exceptions import ApiException, GateApiException
22+
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
23+
# See configuration.py for a list of all supported configuration parameters.
24+
# The client must configure the authentication and authorization parameters
25+
# in accordance with the API server security policy.
26+
# Examples for each auth method are provided below, use the example that
27+
# satisfies your auth use case.
28+
29+
# Configure APIv4 key authorization
30+
configuration = gate_api.Configuration(
31+
host = "https://api.gateio.ws/api/v4",
32+
key = "YOU_API_KEY",
33+
secret = "YOUR_API_SECRET"
34+
)
35+
36+
api_client = gate_api.ApiClient(configuration)
37+
# Create an instance of the API class
38+
api_instance = gate_api.AccountApi(api_client)
39+
40+
try:
41+
# Get account detail
42+
api_response = api_instance.get_account_detail()
43+
print(api_response)
44+
except GateApiException as ex:
45+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
46+
except ApiException as e:
47+
print("Exception when calling AccountApi->get_account_detail: %s\n" % e)
48+
```
49+
50+
### Parameters
51+
This endpoint does not need any parameter.
52+
53+
### Return type
54+
55+
[**AccountDetail**](AccountDetail.md)
56+
57+
### Authorization
58+
59+
[apiv4](../README.md#apiv4)
60+
61+
### HTTP request headers
62+
63+
- **Content-Type**: Not defined
64+
- **Accept**: application/json
65+
66+
### HTTP response details
67+
| Status code | Description | Response headers |
68+
|-------------|-------------|------------------|
69+
**200** | Successful | - |
70+
71+
[[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)
72+

docs/AccountDetail.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# AccountDetail
2+
3+
Account detail
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**ip_whitelist** | **list[str]** | IP whitelist | [optional]
8+
**currency_pairs** | **list[str]** | CurrencyPair whitelisting | [optional]
9+
**user_id** | **int** | User ID | [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/BatchFuturesOrder.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
1111
**user** | **int** | User ID | [optional] [readonly]
1212
**create_time** | **float** | Creation time of order | [optional] [readonly]
1313
**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly]
14-
**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 of position close | [optional] [readonly]
14+
**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 of position close - stp: cancelled because self trade prevention | [optional] [readonly]
1515
**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly]
1616
**contract** | **str** | Futures contract | [optional]
1717
**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | [optional]
@@ -30,6 +30,8 @@ Name | Type | Description | Notes
3030
**mkfr** | **str** | Maker fee | [optional] [readonly]
3131
**refu** | **int** | Reference user ID | [optional] [readonly]
3232
**auto_size** | **str** | Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 | [optional]
33+
**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional]
34+
**stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly]
3335

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

docs/BatchOrder.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ Name | Type | Description | Notes
3434
**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly]
3535
**rebated_fee** | **str** | Rebated fee | [optional] [readonly]
3636
**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly]
37+
**stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly]
38+
**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional]
39+
**finish_as** | **str** | How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention | [optional] [readonly]
3740

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

docs/CrossMarginAccount.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**user_id** | **int** | User ID | [optional]
7+
**refresh_time** | **int** | Time of the most recent refresh | [optional]
78
**locked** | **bool** | Whether account is locked | [optional]
89
**balances** | [**dict(str, CrossMarginBalance)**](CrossMarginBalance.md) | | [optional]
910
**total** | **str** | Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` | [optional]

docs/CrossMarginAccountBook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
88
**currency** | **str** | Currency changed | [optional]
99
**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional]
1010
**balance** | **str** | Balance after change | [optional]
11-
**type** | **str** | Account change type, including: - in: transferals into cross margin account - out: transferals out from cross margin account - repay: loan repayment - borrow: borrowed loan - interest: interest - new_order: new order locked - order_fill: order fills - referral_fee: fee refund from referrals - order_fee: order fee generated from fills - unknown: unknown type | [optional]
11+
**type** | **str** | Account change type, including: - in: transferals into cross margin account - out: transferals out from cross margin account - repay: loan repayment - borrow: borrowed loan - interest: interest - new_order: new order locked - order_fill: order fills - referral_fee: fee refund from referrals - order_fee: order fee generated from fills - futures_in: transfer into futures account - futures_out: transfer out of futures account - unknown: unknown type | [optional]
1212

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

0 commit comments

Comments
 (0)