Skip to content

Commit 935d60c

Browse files
committed
support total balance API
1 parent 48155f3 commit 935d60c

84 files changed

Lines changed: 1864 additions & 555 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: 16 additions & 9 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.21.6
9-
- Package version: 4.21.6
8+
- API version: 4.22.1
9+
- Package version: 4.22.1
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

@@ -184,12 +184,13 @@ Class | Method | HTTP request | Description
184184
*MarginApi* | [**update_loan**](docs/MarginApi.md#update_loan) | **PATCH** /margin/loans/{loan_id} | Modify a loan
185185
*MarginApi* | [**list_loan_repayments**](docs/MarginApi.md#list_loan_repayments) | **GET** /margin/loans/{loan_id}/repayment | List loan repayment records
186186
*MarginApi* | [**repay_loan**](docs/MarginApi.md#repay_loan) | **POST** /margin/loans/{loan_id}/repayment | Repay a loan
187-
*MarginApi* | [**list_loan_records**](docs/MarginApi.md#list_loan_records) | **GET** /margin/loan_records | List repayment records of specified loan
187+
*MarginApi* | [**list_loan_records**](docs/MarginApi.md#list_loan_records) | **GET** /margin/loan_records | List repayment records of a specific loan
188188
*MarginApi* | [**get_loan_record**](docs/MarginApi.md#get_loan_record) | **GET** /margin/loan_records/{loan_record_id} | Get one single loan record
189189
*MarginApi* | [**update_loan_record**](docs/MarginApi.md#update_loan_record) | **PATCH** /margin/loan_records/{loan_record_id} | Modify a loan record
190190
*MarginApi* | [**get_auto_repay_status**](docs/MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting
191191
*MarginApi* | [**set_auto_repay**](docs/MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting
192-
*MarginApi* | [**get_margin_transferable**](docs/MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Max transferable amount for specified margin currency
192+
*MarginApi* | [**get_margin_transferable**](docs/MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency
193+
*MarginApi* | [**get_margin_borrowable**](docs/MarginApi.md#get_margin_borrowable) | **GET** /margin/borrowable | Get the max borrowable amount for a specific margin currency
193194
*MarginApi* | [**list_cross_margin_currencies**](docs/MarginApi.md#list_cross_margin_currencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin.
194195
*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
195196
*MarginApi* | [**get_cross_margin_account**](docs/MarginApi.md#get_cross_margin_account) | **GET** /margin/cross/accounts | Retrieve cross margin account
@@ -199,11 +200,12 @@ Class | Method | HTTP request | Description
199200
*MarginApi* | [**get_cross_margin_loan**](docs/MarginApi.md#get_cross_margin_loan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail
200201
*MarginApi* | [**list_cross_margin_repayments**](docs/MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments
201202
*MarginApi* | [**repay_cross_margin_loan**](docs/MarginApi.md#repay_cross_margin_loan) | **POST** /margin/cross/repayments | Repay cross margin loan
202-
*MarginApi* | [**get_cross_margin_transferable**](docs/MarginApi.md#get_cross_margin_transferable) | **GET** /margin/cross/transferable | Max transferable amount for specified cross margin currency
203-
*SpotApi* | [**list_currencies**](docs/SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' detail
204-
*SpotApi* | [**get_currency**](docs/SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get detail of one particular currency
203+
*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
204+
*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
205+
*SpotApi* | [**list_currencies**](docs/SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details
206+
*SpotApi* | [**get_currency**](docs/SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency
205207
*SpotApi* | [**list_currency_pairs**](docs/SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported
206-
*SpotApi* | [**get_currency_pair**](docs/SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get detail of one single order
208+
*SpotApi* | [**get_currency_pair**](docs/SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc order
207209
*SpotApi* | [**list_tickers**](docs/SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information
208210
*SpotApi* | [**list_order_book**](docs/SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book
209211
*SpotApi* | [**list_trades**](docs/SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades
@@ -228,17 +230,19 @@ Class | Method | HTTP request | Description
228230
*WalletApi* | [**list_withdrawals**](docs/WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records
229231
*WalletApi* | [**list_deposits**](docs/WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records
230232
*WalletApi* | [**transfer**](docs/WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts
231-
*WalletApi* | [**list_sub_account_transfers**](docs/WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Transfer records between main and sub accounts
233+
*WalletApi* | [**list_sub_account_transfers**](docs/WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts
232234
*WalletApi* | [**transfer_with_sub_account**](docs/WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts
233235
*WalletApi* | [**list_withdraw_status**](docs/WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Retrieve withdrawal status
234236
*WalletApi* | [**list_sub_account_balances**](docs/WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances
235237
*WalletApi* | [**get_trade_fee**](docs/WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Retrieve personal trading fee
238+
*WalletApi* | [**get_total_balance**](docs/WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Retrieve user's total balances
236239
*WithdrawalApi* | [**withdraw**](docs/WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw
237240
*WithdrawalApi* | [**cancel_withdrawal**](docs/WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID
238241

239242

240243
## Documentation For Models
241244

245+
- [AccountBalance](docs/AccountBalance.md)
242246
- [AutoRepaySetting](docs/AutoRepaySetting.md)
243247
- [BatchOrder](docs/BatchOrder.md)
244248
- [CancelOrder](docs/CancelOrder.md)
@@ -248,6 +252,7 @@ Class | Method | HTTP request | Description
248252
- [CrossMarginAccount](docs/CrossMarginAccount.md)
249253
- [CrossMarginAccountBook](docs/CrossMarginAccountBook.md)
250254
- [CrossMarginBalance](docs/CrossMarginBalance.md)
255+
- [CrossMarginBorrowable](docs/CrossMarginBorrowable.md)
251256
- [CrossMarginCurrency](docs/CrossMarginCurrency.md)
252257
- [CrossMarginLoan](docs/CrossMarginLoan.md)
253258
- [CrossMarginRepayRequest](docs/CrossMarginRepayRequest.md)
@@ -281,6 +286,7 @@ Class | Method | HTTP request | Description
281286
- [MarginAccount](docs/MarginAccount.md)
282287
- [MarginAccountBook](docs/MarginAccountBook.md)
283288
- [MarginAccountCurrency](docs/MarginAccountCurrency.md)
289+
- [MarginBorrowable](docs/MarginBorrowable.md)
284290
- [MarginCurrencyPair](docs/MarginCurrencyPair.md)
285291
- [MarginTransferable](docs/MarginTransferable.md)
286292
- [MultiChainAddressItem](docs/MultiChainAddressItem.md)
@@ -300,6 +306,7 @@ Class | Method | HTTP request | Description
300306
- [SubAccountBalance](docs/SubAccountBalance.md)
301307
- [SubAccountTransfer](docs/SubAccountTransfer.md)
302308
- [Ticker](docs/Ticker.md)
309+
- [TotalBalance](docs/TotalBalance.md)
303310
- [Trade](docs/Trade.md)
304311
- [TradeFee](docs/TradeFee.md)
305312
- [Transfer](docs/Transfer.md)

docs/AccountBalance.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# AccountBalance
2+
3+
Total balances calculated with specified currency unit
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**amount** | **str** | Account total balance amount | [optional]
8+
**currency** | **str** | Currency | [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/BatchOrder.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ Batch order details
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional]
8-
**succeeded** | **bool** | Whether order succeeds | [optional]
9-
**label** | **str** | Error label, empty string if order succeeds | [optional]
10-
**message** | **str** | Detailed error message, empty string if order succeeds | [optional]
8+
**succeeded** | **bool** | Whether the batch of orders succeeded | [optional]
9+
**label** | **str** | Error label, if any, otherwise an empty string | [optional]
10+
**message** | **str** | Detailed error message, if any, otherwise an empty string | [optional]
1111
**id** | **str** | Order ID | [optional] [readonly]
12-
**create_time** | **str** | Order creation time | [optional] [readonly]
13-
**update_time** | **str** | Order last modification time | [optional] [readonly]
14-
**create_time_ms** | **int** | Order creation time in milliseconds | [optional] [readonly]
15-
**update_time_ms** | **int** | Order last modification time in milliseconds | [optional] [readonly]
12+
**create_time** | **str** | Creation time of order | [optional] [readonly]
13+
**update_time** | **str** | Last modification time of order | [optional] [readonly]
14+
**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly]
15+
**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly]
1616
**status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly]
1717
**currency_pair** | **str** | Currency pair | [optional]
1818
**type** | **str** | Order type. limit - limit order | [optional] [default to 'limit']
@@ -21,15 +21,15 @@ Name | Type | Description | Notes
2121
**amount** | **str** | Trade amount | [optional]
2222
**price** | **str** | Order price | [optional]
2323
**time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee | [optional] [default to 'gtc']
24-
**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Set to -1 to hide the amount totally | [optional]
24+
**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Set to -1 to hide the order completely | [optional]
2525
**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional]
2626
**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` cannot be both set to true in one order. | [optional]
2727
**left** | **str** | Amount left to fill | [optional] [readonly]
2828
**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly]
2929
**filled_total** | **str** | Total filled in quote currency | [optional] [readonly]
3030
**fee** | **str** | Fee deducted | [optional] [readonly]
3131
**fee_currency** | **str** | Fee currency unit | [optional] [readonly]
32-
**point_fee** | **str** | Point used to deduct fee | [optional] [readonly]
32+
**point_fee** | **str** | Points used to deduct fee | [optional] [readonly]
3333
**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly]
3434
**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly]
3535
**rebated_fee** | **str** | Rebated fee | [optional] [readonly]

docs/Contract.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ Name | Type | Description | Notes
3131
**ref_rebate_rate** | **str** | Referrer commission rate | [optional]
3232
**orderbook_id** | **int** | Current orderbook ID | [optional]
3333
**trade_id** | **int** | Current trade ID | [optional]
34-
**trade_size** | **int** | Historical accumulation trade size | [optional]
34+
**trade_size** | **int** | Historical accumulated trade size | [optional]
3535
**position_size** | **int** | Current total long position size | [optional]
36-
**config_change_time** | **float** | Configuration's last changed time | [optional]
36+
**config_change_time** | **float** | Last changed time of configuration | [optional]
3737
**in_delisting** | **bool** | Contract is delisting | [optional]
3838
**orders_limit** | **int** | Maximum number of open orders | [optional]
3939

docs/CrossMarginAccountBook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**id** | **str** | Balance change record ID | [optional]
7-
**time** | **int** | Account changed timestamp in milliseconds | [optional]
7+
**time** | **int** | The timestamp of the change (in milliseconds) | [optional]
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]

docs/CrossMarginBalance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
**available** | **str** | Available amount | [optional]
77
**freeze** | **str** | Locked amount | [optional]
88
**borrowed** | **str** | Borrowed amount | [optional]
9-
**interest** | **str** | Interests unpaid | [optional]
9+
**interest** | **str** | Unpaid interests | [optional]
1010

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

docs/CrossMarginBorrowable.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# CrossMarginBorrowable
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**currency** | **str** | Currency detail | [optional]
7+
**amount** | **str** | Max borrowable amount | [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/CrossMarginLoan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
1212
**status** | **int** | Borrow loan status, which includes: - 1: failed to borrow - 2: borrowed but not repaid - 3: repayment complete | [optional] [readonly]
1313
**repaid** | **str** | Repaid amount | [optional] [readonly]
1414
**repaid_interest** | **str** | Repaid interest | [optional] [readonly]
15-
**unpaid_interest** | **str** | Interest not repaid | [optional] [readonly]
15+
**unpaid_interest** | **str** | Outstanding interest yet to be paid | [optional] [readonly]
1616

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

0 commit comments

Comments
 (0)