diff --git a/README.md b/README.md
index 9f4732c..802396f 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,13 @@
# gate-api
-Welcome to Gate.io API
-
-APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf.
+Welcome to Gate API
+APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading.
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
-- API version: 4.56.0
-- Package version: 4.56.0
+- API version: v4.105.8
+- Package version: 7.1.8
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
-For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts)
+For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts)
## Versioning
@@ -88,7 +87,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.EarnUniApi(api_client)
try:
- # List currencies for lending
+ # Query lending currency list
api_response = api_instance.list_uni_currencies()
print(api_response)
except GateApiException as ex:
@@ -106,242 +105,287 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
-*EarnUniApi* | [**list_uni_currencies**](docs/EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | List currencies for lending
-*EarnUniApi* | [**get_uni_currency**](docs/EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending
-*EarnUniApi* | [**list_user_uni_lends**](docs/EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | List user's lending orders
-*EarnUniApi* | [**create_uni_lend**](docs/EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Lend or redeem
-*EarnUniApi* | [**change_uni_lend**](docs/EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend lending order
-*EarnUniApi* | [**list_uni_lend_records**](docs/EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending
-*EarnUniApi* | [**get_uni_interest**](docs/EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency
-*EarnUniApi* | [**list_uni_interest_records**](docs/EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records
+*EarnUniApi* | [**list_uni_currencies**](docs/EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | Query lending currency list
+*EarnUniApi* | [**get_uni_currency**](docs/EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Query single lending currency details
+*EarnUniApi* | [**list_user_uni_lends**](docs/EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | Query user's lending order list
+*EarnUniApi* | [**create_uni_lend**](docs/EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Create lending or redemption
+*EarnUniApi* | [**change_uni_lend**](docs/EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend user lending information
+*EarnUniApi* | [**list_uni_lend_records**](docs/EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | Query lending transaction records
+*EarnUniApi* | [**get_uni_interest**](docs/EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Query user's total interest income for specified currency
+*EarnUniApi* | [**list_uni_interest_records**](docs/EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | Query user dividend records
+*EarnUniApi* | [**get_uni_interest_status**](docs/EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | Query currency interest compounding status
+*EarnUniApi* | [**list_uni_chart**](docs/EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart
+*EarnUniApi* | [**list_uni_rate**](docs/EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimated annualized interest rate
*MarginUniApi* | [**list_uni_currency_pairs**](docs/MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets
-*MarginUniApi* | [**get_uni_currency_pair**](docs/MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market
-*MarginUniApi* | [**get_margin_uni_estimate_rate**](docs/MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate
-*MarginUniApi* | [**list_uni_loans**](docs/MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans
+*MarginUniApi* | [**get_uni_currency_pair**](docs/MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get lending market details
+*MarginUniApi* | [**get_margin_uni_estimate_rate**](docs/MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest rate for isolated margin currencies
+*MarginUniApi* | [**list_uni_loans**](docs/MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | Query loans
*MarginUniApi* | [**create_uni_loan**](docs/MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay
-*MarginUniApi* | [**list_uni_loan_records**](docs/MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records
-*MarginUniApi* | [**list_uni_loan_interest_records**](docs/MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records
-*MarginUniApi* | [**get_uni_borrowable**](docs/MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable
-*PortfolioApi* | [**list_portfolio_accounts**](docs/PortfolioApi.md#list_portfolio_accounts) | **GET** /portfolio/accounts | Get portfolio account information
-*PortfolioApi* | [**list_account_portfolio_mode**](docs/PortfolioApi.md#list_account_portfolio_mode) | **GET** /portfolio/account_mode | Retrieve the account's portfolio mode
-*PortfolioApi* | [**set_account_portfolio_mode**](docs/PortfolioApi.md#set_account_portfolio_mode) | **POST** /portfolio/account_mode | Configure the account's portfolio mode.
-*PortfolioApi* | [**get_portfolio_borrowable**](docs/PortfolioApi.md#get_portfolio_borrowable) | **GET** /portfolio/borrowable | Retrieve the maximum borrowable amount for the account.
-*PortfolioApi* | [**get_portfolio_transferable**](docs/PortfolioApi.md#get_portfolio_transferable) | **GET** /portfolio/transferable | Retrieve the maximum amount that can be transferred out from the account
-*PortfolioApi* | [**list_portfolio_uni_loan_interest_records**](docs/PortfolioApi.md#list_portfolio_uni_loan_interest_records) | **GET** /portfolio/loans | List loans
-*PortfolioApi* | [**create_portfolio_loan**](docs/PortfolioApi.md#create_portfolio_loan) | **POST** /portfolio/loans | Borrow or repay
-*PortfolioApi* | [**list_portfolio_loan_records**](docs/PortfolioApi.md#list_portfolio_loan_records) | **GET** /portfolio/loan_records | Get load records
-*PortfolioApi* | [**list_portfolio_loan_interest_records**](docs/PortfolioApi.md#list_portfolio_loan_interest_records) | **GET** /portfolio/interest_records | List interest records
+*MarginUniApi* | [**list_uni_loan_records**](docs/MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Query loan records
+*MarginUniApi* | [**list_uni_loan_interest_records**](docs/MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | Query interest deduction records
+*MarginUniApi* | [**get_uni_borrowable**](docs/MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Query maximum borrowable amount by currency
*SubAccountApi* | [**list_sub_accounts**](docs/SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts
*SubAccountApi* | [**create_sub_accounts**](docs/SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account
-*SubAccountApi* | [**get_sub_account**](docs/SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account
-*SubAccountApi* | [**list_sub_account_keys**](docs/SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API Key of the sub-account
-*SubAccountApi* | [**create_sub_account_keys**](docs/SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create API Key of the sub-account
-*SubAccountApi* | [**get_sub_account_key**](docs/SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get the API Key of the sub-account
-*SubAccountApi* | [**update_sub_account_keys**](docs/SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update API key of the sub-account
-*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
-*SubAccountApi* | [**lock_sub_account**](docs/SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account
-*SubAccountApi* | [**unlock_sub_account**](docs/SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account
-*AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail
-*AccountApi* | [**list_stp_groups**](docs/AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups
-*AccountApi* | [**create_stp_group**](docs/AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP Group
-*AccountApi* | [**list_stp_groups_users**](docs/AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group
-*AccountApi* | [**add_stp_group_users**](docs/AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group
-*AccountApi* | [**delete_stp_group_users**](docs/AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | STP用户组中删除用户
-*CollateralLoanApi* | [**list_collateral_loan_orders**](docs/CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | 查询抵押借币订单列表
-*CollateralLoanApi* | [**create_collateral_loan**](docs/CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | 抵押借币借贷下单
-*CollateralLoanApi* | [**get_collateral_loan_order_detail**](docs/CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order
-*CollateralLoanApi* | [**repay_collateral_loan**](docs/CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | 抵押借币还款
-*CollateralLoanApi* | [**list_repay_records**](docs/CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | 查询抵押借币还款记录
-*CollateralLoanApi* | [**list_collateral_records**](docs/CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | 查询质押物调整记录
-*CollateralLoanApi* | [**operate_collateral**](docs/CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | 增加或赎回质押物
-*CollateralLoanApi* | [**get_user_total_amount**](docs/CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | 查询用户总借贷与质押数量
-*CollateralLoanApi* | [**get_user_ltv_info**](docs/CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | 查询用户质押率和可借剩余币种
-*CollateralLoanApi* | [**list_collateral_currencies**](docs/CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | 查询支持的借款币种和抵押币种
-*DeliveryApi* | [**list_delivery_contracts**](docs/DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | List all futures contracts
-*DeliveryApi* | [**get_delivery_contract**](docs/DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract
-*DeliveryApi* | [**list_delivery_order_book**](docs/DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Futures order book
-*DeliveryApi* | [**list_delivery_trades**](docs/DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures trading history
-*DeliveryApi* | [**list_delivery_candlesticks**](docs/DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Get futures candlesticks
-*DeliveryApi* | [**list_delivery_tickers**](docs/DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | List futures tickers
-*DeliveryApi* | [**list_delivery_insurance_ledger**](docs/DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures insurance balance history
-*DeliveryApi* | [**list_delivery_accounts**](docs/DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Query futures account
-*DeliveryApi* | [**list_delivery_account_book**](docs/DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query account book
-*DeliveryApi* | [**list_delivery_positions**](docs/DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | List all positions of a user
-*DeliveryApi* | [**get_delivery_position**](docs/DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position
+*SubAccountApi* | [**get_sub_account**](docs/SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get sub-account
+*SubAccountApi* | [**list_sub_account_keys**](docs/SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API key pairs of the sub-account
+*SubAccountApi* | [**create_sub_account_keys**](docs/SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create new sub-account API key pair
+*SubAccountApi* | [**get_sub_account_key**](docs/SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get specific API key pair of the sub-account
+*SubAccountApi* | [**update_sub_account_keys**](docs/SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update sub-account API key pair
+*SubAccountApi* | [**delete_sub_account_keys**](docs/SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete sub-account API key pair
+*SubAccountApi* | [**lock_sub_account**](docs/SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock sub-account
+*SubAccountApi* | [**unlock_sub_account**](docs/SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock sub-account
+*SubAccountApi* | [**list_unified_mode**](docs/SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode
+*UnifiedApi* | [**list_unified_accounts**](docs/UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information
+*UnifiedApi* | [**get_unified_borrowable**](docs/UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query maximum borrowable amount for unified account
+*UnifiedApi* | [**get_unified_transferable**](docs/UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query maximum transferable amount for unified account
+*UnifiedApi* | [**get_unified_transferables**](docs/UnifiedApi.md#get_unified_transferables) | **GET** /unified/transferables | Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change
+*UnifiedApi* | [**get_unified_borrowable_list**](docs/UnifiedApi.md#get_unified_borrowable_list) | **GET** /unified/batch_borrowable | Batch query unified account maximum borrowable amount
+*UnifiedApi* | [**list_unified_loans**](docs/UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | Query loans
+*UnifiedApi* | [**create_unified_loan**](docs/UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay
+*UnifiedApi* | [**list_unified_loan_records**](docs/UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Query loan records
+*UnifiedApi* | [**list_unified_loan_interest_records**](docs/UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | Query interest deduction records
+*UnifiedApi* | [**get_unified_risk_units**](docs/UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details
+*UnifiedApi* | [**get_unified_mode**](docs/UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account
+*UnifiedApi* | [**set_unified_mode**](docs/UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set unified account mode
+*UnifiedApi* | [**get_unified_estimate_rate**](docs/UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Query unified account estimated interest rate
+*UnifiedApi* | [**list_currency_discount_tiers**](docs/UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | Query unified account tiered
+*UnifiedApi* | [**list_loan_margin_tiers**](docs/UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | Query unified account tiered loan margin
+*UnifiedApi* | [**calculate_portfolio_margin**](docs/UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator
+*UnifiedApi* | [**get_user_leverage_currency_config**](docs/UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | Maximum and minimum currency leverage that can be set
+*UnifiedApi* | [**get_user_leverage_currency_setting**](docs/UnifiedApi.md#get_user_leverage_currency_setting) | **GET** /unified/leverage/user_currency_setting | Get user currency leverage
+*UnifiedApi* | [**set_user_leverage_currency_setting**](docs/UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set loan currency leverage
+*UnifiedApi* | [**list_unified_currencies**](docs/UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account
+*UnifiedApi* | [**get_history_loan_rate**](docs/UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | Get historical lending rates
+*UnifiedApi* | [**set_unified_collateral**](docs/UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | Set collateral currency
+*AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Retrieve user account information
+*AccountApi* | [**get_account_rate_limit**](docs/AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information
+*AccountApi* | [**list_stp_groups**](docs/AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | Query STP user groups created by the user
+*AccountApi* | [**create_stp_group**](docs/AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP user group
+*AccountApi* | [**list_stp_groups_users**](docs/AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | Query users in the STP user group
+*AccountApi* | [**add_stp_group_users**](docs/AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP user group
+*AccountApi* | [**delete_stp_group_users**](docs/AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete users from the STP user group
+*AccountApi* | [**get_debit_fee**](docs/AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT fee deduction configuration
+*AccountApi* | [**set_debit_fee**](docs/AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Configure GT fee deduction
+*CollateralLoanApi* | [**list_collateral_loan_orders**](docs/CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | Query collateral loan order list
+*CollateralLoanApi* | [**create_collateral_loan**](docs/CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place collateral loan order
+*CollateralLoanApi* | [**get_collateral_loan_order_detail**](docs/CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Query single order details
+*CollateralLoanApi* | [**repay_collateral_loan**](docs/CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Collateral loan repayment
+*CollateralLoanApi* | [**list_repay_records**](docs/CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Query collateral loan repayment records
+*CollateralLoanApi* | [**list_collateral_records**](docs/CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records
+*CollateralLoanApi* | [**operate_collateral**](docs/CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral
+*CollateralLoanApi* | [**get_user_total_amount**](docs/CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query user's total borrowing and collateral amount
+*CollateralLoanApi* | [**get_user_ltv_info**](docs/CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio and remaining borrowable currencies
+*CollateralLoanApi* | [**list_collateral_currencies**](docs/CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies
+*DeliveryApi* | [**list_delivery_contracts**](docs/DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | Query all futures contracts
+*DeliveryApi* | [**get_delivery_contract**](docs/DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Query single contract information
+*DeliveryApi* | [**list_delivery_order_book**](docs/DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Query futures market depth information
+*DeliveryApi* | [**list_delivery_trades**](docs/DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures market transaction records
+*DeliveryApi* | [**list_delivery_candlesticks**](docs/DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Futures market K-line chart
+*DeliveryApi* | [**list_delivery_tickers**](docs/DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | Get all futures trading statistics
+*DeliveryApi* | [**list_delivery_insurance_ledger**](docs/DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures market insurance fund history
+*DeliveryApi* | [**list_delivery_accounts**](docs/DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Get futures account
+*DeliveryApi* | [**list_delivery_account_book**](docs/DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query futures account change history
+*DeliveryApi* | [**list_delivery_positions**](docs/DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | Get user position list
+*DeliveryApi* | [**get_delivery_position**](docs/DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position information
*DeliveryApi* | [**update_delivery_position_margin**](docs/DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin
*DeliveryApi* | [**update_delivery_position_leverage**](docs/DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage
*DeliveryApi* | [**update_delivery_position_risk_limit**](docs/DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit
-*DeliveryApi* | [**list_delivery_orders**](docs/DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | List futures orders
-*DeliveryApi* | [**create_delivery_order**](docs/DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Create a futures order
-*DeliveryApi* | [**cancel_delivery_orders**](docs/DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all `open` orders matched
-*DeliveryApi* | [**get_delivery_order**](docs/DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Get a single order
-*DeliveryApi* | [**cancel_delivery_order**](docs/DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel a single order
-*DeliveryApi* | [**get_my_delivery_trades**](docs/DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | List personal trading history
-*DeliveryApi* | [**list_delivery_position_close**](docs/DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | List position close history
-*DeliveryApi* | [**list_delivery_liquidates**](docs/DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | List liquidation history
-*DeliveryApi* | [**list_delivery_settlements**](docs/DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | List settlement history
-*DeliveryApi* | [**list_price_triggered_delivery_orders**](docs/DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | List all auto orders
-*DeliveryApi* | [**create_price_triggered_delivery_order**](docs/DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create a price-triggered order
-*DeliveryApi* | [**cancel_price_triggered_delivery_order_list**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel all open orders
-*DeliveryApi* | [**get_price_triggered_delivery_order**](docs/DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order
-*DeliveryApi* | [**cancel_price_triggered_delivery_order**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order
-*FlashSwapApi* | [**list_flash_swap_currencies**](docs/FlashSwapApi.md#list_flash_swap_currencies) | **GET** /flash_swap/currencies | List All Supported Currencies In Flash Swap (deprecated)
+*DeliveryApi* | [**list_delivery_orders**](docs/DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | Query futures order list
+*DeliveryApi* | [**create_delivery_order**](docs/DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Place futures order
+*DeliveryApi* | [**cancel_delivery_orders**](docs/DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all orders with 'open' status
+*DeliveryApi* | [**get_delivery_order**](docs/DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Query single order details
+*DeliveryApi* | [**cancel_delivery_order**](docs/DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel single order
+*DeliveryApi* | [**get_my_delivery_trades**](docs/DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | Query personal trading records
+*DeliveryApi* | [**list_delivery_position_close**](docs/DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | Query position close history
+*DeliveryApi* | [**list_delivery_liquidates**](docs/DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | Query liquidation history
+*DeliveryApi* | [**list_delivery_settlements**](docs/DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | Query settlement records
+*DeliveryApi* | [**list_delivery_risk_limit_tiers**](docs/DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | Query risk limit tiers
+*DeliveryApi* | [**list_price_triggered_delivery_orders**](docs/DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | Query auto order list
+*DeliveryApi* | [**create_price_triggered_delivery_order**](docs/DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create price-triggered order
+*DeliveryApi* | [**cancel_price_triggered_delivery_order_list**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel all auto orders
+*DeliveryApi* | [**get_price_triggered_delivery_order**](docs/DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Query single auto order details
+*DeliveryApi* | [**cancel_price_triggered_delivery_order**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | Cancel single auto order
+*EarnApi* | [**swap_eth2**](docs/EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap
+*EarnApi* | [**rate_list_eth2**](docs/EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical return rate query
+*EarnApi* | [**list_dual_investment_plans**](docs/EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list
+*EarnApi* | [**list_dual_orders**](docs/EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list
+*EarnApi* | [**place_dual_order**](docs/EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order
+*EarnApi* | [**list_structured_products**](docs/EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List
+*EarnApi* | [**list_structured_orders**](docs/EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List
+*EarnApi* | [**place_structured_order**](docs/EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order
+*EarnApi* | [**find_coin**](docs/EarnApi.md#find_coin) | **GET** /earn/staking/coins | Staking coins
+*EarnApi* | [**swap_staking_coin**](docs/EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain token swap for earned coins
*FlashSwapApi* | [**list_flash_swap_currency_pair**](docs/FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap
-*FlashSwapApi* | [**list_flash_swap_orders**](docs/FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders
+*FlashSwapApi* | [**list_flash_swap_orders**](docs/FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | Query flash swap order list
*FlashSwapApi* | [**create_flash_swap_order**](docs/FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order
-*FlashSwapApi* | [**get_flash_swap_order**](docs/FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Get a single flash swap order's detail
-*FlashSwapApi* | [**preview_flash_swap_order**](docs/FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Initiate a flash swap order preview
-*FuturesApi* | [**list_futures_contracts**](docs/FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | List all futures contracts
-*FuturesApi* | [**get_futures_contract**](docs/FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Get a single contract
-*FuturesApi* | [**list_futures_order_book**](docs/FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Futures order book
-*FuturesApi* | [**list_futures_trades**](docs/FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures trading history
-*FuturesApi* | [**list_futures_candlesticks**](docs/FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Get futures candlesticks
-*FuturesApi* | [**list_futures_premium_index**](docs/FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-Line
-*FuturesApi* | [**list_futures_tickers**](docs/FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | List futures tickers
-*FuturesApi* | [**list_futures_funding_rate_history**](docs/FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Funding rate history
-*FuturesApi* | [**list_futures_insurance_ledger**](docs/FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures insurance balance history
-*FuturesApi* | [**list_contract_stats**](docs/FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures stats
-*FuturesApi* | [**get_index_constituents**](docs/FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Get index constituents
-*FuturesApi* | [**list_liquidated_orders**](docs/FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Retrieve liquidation history
-*FuturesApi* | [**list_futures_accounts**](docs/FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Query futures account
-*FuturesApi* | [**list_futures_account_book**](docs/FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query account book
-*FuturesApi* | [**list_positions**](docs/FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | List all positions of a user
-*FuturesApi* | [**get_position**](docs/FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position
+*FlashSwapApi* | [**get_flash_swap_order**](docs/FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Query single flash swap order
+*FlashSwapApi* | [**preview_flash_swap_order**](docs/FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Flash swap order preview
+*FuturesApi* | [**list_futures_contracts**](docs/FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | Query all futures contracts
+*FuturesApi* | [**get_futures_contract**](docs/FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Query single contract information
+*FuturesApi* | [**list_futures_order_book**](docs/FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Query futures market depth information
+*FuturesApi* | [**list_futures_trades**](docs/FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures market transaction records
+*FuturesApi* | [**list_futures_candlesticks**](docs/FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Futures market K-line chart
+*FuturesApi* | [**list_futures_premium_index**](docs/FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-line chart
+*FuturesApi* | [**list_futures_tickers**](docs/FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | Get all futures trading statistics
+*FuturesApi* | [**list_futures_funding_rate_history**](docs/FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Futures market historical funding rate
+*FuturesApi* | [**list_futures_insurance_ledger**](docs/FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures market insurance fund history
+*FuturesApi* | [**list_contract_stats**](docs/FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures statistics
+*FuturesApi* | [**get_index_constituents**](docs/FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Query index constituents
+*FuturesApi* | [**list_liquidated_orders**](docs/FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Query liquidation order history
+*FuturesApi* | [**list_futures_risk_limit_tiers**](docs/FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | Query risk limit tiers
+*FuturesApi* | [**list_futures_accounts**](docs/FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Get futures account
+*FuturesApi* | [**list_futures_account_book**](docs/FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query futures account change history
+*FuturesApi* | [**list_positions**](docs/FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | Get user position list
+*FuturesApi* | [**get_position**](docs/FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position information
*FuturesApi* | [**update_position_margin**](docs/FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin
*FuturesApi* | [**update_position_leverage**](docs/FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage
+*FuturesApi* | [**update_position_cross_mode**](docs/FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch Position Margin Mode
+*FuturesApi* | [**update_dual_comp_position_cross_mode**](docs/FuturesApi.md#update_dual_comp_position_cross_mode) | **POST** /futures/{settle}/dual_comp/positions/cross_mode | Switch Between Cross and Isolated Margin Modes Under Hedge Mode
*FuturesApi* | [**update_position_risk_limit**](docs/FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit
-*FuturesApi* | [**set_dual_mode**](docs/FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode
-*FuturesApi* | [**get_dual_mode_position**](docs/FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode
+*FuturesApi* | [**set_dual_mode**](docs/FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Set position mode
+*FuturesApi* | [**get_dual_mode_position**](docs/FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Get position information in dual mode
*FuturesApi* | [**update_dual_mode_position_margin**](docs/FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode
*FuturesApi* | [**update_dual_mode_position_leverage**](docs/FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode
*FuturesApi* | [**update_dual_mode_position_risk_limit**](docs/FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode
-*FuturesApi* | [**list_futures_orders**](docs/FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | List futures orders
-*FuturesApi* | [**create_futures_order**](docs/FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Create a futures order
-*FuturesApi* | [**cancel_futures_orders**](docs/FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all `open` orders matched
-*FuturesApi* | [**get_orders_with_time_range**](docs/FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | List Futures Orders By Time Range
-*FuturesApi* | [**create_batch_futures_order**](docs/FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Create a batch of futures orders
-*FuturesApi* | [**get_futures_order**](docs/FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Get a single order
-*FuturesApi* | [**amend_futures_order**](docs/FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend an order
-*FuturesApi* | [**cancel_futures_order**](docs/FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel a single order
-*FuturesApi* | [**get_my_trades**](docs/FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | List personal trading history
-*FuturesApi* | [**get_my_trades_with_time_range**](docs/FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | List personal trading history by time range
-*FuturesApi* | [**list_position_close**](docs/FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | List position close history
-*FuturesApi* | [**list_liquidates**](docs/FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | List liquidation history
-*FuturesApi* | [**list_auto_deleverages**](docs/FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | List Auto-Deleveraging History
+*FuturesApi* | [**list_futures_orders**](docs/FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | Query futures order list
+*FuturesApi* | [**create_futures_order**](docs/FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Place futures order
+*FuturesApi* | [**cancel_futures_orders**](docs/FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all orders with 'open' status
+*FuturesApi* | [**get_orders_with_time_range**](docs/FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | Query futures order list by time range
+*FuturesApi* | [**create_batch_futures_order**](docs/FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Place batch futures orders
+*FuturesApi* | [**get_futures_order**](docs/FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Query single order details
+*FuturesApi* | [**amend_futures_order**](docs/FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend single order
+*FuturesApi* | [**cancel_futures_order**](docs/FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel single order
+*FuturesApi* | [**get_my_trades**](docs/FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | Query personal trading records
+*FuturesApi* | [**get_my_trades_with_time_range**](docs/FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | Query personal trading records by time range
+*FuturesApi* | [**list_position_close**](docs/FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | Query position close history
+*FuturesApi* | [**list_liquidates**](docs/FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | Query liquidation history
+*FuturesApi* | [**list_auto_deleverages**](docs/FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | Query ADL auto-deleveraging order information
*FuturesApi* | [**countdown_cancel_all_futures**](docs/FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders
-*FuturesApi* | [**get_futures_fee**](docs/FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates
-*FuturesApi* | [**list_price_triggered_orders**](docs/FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List all auto orders
-*FuturesApi* | [**create_price_triggered_order**](docs/FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order
-*FuturesApi* | [**cancel_price_triggered_order_list**](docs/FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel all open orders
-*FuturesApi* | [**get_price_triggered_order**](docs/FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order
-*FuturesApi* | [**cancel_price_triggered_order**](docs/FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order
+*FuturesApi* | [**get_futures_fee**](docs/FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query futures market trading fee rates
+*FuturesApi* | [**cancel_batch_future_orders**](docs/FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel batch orders by specified ID list
+*FuturesApi* | [**amend_batch_future_orders**](docs/FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders by specified IDs
+*FuturesApi* | [**get_futures_risk_limit_table**](docs/FuturesApi.md#get_futures_risk_limit_table) | **GET** /futures/{settle}/risk_limit_table | Query risk limit table by table_id
+*FuturesApi* | [**list_price_triggered_orders**](docs/FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | Query auto order list
+*FuturesApi* | [**create_price_triggered_order**](docs/FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create price-triggered order
+*FuturesApi* | [**cancel_price_triggered_order_list**](docs/FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel all auto orders
+*FuturesApi* | [**get_price_triggered_order**](docs/FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Query single auto order details
+*FuturesApi* | [**cancel_price_triggered_order**](docs/FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | Cancel single auto order
*MarginApi* | [**list_margin_accounts**](docs/MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list
-*MarginApi* | [**list_margin_account_book**](docs/MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history
+*MarginApi* | [**list_margin_account_book**](docs/MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | Query margin account balance change history
*MarginApi* | [**list_funding_accounts**](docs/MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list
-*MarginApi* | [**get_auto_repay_status**](docs/MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting
-*MarginApi* | [**set_auto_repay**](docs/MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting
-*MarginApi* | [**get_margin_transferable**](docs/MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency
-*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)
-*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)
-*MarginApi* | [**list_funding_book**](docs/MarginApi.md#list_funding_book) | **GET** /margin/funding_book | Order book of lending loans(Deprecated)
-*MarginApi* | [**list_loans**](docs/MarginApi.md#list_loans) | **GET** /margin/loans | List all loans(Deprecated)
-*MarginApi* | [**create_loan**](docs/MarginApi.md#create_loan) | **POST** /margin/loans | Lend or borrow(Deprecated)
-*MarginApi* | [**merge_loans**](docs/MarginApi.md#merge_loans) | **POST** /margin/merged_loans | Merge multiple lending loans(Deprecated)
-*MarginApi* | [**get_loan**](docs/MarginApi.md#get_loan) | **GET** /margin/loans/{loan_id} | Retrieve one single loan detail(Deprecated)
-*MarginApi* | [**cancel_loan**](docs/MarginApi.md#cancel_loan) | **DELETE** /margin/loans/{loan_id} | Cancel lending loan(Deprecated)
-*MarginApi* | [**update_loan**](docs/MarginApi.md#update_loan) | **PATCH** /margin/loans/{loan_id} | Modify a loan(Deprecated)
-*MarginApi* | [**list_loan_repayments**](docs/MarginApi.md#list_loan_repayments) | **GET** /margin/loans/{loan_id}/repayment | List loan repayment records(Deprecated)
-*MarginApi* | [**repay_loan**](docs/MarginApi.md#repay_loan) | **POST** /margin/loans/{loan_id}/repayment | Repay a loan(Deprecated)
-*MarginApi* | [**list_loan_records**](docs/MarginApi.md#list_loan_records) | **GET** /margin/loan_records | List repayment records of a specific loan(Deprecated)
-*MarginApi* | [**get_loan_record**](docs/MarginApi.md#get_loan_record) | **GET** /margin/loan_records/{loan_record_id} | Get one single loan record(Deprecated)
-*MarginApi* | [**update_loan_record**](docs/MarginApi.md#update_loan_record) | **PATCH** /margin/loan_records/{loan_record_id} | Modify a loan record(Deprecated)
-*MarginApi* | [**get_margin_borrowable**](docs/MarginApi.md#get_margin_borrowable) | **GET** /margin/borrowable | Get the max borrowable amount for a specific margin currency(Deprecated)
-*MarginApi* | [**list_cross_margin_currencies**](docs/MarginApi.md#list_cross_margin_currencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin.
-*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
-*MarginApi* | [**get_cross_margin_account**](docs/MarginApi.md#get_cross_margin_account) | **GET** /margin/cross/accounts | Retrieve cross margin account
-*MarginApi* | [**list_cross_margin_account_book**](docs/MarginApi.md#list_cross_margin_account_book) | **GET** /margin/cross/account_book | Retrieve cross margin account change history
-*MarginApi* | [**list_cross_margin_loans**](docs/MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history
-*MarginApi* | [**create_cross_margin_loan**](docs/MarginApi.md#create_cross_margin_loan) | **POST** /margin/cross/loans | Create a cross margin borrow loan
-*MarginApi* | [**get_cross_margin_loan**](docs/MarginApi.md#get_cross_margin_loan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail
-*MarginApi* | [**list_cross_margin_repayments**](docs/MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments
-*MarginApi* | [**repay_cross_margin_loan**](docs/MarginApi.md#repay_cross_margin_loan) | **POST** /margin/cross/repayments | Cross margin repayments
-*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
-*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
-*MarginApi* | [**get_cross_margin_estimate_rate**](docs/MarginApi.md#get_cross_margin_estimate_rate) | **GET** /margin/cross/estimate_rate | Estimated interest rates
-*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
-*OptionsApi* | [**list_options_underlyings**](docs/OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlyings
-*OptionsApi* | [**list_options_expirations**](docs/OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration times
-*OptionsApi* | [**list_options_contracts**](docs/OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time
-*OptionsApi* | [**get_options_contract**](docs/OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract detail
+*MarginApi* | [**get_auto_repay_status**](docs/MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Query user auto repayment settings
+*MarginApi* | [**set_auto_repay**](docs/MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user auto repayment settings
+*MarginApi* | [**get_margin_transferable**](docs/MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get maximum transferable amount for isolated margin
+*MarginApi* | [**get_user_margin_tier**](docs/MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Query user's own leverage lending tiers in current market
+*MarginApi* | [**get_market_margin_tier**](docs/MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query current market leverage lending tiers
+*MarginApi* | [**set_user_market_leverage**](docs/MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set user market leverage multiplier
+*MarginApi* | [**list_margin_user_account**](docs/MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query user's isolated margin account list
+*MarginApi* | [**list_cross_margin_loans**](docs/MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | Query cross margin borrow history (deprecated)
+*MarginApi* | [**list_cross_margin_repayments**](docs/MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated)
+*MultiCollateralLoanApi* | [**list_multi_collateral_orders**](docs/MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | Query multi-currency collateral order list
+*MultiCollateralLoanApi* | [**create_multi_collateral**](docs/MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Place multi-currency collateral order
+*MultiCollateralLoanApi* | [**get_multi_collateral_order_detail**](docs/MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Query order details
+*MultiCollateralLoanApi* | [**list_multi_repay_records**](docs/MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | Query multi-currency collateral repayment records
+*MultiCollateralLoanApi* | [**repay_multi_collateral_loan**](docs/MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Multi-currency collateral repayment
+*MultiCollateralLoanApi* | [**list_multi_collateral_records**](docs/MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records
+*MultiCollateralLoanApi* | [**operate_multi_collateral**](docs/MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Add or withdraw collateral
+*MultiCollateralLoanApi* | [**list_user_currency_quota**](docs/MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | Query user's collateral and borrowing currency quota information
+*MultiCollateralLoanApi* | [**list_multi_collateral_currencies**](docs/MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies for multi-currency collateral
+*MultiCollateralLoanApi* | [**get_multi_collateral_ltv**](docs/MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Query collateralization ratio information
+*MultiCollateralLoanApi* | [**get_multi_collateral_fix_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query currency's 7-day and 30-day fixed interest rates
+*MultiCollateralLoanApi* | [**get_multi_collateral_current_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query currency's current interest rate
+*OptionsApi* | [**list_options_underlyings**](docs/OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlying assets
+*OptionsApi* | [**list_options_expirations**](docs/OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration dates
+*OptionsApi* | [**list_options_contracts**](docs/OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all contracts for specified underlying and expiration date
+*OptionsApi* | [**get_options_contract**](docs/OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract details
*OptionsApi* | [**list_options_settlements**](docs/OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history
-*OptionsApi* | [**get_options_settlement**](docs/OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract's settlement
-*OptionsApi* | [**list_my_options_settlements**](docs/OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | List my options settlements
-*OptionsApi* | [**list_options_order_book**](docs/OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Options order book
-*OptionsApi* | [**list_options_tickers**](docs/OptionsApi.md#list_options_tickers) | **GET** /options/tickers | List tickers of options contracts
-*OptionsApi* | [**list_options_underlying_tickers**](docs/OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Get underlying ticker
-*OptionsApi* | [**list_options_candlesticks**](docs/OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Get options candlesticks
-*OptionsApi* | [**list_options_underlying_candlesticks**](docs/OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Mark price candlesticks of an underlying
-*OptionsApi* | [**list_options_trades**](docs/OptionsApi.md#list_options_trades) | **GET** /options/trades | Options trade history
-*OptionsApi* | [**list_options_account**](docs/OptionsApi.md#list_options_account) | **GET** /options/accounts | List options account
-*OptionsApi* | [**list_options_account_book**](docs/OptionsApi.md#list_options_account_book) | **GET** /options/account_book | List account changing history
+*OptionsApi* | [**get_options_settlement**](docs/OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract settlement information
+*OptionsApi* | [**list_my_options_settlements**](docs/OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | Query personal settlement records
+*OptionsApi* | [**list_options_order_book**](docs/OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Query options contract order book
+*OptionsApi* | [**list_options_tickers**](docs/OptionsApi.md#list_options_tickers) | **GET** /options/tickers | Query options market ticker information
+*OptionsApi* | [**list_options_underlying_tickers**](docs/OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Query underlying ticker information
+*OptionsApi* | [**list_options_candlesticks**](docs/OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Options contract market candlestick chart
+*OptionsApi* | [**list_options_underlying_candlesticks**](docs/OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Underlying index price candlestick chart
+*OptionsApi* | [**list_options_trades**](docs/OptionsApi.md#list_options_trades) | **GET** /options/trades | Market trade records
+*OptionsApi* | [**list_options_account**](docs/OptionsApi.md#list_options_account) | **GET** /options/accounts | Query account information
+*OptionsApi* | [**list_options_account_book**](docs/OptionsApi.md#list_options_account_book) | **GET** /options/account_book | Query account change history
*OptionsApi* | [**list_options_positions**](docs/OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying
*OptionsApi* | [**get_options_position**](docs/OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position
*OptionsApi* | [**list_options_position_close**](docs/OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying
*OptionsApi* | [**list_options_orders**](docs/OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders
*OptionsApi* | [**create_options_order**](docs/OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order
-*OptionsApi* | [**cancel_options_orders**](docs/OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all `open` orders matched
-*OptionsApi* | [**get_options_order**](docs/OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Get a single order
-*OptionsApi* | [**cancel_options_order**](docs/OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel a single order
-*OptionsApi* | [**list_my_options_trades**](docs/OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | List personal trading history
-*RebateApi* | [**agency_transaction_history**](docs/RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | The broker obtains the transaction history of the recommended user
-*RebateApi* | [**agency_commissions_history**](docs/RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | The broker obtains the commission history of the recommended user
-*SpotApi* | [**list_currencies**](docs/SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details
-*SpotApi* | [**get_currency**](docs/SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency
-*SpotApi* | [**list_currency_pairs**](docs/SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported
-*SpotApi* | [**get_currency_pair**](docs/SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc currency pair
-*SpotApi* | [**list_tickers**](docs/SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information
-*SpotApi* | [**list_order_book**](docs/SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book
-*SpotApi* | [**list_trades**](docs/SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades
-*SpotApi* | [**list_candlesticks**](docs/SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market candlesticks
-*SpotApi* | [**get_fee**](docs/SpotApi.md#get_fee) | **GET** /spot/fee | Query user trading fee rates
-*SpotApi* | [**get_batch_spot_fee**](docs/SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Query a batch of user trading fee rates
-*SpotApi* | [**list_spot_accounts**](docs/SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot accounts
-*SpotApi* | [**list_spot_account_book**](docs/SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query account book
-*SpotApi* | [**create_batch_orders**](docs/SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Create a batch of orders
+*OptionsApi* | [**cancel_options_orders**](docs/OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all orders with 'open' status
+*OptionsApi* | [**get_options_order**](docs/OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Query single order details
+*OptionsApi* | [**cancel_options_order**](docs/OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel single order
+*OptionsApi* | [**countdown_cancel_all_options**](docs/OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders
+*OptionsApi* | [**list_my_options_trades**](docs/OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | Query personal trading records
+*OptionsApi* | [**get_options_mmp**](docs/OptionsApi.md#get_options_mmp) | **GET** /options/mmp | MMP Query.
+*OptionsApi* | [**set_options_mmp**](docs/OptionsApi.md#set_options_mmp) | **POST** /options/mmp | MMP Settings
+*OptionsApi* | [**reset_options_mmp**](docs/OptionsApi.md#reset_options_mmp) | **POST** /options/mmp/reset | MMP Reset
+*RebateApi* | [**agency_transaction_history**](docs/RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | Broker obtains transaction history of recommended users
+*RebateApi* | [**agency_commissions_history**](docs/RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | Broker obtains rebate history of recommended users
+*RebateApi* | [**partner_transaction_history**](docs/RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction history of recommended users
+*RebateApi* | [**partner_commissions_history**](docs/RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains rebate records of recommended users
+*RebateApi* | [**partner_sub_list**](docs/RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list
+*RebateApi* | [**rebate_broker_commission_history**](docs/RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | Broker obtains user's rebate records
+*RebateApi* | [**rebate_broker_transaction_history**](docs/RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | Broker obtains user's trading history
+*RebateApi* | [**rebate_user_info**](docs/RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User obtains rebate information
+*RebateApi* | [**user_sub_relation**](docs/RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User subordinate relationship
+*SpotApi* | [**list_currencies**](docs/SpotApi.md#list_currencies) | **GET** /spot/currencies | Query all currency information
+*SpotApi* | [**get_currency**](docs/SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Query single currency information
+*SpotApi* | [**list_currency_pairs**](docs/SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | Query all supported currency pairs
+*SpotApi* | [**get_currency_pair**](docs/SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Query single currency pair details
+*SpotApi* | [**list_tickers**](docs/SpotApi.md#list_tickers) | **GET** /spot/tickers | Get currency pair ticker information
+*SpotApi* | [**list_order_book**](docs/SpotApi.md#list_order_book) | **GET** /spot/order_book | Get market depth information
+*SpotApi* | [**list_trades**](docs/SpotApi.md#list_trades) | **GET** /spot/trades | Query market transaction records
+*SpotApi* | [**list_candlesticks**](docs/SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market K-line chart
+*SpotApi* | [**get_fee**](docs/SpotApi.md#get_fee) | **GET** /spot/fee | Query account fee rates
+*SpotApi* | [**get_batch_spot_fee**](docs/SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Batch query account fee rates
+*SpotApi* | [**list_spot_accounts**](docs/SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot trading accounts
+*SpotApi* | [**list_spot_account_book**](docs/SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query spot account transaction history
+*SpotApi* | [**create_batch_orders**](docs/SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Batch place orders
*SpotApi* | [**list_all_open_orders**](docs/SpotApi.md#list_all_open_orders) | **GET** /spot/open_orders | List all open orders
-*SpotApi* | [**create_cross_liquidate_order**](docs/SpotApi.md#create_cross_liquidate_order) | **POST** /spot/cross_liquidate_orders | close position when cross-currency is disabled
+*SpotApi* | [**create_cross_liquidate_order**](docs/SpotApi.md#create_cross_liquidate_order) | **POST** /spot/cross_liquidate_orders | Close position when cross-currency is disabled
*SpotApi* | [**list_orders**](docs/SpotApi.md#list_orders) | **GET** /spot/orders | List orders
*SpotApi* | [**create_order**](docs/SpotApi.md#create_order) | **POST** /spot/orders | Create an order
*SpotApi* | [**cancel_orders**](docs/SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair
-*SpotApi* | [**cancel_batch_orders**](docs/SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel a batch of orders with an ID list
-*SpotApi* | [**get_order**](docs/SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Get a single order
-*SpotApi* | [**cancel_order**](docs/SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel a single order
-*SpotApi* | [**amend_order**](docs/SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend an order
-*SpotApi* | [**list_my_trades**](docs/SpotApi.md#list_my_trades) | **GET** /spot/my_trades | List personal trading history
+*SpotApi* | [**cancel_batch_orders**](docs/SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel batch orders by specified ID list
+*SpotApi* | [**get_order**](docs/SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Query single order details
+*SpotApi* | [**cancel_order**](docs/SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel single order
+*SpotApi* | [**amend_order**](docs/SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend single order
+*SpotApi* | [**list_my_trades**](docs/SpotApi.md#list_my_trades) | **GET** /spot/my_trades | Query personal trading records
*SpotApi* | [**get_system_time**](docs/SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time
*SpotApi* | [**countdown_cancel_all_spot**](docs/SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders
-*SpotApi* | [**list_spot_price_triggered_orders**](docs/SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Retrieve running auto order list
-*SpotApi* | [**create_spot_price_triggered_order**](docs/SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create a price-triggered order
-*SpotApi* | [**cancel_spot_price_triggered_order_list**](docs/SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel all open orders
-*SpotApi* | [**get_spot_price_triggered_order**](docs/SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Get a price-triggered order
-*SpotApi* | [**cancel_spot_price_triggered_order**](docs/SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | cancel a price-triggered order
-*WalletApi* | [**list_currency_chains**](docs/WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | List chains supported for specified currency
+*SpotApi* | [**amend_batch_orders**](docs/SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders
+*SpotApi* | [**get_spot_insurance_history**](docs/SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data
+*SpotApi* | [**list_spot_price_triggered_orders**](docs/SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Query running auto order list
+*SpotApi* | [**create_spot_price_triggered_order**](docs/SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create price-triggered order
+*SpotApi* | [**cancel_spot_price_triggered_order_list**](docs/SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel all auto orders
+*SpotApi* | [**get_spot_price_triggered_order**](docs/SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Query single auto order details
+*SpotApi* | [**cancel_spot_price_triggered_order**](docs/SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | Cancel single auto order
+*WalletApi* | [**list_currency_chains**](docs/WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | Query chains supported for specified currency
*WalletApi* | [**get_deposit_address**](docs/WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address
-*WalletApi* | [**list_withdrawals**](docs/WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records
-*WalletApi* | [**list_deposits**](docs/WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records
+*WalletApi* | [**list_withdrawals**](docs/WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Get withdrawal records
+*WalletApi* | [**list_deposits**](docs/WalletApi.md#list_deposits) | **GET** /wallet/deposits | Get deposit records
*WalletApi* | [**transfer**](docs/WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts
-*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
+*WalletApi* | [**list_sub_account_transfers**](docs/WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Get transfer records between main and sub accounts
*WalletApi* | [**transfer_with_sub_account**](docs/WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts
-*WalletApi* | [**sub_account_to_sub_account**](docs/WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account
-*WalletApi* | [**list_withdraw_status**](docs/WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Retrieve withdrawal status
-*WalletApi* | [**list_sub_account_balances**](docs/WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances
-*WalletApi* | [**list_sub_account_margin_balances**](docs/WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts' margin balances
-*WalletApi* | [**list_sub_account_futures_balances**](docs/WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub accounts' futures account balances
-*WalletApi* | [**list_sub_account_cross_margin_balances**](docs/WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query subaccount's cross_margin account info
-*WalletApi* | [**list_saved_address**](docs/WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query saved address
-*WalletApi* | [**get_trade_fee**](docs/WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Retrieve personal trading fee
-*WalletApi* | [**get_total_balance**](docs/WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Retrieve user's total balances
+*WalletApi* | [**sub_account_to_sub_account**](docs/WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Transfer between sub-accounts
+*WalletApi* | [**get_transfer_order_status**](docs/WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query
+*WalletApi* | [**list_withdraw_status**](docs/WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Query withdrawal status
+*WalletApi* | [**list_sub_account_balances**](docs/WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Query sub-account balance information
+*WalletApi* | [**list_sub_account_margin_balances**](docs/WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub-account isolated margin account balance information
+*WalletApi* | [**list_sub_account_futures_balances**](docs/WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub-account perpetual futures account balance information
+*WalletApi* | [**list_sub_account_cross_margin_balances**](docs/WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query sub-account cross margin account balance information
+*WalletApi* | [**list_saved_address**](docs/WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query withdrawal address whitelist
+*WalletApi* | [**get_trade_fee**](docs/WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Query personal trading fees
+*WalletApi* | [**get_total_balance**](docs/WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Query personal account totals
+*WalletApi* | [**list_small_balance**](docs/WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | Get list of convertible small balance currencies
+*WalletApi* | [**convert_small_balance**](docs/WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance currency
+*WalletApi* | [**list_small_balance_history**](docs/WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | Get convertible small balance currency history
+*WalletApi* | [**list_push_orders**](docs/WalletApi.md#list_push_orders) | **GET** /wallet/push | Get UID transfer history
*WithdrawalApi* | [**withdraw**](docs/WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw
+*WithdrawalApi* | [**withdraw_push_order**](docs/WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer
*WithdrawalApi* | [**cancel_withdrawal**](docs/WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID
@@ -350,86 +394,129 @@ Class | Method | HTTP request | Description
- [AccountBalance](docs/AccountBalance.md)
- [AccountDetail](docs/AccountDetail.md)
- [AccountDetailKey](docs/AccountDetailKey.md)
+ - [AccountRateLimit](docs/AccountRateLimit.md)
- [AgencyCommission](docs/AgencyCommission.md)
- [AgencyCommissionHistory](docs/AgencyCommissionHistory.md)
- [AgencyTransaction](docs/AgencyTransaction.md)
- [AgencyTransactionHistory](docs/AgencyTransactionHistory.md)
- - [ApiV4KeyPerm](docs/ApiV4KeyPerm.md)
- [AutoRepaySetting](docs/AutoRepaySetting.md)
+ - [BatchAmendItem](docs/BatchAmendItem.md)
+ - [BatchAmendOrderReq](docs/BatchAmendOrderReq.md)
- [BatchFuturesOrder](docs/BatchFuturesOrder.md)
- [BatchOrder](docs/BatchOrder.md)
+ - [BorrowCurrencyInfo](docs/BorrowCurrencyInfo.md)
+ - [BrokerCommission](docs/BrokerCommission.md)
+ - [BrokerCommission1](docs/BrokerCommission1.md)
+ - [BrokerCommissionSubBrokerInfo](docs/BrokerCommissionSubBrokerInfo.md)
+ - [BrokerTransaction](docs/BrokerTransaction.md)
+ - [BrokerTransaction1](docs/BrokerTransaction1.md)
- [CancelBatchOrder](docs/CancelBatchOrder.md)
- [CancelOrderResult](docs/CancelOrderResult.md)
+ - [CollateralAdjust](docs/CollateralAdjust.md)
+ - [CollateralAdjustRes](docs/CollateralAdjustRes.md)
- [CollateralAlign](docs/CollateralAlign.md)
+ - [CollateralCurrency](docs/CollateralCurrency.md)
+ - [CollateralCurrencyInfo](docs/CollateralCurrencyInfo.md)
+ - [CollateralCurrencyRes](docs/CollateralCurrencyRes.md)
+ - [CollateralCurrentRate](docs/CollateralCurrentRate.md)
+ - [CollateralFixRate](docs/CollateralFixRate.md)
- [CollateralLoanCurrency](docs/CollateralLoanCurrency.md)
+ - [CollateralLtv](docs/CollateralLtv.md)
- [CollateralOrder](docs/CollateralOrder.md)
- [CollateralRecord](docs/CollateralRecord.md)
- [Contract](docs/Contract.md)
- [ContractStat](docs/ContractStat.md)
+ - [ConvertSmallBalance](docs/ConvertSmallBalance.md)
- [CountdownCancelAllFuturesTask](docs/CountdownCancelAllFuturesTask.md)
+ - [CountdownCancelAllOptionsTask](docs/CountdownCancelAllOptionsTask.md)
- [CountdownCancelAllSpotTask](docs/CountdownCancelAllSpotTask.md)
- [CreateCollateralOrder](docs/CreateCollateralOrder.md)
+ - [CreateMultiCollateralOrder](docs/CreateMultiCollateralOrder.md)
- [CreateUniLend](docs/CreateUniLend.md)
- [CreateUniLoan](docs/CreateUniLoan.md)
- - [CrossMarginAccount](docs/CrossMarginAccount.md)
- - [CrossMarginAccountBook](docs/CrossMarginAccountBook.md)
- [CrossMarginBalance](docs/CrossMarginBalance.md)
- - [CrossMarginBalance1](docs/CrossMarginBalance1.md)
- - [CrossMarginCurrency](docs/CrossMarginCurrency.md)
- [CrossMarginLoan](docs/CrossMarginLoan.md)
- - [CrossMarginRepayRequest](docs/CrossMarginRepayRequest.md)
- [CrossMarginRepayment](docs/CrossMarginRepayment.md)
- - [CrossMarginTransferable](docs/CrossMarginTransferable.md)
- [Currency](docs/Currency.md)
- [CurrencyChain](docs/CurrencyChain.md)
- [CurrencyPair](docs/CurrencyPair.md)
+ - [CurrencyQuota](docs/CurrencyQuota.md)
+ - [DebitFee](docs/DebitFee.md)
- [DeliveryCandlestick](docs/DeliveryCandlestick.md)
- [DeliveryContract](docs/DeliveryContract.md)
- [DeliverySettlement](docs/DeliverySettlement.md)
+ - [DeliveryTicker](docs/DeliveryTicker.md)
- [DepositAddress](docs/DepositAddress.md)
- - [FlashSwapCurrency](docs/FlashSwapCurrency.md)
+ - [DepositRecord](docs/DepositRecord.md)
+ - [DualGetOrders](docs/DualGetOrders.md)
+ - [DualGetPlans](docs/DualGetPlans.md)
+ - [Eth2RateList](docs/Eth2RateList.md)
+ - [Eth2Swap](docs/Eth2Swap.md)
+ - [FindCoin](docs/FindCoin.md)
- [FlashSwapCurrencyPair](docs/FlashSwapCurrencyPair.md)
- [FlashSwapOrder](docs/FlashSwapOrder.md)
- [FlashSwapOrderPreview](docs/FlashSwapOrderPreview.md)
- [FlashSwapOrderRequest](docs/FlashSwapOrderRequest.md)
- [FlashSwapPreviewRequest](docs/FlashSwapPreviewRequest.md)
- [FundingAccount](docs/FundingAccount.md)
- - [FundingBookItem](docs/FundingBookItem.md)
- [FundingRateRecord](docs/FundingRateRecord.md)
+ - [FutureCancelOrderResult](docs/FutureCancelOrderResult.md)
- [FuturesAccount](docs/FuturesAccount.md)
- [FuturesAccountBook](docs/FuturesAccountBook.md)
- [FuturesAccountHistory](docs/FuturesAccountHistory.md)
- [FuturesAutoDeleverage](docs/FuturesAutoDeleverage.md)
+ - [FuturesBatchAmendOrderRequest](docs/FuturesBatchAmendOrderRequest.md)
- [FuturesCandlestick](docs/FuturesCandlestick.md)
- [FuturesFee](docs/FuturesFee.md)
- [FuturesIndexConstituents](docs/FuturesIndexConstituents.md)
- [FuturesInitialOrder](docs/FuturesInitialOrder.md)
+ - [FuturesLimitRiskTiers](docs/FuturesLimitRiskTiers.md)
- [FuturesLiqOrder](docs/FuturesLiqOrder.md)
- [FuturesLiquidate](docs/FuturesLiquidate.md)
- [FuturesOrder](docs/FuturesOrder.md)
- [FuturesOrderAmendment](docs/FuturesOrderAmendment.md)
- [FuturesOrderBook](docs/FuturesOrderBook.md)
- [FuturesOrderBookItem](docs/FuturesOrderBookItem.md)
+ - [FuturesPositionCrossMode](docs/FuturesPositionCrossMode.md)
- [FuturesPremiumIndex](docs/FuturesPremiumIndex.md)
- [FuturesPriceTrigger](docs/FuturesPriceTrigger.md)
- [FuturesPriceTriggeredOrder](docs/FuturesPriceTriggeredOrder.md)
+ - [FuturesRiskLimitTier](docs/FuturesRiskLimitTier.md)
- [FuturesTicker](docs/FuturesTicker.md)
- [FuturesTrade](docs/FuturesTrade.md)
- [IndexConstituent](docs/IndexConstituent.md)
+ - [InlineObject](docs/InlineObject.md)
+ - [InlineResponse200](docs/InlineResponse200.md)
+ - [InlineResponse2001](docs/InlineResponse2001.md)
- [InsuranceRecord](docs/InsuranceRecord.md)
- [LedgerRecord](docs/LedgerRecord.md)
- [LiquidateOrder](docs/LiquidateOrder.md)
- - [Loan](docs/Loan.md)
- - [LoanPatch](docs/LoanPatch.md)
- - [LoanRecord](docs/LoanRecord.md)
- [MarginAccount](docs/MarginAccount.md)
- [MarginAccountBook](docs/MarginAccountBook.md)
- [MarginAccountCurrency](docs/MarginAccountCurrency.md)
- - [MarginBorrowable](docs/MarginBorrowable.md)
- - [MarginCurrencyPair](docs/MarginCurrencyPair.md)
+ - [MarginLeverageTier](docs/MarginLeverageTier.md)
+ - [MarginMarketLeverage](docs/MarginMarketLeverage.md)
+ - [MarginTiers](docs/MarginTiers.md)
- [MarginTransferable](docs/MarginTransferable.md)
- [MaxUniBorrowable](docs/MaxUniBorrowable.md)
+ - [MockFuturesOrder](docs/MockFuturesOrder.md)
+ - [MockFuturesPosition](docs/MockFuturesPosition.md)
+ - [MockMarginResult](docs/MockMarginResult.md)
+ - [MockOptionsOrder](docs/MockOptionsOrder.md)
+ - [MockOptionsPosition](docs/MockOptionsPosition.md)
+ - [MockRiskUnit](docs/MockRiskUnit.md)
+ - [MockSpotBalance](docs/MockSpotBalance.md)
+ - [MockSpotOrder](docs/MockSpotOrder.md)
- [MultiChainAddressItem](docs/MultiChainAddressItem.md)
+ - [MultiCollateralCurrency](docs/MultiCollateralCurrency.md)
+ - [MultiCollateralItem](docs/MultiCollateralItem.md)
+ - [MultiCollateralOrder](docs/MultiCollateralOrder.md)
+ - [MultiCollateralRecord](docs/MultiCollateralRecord.md)
+ - [MultiCollateralRecordCurrency](docs/MultiCollateralRecordCurrency.md)
+ - [MultiLoanItem](docs/MultiLoanItem.md)
+ - [MultiLoanRepayItem](docs/MultiLoanRepayItem.md)
+ - [MultiRepayRecord](docs/MultiRepayRecord.md)
+ - [MultiRepayResp](docs/MultiRepayResp.md)
- [MyFuturesTrade](docs/MyFuturesTrade.md)
- [MyFuturesTradeTimeRange](docs/MyFuturesTradeTimeRange.md)
- [OpenOrders](docs/OpenOrders.md)
@@ -437,6 +524,8 @@ Class | Method | HTTP request | Description
- [OptionsAccountBook](docs/OptionsAccountBook.md)
- [OptionsCandlestick](docs/OptionsCandlestick.md)
- [OptionsContract](docs/OptionsContract.md)
+ - [OptionsMMP](docs/OptionsMMP.md)
+ - [OptionsMMPReset](docs/OptionsMMPReset.md)
- [OptionsMySettlements](docs/OptionsMySettlements.md)
- [OptionsMyTrade](docs/OptionsMyTrade.md)
- [OptionsOrder](docs/OptionsOrder.md)
@@ -449,42 +538,60 @@ Class | Method | HTTP request | Description
- [OptionsUnderlyingTicker](docs/OptionsUnderlyingTicker.md)
- [Order](docs/Order.md)
- [OrderBook](docs/OrderBook.md)
+ - [OrderCancel](docs/OrderCancel.md)
- [OrderPatch](docs/OrderPatch.md)
- [OrderResp](docs/OrderResp.md)
+ - [PartnerCommissionHistory](docs/PartnerCommissionHistory.md)
+ - [PartnerSub](docs/PartnerSub.md)
+ - [PartnerSubList](docs/PartnerSubList.md)
+ - [PartnerTransactionHistory](docs/PartnerTransactionHistory.md)
- [PatchUniLend](docs/PatchUniLend.md)
- - [PortfolioAccount](docs/PortfolioAccount.md)
- - [PortfolioBorrowable](docs/PortfolioBorrowable.md)
- - [PortfolioLoan](docs/PortfolioLoan.md)
- - [PortfolioLoanRecord](docs/PortfolioLoanRecord.md)
- - [PortfolioMarginBalance](docs/PortfolioMarginBalance.md)
- - [PortfolioMode](docs/PortfolioMode.md)
- - [PortfolioTransferable](docs/PortfolioTransferable.md)
+ - [PlaceDualInvestmentOrder](docs/PlaceDualInvestmentOrder.md)
- [Position](docs/Position.md)
- [PositionClose](docs/PositionClose.md)
- [PositionCloseOrder](docs/PositionCloseOrder.md)
+ - [ProfitLossRange](docs/ProfitLossRange.md)
+ - [RebateUserInfo](docs/RebateUserInfo.md)
+ - [RepayCurrencyRes](docs/RepayCurrencyRes.md)
- [RepayLoan](docs/RepayLoan.md)
+ - [RepayMultiLoan](docs/RepayMultiLoan.md)
- [RepayRecord](docs/RepayRecord.md)
- - [RepayRequest](docs/RepayRequest.md)
+ - [RepayRecordCurrency](docs/RepayRecordCurrency.md)
+ - [RepayRecordLeftInterest](docs/RepayRecordLeftInterest.md)
+ - [RepayRecordRepaidCurrency](docs/RepayRecordRepaidCurrency.md)
+ - [RepayRecordTotalInterest](docs/RepayRecordTotalInterest.md)
- [RepayResp](docs/RepayResp.md)
- - [Repayment](docs/Repayment.md)
+ - [RiskUnits](docs/RiskUnits.md)
- [SavedAddress](docs/SavedAddress.md)
+ - [SmallBalance](docs/SmallBalance.md)
+ - [SmallBalanceHistory](docs/SmallBalanceHistory.md)
- [SpotAccount](docs/SpotAccount.md)
- [SpotAccountBook](docs/SpotAccountBook.md)
+ - [SpotCurrencyChain](docs/SpotCurrencyChain.md)
- [SpotFee](docs/SpotFee.md)
+ - [SpotInsuranceHistory](docs/SpotInsuranceHistory.md)
- [SpotPricePutOrder](docs/SpotPricePutOrder.md)
- [SpotPriceTrigger](docs/SpotPriceTrigger.md)
- [SpotPriceTriggeredOrder](docs/SpotPriceTriggeredOrder.md)
- [StpGroup](docs/StpGroup.md)
- [StpGroupUser](docs/StpGroupUser.md)
+ - [StructuredBuy](docs/StructuredBuy.md)
+ - [StructuredGetProjectList](docs/StructuredGetProjectList.md)
+ - [StructuredOrderList](docs/StructuredOrderList.md)
- [SubAccount](docs/SubAccount.md)
- [SubAccountBalance](docs/SubAccountBalance.md)
- [SubAccountCrossMarginBalance](docs/SubAccountCrossMarginBalance.md)
- [SubAccountFuturesBalance](docs/SubAccountFuturesBalance.md)
- [SubAccountKey](docs/SubAccountKey.md)
+ - [SubAccountKeyPerms](docs/SubAccountKeyPerms.md)
- [SubAccountMarginBalance](docs/SubAccountMarginBalance.md)
- [SubAccountToSubAccount](docs/SubAccountToSubAccount.md)
- [SubAccountTransfer](docs/SubAccountTransfer.md)
+ - [SubAccountTransferRecordItem](docs/SubAccountTransferRecordItem.md)
- [SubCrossMarginAccount](docs/SubCrossMarginAccount.md)
+ - [SubUserMode](docs/SubUserMode.md)
+ - [SwapCoin](docs/SwapCoin.md)
+ - [SwapCoinStruct](docs/SwapCoinStruct.md)
- [SystemTime](docs/SystemTime.md)
- [Ticker](docs/Ticker.md)
- [TotalBalance](docs/TotalBalance.md)
@@ -492,9 +599,15 @@ Class | Method | HTTP request | Description
- [TradeFee](docs/TradeFee.md)
- [TransactionID](docs/TransactionID.md)
- [Transfer](docs/Transfer.md)
+ - [TransferOrderStatus](docs/TransferOrderStatus.md)
+ - [TransferablesResult](docs/TransferablesResult.md)
- [TriggerOrderResponse](docs/TriggerOrderResponse.md)
- [TriggerTime](docs/TriggerTime.md)
+ - [UidPushOrder](docs/UidPushOrder.md)
+ - [UidPushWithdrawal](docs/UidPushWithdrawal.md)
+ - [UidPushWithdrawalResp](docs/UidPushWithdrawalResp.md)
- [UniCurrency](docs/UniCurrency.md)
+ - [UniCurrencyInterest](docs/UniCurrencyInterest.md)
- [UniCurrencyPair](docs/UniCurrencyPair.md)
- [UniInterestRecord](docs/UniInterestRecord.md)
- [UniLend](docs/UniLend.md)
@@ -503,9 +616,35 @@ Class | Method | HTTP request | Description
- [UniLoan](docs/UniLoan.md)
- [UniLoanInterestRecord](docs/UniLoanInterestRecord.md)
- [UniLoanRecord](docs/UniLoanRecord.md)
+ - [UnifiedAccount](docs/UnifiedAccount.md)
+ - [UnifiedBalance](docs/UnifiedBalance.md)
+ - [UnifiedBorrowable](docs/UnifiedBorrowable.md)
+ - [UnifiedBorrowable1](docs/UnifiedBorrowable1.md)
+ - [UnifiedCollateralReq](docs/UnifiedCollateralReq.md)
+ - [UnifiedCollateralRes](docs/UnifiedCollateralRes.md)
+ - [UnifiedCurrency](docs/UnifiedCurrency.md)
+ - [UnifiedDiscount](docs/UnifiedDiscount.md)
+ - [UnifiedDiscountTiers](docs/UnifiedDiscountTiers.md)
+ - [UnifiedHistoryLoanRate](docs/UnifiedHistoryLoanRate.md)
+ - [UnifiedHistoryLoanRateRates](docs/UnifiedHistoryLoanRateRates.md)
+ - [UnifiedLeverageConfig](docs/UnifiedLeverageConfig.md)
+ - [UnifiedLeverageSetting](docs/UnifiedLeverageSetting.md)
+ - [UnifiedLoan](docs/UnifiedLoan.md)
+ - [UnifiedLoanRecord](docs/UnifiedLoanRecord.md)
+ - [UnifiedLoanResult](docs/UnifiedLoanResult.md)
+ - [UnifiedMarginTiers](docs/UnifiedMarginTiers.md)
+ - [UnifiedModeSet](docs/UnifiedModeSet.md)
+ - [UnifiedPortfolioInput](docs/UnifiedPortfolioInput.md)
+ - [UnifiedPortfolioOutput](docs/UnifiedPortfolioOutput.md)
+ - [UnifiedRiskUnits](docs/UnifiedRiskUnits.md)
+ - [UnifiedSettings](docs/UnifiedSettings.md)
+ - [UnifiedTransferable](docs/UnifiedTransferable.md)
- [UserLtvInfo](docs/UserLtvInfo.md)
+ - [UserSub](docs/UserSub.md)
+ - [UserSubRelation](docs/UserSubRelation.md)
- [UserTotalAmount](docs/UserTotalAmount.md)
- [WithdrawStatus](docs/WithdrawStatus.md)
+ - [WithdrawalRecord](docs/WithdrawalRecord.md)
## Documentation For Authorization
@@ -516,11 +655,11 @@ Class | Method | HTTP request | Description
Authentication with APIv4 key and secret
For details, refer to:
-[APIv4 signed request requirements](https://www.gate.io/docs/apiv4/en/index.html#apiv4-signed-request-requirements)
+[APIv4 signed request requirements](https://www.gate.com/docs/apiv4/en/index.html#apiv4-signed-request-requirements)
## Author
-support@mail.gate.io
+support@mail.gate.com
diff --git a/docs/AccountApi.md b/docs/AccountApi.md
index 024522a..855675f 100644
--- a/docs/AccountApi.md
+++ b/docs/AccountApi.md
@@ -4,18 +4,21 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**get_account_detail**](AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail
-[**list_stp_groups**](AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups
-[**create_stp_group**](AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP Group
-[**list_stp_groups_users**](AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group
-[**add_stp_group_users**](AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group
-[**delete_stp_group_users**](AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | STP用户组中删除用户
+[**get_account_detail**](AccountApi.md#get_account_detail) | **GET** /account/detail | Retrieve user account information
+[**get_account_rate_limit**](AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information
+[**list_stp_groups**](AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | Query STP user groups created by the user
+[**create_stp_group**](AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP user group
+[**list_stp_groups_users**](AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | Query users in the STP user group
+[**add_stp_group_users**](AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP user group
+[**delete_stp_group_users**](AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete users from the STP user group
+[**get_debit_fee**](AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT fee deduction configuration
+[**set_debit_fee**](AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Configure GT fee deduction
# **get_account_detail**
> AccountDetail get_account_detail()
-Get account detail
+Retrieve user account information
### Example
@@ -43,7 +46,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.AccountApi(api_client)
try:
- # Get account detail
+ # Retrieve user account information
api_response = api_instance.get_account_detail()
print(api_response)
except GateApiException as ex:
@@ -71,16 +74,79 @@ This endpoint does not need any parameter.
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successful | - |
+**200** | Successfully retrieved | - |
+
+[[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)
+
+# **get_account_rate_limit**
+> list[AccountRateLimit] get_account_rate_limit()
+
+Get user transaction rate limit information
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.AccountApi(api_client)
+
+try:
+ # Get user transaction rate limit information
+ api_response = api_instance.get_account_rate_limit()
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling AccountApi->get_account_rate_limit: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**list[AccountRateLimit]**](AccountRateLimit.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Successfully retrieved | - |
[[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)
# **list_stp_groups**
> list[StpGroup] list_stp_groups(name=name)
-List STP Groups
+Query STP user groups created by the user
-Retrieve the list of STP groups created by the main account user only
+Only query STP user groups created by the current main account
### Example
@@ -106,10 +172,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.AccountApi(api_client)
-name = 'group' # str | Perform a fuzzy search based on the name (optional)
+name = 'group' # str | Fuzzy search by name (optional)
try:
- # List STP Groups
+ # Query STP user groups created by the user
api_response = api_instance.list_stp_groups(name=name)
print(api_response)
except GateApiException as ex:
@@ -122,7 +188,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **name** | **str**| Perform a fuzzy search based on the name | [optional]
+ **name** | **str**| Fuzzy search by name | [optional]
### Return type
@@ -140,14 +206,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **create_stp_group**
> StpGroup create_stp_group(stp_group)
-Create STP Group
+Create STP user group
Only the main account is allowed to create a new STP user group
@@ -178,7 +244,7 @@ api_instance = gate_api.AccountApi(api_client)
stp_group = gate_api.StpGroup() # StpGroup |
try:
- # Create STP Group
+ # Create STP user group
api_response = api_instance.create_stp_group(stp_group)
print(api_response)
except GateApiException as ex:
@@ -209,16 +275,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | User added successfully. Returning the current users within the STP group. | - |
+**200** | User added successfully, returning current users in the STP group | - |
[[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)
# **list_stp_groups_users**
> list[StpGroupUser] list_stp_groups_users(stp_id)
-List users of the STP group
+Query users in the STP user group
-Only the main account that created this STP group is allowed to list the user ID of the STP group
+Only the main account that created this STP group can query the account ID list in the current STP group
### Example
@@ -247,7 +313,7 @@ api_instance = gate_api.AccountApi(api_client)
stp_id = 1 # int | STP Group ID
try:
- # List users of the STP group
+ # Query users in the STP user group
api_response = api_instance.list_stp_groups_users(stp_id)
print(api_response)
except GateApiException as ex:
@@ -278,16 +344,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **add_stp_group_users**
> list[StpGroupUser] add_stp_group_users(stp_id, request_body)
-Add users to the STP group
+Add users to the STP user group
-- Only the master account that created the STP user group is allowed to add users to the STP user group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted
+- Only the main account that created this STP group can add users to the STP user group - Only accounts under the current main account are allowed, cross-main account is not permitted
### Example
@@ -317,7 +383,7 @@ stp_id = 1 # int | STP Group ID
request_body = [[1,2,3]] # list[int] | User ID
try:
- # Add users to the STP group
+ # Add users to the STP user group
api_response = api_instance.add_stp_group_users(stp_id, request_body)
print(api_response)
except GateApiException as ex:
@@ -349,16 +415,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | User added successfully. Returning the current users within the STP group. | - |
+**200** | User added successfully, returning current users in the STP group | - |
[[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)
# **delete_stp_group_users**
-> list[StpGroupUser] delete_stp_group_users(stp_id, request_body)
+> list[StpGroupUser] delete_stp_group_users(stp_id, user_id)
-STP用户组中删除用户
+Delete users from the STP user group
-- 只允许创建此STP组的主账号删除STP用户组用户 - 只允许删除当前主账户下的账户,不允许跨主账户
+- Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted
### Example
@@ -385,11 +451,11 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.AccountApi(api_client)
stp_id = 1 # int | STP Group ID
-request_body = [[1,2,3]] # list[int] | User ID
+user_id = 1 # int | STP user IDs, multiple IDs can be separated by commas
try:
- # STP用户组中删除用户
- api_response = api_instance.delete_stp_group_users(stp_id, request_body)
+ # Delete users from the STP user group
+ api_response = api_instance.delete_stp_group_users(stp_id, user_id)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -402,7 +468,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**stp_id** | **int**| STP Group ID |
- **request_body** | [**list[int]**](int.md)| User ID |
+ **user_id** | **int**| STP user IDs, multiple IDs can be separated by commas |
### Return type
@@ -414,13 +480,146 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | 删除用户成功,返回当前STP组内用户 | - |
+**200** | Users deleted successfully, returns current users in the STP group | - |
+
+[[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)
+
+# **get_debit_fee**
+> DebitFee get_debit_fee()
+
+Query GT fee deduction configuration
+
+Query the GT fee deduction configuration for the current account
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.AccountApi(api_client)
+
+try:
+ # Query GT fee deduction configuration
+ api_response = api_instance.get_debit_fee()
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling AccountApi->get_debit_fee: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**DebitFee**](DebitFee.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+
+[[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)
+
+# **set_debit_fee**
+> set_debit_fee(debit_fee)
+
+Configure GT fee deduction
+
+Enable or disable GT fee deduction for the current account
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.AccountApi(api_client)
+debit_fee = gate_api.DebitFee() # DebitFee |
+
+try:
+ # Configure GT fee deduction
+ api_instance.set_debit_fee(debit_fee)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling AccountApi->set_debit_fee: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **debit_fee** | [**DebitFee**](DebitFee.md)| |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
[[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)
diff --git a/docs/AccountBalance.md b/docs/AccountBalance.md
index cf686f7..7941688 100644
--- a/docs/AccountBalance.md
+++ b/docs/AccountBalance.md
@@ -6,6 +6,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**amount** | **str** | Account total balance amount | [optional]
**currency** | **str** | Currency | [optional]
+**unrealised_pnl** | **str** | Unrealised_pnl, this field will only appear in futures, options, delivery, and total accounts | [optional]
+**borrowed** | **str** | Total borrowed amount, this field will only appear in margin and cross_margin accounts | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/AccountDetail.md b/docs/AccountDetail.md
index 65f2448..8e01703 100644
--- a/docs/AccountDetail.md
+++ b/docs/AccountDetail.md
@@ -1,13 +1,15 @@
# AccountDetail
-Account detail
+Account details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ip_whitelist** | **list[str]** | IP whitelist | [optional]
-**currency_pairs** | **list[str]** | CurrencyPair whitelisting | [optional]
+**ip_whitelist** | **list[str]** | IP Whitelist | [optional]
+**currency_pairs** | **list[str]** | Trading pair whitelist | [optional]
**user_id** | **int** | User ID | [optional]
+**tier** | **int** | User VIP level | [optional]
**key** | [**AccountDetailKey**](AccountDetailKey.md) | | [optional]
+**copy_trading_role** | **int** | User role: 0 - Normal user, 1 - Copy trading leader, 2 - Follower, 3 - Both leader and follower | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/AccountDetailKey.md b/docs/AccountDetailKey.md
index e86955d..363513d 100644
--- a/docs/AccountDetailKey.md
+++ b/docs/AccountDetailKey.md
@@ -1,10 +1,10 @@
# AccountDetailKey
-API Key detail
+API Key details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**mode** | **int** | mode: 1 - classic account 2 - portfolio margin account | [optional]
+**mode** | **int** | Mode: 1 - Classic mode, 2 - Legacy unified mode | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/AccountRateLimit.md b/docs/AccountRateLimit.md
new file mode 100644
index 0000000..b91882b
--- /dev/null
+++ b/docs/AccountRateLimit.md
@@ -0,0 +1,13 @@
+# AccountRateLimit
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**tier** | **str** | Frequency limit level (For detailed frequency limit rules, see [Transaction ratio frequency limit](#rate-limit-based-on-fill-ratio)) | [optional]
+**ratio** | **str** | Fill rate | [optional]
+**main_ratio** | **str** | Total fill ratio of main account | [optional]
+**updated_at** | **str** | Update time | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/AgencyCommission.md b/docs/AgencyCommission.md
index 85d5907..1151423 100644
--- a/docs/AgencyCommission.md
+++ b/docs/AgencyCommission.md
@@ -3,12 +3,12 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**commission_time** | **int** | Commission Time. (unix timestamp) | [optional]
+**commission_time** | **int** | Commission time (Unix timestamp in seconds) | [optional]
**user_id** | **int** | User ID | [optional]
**group_name** | **str** | Group name | [optional]
-**commission_amount** | **str** | Commission Amount | [optional]
+**commission_amount** | **str** | Transaction amount | [optional]
**commission_asset** | **str** | Commission Asset | [optional]
-**source** | **str** | Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate | [optional]
+**source** | **str** | Commission source: SPOT - Spot commission, FUTURES - Futures commission | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/AgencyCommissionHistory.md b/docs/AgencyCommissionHistory.md
index e3558c1..195a454 100644
--- a/docs/AgencyCommissionHistory.md
+++ b/docs/AgencyCommissionHistory.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency_pair** | **str** | Currency pair | [optional]
**total** | **int** | Total | [optional]
-**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of comission history | [optional]
+**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of commission history | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/AgencyTransaction.md b/docs/AgencyTransaction.md
index e54646f..930d2b7 100644
--- a/docs/AgencyTransaction.md
+++ b/docs/AgencyTransaction.md
@@ -9,9 +9,9 @@ Name | Type | Description | Notes
**fee** | **str** | Fee | [optional]
**fee_asset** | **str** | Fee currency | [optional]
**currency_pair** | **str** | Currency pair | [optional]
-**amount** | **str** | Commission Amount | [optional]
+**amount** | **str** | Transaction amount | [optional]
**amount_asset** | **str** | Commission Asset | [optional]
-**source** | **str** | Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate | [optional]
+**source** | **str** | Commission source: SPOT - Spot commission, FUTURES - Futures commission | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ApiV4KeyPerm.md b/docs/ApiV4KeyPerm.md
deleted file mode 100644
index 97325df..0000000
--- a/docs/ApiV4KeyPerm.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# ApiV4KeyPerm
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**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 | [optional]
-**read_only** | **bool** | read only | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/AutoRepaySetting.md b/docs/AutoRepaySetting.md
index 14d2c7e..d71d92d 100644
--- a/docs/AutoRepaySetting.md
+++ b/docs/AutoRepaySetting.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**status** | **str** | Auto repayment status. `on` - enabled, `off` - disabled | [optional]
+**status** | **str** | Auto repayment status: `on` - enabled, `off` - disabled | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/BatchAmendItem.md b/docs/BatchAmendItem.md
new file mode 100644
index 0000000..62bc971
--- /dev/null
+++ b/docs/BatchAmendItem.md
@@ -0,0 +1,17 @@
+# BatchAmendItem
+
+Order information that needs to be modified
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order_id** | **str** | The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field) |
+**currency_pair** | **str** | Currency pair |
+**account** | **str** | Default spot, unified account and warehouse-by-store leverage account | [optional]
+**amount** | **str** | Trading Quantity. Only one of `amount` or `price` can be specified | [optional]
+**price** | **str** | Trading Price. Only one of `amount` or `price` can be specified | [optional]
+**amend_text** | **str** | Custom info during order amendment | [optional]
+**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]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/BatchAmendOrderReq.md b/docs/BatchAmendOrderReq.md
new file mode 100644
index 0000000..41df706
--- /dev/null
+++ b/docs/BatchAmendOrderReq.md
@@ -0,0 +1,15 @@
+# BatchAmendOrderReq
+
+Modify contract order parameters
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order_id** | **int** | Order id, order_id and text must contain at least one | [optional]
+**text** | **str** | User-defined order text, at least one of order_id and text must be passed | [optional]
+**size** | **int** | New order size, including filled size. - If less than or equal to the filled quantity, the order will be cancelled. - The new order side must be identical to the original one. - Close order size cannot be modified. - For reduce-only orders, increasing the size may cancel other reduce-only orders. - If the price is not modified, decreasing the size will not affect the depth queue, while increasing the size will place it at the end of the current price level. | [optional]
+**price** | **str** | New order price | [optional]
+**amend_text** | **str** | Custom info during order amendment | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/BatchFuturesOrder.md b/docs/BatchFuturesOrder.md
index 0e81bea..c7599b6 100644
--- a/docs/BatchFuturesOrder.md
+++ b/docs/BatchFuturesOrder.md
@@ -4,33 +4,33 @@ Futures order details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**succeeded** | **bool** | Whether the batch of orders succeeded | [optional]
+**succeeded** | **bool** | Request execution result | [optional]
**label** | **str** | Error label, only exists if execution fails | [optional]
**detail** | **str** | Error detail, only present if execution failed and details need to be given | [optional]
**id** | **int** | Futures order ID | [optional] [readonly]
**user** | **int** | User ID | [optional] [readonly]
**create_time** | **float** | Creation time of order | [optional] [readonly]
**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly]
-**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]
-**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly]
+**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]
+**status** | **str** | Order status - `open`: Pending - `finished`: Completed | [optional] [readonly]
**contract** | **str** | Futures contract | [optional]
-**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | [optional]
-**iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional]
-**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` | [optional]
+**size** | **int** | Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. | [optional]
+**iceberg** | **int** | Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. | [optional]
+**price** | **str** | Order price. Price of 0 with `tif` set to `ioc` represents a market order. | [optional]
**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False]
**is_close** | **bool** | Is the order to close position | [optional] [readonly]
**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False]
**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly]
**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly]
**tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc']
-**left** | **int** | Size left to be traded | [optional] [readonly]
-**fill_price** | **str** | Fill price of the order | [optional] [readonly]
+**left** | **int** | Unfilled quantity | [optional] [readonly]
+**fill_price** | **str** | Fill price | [optional] [readonly]
**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(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance | [optional]
**tkfr** | **str** | Taker fee | [optional] [readonly]
**mkfr** | **str** | Maker fee | [optional] [readonly]
-**refu** | **int** | Reference user ID | [optional] [readonly]
+**refu** | **int** | Referrer user ID | [optional] [readonly]
**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]
-**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]
+**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention 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]
**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]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/BatchOrder.md b/docs/BatchOrder.md
index 1662053..7840bc6 100644
--- a/docs/BatchOrder.md
+++ b/docs/BatchOrder.md
@@ -4,8 +4,10 @@ Batch order details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**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]
-**succeeded** | **bool** | Whether the batch of orders succeeded | [optional]
+**order_id** | **str** | Order ID | [optional]
+**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional]
+**text** | **str** | Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) | [optional]
+**succeeded** | **bool** | Request execution result | [optional]
**label** | **str** | Error label, if any, otherwise an empty string | [optional]
**message** | **str** | Detailed error message, if any, otherwise an empty string | [optional]
**id** | **str** | Order ID | [optional] [readonly]
@@ -15,27 +17,29 @@ Name | Type | Description | Notes
**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly]
**status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly]
**currency_pair** | **str** | Currency pair | [optional]
-**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit']
-**account** | **str** | Account type. spot - use spot account; margin - use margin account; cross_margin - use cross margin account | [optional] [default to 'spot']
-**side** | **str** | Order side | [optional]
+**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit']
+**account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot']
+**side** | **str** | Buy or sell order | [optional]
**amount** | **str** | Trade amount | [optional]
**price** | **str** | Order price | [optional]
**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 - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc']
-**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional]
-**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional]
-**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]
+**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported | [optional]
+**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough | [optional]
+**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` can be both set to true in one order | [optional]
**left** | **str** | Amount left to fill | [optional] [readonly]
+**filled_amount** | **str** | Amount filled | [optional] [readonly]
**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly]
**filled_total** | **str** | Total filled in quote currency | [optional] [readonly]
+**avg_deal_price** | **str** | Average fill price | [optional] [readonly]
**fee** | **str** | Fee deducted | [optional] [readonly]
**fee_currency** | **str** | Fee currency unit | [optional] [readonly]
**point_fee** | **str** | Points used to deduct fee | [optional] [readonly]
**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly]
-**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly]
+**gt_discount** | **bool** | Whether GT fee deduction is enabled | [optional] [readonly]
**rebated_fee** | **str** | Rebated fee | [optional] [readonly]
**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly]
**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]
-**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]
+**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, new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional]
**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]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/BorrowCurrencyInfo.md b/docs/BorrowCurrencyInfo.md
new file mode 100644
index 0000000..64ca722
--- /dev/null
+++ b/docs/BorrowCurrencyInfo.md
@@ -0,0 +1,14 @@
+# BorrowCurrencyInfo
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional]
+**index_price** | **str** | Currency Index Price | [optional]
+**left_repay_principal** | **str** | Outstanding principal | [optional]
+**left_repay_interest** | **str** | Outstanding interest | [optional]
+**left_repay_usdt** | **str** | Remaining total outstanding value converted to USDT | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/BrokerCommission.md b/docs/BrokerCommission.md
new file mode 100644
index 0000000..0cbfd46
--- /dev/null
+++ b/docs/BrokerCommission.md
@@ -0,0 +1,11 @@
+# BrokerCommission
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**total** | **int** | Total | [optional]
+**list** | [**list[BrokerCommission1]**](BrokerCommission1.md) | List of commission history | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/BrokerCommission1.md b/docs/BrokerCommission1.md
new file mode 100644
index 0000000..0382e9c
--- /dev/null
+++ b/docs/BrokerCommission1.md
@@ -0,0 +1,20 @@
+# BrokerCommission1
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**commission_time** | **int** | Commission time (Unix timestamp in seconds) | [optional]
+**user_id** | **int** | User ID | [optional]
+**group_name** | **str** | Group name | [optional]
+**amount** | **str** | The amount of commission rebates | [optional]
+**fee** | **str** | Fee | [optional]
+**fee_asset** | **str** | Fee currency | [optional]
+**rebate_fee** | **str** | The income from rebates, converted to USDT | [optional]
+**source** | **str** | Commission transaction type: Spot, Futures, Options, Alpha | [optional]
+**currency_pair** | **str** | Currency pair | [optional]
+**sub_broker_info** | [**BrokerCommissionSubBrokerInfo**](BrokerCommissionSubBrokerInfo.md) | | [optional]
+**alpha_contract_addr** | **str** | Alpha contract address | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/BrokerCommissionSubBrokerInfo.md b/docs/BrokerCommissionSubBrokerInfo.md
new file mode 100644
index 0000000..d6a0912
--- /dev/null
+++ b/docs/BrokerCommissionSubBrokerInfo.md
@@ -0,0 +1,14 @@
+# BrokerCommissionSubBrokerInfo
+
+Sub-broker information
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**user_id** | **int** | Sub-broker user ID | [optional]
+**original_commission_rate** | **str** | Sub-broker original commission rate | [optional]
+**relative_commission_rate** | **str** | Sub-broker relative commission rate | [optional]
+**commission_rate** | **str** | Sub-broker actual commission rate | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/BrokerTransaction.md b/docs/BrokerTransaction.md
new file mode 100644
index 0000000..c450894
--- /dev/null
+++ b/docs/BrokerTransaction.md
@@ -0,0 +1,11 @@
+# BrokerTransaction
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**total** | **int** | Total | [optional]
+**list** | [**list[BrokerTransaction1]**](BrokerTransaction1.md) | List of transaction history | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/BrokerTransaction1.md b/docs/BrokerTransaction1.md
new file mode 100644
index 0000000..07833a8
--- /dev/null
+++ b/docs/BrokerTransaction1.md
@@ -0,0 +1,19 @@
+# BrokerTransaction1
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**transaction_time** | **int** | Transaction Time. (unix timestamp) | [optional]
+**user_id** | **int** | User ID | [optional]
+**group_name** | **str** | Group name | [optional]
+**fee** | **str** | Fee amount (USDT) | [optional]
+**currency_pair** | **str** | Currency pair | [optional]
+**amount** | **str** | Transaction amount | [optional]
+**fee_asset** | **str** | Fee currency | [optional]
+**source** | **str** | Commission transaction type: Spot, Futures, Options, Alpha | [optional]
+**sub_broker_info** | [**BrokerCommissionSubBrokerInfo**](BrokerCommissionSubBrokerInfo.md) | | [optional]
+**alpha_contract_addr** | **str** | Alpha contract address | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CancelBatchOrder.md b/docs/CancelBatchOrder.md
index a169a5d..4d2953b 100644
--- a/docs/CancelBatchOrder.md
+++ b/docs/CancelBatchOrder.md
@@ -6,7 +6,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency_pair** | **str** | Order currency pair |
**id** | **str** | Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation |
-**account** | **str** | If cancelled order is cross margin order or is portfolio margin account's API key, this field must be set and can only be `cross_margin`If cancelled order is cross margin order, this field must be set and can only be `cross_margin` | [optional]
+**account** | **str** | If the canceled order is a unified account apikey, this field must be specified and set to `unified` | [optional]
+**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]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CancelOrder.md b/docs/CancelOrder.md
deleted file mode 100644
index 3e3ef84..0000000
--- a/docs/CancelOrder.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# CancelOrder
-
-Info of order to be cancelled
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**currency_pair** | **str** | Order currency pair |
-**id** | **str** | Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation |
-**account** | **str** | If cancelled order is cross margin order or is portfolio margin account's API key, this field must be set and can only be `cross_margin`If cancelled order is cross margin order, this field must be set and can only be `cross_margin` | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/CancelOrderResult.md b/docs/CancelOrderResult.md
index d5cb671..8aa2f77 100644
--- a/docs/CancelOrderResult.md
+++ b/docs/CancelOrderResult.md
@@ -6,10 +6,11 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency_pair** | **str** | Order currency pair | [optional]
**id** | **str** | Order ID | [optional]
+**text** | **str** | Custom order information | [optional]
**succeeded** | **bool** | Whether cancellation succeeded | [optional]
**label** | **str** | Error label when failed to cancel the order; emtpy if succeeded | [optional]
-**message** | **str** | Error message when failed to cancel the order; empty if succeeded | [optional]
-**account** | **str** | Empty by default. If cancelled order is cross margin order, this field is set to `cross_margin` | [optional]
+**message** | **str** | Error description when cancellation fails, empty if successful | [optional]
+**account** | **str** | Default is empty (deprecated) | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CollateralAdjust.md b/docs/CollateralAdjust.md
new file mode 100644
index 0000000..945eda4
--- /dev/null
+++ b/docs/CollateralAdjust.md
@@ -0,0 +1,12 @@
+# CollateralAdjust
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order_id** | **int** | Order ID |
+**type** | **str** | Operation type: append - add collateral, redeem - withdraw collateral |
+**collaterals** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral currency list | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CrossMarginBalance1.md b/docs/CollateralAdjustRes.md
similarity index 53%
rename from docs/CrossMarginBalance1.md
rename to docs/CollateralAdjustRes.md
index 2db2a14..d116036 100644
--- a/docs/CrossMarginBalance1.md
+++ b/docs/CollateralAdjustRes.md
@@ -1,12 +1,11 @@
-# CrossMarginBalance1
+# CollateralAdjustRes
+Multi-collateral adjustment result
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**available** | **str** | Available amount | [optional]
-**freeze** | **str** | Locked amount | [optional]
-**borrowed** | **str** | Borrowed amount | [optional]
-**interest** | **str** | Unpaid interests | [optional]
+**order_id** | **int** | Order ID | [optional]
+**collateral_currencies** | [**list[CollateralCurrencyRes]**](CollateralCurrencyRes.md) | Collateral currency information | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CollateralAlign.md b/docs/CollateralAlign.md
index 4adecb0..4b14840 100644
--- a/docs/CollateralAlign.md
+++ b/docs/CollateralAlign.md
@@ -3,10 +3,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**order_id** | **int** | 订单id |
-**collateral_currency** | **str** | 质押币种 |
-**collateral_amount** | **str** | 质押数量 |
-**type** | **str** | 操作类型, append - 补充 , redeem - 提取 |
+**order_id** | **int** | Order ID |
+**collateral_currency** | **str** | Collateral currency |
+**collateral_amount** | **str** | Collateral amount |
+**type** | **str** | Operation type: append - add collateral, redeem - withdraw collateral |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CrossMarginRepayRequest.md b/docs/CollateralCurrency.md
similarity index 70%
rename from docs/CrossMarginRepayRequest.md
rename to docs/CollateralCurrency.md
index 9c1ca05..016d704 100644
--- a/docs/CrossMarginRepayRequest.md
+++ b/docs/CollateralCurrency.md
@@ -1,10 +1,10 @@
-# CrossMarginRepayRequest
+# CollateralCurrency
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**currency** | **str** | Repayment currency |
-**amount** | **str** | Repayment amount |
+**currency** | **str** | Currency | [optional]
+**amount** | **str** | Size | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CollateralCurrencyInfo.md b/docs/CollateralCurrencyInfo.md
new file mode 100644
index 0000000..0b1e1f4
--- /dev/null
+++ b/docs/CollateralCurrencyInfo.md
@@ -0,0 +1,13 @@
+# CollateralCurrencyInfo
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional]
+**index_price** | **str** | Currency Index Price | [optional]
+**left_collateral** | **str** | Remaining collateral amount | [optional]
+**left_collateral_usdt** | **str** | Remaining collateral value converted to USDT | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CollateralCurrencyRes.md b/docs/CollateralCurrencyRes.md
new file mode 100644
index 0000000..1a64fff
--- /dev/null
+++ b/docs/CollateralCurrencyRes.md
@@ -0,0 +1,14 @@
+# CollateralCurrencyRes
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**succeeded** | **bool** | Update success status | [optional]
+**label** | **str** | Error identifier for failed operations; empty when successful | [optional]
+**message** | **str** | Error description for failed operations; empty when successful | [optional]
+**currency** | **str** | Currency | [optional]
+**amount** | **str** | Successfully operated collateral quantity; 0 if operation fails | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CollateralCurrentRate.md b/docs/CollateralCurrentRate.md
new file mode 100644
index 0000000..f9a94d0
--- /dev/null
+++ b/docs/CollateralCurrentRate.md
@@ -0,0 +1,12 @@
+# CollateralCurrentRate
+
+Multi-collateral current interest rate
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional]
+**current_rate** | **str** | Currency current interest rate | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CollateralFixRate.md b/docs/CollateralFixRate.md
new file mode 100644
index 0000000..2f3f84f
--- /dev/null
+++ b/docs/CollateralFixRate.md
@@ -0,0 +1,14 @@
+# CollateralFixRate
+
+Multi-collateral fixed interest rate
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional]
+**rate_7d** | **str** | Fixed interest rate for 7-day lending period | [optional]
+**rate_30d** | **str** | Fixed interest rate for 30-day lending period | [optional]
+**update_time** | **int** | Update time, timestamp in seconds | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CollateralLoanApi.md b/docs/CollateralLoanApi.md
index f2001a4..bfd5ed6 100644
--- a/docs/CollateralLoanApi.md
+++ b/docs/CollateralLoanApi.md
@@ -4,22 +4,22 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**list_collateral_loan_orders**](CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | 查询抵押借币订单列表
-[**create_collateral_loan**](CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | 抵押借币借贷下单
-[**get_collateral_loan_order_detail**](CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order
-[**repay_collateral_loan**](CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | 抵押借币还款
-[**list_repay_records**](CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | 查询抵押借币还款记录
-[**list_collateral_records**](CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | 查询质押物调整记录
-[**operate_collateral**](CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | 增加或赎回质押物
-[**get_user_total_amount**](CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | 查询用户总借贷与质押数量
-[**get_user_ltv_info**](CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | 查询用户质押率和可借剩余币种
-[**list_collateral_currencies**](CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | 查询支持的借款币种和抵押币种
+[**list_collateral_loan_orders**](CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | Query collateral loan order list
+[**create_collateral_loan**](CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place collateral loan order
+[**get_collateral_loan_order_detail**](CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Query single order details
+[**repay_collateral_loan**](CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Collateral loan repayment
+[**list_repay_records**](CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Query collateral loan repayment records
+[**list_collateral_records**](CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records
+[**operate_collateral**](CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral
+[**get_user_total_amount**](CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query user's total borrowing and collateral amount
+[**get_user_ltv_info**](CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio and remaining borrowable currencies
+[**list_collateral_currencies**](CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies
# **list_collateral_loan_orders**
> list[CollateralOrder] list_collateral_loan_orders(page=page, limit=limit, collateral_currency=collateral_currency, borrow_currency=borrow_currency)
-查询抵押借币订单列表
+Query collateral loan order list
### Example
@@ -46,12 +46,12 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.CollateralLoanApi(api_client)
page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-collateral_currency = 'BTC' # str | 质押币种 (optional)
-borrow_currency = 'USDT' # str | 借款币种 (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+collateral_currency = 'BTC' # str | Collateral currency (optional)
+borrow_currency = 'USDT' # str | Borrowed currency (optional)
try:
- # 查询抵押借币订单列表
+ # Query collateral loan order list
api_response = api_instance.list_collateral_loan_orders(page=page, limit=limit, collateral_currency=collateral_currency, borrow_currency=borrow_currency)
print(api_response)
except GateApiException as ex:
@@ -65,9 +65,9 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **collateral_currency** | **str**| 质押币种 | [optional]
- **borrow_currency** | **str**| 借款币种 | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **collateral_currency** | **str**| Collateral currency | [optional]
+ **borrow_currency** | **str**| Borrowed currency | [optional]
### Return type
@@ -85,14 +85,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **create_collateral_loan**
> OrderResp create_collateral_loan(create_collateral_order)
-抵押借币借贷下单
+Place collateral loan order
### Example
@@ -121,7 +121,7 @@ api_instance = gate_api.CollateralLoanApi(api_client)
create_collateral_order = gate_api.CreateCollateralOrder() # CreateCollateralOrder |
try:
- # 抵押借币借贷下单
+ # Place collateral loan order
api_response = api_instance.create_collateral_loan(create_collateral_order)
print(api_response)
except GateApiException as ex:
@@ -152,14 +152,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | 下单成功 | - |
+**200** | Order placed successfully | - |
[[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)
# **get_collateral_loan_order_detail**
> CollateralOrder get_collateral_loan_order_detail(order_id)
-Get a single order
+Query single order details
### Example
@@ -185,10 +185,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.CollateralLoanApi(api_client)
-order_id = 100001 # int | Order ID returned on successful order creation
+order_id = 100001 # int | Order ID returned when order is successfully created
try:
- # Get a single order
+ # Query single order details
api_response = api_instance.get_collateral_loan_order_detail(order_id)
print(api_response)
except GateApiException as ex:
@@ -201,7 +201,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **order_id** | **int**| Order ID returned on successful order creation |
+ **order_id** | **int**| Order ID returned when order is successfully created |
### Return type
@@ -219,14 +219,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | 订单详情查询成功 | - |
+**200** | Order details queried successfully | - |
[[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)
# **repay_collateral_loan**
> RepayResp repay_collateral_loan(repay_loan)
-抵押借币还款
+Collateral loan repayment
### Example
@@ -255,7 +255,7 @@ api_instance = gate_api.CollateralLoanApi(api_client)
repay_loan = gate_api.RepayLoan() # RepayLoan |
try:
- # 抵押借币还款
+ # Collateral loan repayment
api_response = api_instance.repay_collateral_loan(repay_loan)
print(api_response)
except GateApiException as ex:
@@ -286,14 +286,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Operated successfully | - |
+**200** | Operation successful | - |
[[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)
# **list_repay_records**
> list[RepayRecord] list_repay_records(source, borrow_currency=borrow_currency, collateral_currency=collateral_currency, page=page, limit=limit, _from=_from, to=to)
-查询抵押借币还款记录
+Query collateral loan repayment records
### Example
@@ -319,16 +319,16 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.CollateralLoanApi(api_client)
-source = 'repay' # str | 操作类型 ; repay - 普通还款, liquidate - 平仓
-borrow_currency = 'USDT' # str | 借款币种 (optional)
-collateral_currency = 'BTC' # str | 质押币种 (optional)
+source = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation
+borrow_currency = 'USDT' # str | Borrowed currency (optional)
+collateral_currency = 'BTC' # str | Collateral currency (optional)
page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-_from = 1609459200 # int | Start timestamp of the query (optional)
-to = 1609459200 # int | Time range ending, default to current time (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+_from = 1609459200 # int | Start timestamp for the query (optional)
+to = 1609459200 # int | End timestamp for the query, defaults to current time if not specified (optional)
try:
- # 查询抵押借币还款记录
+ # Query collateral loan repayment records
api_response = api_instance.list_repay_records(source, borrow_currency=borrow_currency, collateral_currency=collateral_currency, page=page, limit=limit, _from=_from, to=to)
print(api_response)
except GateApiException as ex:
@@ -341,13 +341,13 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **source** | **str**| 操作类型 ; repay - 普通还款, liquidate - 平仓 |
- **borrow_currency** | **str**| 借款币种 | [optional]
- **collateral_currency** | **str**| 质押币种 | [optional]
+ **source** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation |
+ **borrow_currency** | **str**| Borrowed currency | [optional]
+ **collateral_currency** | **str**| Collateral currency | [optional]
**page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **_from** | **int**| Start timestamp of the query | [optional]
- **to** | **int**| Time range ending, default to current time | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **_from** | **int**| Start timestamp for the query | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
### Return type
@@ -365,14 +365,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_collateral_records**
> list[CollateralRecord] list_collateral_records(page=page, limit=limit, _from=_from, to=to, borrow_currency=borrow_currency, collateral_currency=collateral_currency)
-查询质押物调整记录
+Query collateral adjustment records
### Example
@@ -399,14 +399,14 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.CollateralLoanApi(api_client)
page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-_from = 1609459200 # int | Start timestamp of the query (optional)
-to = 1609459200 # int | Time range ending, default to current time (optional)
-borrow_currency = 'USDT' # str | 借款币种 (optional)
-collateral_currency = 'BTC' # str | 质押币种 (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+_from = 1609459200 # int | Start timestamp for the query (optional)
+to = 1609459200 # int | End timestamp for the query, defaults to current time if not specified (optional)
+borrow_currency = 'USDT' # str | Borrowed currency (optional)
+collateral_currency = 'BTC' # str | Collateral currency (optional)
try:
- # 查询质押物调整记录
+ # Query collateral adjustment records
api_response = api_instance.list_collateral_records(page=page, limit=limit, _from=_from, to=to, borrow_currency=borrow_currency, collateral_currency=collateral_currency)
print(api_response)
except GateApiException as ex:
@@ -420,11 +420,11 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **_from** | **int**| Start timestamp of the query | [optional]
- **to** | **int**| Time range ending, default to current time | [optional]
- **borrow_currency** | **str**| 借款币种 | [optional]
- **collateral_currency** | **str**| 质押币种 | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **_from** | **int**| Start timestamp for the query | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+ **borrow_currency** | **str**| Borrowed currency | [optional]
+ **collateral_currency** | **str**| Collateral currency | [optional]
### Return type
@@ -442,14 +442,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **operate_collateral**
> operate_collateral(collateral_align)
-增加或赎回质押物
+Increase or redeem collateral
### Example
@@ -478,7 +478,7 @@ api_instance = gate_api.CollateralLoanApi(api_client)
collateral_align = gate_api.CollateralAlign() # CollateralAlign |
try:
- # 增加或赎回质押物
+ # Increase or redeem collateral
api_instance.operate_collateral(collateral_align)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -508,14 +508,14 @@ void (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | Operated successfully | - |
+**204** | Operation successful | - |
[[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)
# **get_user_total_amount**
> UserTotalAmount get_user_total_amount()
-查询用户总借贷与质押数量
+Query user's total borrowing and collateral amount
### Example
@@ -543,7 +543,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.CollateralLoanApi(api_client)
try:
- # 查询用户总借贷与质押数量
+ # Query user's total borrowing and collateral amount
api_response = api_instance.get_user_total_amount()
print(api_response)
except GateApiException as ex:
@@ -571,14 +571,14 @@ This endpoint does not need any parameter.
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **get_user_ltv_info**
> UserLtvInfo get_user_ltv_info(collateral_currency, borrow_currency)
-查询用户质押率和可借剩余币种
+Query user's collateralization ratio and remaining borrowable currencies
### Example
@@ -604,11 +604,11 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.CollateralLoanApi(api_client)
-collateral_currency = 'BTC' # str | 质押币种
-borrow_currency = 'USDT' # str | 借款币种
+collateral_currency = 'BTC' # str | Collateral currency
+borrow_currency = 'USDT' # str | Borrowed currency
try:
- # 查询用户质押率和可借剩余币种
+ # Query user's collateralization ratio and remaining borrowable currencies
api_response = api_instance.get_user_ltv_info(collateral_currency, borrow_currency)
print(api_response)
except GateApiException as ex:
@@ -621,8 +621,8 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **collateral_currency** | **str**| 质押币种 |
- **borrow_currency** | **str**| 借款币种 |
+ **collateral_currency** | **str**| Collateral currency |
+ **borrow_currency** | **str**| Borrowed currency |
### Return type
@@ -640,14 +640,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_collateral_currencies**
> list[CollateralLoanCurrency] list_collateral_currencies(loan_currency=loan_currency)
-查询支持的借款币种和抵押币种
+Query supported borrowing and collateral currencies
### Example
@@ -664,10 +664,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.CollateralLoanApi(api_client)
-loan_currency = 'BTC' # str | 借款币种参数,当loan_currency没传时会返回支持的所有借款币种,当传loan_currency时会查询该借款币种支持的抵押币种数组 (optional)
+loan_currency = 'BTC' # str | Parameter loan_currency. If omitted, returns all supported borrowing currencies; if provided, returns the array of collateral currencies supported for that borrowing currency (optional)
try:
- # 查询支持的借款币种和抵押币种
+ # Query supported borrowing and collateral currencies
api_response = api_instance.list_collateral_currencies(loan_currency=loan_currency)
print(api_response)
except GateApiException as ex:
@@ -680,7 +680,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **loan_currency** | **str**| 借款币种参数,当loan_currency没传时会返回支持的所有借款币种,当传loan_currency时会查询该借款币种支持的抵押币种数组 | [optional]
+ **loan_currency** | **str**| Parameter loan_currency. If omitted, returns all supported borrowing currencies; if provided, returns the array of collateral currencies supported for that borrowing currency | [optional]
### Return type
@@ -698,7 +698,7 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
diff --git a/docs/CollateralLoanCurrency.md b/docs/CollateralLoanCurrency.md
index 1100101..fc4151a 100644
--- a/docs/CollateralLoanCurrency.md
+++ b/docs/CollateralLoanCurrency.md
@@ -1,11 +1,11 @@
# CollateralLoanCurrency
-支持的借款币种和抵押币种
+Supported borrowing and collateral currencies
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**loan_currency** | **str** | 借款币种 | [optional]
-**collateral_currency** | **list[str]** | 支持的抵押币种列表 | [optional]
+**loan_currency** | **str** | Borrowed currency | [optional]
+**collateral_currency** | **list[str]** | List of supported collateral currencies | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CollateralLtv.md b/docs/CollateralLtv.md
new file mode 100644
index 0000000..5bd7f58
--- /dev/null
+++ b/docs/CollateralLtv.md
@@ -0,0 +1,13 @@
+# CollateralLtv
+
+Multi-collateral ratio
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**init_ltv** | **str** | Initial collateralization rate | [optional]
+**alert_ltv** | **str** | Warning collateralization rate | [optional]
+**liquidate_ltv** | **str** | Liquidation collateralization rate | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CollateralOrder.md b/docs/CollateralOrder.md
index 1706cac..b83a7fb 100644
--- a/docs/CollateralOrder.md
+++ b/docs/CollateralOrder.md
@@ -1,25 +1,25 @@
# CollateralOrder
-抵押借币订单
+Collateral order
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**order_id** | **int** | 订单id | [optional]
-**collateral_currency** | **str** | 质押币种 | [optional]
-**collateral_amount** | **str** | 质押数量 | [optional]
-**borrow_currency** | **str** | 借款币种 | [optional]
-**borrow_amount** | **str** | 借款数量 | [optional]
-**repaid_amount** | **str** | 已还款数量 | [optional]
-**repaid_principal** | **str** | 已还本金 | [optional]
-**repaid_interest** | **str** | 已还利息 | [optional]
-**init_ltv** | **str** | 初始质押率 | [optional]
-**current_ltv** | **str** | 当前质押率 | [optional]
-**liquidate_ltv** | **str** | 平仓质押率 | [optional]
-**status** | **str** | 订单状态: - initial: 下单初始状态 - collateral_deducted: 扣除质押物成功 - collateral_returning: 放款失败-待退回质押物 - lent: 放款成功 - repaying: 还款中 - liquidating: 平仓中 - finished: 已完成 - closed_liquidated: 已结束-平仓还款结束 | [optional]
-**borrow_time** | **int** | 借款时间,时间戳,单位秒 | [optional]
-**left_repay_total** | **str** | 待还本息(待还本金+待还利息) | [optional]
-**left_repay_principal** | **str** | 待还本金 | [optional]
-**left_repay_interest** | **str** | 待还利息 | [optional]
+**order_id** | **int** | Order ID | [optional]
+**collateral_currency** | **str** | Collateral currency | [optional]
+**collateral_amount** | **str** | Collateral amount | [optional]
+**borrow_currency** | **str** | Borrowed currency | [optional]
+**borrow_amount** | **str** | Borrowed amount | [optional]
+**repaid_amount** | **str** | Repaid amount | [optional]
+**repaid_principal** | **str** | Repaid principal | [optional]
+**repaid_interest** | **str** | Repaid interest | [optional]
+**init_ltv** | **str** | Initial collateralization rate | [optional]
+**current_ltv** | **str** | Current collateralization rate | [optional]
+**liquidate_ltv** | **str** | Liquidation collateralization rate | [optional]
+**status** | **str** | Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed | [optional]
+**borrow_time** | **int** | Borrowing time, timestamp in seconds | [optional]
+**left_repay_total** | **str** | Outstanding principal and interest (outstanding principal + outstanding interest) | [optional]
+**left_repay_principal** | **str** | Outstanding principal | [optional]
+**left_repay_interest** | **str** | Outstanding interest | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CollateralRecord.md b/docs/CollateralRecord.md
index 73b77ad..f2fbfa7 100644
--- a/docs/CollateralRecord.md
+++ b/docs/CollateralRecord.md
@@ -1,19 +1,19 @@
# CollateralRecord
-质押物记录
+Collateral record
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**order_id** | **int** | 订单id | [optional]
-**record_id** | **int** | 质押物记录 id | [optional]
-**borrow_currency** | **str** | 借款币种 | [optional]
-**borrow_amount** | **str** | 借款数量 | [optional]
-**collateral_currency** | **str** | 质押币种 | [optional]
-**before_collateral** | **str** | 调整前质押数量 | [optional]
-**after_collateral** | **str** | 调整后质押数量 | [optional]
-**before_ltv** | **str** | 调整前质押率 | [optional]
-**after_ltv** | **str** | 调整后质押率 | [optional]
-**operate_time** | **int** | 操作时间,时间戳,单位秒 | [optional]
+**order_id** | **int** | Order ID | [optional]
+**record_id** | **int** | Collateral record ID | [optional]
+**borrow_currency** | **str** | Borrowed currency | [optional]
+**borrow_amount** | **str** | Borrowed amount | [optional]
+**collateral_currency** | **str** | Collateral currency | [optional]
+**before_collateral** | **str** | Collateral amount before adjustment | [optional]
+**after_collateral** | **str** | Collateral amount after adjustment | [optional]
+**before_ltv** | **str** | Collateral ratio before adjustment | [optional]
+**after_ltv** | **str** | Collateral ratio after adjustment | [optional]
+**operate_time** | **int** | Operation time, timestamp in seconds | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/Contract.md b/docs/Contract.md
index b8be5ee..d7adc71 100644
--- a/docs/Contract.md
+++ b/docs/Contract.md
@@ -5,40 +5,45 @@ Futures contract details
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Futures contract | [optional]
-**type** | **str** | Futures contract type | [optional]
+**type** | **str** | Contract type: inverse - inverse contract, direct - direct contract | [optional]
**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional]
**leverage_min** | **str** | Minimum leverage | [optional]
**leverage_max** | **str** | Maximum leverage | [optional]
**maintenance_rate** | **str** | Maintenance rate of margin | [optional]
-**mark_type** | **str** | Mark price type, internal - based on internal trading, index - based on external index price | [optional]
+**mark_type** | **str** | Mark price type: internal - internal trading price, index - external index price | [optional]
**mark_price** | **str** | Current mark price | [optional]
**index_price** | **str** | Current index price | [optional]
**last_price** | **str** | Last trading price | [optional]
-**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate | [optional]
+**maker_fee_rate** | **str** | Maker fee rate, negative values indicate rebates | [optional]
**taker_fee_rate** | **str** | Taker fee rate | [optional]
**order_price_round** | **str** | Minimum order price increment | [optional]
**mark_price_round** | **str** | Minimum mark price increment | [optional]
**funding_rate** | **str** | Current funding rate | [optional]
**funding_interval** | **int** | Funding application interval, unit in seconds | [optional]
**funding_next_apply** | **float** | Next funding time | [optional]
-**risk_limit_base** | **str** | Risk limit base | [optional]
-**risk_limit_step** | **str** | Step of adjusting risk limit | [optional]
-**risk_limit_max** | **str** | Maximum risk limit the contract allowed | [optional]
-**order_size_min** | **int** | Minimum order size the contract allowed | [optional]
-**order_size_max** | **int** | Maximum order size the contract allowed | [optional]
-**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional]
-**ref_discount_rate** | **str** | Referral fee rate discount | [optional]
-**ref_rebate_rate** | **str** | Referrer commission rate | [optional]
-**orderbook_id** | **int** | Current orderbook ID | [optional]
+**risk_limit_base** | **str** | Base risk limit (deprecated) | [optional]
+**risk_limit_step** | **str** | Risk limit adjustment step (deprecated) | [optional]
+**risk_limit_max** | **str** | Maximum risk limit allowed by the contract (deprecated). It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits | [optional]
+**order_size_min** | **int** | Minimum order size allowed by the contract | [optional]
+**order_size_max** | **int** | Maximum order size allowed by the contract | [optional]
+**order_price_deviate** | **str** | Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional]
+**ref_discount_rate** | **str** | Trading fee discount for referred users | [optional]
+**ref_rebate_rate** | **str** | Commission rate for referrers | [optional]
+**orderbook_id** | **int** | Orderbook update ID | [optional]
**trade_id** | **int** | Current trade ID | [optional]
-**trade_size** | **int** | Historical accumulated trade size | [optional]
+**trade_size** | **int** | Historical cumulative trading volume | [optional]
**position_size** | **int** | Current total long position size | [optional]
-**config_change_time** | **float** | Last changed time of configuration | [optional]
-**in_delisting** | **bool** | Contract is delisting | [optional]
-**orders_limit** | **int** | Maximum number of open orders | [optional]
-**enable_bonus** | **bool** | Whether bouns is enabled | [optional]
+**config_change_time** | **float** | Last configuration update time | [optional]
+**in_delisting** | **bool** | `in_delisting=true` and position_size>0 indicates the contract is in delisting transition period `in_delisting=true` and position_size=0 indicates the contract is delisted | [optional]
+**orders_limit** | **int** | Maximum number of pending orders | [optional]
+**enable_bonus** | **bool** | Whether bonus is enabled | [optional]
**enable_credit** | **bool** | Whether portfolio margin account is enabled | [optional]
**create_time** | **float** | Created time of the contract | [optional]
+**funding_cap_ratio** | **str** | The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio | [optional]
+**status** | **str** | Contract status types include: prelaunch (pre-launch), trading (active), delisting (delisting), delisted (delisted), circuit_breaker (circuit breaker) | [optional]
+**launch_time** | **int** | Contract expiry timestamp | [optional]
+**delisting_time** | **int** | Timestamp when contract enters reduce-only state | [optional]
+**delisted_time** | **int** | Contract delisting time | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ContractStat.md b/docs/ContractStat.md
index c66586e..f20a520 100644
--- a/docs/ContractStat.md
+++ b/docs/ContractStat.md
@@ -4,18 +4,19 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time** | **int** | Stat timestamp | [optional]
-**lsr_taker** | **float** | Long/short account number ratio | [optional]
-**lsr_account** | **float** | Long/short taker size ratio | [optional]
-**long_liq_size** | **int** | Long liquidation size | [optional]
-**long_liq_amount** | **float** | Long liquidation amount(base currency) | [optional]
-**long_liq_usd** | **float** | Long liquidation volume(quote currency) | [optional]
-**short_liq_size** | **int** | Short liquidation size | [optional]
-**short_liq_amount** | **float** | Short liquidation amount(base currency) | [optional]
-**short_liq_usd** | **float** | Short liquidation volume(quote currency) | [optional]
-**open_interest** | **int** | Open interest size | [optional]
-**open_interest_usd** | **float** | Open interest volume(quote currency) | [optional]
+**lsr_taker** | **float** | Long/short taker ratio | [optional]
+**lsr_account** | **float** | Long/short position user ratio | [optional]
+**long_liq_size** | **int** | Long liquidation size (contracts) | [optional]
+**long_liq_amount** | **float** | Long liquidation amount (base currency) | [optional]
+**long_liq_usd** | **float** | Long liquidation volume (quote currency) | [optional]
+**short_liq_size** | **int** | Short liquidation size (contracts) | [optional]
+**short_liq_amount** | **float** | Short liquidation amount (base currency) | [optional]
+**short_liq_usd** | **float** | Short liquidation volume (quote currency) | [optional]
+**open_interest** | **int** | Total open interest size (contracts) | [optional]
+**open_interest_usd** | **float** | Total open interest volume (quote currency) | [optional]
**top_lsr_account** | **float** | Top trader long/short account ratio | [optional]
**top_lsr_size** | **float** | Top trader long/short position ratio | [optional]
+**mark_price** | **float** | Mark price | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ConvertSmallBalance.md b/docs/ConvertSmallBalance.md
new file mode 100644
index 0000000..e412efb
--- /dev/null
+++ b/docs/ConvertSmallBalance.md
@@ -0,0 +1,12 @@
+# ConvertSmallBalance
+
+Small Balance Conversion
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **list[str]** | Currency to be converted | [optional]
+**is_all** | **bool** | Whether to convert all | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CountdownCancelAllFuturesTask.md b/docs/CountdownCancelAllFuturesTask.md
index 9e05e8e..5cf1cd3 100644
--- a/docs/CountdownCancelAllFuturesTask.md
+++ b/docs/CountdownCancelAllFuturesTask.md
@@ -1,10 +1,10 @@
# CountdownCancelAllFuturesTask
-Countdown cancel task detail
+Countdown cancel task details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**timeout** | **int** | Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown |
+**timeout** | **int** | Countdown time in seconds At least 5 seconds, 0 means cancel countdown |
**contract** | **str** | Futures contract | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CountdownCancelAllOptionsTask.md b/docs/CountdownCancelAllOptionsTask.md
new file mode 100644
index 0000000..0f50bb0
--- /dev/null
+++ b/docs/CountdownCancelAllOptionsTask.md
@@ -0,0 +1,13 @@
+# CountdownCancelAllOptionsTask
+
+Countdown cancel task details
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**timeout** | **int** | Countdown time in seconds At least 5 seconds, 0 means cancel countdown |
+**contract** | **str** | Options contract name | [optional]
+**underlying** | **str** | Underlying | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CountdownCancelAllSpotTask.md b/docs/CountdownCancelAllSpotTask.md
index aaab8f8..49c09a8 100644
--- a/docs/CountdownCancelAllSpotTask.md
+++ b/docs/CountdownCancelAllSpotTask.md
@@ -1,10 +1,10 @@
# CountdownCancelAllSpotTask
-Countdown cancel task detail
+Countdown cancel task details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**timeout** | **int** | Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown |
+**timeout** | **int** | Countdown time in seconds At least 5 seconds, 0 means cancel countdown |
**currency_pair** | **str** | Currency pair | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CreateCollateralOrder.md b/docs/CreateCollateralOrder.md
index 8f751b0..41db4cc 100644
--- a/docs/CreateCollateralOrder.md
+++ b/docs/CreateCollateralOrder.md
@@ -3,10 +3,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**collateral_amount** | **str** | 质押数量 |
-**collateral_currency** | **str** | 质押币种 |
-**borrow_amount** | **str** | 借款数量 |
-**borrow_currency** | **str** | 借款币种 |
+**collateral_amount** | **str** | Collateral amount |
+**collateral_currency** | **str** | Collateral currency |
+**borrow_amount** | **str** | Borrowed amount |
+**borrow_currency** | **str** | Borrowed currency |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CreateMultiCollateralOrder.md b/docs/CreateMultiCollateralOrder.md
new file mode 100644
index 0000000..72aa727
--- /dev/null
+++ b/docs/CreateMultiCollateralOrder.md
@@ -0,0 +1,18 @@
+# CreateMultiCollateralOrder
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order_id** | **str** | Order ID | [optional]
+**order_type** | **str** | current - current rate, fixed - fixed rate, defaults to current if not specified | [optional]
+**fixed_type** | **str** | Fixed interest rate lending period: 7d - 7 days, 30d - 30 days. Required for fixed rate | [optional]
+**fixed_rate** | **str** | Fixed interest rate, required for fixed rate | [optional]
+**auto_renew** | **bool** | Fixed interest rate, auto-renewal | [optional]
+**auto_repay** | **bool** | Fixed interest rate, auto-repayment | [optional]
+**borrow_currency** | **str** | Borrowed currency |
+**borrow_amount** | **str** | Borrowed amount |
+**collateral_currencies** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral currency and amount | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CreatePortfolioSpotOrder.md b/docs/CreatePortfolioSpotOrder.md
deleted file mode 100644
index 61d99a8..0000000
--- a/docs/CreatePortfolioSpotOrder.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# CreatePortfolioSpotOrder
-
-Spot order details
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**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(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 | [optional]
-**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly]
-**currency_pair** | **str** | Currency pair |
-**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit']
-**side** | **str** | Order side |
-**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` |
-**price** | **str** | Price can't be empty when `type`= `limit` | [optional]
-**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 - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` | [optional] [default to 'gtc']
-**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional]
-**auto_borrow** | **bool** | When engaging in margin trading, if the account balance is insufficient, the system will automatically borrow the remaining amount to cover the deficit. | [optional]
-**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan. Default is disabled. Note that: `auto_borrow` and `auto_repay` cannot be both set to true in one order. | [optional]
-**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]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/CreateUniLend.md b/docs/CreateUniLend.md
index c17fc8e..8c9af5a 100644
--- a/docs/CreateUniLend.md
+++ b/docs/CreateUniLend.md
@@ -1,13 +1,13 @@
# CreateUniLend
-Lend or redeem
+Create lending or redemption
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Currency name |
-**amount** | **str** | The amount of currency could be lent |
-**type** | **str** | type: lend - lend, redeem - redeem |
-**min_rate** | **str** | The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. | [optional]
+**amount** | **str** | Amount to deposit into lending pool |
+**type** | **str** | Operation type: lend - Lend, redeem - Redeem |
+**min_rate** | **str** | Minimum interest rate. If set too high, lending may fail and no interest will be earned. Required for lending operations. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CreateUniLoan.md b/docs/CreateUniLoan.md
index a8f30e1..22ad9da 100644
--- a/docs/CreateUniLoan.md
+++ b/docs/CreateUniLoan.md
@@ -5,9 +5,9 @@ Borrow or repay
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Currency |
-**type** | **str** | type: borrow - borrow, repay - repay |
-**amount** | **str** | The amount of lending or repaying |
-**repaid_all** | **bool** | Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. | [optional]
+**type** | **str** | Type: `borrow` - borrow, `repay` - repay |
+**amount** | **str** | Borrow or repayment amount |
+**repaid_all** | **bool** | Full repayment. For repayment operations only. When `true`, overrides `amount` and repays the full amount | [optional]
**currency_pair** | **str** | Currency pair |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CrossMarginAccount.md b/docs/CrossMarginAccount.md
deleted file mode 100644
index 64dc282..0000000
--- a/docs/CrossMarginAccount.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# CrossMarginAccount
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**user_id** | **int** | User ID | [optional]
-**refresh_time** | **int** | Time of the most recent refresh | [optional]
-**locked** | **bool** | Whether account is locked | [optional]
-**balances** | [**dict(str, CrossMarginBalance)**](CrossMarginBalance.md) | | [optional]
-**total** | **str** | Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` | [optional]
-**borrowed** | **str** | Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` | [optional]
-**interest** | **str** | Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` | [optional]
-**risk** | **str** | Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` | [optional]
-**total_initial_margin** | **str** | Total initial margin | [optional]
-**total_margin_balance** | **str** | Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) | [optional]
-**total_maintenance_margin** | **str** | Total maintenance margin | [optional]
-**total_initial_margin_rate** | **str** | Total initial margin rate | [optional]
-**total_maintenance_margin_rate** | **str** | Total maintenance margin rate | [optional]
-**total_available_margin** | **str** | Total available margin | [optional]
-**portfolio_margin_total** | **str** | Total amount of the portfolio margin account | [optional]
-**portfolio_margin_total_liab** | **str** | Total liabilities of the portfolio margin account | [optional]
-**portfolio_margin_total_equity** | **str** | Total equity of the portfolio margin account | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/CrossMarginAccountBook.md b/docs/CrossMarginAccountBook.md
deleted file mode 100644
index d02b52f..0000000
--- a/docs/CrossMarginAccountBook.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# CrossMarginAccountBook
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | **str** | Balance change record ID | [optional]
-**time** | **int** | The timestamp of the change (in milliseconds) | [optional]
-**currency** | **str** | Currency changed | [optional]
-**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional]
-**balance** | **str** | Balance after change | [optional]
-**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/CrossMarginBalance.md b/docs/CrossMarginBalance.md
index 275fa85..f4ccc54 100644
--- a/docs/CrossMarginBalance.md
+++ b/docs/CrossMarginBalance.md
@@ -3,15 +3,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**available** | **str** | Available amount | [optional]
-**freeze** | **str** | Locked amount | [optional]
-**borrowed** | **str** | Borrowed amount | [optional]
-**interest** | **str** | Unpaid interests | [optional]
-**negative_liab** | **str** | Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] | [optional]
-**futures_pos_liab** | **str** | Borrowing to Open Positions in Futures | [optional]
-**equity** | **str** | Equity. Formula: available + freeze - borrowed + futures account's total + unrealized_pnl | [optional]
-**total_freeze** | **str** | Total freeze. Formula: freeze + position_initial_margin + order_margin | [optional]
-**total_liab** | **str** | Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab | [optional]
+**available** | **str** | Available balance | [optional]
+**freeze** | **str** | Locked balance | [optional]
+**borrowed** | **str** | Borrowed balance | [optional]
+**interest** | **str** | Unpaid interest | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CrossMarginCurrency.md b/docs/CrossMarginCurrency.md
deleted file mode 100644
index c768a5e..0000000
--- a/docs/CrossMarginCurrency.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# CrossMarginCurrency
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**name** | **str** | Currency name | [optional]
-**rate** | **str** | Minimum lending rate (hourly rate) | [optional]
-**prec** | **str** | Currency precision | [optional]
-**discount** | **str** | Currency value discount, which is used in total value calculation | [optional]
-**min_borrow_amount** | **str** | Minimum currency borrow amount. Unit is currency itself | [optional]
-**user_max_borrow_amount** | **str** | Maximum borrow value allowed per user, in USDT | [optional]
-**total_max_borrow_amount** | **str** | Maximum borrow value allowed for this currency, in USDT | [optional]
-**price** | **str** | Price change between this currency and USDT | [optional]
-**status** | **int** | status - `0` : disable - `1` : enable | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/CrossMarginLoan.md b/docs/CrossMarginLoan.md
index f3f8012..662a94c 100644
--- a/docs/CrossMarginLoan.md
+++ b/docs/CrossMarginLoan.md
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
**status** | **int** | Deprecated. Currently, all statuses have been set to 2. Borrow loan status, which includes: - 1: failed to borrow - 2: borrowed but not repaid - 3: repayment complete | [optional] [readonly]
**repaid** | **str** | Repaid amount | [optional] [readonly]
**repaid_interest** | **str** | Repaid interest | [optional] [readonly]
-**unpaid_interest** | **str** | Outstanding interest yet to be paid | [optional] [readonly]
+**unpaid_interest** | **str** | Unpaid interest | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CrossMarginRepayment.md b/docs/CrossMarginRepayment.md
index 3ceca3c..3997879 100644
--- a/docs/CrossMarginRepayment.md
+++ b/docs/CrossMarginRepayment.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**currency** | **str** | Currency name | [optional]
**principal** | **str** | Repaid principal | [optional]
**interest** | **str** | Repaid interest | [optional]
-**repayment_type** | **str** | 还款类型 , none - 无还款类型, manual_repay - 手动还款 , auto_repay - 自动还款, cancel_auto_repay - 撤单后自动还款 | [optional] [readonly]
+**repayment_type** | **str** | Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment after cancellation | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/Currency.md b/docs/Currency.md
index 84ed666..27e0400 100644
--- a/docs/Currency.md
+++ b/docs/Currency.md
@@ -3,14 +3,16 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**currency** | **str** | Currency name | [optional]
+**currency** | **str** | Currency symbol | [optional]
+**name** | **str** | Currency name | [optional]
**delisted** | **bool** | Whether currency is de-listed | [optional]
-**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled | [optional]
-**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed | [optional]
-**deposit_disabled** | **bool** | Whether currency's deposit is disabled | [optional]
+**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled (deprecated) | [optional]
+**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed (deprecated) | [optional]
+**deposit_disabled** | **bool** | Whether currency's deposit is disabled (deprecated) | [optional]
**trade_disabled** | **bool** | Whether currency's trading is disabled | [optional]
**fixed_rate** | **str** | Fixed fee rate. Only for fixed rate currencies, not valid for normal currencies | [optional]
-**chain** | **str** | Chain of currency | [optional]
+**chain** | **str** | The main chain corresponding to the coin | [optional]
+**chains** | [**list[SpotCurrencyChain]**](SpotCurrencyChain.md) | All links corresponding to coins | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CurrencyChain.md b/docs/CurrencyChain.md
index a5fc250..90a4984 100644
--- a/docs/CurrencyChain.md
+++ b/docs/CurrencyChain.md
@@ -6,10 +6,11 @@ Name | Type | Description | Notes
**chain** | **str** | Chain name | [optional]
**name_cn** | **str** | Chain name in Chinese | [optional]
**name_en** | **str** | Chain name in English | [optional]
-**contract_address** | **str** | 币种智能合约地址,如果没有地址则为空字串 | [optional]
+**contract_address** | **str** | Smart contract address for the currency; if no address is available, it will be an empty string | [optional]
**is_disabled** | **int** | If it is disabled. 0 means NOT being disabled | [optional]
-**is_deposit_disabled** | **int** | Is deposit disabled. 0 means not | [optional]
-**is_withdraw_disabled** | **int** | Is withdrawal disabled. 0 means not | [optional]
+**is_deposit_disabled** | **int** | Is deposit disabled. 0 means not disabled | [optional]
+**is_withdraw_disabled** | **int** | Is withdrawal disabled. 0 means not disabled | [optional]
+**decimal** | **str** | Withdrawal precision | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CurrencyPair.md b/docs/CurrencyPair.md
index 19d4e7b..3f5f39f 100644
--- a/docs/CurrencyPair.md
+++ b/docs/CurrencyPair.md
@@ -6,15 +6,23 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Currency pair | [optional]
**base** | **str** | Base currency | [optional]
+**base_name** | **str** | Base currency name | [optional]
**quote** | **str** | Quote currency | [optional]
-**fee** | **str** | Trading fee | [optional]
+**quote_name** | **str** | Quote currency name | [optional]
+**fee** | **str** | Trading fee rate | [optional]
**min_base_amount** | **str** | Minimum amount of base currency to trade, `null` means no limit | [optional]
**min_quote_amount** | **str** | Minimum amount of quote currency to trade, `null` means no limit | [optional]
+**max_base_amount** | **str** | Maximum amount of base currency to trade, `null` means no limit | [optional]
+**max_quote_amount** | **str** | Maximum amount of quote currency to trade, `null` means no limit | [optional]
**amount_precision** | **int** | Amount scale | [optional]
**precision** | **int** | Price scale | [optional]
-**trade_status** | **str** | How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: can be bought or sold | [optional]
+**trade_status** | **str** | Trading status - untradable: cannot be traded - buyable: can be bought - sellable: can be sold - tradable: can be bought and sold | [optional]
**sell_start** | **int** | Sell start unix timestamp in seconds | [optional]
**buy_start** | **int** | Buy start unix timestamp in seconds | [optional]
+**delisting_time** | **int** | Expected time to remove the shelves, Unix timestamp in seconds | [optional]
+**type** | **str** | Trading pair type, normal: normal, premarket: pre-market | [optional]
+**trade_url** | **str** | Transaction link | [optional]
+**st_tag** | **bool** | Whether the trading pair is in ST risk assessment, false - No, true - Yes | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CurrencyQuota.md b/docs/CurrencyQuota.md
new file mode 100644
index 0000000..656a6a8
--- /dev/null
+++ b/docs/CurrencyQuota.md
@@ -0,0 +1,15 @@
+# CurrencyQuota
+
+Currency Quota
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional]
+**index_price** | **str** | Currency Index Price | [optional]
+**min_quota** | **str** | Minimum borrowing/collateral limit for the currency | [optional]
+**left_quota** | **str** | Remaining borrowing/collateral quota for the currency | [optional]
+**left_quote_usdt** | **str** | Remaining currency limit converted to USDT | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PortfolioMode.md b/docs/DebitFee.md
similarity index 66%
rename from docs/PortfolioMode.md
rename to docs/DebitFee.md
index 9d6074a..98d0744 100644
--- a/docs/PortfolioMode.md
+++ b/docs/DebitFee.md
@@ -1,10 +1,9 @@
-# PortfolioMode
+# DebitFee
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**mode** | **str** | 保证金模式 - cross_margin : 现货全仓保证金 |
-**enabled** | **bool** | 是否启用 |
+**enabled** | **bool** | Whether GT fee deduction is enabled |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/DeliveryApi.md b/docs/DeliveryApi.md
index cb002e9..88ac2c5 100644
--- a/docs/DeliveryApi.md
+++ b/docs/DeliveryApi.md
@@ -4,40 +4,41 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**list_delivery_contracts**](DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | List all futures contracts
-[**get_delivery_contract**](DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract
-[**list_delivery_order_book**](DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Futures order book
-[**list_delivery_trades**](DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures trading history
-[**list_delivery_candlesticks**](DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Get futures candlesticks
-[**list_delivery_tickers**](DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | List futures tickers
-[**list_delivery_insurance_ledger**](DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures insurance balance history
-[**list_delivery_accounts**](DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Query futures account
-[**list_delivery_account_book**](DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query account book
-[**list_delivery_positions**](DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | List all positions of a user
-[**get_delivery_position**](DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position
+[**list_delivery_contracts**](DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | Query all futures contracts
+[**get_delivery_contract**](DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Query single contract information
+[**list_delivery_order_book**](DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Query futures market depth information
+[**list_delivery_trades**](DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures market transaction records
+[**list_delivery_candlesticks**](DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Futures market K-line chart
+[**list_delivery_tickers**](DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | Get all futures trading statistics
+[**list_delivery_insurance_ledger**](DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures market insurance fund history
+[**list_delivery_accounts**](DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Get futures account
+[**list_delivery_account_book**](DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query futures account change history
+[**list_delivery_positions**](DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | Get user position list
+[**get_delivery_position**](DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position information
[**update_delivery_position_margin**](DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin
[**update_delivery_position_leverage**](DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage
[**update_delivery_position_risk_limit**](DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit
-[**list_delivery_orders**](DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | List futures orders
-[**create_delivery_order**](DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Create a futures order
-[**cancel_delivery_orders**](DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all `open` orders matched
-[**get_delivery_order**](DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Get a single order
-[**cancel_delivery_order**](DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel a single order
-[**get_my_delivery_trades**](DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | List personal trading history
-[**list_delivery_position_close**](DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | List position close history
-[**list_delivery_liquidates**](DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | List liquidation history
-[**list_delivery_settlements**](DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | List settlement history
-[**list_price_triggered_delivery_orders**](DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | List all auto orders
-[**create_price_triggered_delivery_order**](DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create a price-triggered order
-[**cancel_price_triggered_delivery_order_list**](DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel all open orders
-[**get_price_triggered_delivery_order**](DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order
-[**cancel_price_triggered_delivery_order**](DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order
+[**list_delivery_orders**](DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | Query futures order list
+[**create_delivery_order**](DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Place futures order
+[**cancel_delivery_orders**](DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all orders with 'open' status
+[**get_delivery_order**](DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Query single order details
+[**cancel_delivery_order**](DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel single order
+[**get_my_delivery_trades**](DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | Query personal trading records
+[**list_delivery_position_close**](DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | Query position close history
+[**list_delivery_liquidates**](DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | Query liquidation history
+[**list_delivery_settlements**](DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | Query settlement records
+[**list_delivery_risk_limit_tiers**](DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | Query risk limit tiers
+[**list_price_triggered_delivery_orders**](DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | Query auto order list
+[**create_price_triggered_delivery_order**](DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create price-triggered order
+[**cancel_price_triggered_delivery_order_list**](DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel all auto orders
+[**get_price_triggered_delivery_order**](DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Query single auto order details
+[**cancel_price_triggered_delivery_order**](DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | Cancel single auto order
# **list_delivery_contracts**
> list[DeliveryContract] list_delivery_contracts(settle)
-List all futures contracts
+Query all futures contracts
### Example
@@ -57,7 +58,7 @@ api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
try:
- # List all futures contracts
+ # Query all futures contracts
api_response = api_instance.list_delivery_contracts(settle)
print(api_response)
except GateApiException as ex:
@@ -88,14 +89,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **get_delivery_contract**
> DeliveryContract get_delivery_contract(settle, contract)
-Get a single contract
+Query single contract information
### Example
@@ -116,7 +117,7 @@ settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT_20200814' # str | Futures contract
try:
- # Get a single contract
+ # Query single contract information
api_response = api_instance.get_delivery_contract(settle, contract)
print(api_response)
except GateApiException as ex:
@@ -155,7 +156,7 @@ No authorization required
# **list_delivery_order_book**
> FuturesOrderBook list_delivery_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id)
-Futures order book
+Query futures market depth information
Bids will be sorted by price from high to low, while asks sorted reversely
@@ -176,12 +177,12 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT_20200814' # str | Futures contract
-interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0')
-limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10)
-with_id = False # bool | Whether the order book update ID will be returned. This ID increases by 1 on every order book update (optional) (default to False)
+interval = '0' # str | Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified (optional) (default to '0')
+limit = 10 # int | Number of depth levels (optional) (default to 10)
+with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time depth changes (optional) (default to False)
try:
- # Futures order book
+ # Query futures market depth information
api_response = api_instance.list_delivery_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id)
print(api_response)
except GateApiException as ex:
@@ -196,9 +197,9 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0']
- **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10]
- **with_id** | **bool**| Whether the order book update ID will be returned. This ID increases by 1 on every order book update | [optional] [default to False]
+ **interval** | **str**| Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified | [optional] [default to '0']
+ **limit** | **int**| Number of depth levels | [optional] [default to 10]
+ **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time depth changes | [optional] [default to False]
### Return type
@@ -216,14 +217,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Order book retrieved | - |
+**200** | Depth query successful | - |
[[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)
# **list_delivery_trades**
> list[FuturesTrade] list_delivery_trades(settle, contract, limit=limit, last_id=last_id, _from=_from, to=to)
-Futures trading history
+Futures market transaction records
### Example
@@ -242,13 +243,13 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT_20200814' # str | Futures contract
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+last_id = '12345' # str | Use the ID of the last record in the previous list as the starting point for the next list.This field is no longer supported. For new requests, please use the fromand tofields to specify the time rang (optional)
_from = 1546905600 # int | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional)
-to = 1546935600 # int | Specify end time in Unix seconds, default to current time (optional)
+to = 1546935600 # int | Specify end time in Unix seconds, default to current time. (optional)
try:
- # Futures trading history
+ # Futures market transaction records
api_response = api_instance.list_delivery_trades(settle, contract, limit=limit, last_id=last_id, _from=_from, to=to)
print(api_response)
except GateApiException as ex:
@@ -263,10 +264,10 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **last_id** | **str**| Use the ID of the last record in the previous list as the starting point for the next list.This field is no longer supported. For new requests, please use the fromand tofields to specify the time rang | [optional]
**_from** | **int**| Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. | [optional]
- **to** | **int**| Specify end time in Unix seconds, default to current time | [optional]
+ **to** | **int**| Specify end time in Unix seconds, default to current time. | [optional]
### Return type
@@ -284,14 +285,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_delivery_candlesticks**
> list[DeliveryCandlestick] list_delivery_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval)
-Get futures candlesticks
+Futures market K-line chart
Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval`
@@ -312,13 +313,13 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT_20200814' # str | Futures contract
-_from = 1546905600 # int | 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间 (optional)
-to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional)
-limit = 100 # int | 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝 (optional) (default to 100)
-interval = '5m' # str | Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0 (optional) (default to '5m')
+_from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional)
+to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision (optional)
+limit = 100 # int | Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100)
+interval = '5m' # str | Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial time (optional) (default to '5m')
try:
- # Get futures candlesticks
+ # Futures market K-line chart
api_response = api_instance.list_delivery_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval)
print(api_response)
except GateApiException as ex:
@@ -333,10 +334,10 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **_from** | **int**| 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间 | [optional]
- **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional]
- **limit** | **int**| 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝 | [optional] [default to 100]
- **interval** | **str**| Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0 | [optional] [default to '5m']
+ **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional]
+ **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision | [optional]
+ **limit** | **int**| Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100]
+ **interval** | **str**| Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial time | [optional] [default to '5m']
### Return type
@@ -354,14 +355,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_delivery_tickers**
-> list[FuturesTicker] list_delivery_tickers(settle, contract=contract)
+> list[DeliveryTicker] list_delivery_tickers(settle, contract=contract)
-List futures tickers
+Get all futures trading statistics
### Example
@@ -382,7 +383,7 @@ settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT_20200814' # str | Futures contract (optional)
try:
- # List futures tickers
+ # Get all futures trading statistics
api_response = api_instance.list_delivery_tickers(settle, contract=contract)
print(api_response)
except GateApiException as ex:
@@ -400,7 +401,7 @@ Name | Type | Description | Notes
### Return type
-[**list[FuturesTicker]**](FuturesTicker.md)
+[**list[DeliveryTicker]**](DeliveryTicker.md)
### Authorization
@@ -414,14 +415,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_delivery_insurance_ledger**
> list[InsuranceRecord] list_delivery_insurance_ledger(settle, limit=limit)
-Futures insurance balance history
+Futures market insurance fund history
### Example
@@ -439,10 +440,10 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
try:
- # Futures insurance balance history
+ # Futures market insurance fund history
api_response = api_instance.list_delivery_insurance_ledger(settle, limit=limit)
print(api_response)
except GateApiException as ex:
@@ -456,7 +457,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
### Return type
@@ -474,14 +475,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_delivery_accounts**
> FuturesAccount list_delivery_accounts(settle)
-Query futures account
+Get futures account
### Example
@@ -510,7 +511,7 @@ api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
try:
- # Query futures account
+ # Get futures account
api_response = api_instance.list_delivery_accounts(settle)
print(api_response)
except GateApiException as ex:
@@ -541,14 +542,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_delivery_account_book**
> list[FuturesAccountBook] list_delivery_account_book(settle, limit=limit, _from=_from, to=to, type=type)
-Query account book
+Query futures account change history
### Example
@@ -575,13 +576,13 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
-type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
+type = 'dnw' # str | Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates (optional)
try:
- # Query account book
+ # Query futures account change history
api_response = api_instance.list_delivery_account_book(settle, limit=limit, _from=_from, to=to, type=type)
print(api_response)
except GateApiException as ex:
@@ -595,10 +596,10 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
- **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
+ **type** | **str**| Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates | [optional]
### Return type
@@ -616,14 +617,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_delivery_positions**
> list[Position] list_delivery_positions(settle)
-List all positions of a user
+Get user position list
### Example
@@ -652,7 +653,7 @@ api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
try:
- # List all positions of a user
+ # Get user position list
api_response = api_instance.list_delivery_positions(settle)
print(api_response)
except GateApiException as ex:
@@ -683,14 +684,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **get_delivery_position**
> Position get_delivery_position(settle, contract)
-Get single position
+Get single position information
### Example
@@ -720,7 +721,7 @@ settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT_20200814' # str | Futures contract
try:
- # Get single position
+ # Get single position information
api_response = api_instance.get_delivery_position(settle, contract)
print(api_response)
except GateApiException as ex:
@@ -787,7 +788,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT_20200814' # str | Futures contract
-change = '0.01' # str | Margin change. Use positive number to increase margin, negative number otherwise.
+change = '0.01' # str | Margin change amount, positive number increases, negative number decreases
try:
# Update position margin
@@ -805,7 +806,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **change** | **str**| Margin change. Use positive number to increase margin, negative number otherwise. |
+ **change** | **str**| Margin change amount, positive number increases, negative number decreases |
### Return type
@@ -972,9 +973,9 @@ Name | Type | Description | Notes
# **list_delivery_orders**
> list[FuturesOrder] list_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id, count_total=count_total)
-List futures orders
+Query futures order list
-Zero-filled order cannot be retrieved 10 minutes after order cancellation
+Zero-fill orders cannot be retrieved 10 minutes after order cancellation
### Example
@@ -1001,15 +1002,15 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
-status = 'open' # str | Only list the orders with this status
+status = 'open' # str | Query order list based on status
contract = 'BTC_USDT_20200814' # str | Futures contract (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
-last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional)
-count_total = 0 # int | Whether to return total number matched. Default to 0(no return) (optional) (default to 0)
+last_id = '12345' # str | Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used (optional)
+count_total = 0 # int | Whether to return total number matched, defaults to 0 (no return) (optional) (default to 0)
try:
- # List futures orders
+ # Query futures order list
api_response = api_instance.list_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id, count_total=count_total)
print(api_response)
except GateApiException as ex:
@@ -1023,12 +1024,12 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **status** | **str**| Only list the orders with this status |
+ **status** | **str**| Query order list based on status |
**contract** | **str**| Futures contract | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
- **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional]
- **count_total** | **int**| Whether to return total number matched. Default to 0(no return) | [optional] [default to 0]
+ **last_id** | **str**| Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used | [optional]
+ **count_total** | **int**| Whether to return total number matched, defaults to 0 (no return) | [optional] [default to 0]
### Return type
@@ -1046,16 +1047,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
* X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1
|
+**200** | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination
* X-Pagination-Offset - Offset specified for pagination
* X-Pagination-Total - Total number matched, only returned if `count_total` is set to 1
|
[[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)
# **create_delivery_order**
> FuturesOrder create_delivery_order(settle, futures_order)
-Create a futures order
+Place futures order
-Zero-filled order cannot be retrieved 10 minutes after order cancellation
+Zero-fill orders cannot be retrieved 10 minutes after order cancellation
### Example
@@ -1085,7 +1086,7 @@ settle = 'usdt' # str | Settle currency
futures_order = gate_api.FuturesOrder() # FuturesOrder |
try:
- # Create a futures order
+ # Place futures order
api_response = api_instance.create_delivery_order(settle, futures_order)
print(api_response)
except GateApiException as ex:
@@ -1124,9 +1125,9 @@ Name | Type | Description | Notes
# **cancel_delivery_orders**
> list[FuturesOrder] cancel_delivery_orders(settle, contract, side=side)
-Cancel all `open` orders matched
+Cancel all orders with 'open' status
-Zero-filled order cannot be retrieved 10 minutes after order cancellation
+Zero-fill orders cannot be retrieved 10 minutes after order cancellation
### Example
@@ -1154,10 +1155,10 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT_20200814' # str | Futures contract
-side = 'ask' # str | All bids or asks. Both included if not specified (optional)
+side = 'ask' # str | Specify all bids or all asks, both included if not specified (optional)
try:
- # Cancel all `open` orders matched
+ # Cancel all orders with 'open' status
api_response = api_instance.cancel_delivery_orders(settle, contract, side=side)
print(api_response)
except GateApiException as ex:
@@ -1172,7 +1173,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **side** | **str**| All bids or asks. Both included if not specified | [optional]
+ **side** | **str**| Specify all bids or all asks, both included if not specified | [optional]
### Return type
@@ -1190,16 +1191,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | All orders matched cancelled | - |
+**200** | Batch cancellation successful | - |
[[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)
# **get_delivery_order**
> FuturesOrder get_delivery_order(settle, order_id)
-Get a single order
+Query single order details
-Zero-filled order cannot be retrieved 10 minutes after order cancellation
+Zero-fill orders cannot be retrieved 10 minutes after order cancellation
### Example
@@ -1226,10 +1227,10 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
-order_id = '12345' # str | Retrieve the data of the order with the specified ID
+order_id = '12345' # str | ID returned when order is successfully created
try:
- # Get a single order
+ # Query single order details
api_response = api_instance.get_delivery_order(settle, order_id)
print(api_response)
except GateApiException as ex:
@@ -1243,7 +1244,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **order_id** | **str**| Retrieve the data of the order with the specified ID |
+ **order_id** | **str**| ID returned when order is successfully created |
### Return type
@@ -1268,7 +1269,7 @@ Name | Type | Description | Notes
# **cancel_delivery_order**
> FuturesOrder cancel_delivery_order(settle, order_id)
-Cancel a single order
+Cancel single order
### Example
@@ -1295,10 +1296,10 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
-order_id = '12345' # str | Retrieve the data of the order with the specified ID
+order_id = '12345' # str | ID returned when order is successfully created
try:
- # Cancel a single order
+ # Cancel single order
api_response = api_instance.cancel_delivery_order(settle, order_id)
print(api_response)
except GateApiException as ex:
@@ -1312,7 +1313,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **order_id** | **str**| Retrieve the data of the order with the specified ID |
+ **order_id** | **str**| ID returned when order is successfully created |
### Return type
@@ -1337,7 +1338,7 @@ Name | Type | Description | Notes
# **get_my_delivery_trades**
> list[MyFuturesTrade] get_my_delivery_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id, count_total=count_total)
-List personal trading history
+Query personal trading records
### Example
@@ -1366,13 +1367,13 @@ api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT_20200814' # str | Futures contract (optional)
order = 12345 # int | Futures order ID, return related data only if specified (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
-last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional)
-count_total = 0 # int | Whether to return total number matched. Default to 0(no return) (optional) (default to 0)
+last_id = '12345' # str | Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used (optional)
+count_total = 0 # int | Whether to return total number matched, defaults to 0 (no return) (optional) (default to 0)
try:
- # List personal trading history
+ # Query personal trading records
api_response = api_instance.get_my_delivery_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id, count_total=count_total)
print(api_response)
except GateApiException as ex:
@@ -1388,10 +1389,10 @@ Name | Type | Description | Notes
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract | [optional]
**order** | **int**| Futures order ID, return related data only if specified | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
- **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional]
- **count_total** | **int**| Whether to return total number matched. Default to 0(no return) | [optional] [default to 0]
+ **last_id** | **str**| Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used | [optional]
+ **count_total** | **int**| Whether to return total number matched, defaults to 0 (no return) | [optional] [default to 0]
### Return type
@@ -1409,14 +1410,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
* X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1
|
+**200** | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination
* X-Pagination-Offset - Offset specified for pagination
* X-Pagination-Total - Total number matched, only returned if `count_total` is set to 1
|
[[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)
# **list_delivery_position_close**
> list[PositionClose] list_delivery_position_close(settle, contract=contract, limit=limit)
-List position close history
+Query position close history
### Example
@@ -1444,10 +1445,10 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT_20200814' # str | Futures contract (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
try:
- # List position close history
+ # Query position close history
api_response = api_instance.list_delivery_position_close(settle, contract=contract, limit=limit)
print(api_response)
except GateApiException as ex:
@@ -1462,7 +1463,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
### Return type
@@ -1480,14 +1481,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_delivery_liquidates**
> list[FuturesLiquidate] list_delivery_liquidates(settle, contract=contract, limit=limit, at=at)
-List liquidation history
+Query liquidation history
### Example
@@ -1515,11 +1516,11 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT_20200814' # str | Futures contract (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-at = 0 # int | Specify a liquidation timestamp (optional) (default to 0)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+at = 0 # int | Specify liquidation timestamp (optional) (default to 0)
try:
- # List liquidation history
+ # Query liquidation history
api_response = api_instance.list_delivery_liquidates(settle, contract=contract, limit=limit, at=at)
print(api_response)
except GateApiException as ex:
@@ -1534,8 +1535,8 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **at** | **int**| Specify a liquidation timestamp | [optional] [default to 0]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **at** | **int**| Specify liquidation timestamp | [optional] [default to 0]
### Return type
@@ -1553,14 +1554,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_delivery_settlements**
> list[DeliverySettlement] list_delivery_settlements(settle, contract=contract, limit=limit, at=at)
-List settlement history
+Query settlement records
### Example
@@ -1588,11 +1589,11 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT_20200814' # str | Futures contract (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-at = 0 # int | Specify a settlement timestamp (optional) (default to 0)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+at = 0 # int | Specify settlement timestamp (optional) (default to 0)
try:
- # List settlement history
+ # Query settlement records
api_response = api_instance.list_delivery_settlements(settle, contract=contract, limit=limit, at=at)
print(api_response)
except GateApiException as ex:
@@ -1607,8 +1608,8 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **at** | **int**| Specify a settlement timestamp | [optional] [default to 0]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **at** | **int**| Specify settlement timestamp | [optional] [default to 0]
### Return type
@@ -1626,14 +1627,80 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
+
+[[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)
+
+# **list_delivery_risk_limit_tiers**
+> list[FuturesLimitRiskTiers] list_delivery_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset)
+
+Query risk limit tiers
+
+When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty.
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.DeliveryApi(api_client)
+settle = 'usdt' # str | Settle currency
+contract = 'BTC_USDT_20200814' # str | Futures contract (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
+
+try:
+ # Query risk limit tiers
+ api_response = api_instance.list_delivery_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling DeliveryApi->list_delivery_risk_limit_tiers: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **settle** | **str**| Settle currency |
+ **contract** | **str**| Futures contract | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
+
+### Return type
+
+[**list[FuturesLimitRiskTiers]**](FuturesLimitRiskTiers.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
[[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)
# **list_price_triggered_delivery_orders**
> list[FuturesPriceTriggeredOrder] list_price_triggered_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset)
-List all auto orders
+Query auto order list
### Example
@@ -1660,13 +1727,13 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
-status = 'status_example' # str | Only list the orders with this status
+status = 'status_example' # str | Query order list based on status
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
try:
- # List all auto orders
+ # Query auto order list
api_response = api_instance.list_price_triggered_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset)
print(api_response)
except GateApiException as ex:
@@ -1680,9 +1747,9 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **status** | **str**| Only list the orders with this status |
+ **status** | **str**| Query order list based on status |
**contract** | **str**| Futures contract, return related data only if specified | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
### Return type
@@ -1701,14 +1768,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **create_price_triggered_delivery_order**
> TriggerOrderResponse create_price_triggered_delivery_order(settle, futures_price_triggered_order)
-Create a price-triggered order
+Create price-triggered order
### Example
@@ -1738,7 +1805,7 @@ settle = 'usdt' # str | Settle currency
futures_price_triggered_order = gate_api.FuturesPriceTriggeredOrder() # FuturesPriceTriggeredOrder |
try:
- # Create a price-triggered order
+ # Create price-triggered order
api_response = api_instance.create_price_triggered_delivery_order(settle, futures_price_triggered_order)
print(api_response)
except GateApiException as ex:
@@ -1770,14 +1837,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**201** | Order created | - |
+**201** | Order created successfully | - |
[[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)
# **cancel_price_triggered_delivery_order_list**
> list[FuturesPriceTriggeredOrder] cancel_price_triggered_delivery_order_list(settle, contract)
-Cancel all open orders
+Cancel all auto orders
### Example
@@ -1807,7 +1874,7 @@ settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
try:
- # Cancel all open orders
+ # Cancel all auto orders
api_response = api_instance.cancel_price_triggered_delivery_order_list(settle, contract)
print(api_response)
except GateApiException as ex:
@@ -1839,14 +1906,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Batch cancellation request accepted. Query order status by listing orders | - |
+**200** | Batch cancellation request accepted and processed, success determined by order list | - |
[[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)
# **get_price_triggered_delivery_order**
> FuturesPriceTriggeredOrder get_price_triggered_delivery_order(settle, order_id)
-Get a price-triggered order
+Query single auto order details
### Example
@@ -1873,10 +1940,10 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
-order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID
+order_id = 'order_id_example' # str | ID returned when order is successfully created
try:
- # Get a price-triggered order
+ # Query single auto order details
api_response = api_instance.get_price_triggered_delivery_order(settle, order_id)
print(api_response)
except GateApiException as ex:
@@ -1890,7 +1957,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **order_id** | **str**| Retrieve the data of the order with the specified ID |
+ **order_id** | **str**| ID returned when order is successfully created |
### Return type
@@ -1908,14 +1975,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Auto order detail | - |
+**200** | Auto order details | - |
[[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)
# **cancel_price_triggered_delivery_order**
> FuturesPriceTriggeredOrder cancel_price_triggered_delivery_order(settle, order_id)
-cancel a price-triggered order
+Cancel single auto order
### Example
@@ -1942,10 +2009,10 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.DeliveryApi(api_client)
settle = 'usdt' # str | Settle currency
-order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID
+order_id = 'order_id_example' # str | ID returned when order is successfully created
try:
- # cancel a price-triggered order
+ # Cancel single auto order
api_response = api_instance.cancel_price_triggered_delivery_order(settle, order_id)
print(api_response)
except GateApiException as ex:
@@ -1959,7 +2026,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **order_id** | **str**| Retrieve the data of the order with the specified ID |
+ **order_id** | **str**| ID returned when order is successfully created |
### Return type
@@ -1977,7 +2044,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Auto order detail | - |
+**200** | Auto order details | - |
[[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)
diff --git a/docs/DeliveryContract.md b/docs/DeliveryContract.md
index 069eb7b..9675b71 100644
--- a/docs/DeliveryContract.md
+++ b/docs/DeliveryContract.md
@@ -7,16 +7,16 @@ Name | Type | Description | Notes
**name** | **str** | Futures contract | [optional]
**underlying** | **str** | Underlying | [optional]
**cycle** | **str** | Cycle type, e.g. WEEKLY, QUARTERLY | [optional]
-**type** | **str** | Futures contract type | [optional]
+**type** | **str** | Contract type: inverse - inverse contract, direct - direct contract | [optional]
**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional]
**leverage_min** | **str** | Minimum leverage | [optional]
**leverage_max** | **str** | Maximum leverage | [optional]
**maintenance_rate** | **str** | Maintenance rate of margin | [optional]
-**mark_type** | **str** | Mark price type, internal - based on internal trading, index - based on external index price | [optional]
+**mark_type** | **str** | Mark price type: internal - internal trading price, index - external index price | [optional]
**mark_price** | **str** | Current mark price | [optional]
**index_price** | **str** | Current index price | [optional]
**last_price** | **str** | Last trading price | [optional]
-**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate | [optional]
+**maker_fee_rate** | **str** | Maker fee rate, negative values indicate rebates | [optional]
**taker_fee_rate** | **str** | Taker fee rate | [optional]
**order_price_round** | **str** | Minimum order price increment | [optional]
**mark_price_round** | **str** | Minimum mark price increment | [optional]
@@ -30,18 +30,18 @@ Name | Type | Description | Notes
**risk_limit_base** | **str** | Risk limit base | [optional]
**risk_limit_step** | **str** | Step of adjusting risk limit | [optional]
**risk_limit_max** | **str** | Maximum risk limit the contract allowed | [optional]
-**order_size_min** | **int** | Minimum order size the contract allowed | [optional]
-**order_size_max** | **int** | Maximum order size the contract allowed | [optional]
-**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional]
-**ref_discount_rate** | **str** | Referral fee rate discount | [optional]
-**ref_rebate_rate** | **str** | Referrer commission rate | [optional]
-**orderbook_id** | **int** | Current orderbook ID | [optional]
+**order_size_min** | **int** | Minimum order size allowed by the contract | [optional]
+**order_size_max** | **int** | Maximum order size allowed by the contract | [optional]
+**order_price_deviate** | **str** | Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional]
+**ref_discount_rate** | **str** | Trading fee discount for referred users | [optional]
+**ref_rebate_rate** | **str** | Commission rate for referrers | [optional]
+**orderbook_id** | **int** | Orderbook update ID | [optional]
**trade_id** | **int** | Current trade ID | [optional]
-**trade_size** | **int** | Historical accumulated trade size | [optional]
+**trade_size** | **int** | Historical cumulative trading volume | [optional]
**position_size** | **int** | Current total long position size | [optional]
-**config_change_time** | **float** | Last changed time of configuration | [optional]
+**config_change_time** | **float** | Last configuration update time | [optional]
**in_delisting** | **bool** | Contract is delisting | [optional]
-**orders_limit** | **int** | Maximum number of open orders | [optional]
+**orders_limit** | **int** | Maximum number of pending orders | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/DeliveryTicker.md b/docs/DeliveryTicker.md
new file mode 100644
index 0000000..b8de016
--- /dev/null
+++ b/docs/DeliveryTicker.md
@@ -0,0 +1,32 @@
+# DeliveryTicker
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**contract** | **str** | Futures contract | [optional]
+**last** | **str** | Last trading price | [optional]
+**change_percentage** | **str** | Price change percentage. Negative values indicate price decrease, e.g. -7.45 | [optional]
+**total_size** | **str** | Contract total size | [optional]
+**low_24h** | **str** | 24-hour lowest price | [optional]
+**high_24h** | **str** | 24-hour highest price | [optional]
+**volume_24h** | **str** | 24-hour trading volume | [optional]
+**volume_24h_btc** | **str** | 24-hour trading volume in BTC (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional]
+**volume_24h_usd** | **str** | 24-hour trading volume in USD (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional]
+**volume_24h_base** | **str** | 24-hour trading volume in base currency | [optional]
+**volume_24h_quote** | **str** | 24-hour trading volume in quote currency | [optional]
+**volume_24h_settle** | **str** | 24-hour trading volume in settle currency | [optional]
+**mark_price** | **str** | Recent mark price | [optional]
+**funding_rate** | **str** | Funding rate | [optional]
+**funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`) | [optional]
+**index_price** | **str** | Index price | [optional]
+**quanto_base_rate** | **str** | Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types | [optional]
+**basis_rate** | **str** | Basis rate | [optional]
+**basis_value** | **str** | Basis value | [optional]
+**lowest_ask** | **str** | Recent lowest ask | [optional]
+**lowest_size** | **str** | The latest seller's lowest price order quantity | [optional]
+**highest_bid** | **str** | Recent highest bid | [optional]
+**highest_size** | **str** | The latest buyer's highest price order volume | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/DepositRecord.md b/docs/DepositRecord.md
new file mode 100644
index 0000000..e5fa3b5
--- /dev/null
+++ b/docs/DepositRecord.md
@@ -0,0 +1,19 @@
+# DepositRecord
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Record ID | [optional] [readonly]
+**txid** | **str** | Hash record of the withdrawal | [optional] [readonly]
+**withdraw_order_id** | **str** | Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional]
+**timestamp** | **str** | Operation time | [optional] [readonly]
+**amount** | **str** | Token amount |
+**currency** | **str** | Currency name |
+**address** | **str** | Withdrawal address. Required for withdrawals | [optional]
+**memo** | **str** | Additional remarks with regards to the withdrawal | [optional]
+**status** | **str** | Trading Status - REVIEW: Recharge review (compliance review) - PEND: Processing - DONE: Waiting for funds to be unlocked - INVALID: Invalid data - TRACK: Track the number of confirmations, waiting to add funds to the user (spot) - BLOCKED: Rejected Recharge - DEP_CREDITED: Recharge to account, withdrawal is not unlocked | [optional] [readonly]
+**chain** | **str** | Name of the chain used in withdrawals |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/DualGetOrders.md b/docs/DualGetOrders.md
new file mode 100644
index 0000000..91f79de
--- /dev/null
+++ b/docs/DualGetOrders.md
@@ -0,0 +1,26 @@
+# DualGetOrders
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | Order ID | [optional]
+**plan_id** | **int** | Product ID | [optional]
+**copies** | **str** | Units | [optional]
+**invest_amount** | **str** | Investment Quantity | [optional]
+**settlement_amount** | **str** | Settlement Quantity | [optional]
+**create_time** | **int** | Created time | [optional]
+**complete_time** | **int** | Completed Time | [optional]
+**status** | **str** | Status: `INIT`-Created `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-Settlement Processing `CANCELED`-Canceled `FAILED`-Failed | [optional]
+**invest_currency** | **str** | Investment Token | [optional]
+**exercise_currency** | **str** | Strike Token | [optional]
+**exercise_price** | **str** | Strike price | [optional]
+**settlement_price** | **str** | Settlement price | [optional]
+**settlement_currency** | **str** | Settlement currency | [optional]
+**apy_display** | **str** | Annual Yield | [optional]
+**apy_settlement** | **str** | Settlement Annual Yield | [optional]
+**delivery_time** | **int** | Settlement time | [optional]
+**text** | **str** | Custom order information | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/DualGetPlans.md b/docs/DualGetPlans.md
new file mode 100644
index 0000000..53b3a58
--- /dev/null
+++ b/docs/DualGetPlans.md
@@ -0,0 +1,22 @@
+# DualGetPlans
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | Product ID | [optional]
+**instrument_name** | **str** | Product Name | [optional]
+**invest_currency** | **str** | Investment Token | [optional]
+**exercise_currency** | **str** | Strike Token | [optional]
+**exercise_price** | **float** | Strike price | [optional]
+**delivery_time** | **int** | Settlement time | [optional]
+**min_copies** | **int** | Minimum Units | [optional]
+**max_copies** | **int** | Maximum Units | [optional]
+**per_value** | **str** | Value Per Unit | [optional]
+**apy_display** | **str** | Annual Yield | [optional]
+**start_time** | **int** | Start Time | [optional]
+**end_time** | **int** | End time | [optional]
+**status** | **str** | Status: `NOTSTARTED`-Not Started `ONGOING`-In Progress `ENDED`-Ended | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PortfolioApi.md b/docs/EarnApi.md
similarity index 59%
rename from docs/PortfolioApi.md
rename to docs/EarnApi.md
index 4b90021..a2b83b8 100644
--- a/docs/PortfolioApi.md
+++ b/docs/EarnApi.md
@@ -1,26 +1,25 @@
-# gate_api.PortfolioApi
+# gate_api.EarnApi
All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**list_portfolio_accounts**](PortfolioApi.md#list_portfolio_accounts) | **GET** /portfolio/accounts | Get portfolio account information
-[**list_account_portfolio_mode**](PortfolioApi.md#list_account_portfolio_mode) | **GET** /portfolio/account_mode | Retrieve the account's portfolio mode
-[**set_account_portfolio_mode**](PortfolioApi.md#set_account_portfolio_mode) | **POST** /portfolio/account_mode | Configure the account's portfolio mode.
-[**get_portfolio_borrowable**](PortfolioApi.md#get_portfolio_borrowable) | **GET** /portfolio/borrowable | Retrieve the maximum borrowable amount for the account.
-[**get_portfolio_transferable**](PortfolioApi.md#get_portfolio_transferable) | **GET** /portfolio/transferable | Retrieve the maximum amount that can be transferred out from the account
-[**list_portfolio_uni_loan_interest_records**](PortfolioApi.md#list_portfolio_uni_loan_interest_records) | **GET** /portfolio/loans | List loans
-[**create_portfolio_loan**](PortfolioApi.md#create_portfolio_loan) | **POST** /portfolio/loans | Borrow or repay
-[**list_portfolio_loan_records**](PortfolioApi.md#list_portfolio_loan_records) | **GET** /portfolio/loan_records | Get load records
-[**list_portfolio_loan_interest_records**](PortfolioApi.md#list_portfolio_loan_interest_records) | **GET** /portfolio/interest_records | List interest records
+[**swap_eth2**](EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap
+[**rate_list_eth2**](EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical return rate query
+[**list_dual_investment_plans**](EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list
+[**list_dual_orders**](EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list
+[**place_dual_order**](EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order
+[**list_structured_products**](EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List
+[**list_structured_orders**](EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List
+[**place_structured_order**](EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order
+[**find_coin**](EarnApi.md#find_coin) | **GET** /earn/staking/coins | Staking coins
+[**swap_staking_coin**](EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain token swap for earned coins
-# **list_portfolio_accounts**
-> PortfolioAccount list_portfolio_accounts(currency=currency)
+# **swap_eth2**
+> swap_eth2(eth2_swap)
-Get portfolio account information
-
-The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation
+ETH2 swap
### Example
@@ -45,28 +44,27 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
-api_instance = gate_api.PortfolioApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
+api_instance = gate_api.EarnApi(api_client)
+eth2_swap = gate_api.Eth2Swap() # Eth2Swap |
try:
- # Get portfolio account information
- api_response = api_instance.list_portfolio_accounts(currency=currency)
- print(api_response)
+ # ETH2 swap
+ api_instance.swap_eth2(eth2_swap)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling PortfolioApi->list_portfolio_accounts: %s\n" % e)
+ print("Exception when calling EarnApi->swap_eth2: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency | [optional]
+ **eth2_swap** | [**Eth2Swap**](Eth2Swap.md)| |
### Return type
-[**PortfolioAccount**](PortfolioAccount.md)
+void (empty response body)
### Authorization
@@ -74,22 +72,22 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: application/json
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | Swap successful | - |
[[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)
-# **list_account_portfolio_mode**
-> dict(str, bool) list_account_portfolio_mode()
+# **rate_list_eth2**
+> list[Eth2RateList] rate_list_eth2()
-Retrieve the account's portfolio mode
+ETH2 historical return rate query
-cross_margin - 现货全仓保证金
+Query ETH earnings rate records for the last 31 days
### Example
@@ -114,16 +112,16 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
-api_instance = gate_api.PortfolioApi(api_client)
+api_instance = gate_api.EarnApi(api_client)
try:
- # Retrieve the account's portfolio mode
- api_response = api_instance.list_account_portfolio_mode()
+ # ETH2 historical return rate query
+ api_response = api_instance.rate_list_eth2()
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling PortfolioApi->list_account_portfolio_mode: %s\n" % e)
+ print("Exception when calling EarnApi->rate_list_eth2: %s\n" % e)
```
### Parameters
@@ -131,7 +129,7 @@ This endpoint does not need any parameter.
### Return type
-**dict(str, bool)**
+[**list[Eth2RateList]**](Eth2RateList.md)
### Authorization
@@ -149,77 +147,68 @@ This endpoint does not need any parameter.
[[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)
-# **set_account_portfolio_mode**
-> dict(str, bool) set_account_portfolio_mode(portfolio_mode)
+# **list_dual_investment_plans**
+> list[DualGetPlans] list_dual_investment_plans(plan_id=plan_id)
-Configure the account's portfolio mode.
+Dual Investment product list
### Example
-* Api Key Authentication (apiv4):
```python
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
+ host = "https://api.gateio.ws/api/v4"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
-api_instance = gate_api.PortfolioApi(api_client)
-portfolio_mode = gate_api.PortfolioMode() # PortfolioMode |
+api_instance = gate_api.EarnApi(api_client)
+plan_id = 1 # int | Financial project ID (optional)
try:
- # Configure the account's portfolio mode.
- api_response = api_instance.set_account_portfolio_mode(portfolio_mode)
+ # Dual Investment product list
+ api_response = api_instance.list_dual_investment_plans(plan_id=plan_id)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling PortfolioApi->set_account_portfolio_mode: %s\n" % e)
+ print("Exception when calling EarnApi->list_dual_investment_plans: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **portfolio_mode** | [**PortfolioMode**](PortfolioMode.md)| |
+ **plan_id** | **int**| Financial project ID | [optional]
### Return type
-**dict(str, bool)**
+[**list[DualGetPlans]**](DualGetPlans.md)
### Authorization
-[apiv4](../README.md#apiv4)
+No authorization required
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Success | - |
+**200** | Successfully retrieved | - |
[[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)
-# **get_portfolio_borrowable**
-> PortfolioBorrowable get_portfolio_borrowable(currency)
+# **list_dual_orders**
+> list[DualGetOrders] list_dual_orders(_from=_from, to=to, page=page, limit=limit)
-Retrieve the maximum borrowable amount for the account.
+Dual Investment order list
### Example
@@ -244,28 +233,34 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
-api_instance = gate_api.PortfolioApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency
+api_instance = gate_api.EarnApi(api_client)
+_from = 1740727000 # int | Start settlement time (optional)
+to = 1740729000 # int | End settlement time (optional)
+page = 1 # int | Page number (optional) (default to 1)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
try:
- # Retrieve the maximum borrowable amount for the account.
- api_response = api_instance.get_portfolio_borrowable(currency)
+ # Dual Investment order list
+ api_response = api_instance.list_dual_orders(_from=_from, to=to, page=page, limit=limit)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling PortfolioApi->get_portfolio_borrowable: %s\n" % e)
+ print("Exception when calling EarnApi->list_dual_orders: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency |
+ **_from** | **int**| Start settlement time | [optional]
+ **to** | **int**| End settlement time | [optional]
+ **page** | **int**| Page number | [optional] [default to 1]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
### Return type
-[**PortfolioBorrowable**](PortfolioBorrowable.md)
+[**list[DualGetOrders]**](DualGetOrders.md)
### Authorization
@@ -283,10 +278,10 @@ Name | Type | Description | Notes
[[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)
-# **get_portfolio_transferable**
-> PortfolioTransferable get_portfolio_transferable(currency)
+# **place_dual_order**
+> place_dual_order(place_dual_investment_order)
-Retrieve the maximum amount that can be transferred out from the account
+Place Dual Investment order
### Example
@@ -311,33 +306,96 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
-api_instance = gate_api.PortfolioApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency
+api_instance = gate_api.EarnApi(api_client)
+place_dual_investment_order = gate_api.PlaceDualInvestmentOrder() # PlaceDualInvestmentOrder |
try:
- # Retrieve the maximum amount that can be transferred out from the account
- api_response = api_instance.get_portfolio_transferable(currency)
- print(api_response)
+ # Place Dual Investment order
+ api_instance.place_dual_order(place_dual_investment_order)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling PortfolioApi->get_portfolio_transferable: %s\n" % e)
+ print("Exception when calling EarnApi->place_dual_order: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency |
+ **place_dual_investment_order** | [**PlaceDualInvestmentOrder**](PlaceDualInvestmentOrder.md)| |
### Return type
-[**PortfolioTransferable**](PortfolioTransferable.md)
+void (empty response body)
### Authorization
[apiv4](../README.md#apiv4)
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Order placed successfully | - |
+
+[[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)
+
+# **list_structured_products**
+> list[StructuredGetProjectList] list_structured_products(status, type=type, page=page, limit=limit)
+
+Structured Product List
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.EarnApi(api_client)
+status = 'in_process' # str | Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed
+type = 'BullishSharkFin' # str | Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball (optional)
+page = 1 # int | Page number (optional) (default to 1)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+
+try:
+ # Structured Product List
+ api_response = api_instance.list_structured_products(status, type=type, page=page, limit=limit)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling EarnApi->list_structured_products: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **status** | **str**| Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed |
+ **type** | **str**| Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball | [optional]
+ **page** | **int**| Page number | [optional] [default to 1]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+
+### Return type
+
+[**list[StructuredGetProjectList]**](StructuredGetProjectList.md)
+
+### Authorization
+
+No authorization required
+
### HTTP request headers
- **Content-Type**: Not defined
@@ -350,10 +408,10 @@ Name | Type | Description | Notes
[[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)
-# **list_portfolio_uni_loan_interest_records**
-> list[UniLoan] list_portfolio_uni_loan_interest_records(currency=currency, page=page, limit=limit)
+# **list_structured_orders**
+> list[StructuredOrderList] list_structured_orders(_from=_from, to=to, page=page, limit=limit)
-List loans
+Structured Product Order List
### Example
@@ -378,32 +436,34 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
-api_instance = gate_api.PortfolioApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
+api_instance = gate_api.EarnApi(api_client)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
try:
- # List loans
- api_response = api_instance.list_portfolio_uni_loan_interest_records(currency=currency, page=page, limit=limit)
+ # Structured Product Order List
+ api_response = api_instance.list_structured_orders(_from=_from, to=to, page=page, limit=limit)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling PortfolioApi->list_portfolio_uni_loan_interest_records: %s\n" % e)
+ print("Exception when calling EarnApi->list_structured_orders: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency | [optional]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
**page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
### Return type
-[**list[UniLoan]**](UniLoan.md)
+[**list[StructuredOrderList]**](StructuredOrderList.md)
### Authorization
@@ -421,12 +481,10 @@ Name | Type | Description | Notes
[[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)
-# **create_portfolio_loan**
-> create_portfolio_loan(portfolio_loan)
+# **place_structured_order**
+> place_structured_order(structured_buy)
-Borrow or repay
-
-When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the entire borrowed amount is available by setting the parameter `repaid_all=true`
+Place Structured Product Order
### Example
@@ -451,23 +509,23 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
-api_instance = gate_api.PortfolioApi(api_client)
-portfolio_loan = gate_api.PortfolioLoan() # PortfolioLoan |
+api_instance = gate_api.EarnApi(api_client)
+structured_buy = gate_api.StructuredBuy() # StructuredBuy |
try:
- # Borrow or repay
- api_instance.create_portfolio_loan(portfolio_loan)
+ # Place Structured Product Order
+ api_instance.place_structured_order(structured_buy)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling PortfolioApi->create_portfolio_loan: %s\n" % e)
+ print("Exception when calling EarnApi->place_structured_order: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **portfolio_loan** | [**PortfolioLoan**](PortfolioLoan.md)| |
+ **structured_buy** | [**StructuredBuy**](StructuredBuy.md)| |
### Return type
@@ -485,14 +543,14 @@ void (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | Operated successfully | - |
+**200** | Order placed successfully | - |
[[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)
-# **list_portfolio_loan_records**
-> list[PortfolioLoanRecord] list_portfolio_loan_records(type=type, currency=currency, page=page, limit=limit)
+# **find_coin**
+> object find_coin(find_coin)
-Get load records
+Staking coins
### Example
@@ -517,34 +575,28 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
-api_instance = gate_api.PortfolioApi(api_client)
-type = 'type_example' # str | The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds (optional)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
-page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100)
+api_instance = gate_api.EarnApi(api_client)
+find_coin = gate_api.FindCoin() # FindCoin |
try:
- # Get load records
- api_response = api_instance.list_portfolio_loan_records(type=type, currency=currency, page=page, limit=limit)
+ # Staking coins
+ api_response = api_instance.find_coin(find_coin)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling PortfolioApi->list_portfolio_loan_records: %s\n" % e)
+ print("Exception when calling EarnApi->find_coin: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **type** | **str**| The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds | [optional]
- **currency** | **str**| Retrieve data of the specified currency | [optional]
- **page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100]
+ **find_coin** | [**FindCoin**](FindCoin.md)| |
### Return type
-[**list[PortfolioLoanRecord]**](PortfolioLoanRecord.md)
+**object**
### Authorization
@@ -552,7 +604,7 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
+ - **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
@@ -562,10 +614,10 @@ Name | Type | Description | Notes
[[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)
-# **list_portfolio_loan_interest_records**
-> list[UniLoanInterestRecord] list_portfolio_loan_interest_records(currency=currency, page=page, limit=limit)
+# **swap_staking_coin**
+> SwapCoinStruct swap_staking_coin(swap_coin)
-List interest records
+On-chain token swap for earned coins
### Example
@@ -590,32 +642,28 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
-api_instance = gate_api.PortfolioApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
-page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100)
+api_instance = gate_api.EarnApi(api_client)
+swap_coin = gate_api.SwapCoin() # SwapCoin |
try:
- # List interest records
- api_response = api_instance.list_portfolio_loan_interest_records(currency=currency, page=page, limit=limit)
+ # On-chain token swap for earned coins
+ api_response = api_instance.swap_staking_coin(swap_coin)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling PortfolioApi->list_portfolio_loan_interest_records: %s\n" % e)
+ print("Exception when calling EarnApi->swap_staking_coin: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency | [optional]
- **page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100]
+ **swap_coin** | [**SwapCoin**](SwapCoin.md)| |
### Return type
-[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md)
+[**SwapCoinStruct**](SwapCoinStruct.md)
### Authorization
@@ -623,13 +671,13 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
+ - **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Swap successful | - |
[[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)
diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md
index 2046d20..5128e5d 100644
--- a/docs/EarnUniApi.md
+++ b/docs/EarnUniApi.md
@@ -4,20 +4,23 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**list_uni_currencies**](EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | List currencies for lending
-[**get_uni_currency**](EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending
-[**list_user_uni_lends**](EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | List user's lending orders
-[**create_uni_lend**](EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Lend or redeem
-[**change_uni_lend**](EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend lending order
-[**list_uni_lend_records**](EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending
-[**get_uni_interest**](EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency
-[**list_uni_interest_records**](EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records
+[**list_uni_currencies**](EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | Query lending currency list
+[**get_uni_currency**](EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Query single lending currency details
+[**list_user_uni_lends**](EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | Query user's lending order list
+[**create_uni_lend**](EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Create lending or redemption
+[**change_uni_lend**](EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend user lending information
+[**list_uni_lend_records**](EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | Query lending transaction records
+[**get_uni_interest**](EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Query user's total interest income for specified currency
+[**list_uni_interest_records**](EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | Query user dividend records
+[**get_uni_interest_status**](EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | Query currency interest compounding status
+[**list_uni_chart**](EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart
+[**list_uni_rate**](EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimated annualized interest rate
# **list_uni_currencies**
> list[UniCurrency] list_uni_currencies()
-List currencies for lending
+Query lending currency list
### Example
@@ -36,7 +39,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.EarnUniApi(api_client)
try:
- # List currencies for lending
+ # Query lending currency list
api_response = api_instance.list_uni_currencies()
print(api_response)
except GateApiException as ex:
@@ -64,14 +67,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **get_uni_currency**
> UniCurrency get_uni_currency(currency)
-Get currency detail for lending
+Query single lending currency details
### Example
@@ -91,7 +94,7 @@ api_instance = gate_api.EarnUniApi(api_client)
currency = 'btc' # str | Currency
try:
- # Get currency detail for lending
+ # Query single lending currency details
api_response = api_instance.get_uni_currency(currency)
print(api_response)
except GateApiException as ex:
@@ -122,14 +125,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_user_uni_lends**
> list[UniLend] list_user_uni_lends(currency=currency, page=page, limit=limit)
-List user's lending orders
+Query user's lending order list
### Example
@@ -155,12 +158,12 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.EarnUniApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
+currency = 'BTC' # str | Query by specified currency name (optional)
page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100)
+limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100)
try:
- # List user's lending orders
+ # Query user's lending order list
api_response = api_instance.list_user_uni_lends(currency=currency, page=page, limit=limit)
print(api_response)
except GateApiException as ex:
@@ -173,9 +176,9 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency | [optional]
+ **currency** | **str**| Query by specified currency name | [optional]
**page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100]
+ **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100]
### Return type
@@ -193,16 +196,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **create_uni_lend**
> create_uni_lend(create_uni_lend)
-Lend or redeem
+Create lending or redemption
-`Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited.
+Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited.
### Example
@@ -231,7 +234,7 @@ api_instance = gate_api.EarnUniApi(api_client)
create_uni_lend = gate_api.CreateUniLend() # CreateUniLend |
try:
- # Lend or redeem
+ # Create lending or redemption
api_instance.create_uni_lend(create_uni_lend)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -261,16 +264,16 @@ void (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | Operated successfully | - |
+**204** | Operation successful | - |
[[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)
# **change_uni_lend**
> change_uni_lend(patch_uni_lend)
-Amend lending order
+Amend user lending information
-Currently only supports amending the minimum interest rate (hour)
+Currently only supports amending minimum interest rate (hourly)
### Example
@@ -299,7 +302,7 @@ api_instance = gate_api.EarnUniApi(api_client)
patch_uni_lend = gate_api.PatchUniLend() # PatchUniLend |
try:
- # Amend lending order
+ # Amend user lending information
api_instance.change_uni_lend(patch_uni_lend)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -329,14 +332,14 @@ void (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | Updated | - |
+**204** | Updated successfully | - |
[[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)
# **list_uni_lend_records**
> list[UniLendRecord] list_uni_lend_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type)
-List records of lending
+Query lending transaction records
### Example
@@ -362,15 +365,15 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.EarnUniApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
+currency = 'BTC' # str | Query by specified currency name (optional)
page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
-type = 'lend' # str | type: lend - lend, redeem - redeem (optional)
+limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
+type = 'lend' # str | Operation type: lend - Lend, redeem - Redeem (optional)
try:
- # List records of lending
+ # Query lending transaction records
api_response = api_instance.list_uni_lend_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type)
print(api_response)
except GateApiException as ex:
@@ -383,12 +386,12 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency | [optional]
+ **currency** | **str**| Query by specified currency name | [optional]
**page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
- **type** | **str**| type: lend - lend, redeem - redeem | [optional]
+ **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
+ **type** | **str**| Operation type: lend - Lend, redeem - Redeem | [optional]
### Return type
@@ -406,14 +409,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **get_uni_interest**
> UniLendInterest get_uni_interest(currency)
-Get the user's total interest income of specified currency
+Query user's total interest income for specified currency
### Example
@@ -442,7 +445,7 @@ api_instance = gate_api.EarnUniApi(api_client)
currency = 'btc' # str | Currency
try:
- # Get the user's total interest income of specified currency
+ # Query user's total interest income for specified currency
api_response = api_instance.get_uni_interest(currency)
print(api_response)
except GateApiException as ex:
@@ -473,14 +476,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_uni_interest_records**
-> list[UniInterestRecord] list_uni_interest_records(currency=currency, page=page, limit=limit)
+> list[UniInterestRecord] list_uni_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to)
-List interest records
+Query user dividend records
### Example
@@ -506,13 +509,15 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.EarnUniApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
+currency = 'BTC' # str | Query by specified currency name (optional)
page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100)
+limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
try:
- # List interest records
- api_response = api_instance.list_uni_interest_records(currency=currency, page=page, limit=limit)
+ # Query user dividend records
+ api_response = api_instance.list_uni_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -524,9 +529,11 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency | [optional]
+ **currency** | **str**| Query by specified currency name | [optional]
**page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100]
+ **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
### Return type
@@ -544,7 +551,212 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
+
+[[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)
+
+# **get_uni_interest_status**
+> UniCurrencyInterest get_uni_interest_status(currency)
+
+Query currency interest compounding status
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.EarnUniApi(api_client)
+currency = 'btc' # str | Currency
+
+try:
+ # Query currency interest compounding status
+ api_response = api_instance.get_uni_interest_status(currency)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling EarnUniApi->get_uni_interest_status: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currency** | **str**| Currency |
+
+### Return type
+
+[**UniCurrencyInterest**](UniCurrencyInterest.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **list_uni_chart**
+> list[InlineResponse200] list_uni_chart(_from, to, asset)
+
+UniLoan currency annualized trend chart
+
+Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.EarnUniApi(api_client)
+_from = 1719763200 # int | Start timestamp in seconds, maximum span 30 days
+to = 1722441600 # int | End timestamp in seconds, maximum span 30 days
+asset = 'BTC' # str | Currency name
+
+try:
+ # UniLoan currency annualized trend chart
+ api_response = api_instance.list_uni_chart(_from, to, asset)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling EarnUniApi->list_uni_chart: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **_from** | **int**| Start timestamp in seconds, maximum span 30 days |
+ **to** | **int**| End timestamp in seconds, maximum span 30 days |
+ **asset** | **str**| Currency name |
+
+### Return type
+
+[**list[InlineResponse200]**](InlineResponse200.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
+
+[[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)
+
+# **list_uni_rate**
+> list[InlineResponse2001] list_uni_rate()
+
+Currency estimated annualized interest rate
+
+Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.EarnUniApi(api_client)
+
+try:
+ # Currency estimated annualized interest rate
+ api_response = api_instance.list_uni_rate()
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling EarnUniApi->list_uni_rate: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**list[InlineResponse2001]**](InlineResponse2001.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[[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)
diff --git a/docs/Eth2RateList.md b/docs/Eth2RateList.md
new file mode 100644
index 0000000..574d27a
--- /dev/null
+++ b/docs/Eth2RateList.md
@@ -0,0 +1,12 @@
+# Eth2RateList
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**date_time** | **int** | Date Timestamp | [optional]
+**date** | **str** | Date | [optional]
+**rate** | **str** | Percentage Rate | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/Eth2Swap.md b/docs/Eth2Swap.md
new file mode 100644
index 0000000..31c2116
--- /dev/null
+++ b/docs/Eth2Swap.md
@@ -0,0 +1,12 @@
+# Eth2Swap
+
+ETH2 Mining
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**side** | **str** | 1-Forward Swap (ETH -> ETH2), 2-Reverse Swap (ETH2 -> ETH) |
+**amount** | **str** | Swap Amount |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/FindCoin.md b/docs/FindCoin.md
new file mode 100644
index 0000000..784880a
--- /dev/null
+++ b/docs/FindCoin.md
@@ -0,0 +1,10 @@
+# FindCoin
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**cointype** | **str** | Currency type: swap - voucher; lock - locked position; debt - US Treasury bond. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/FlashSwapApi.md b/docs/FlashSwapApi.md
index b4b6729..39fd84a 100644
--- a/docs/FlashSwapApi.md
+++ b/docs/FlashSwapApi.md
@@ -4,70 +4,15 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**list_flash_swap_currencies**](FlashSwapApi.md#list_flash_swap_currencies) | **GET** /flash_swap/currencies | List All Supported Currencies In Flash Swap (deprecated)
[**list_flash_swap_currency_pair**](FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap
-[**list_flash_swap_orders**](FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders
+[**list_flash_swap_orders**](FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | Query flash swap order list
[**create_flash_swap_order**](FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order
-[**get_flash_swap_order**](FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Get a single flash swap order's detail
-[**preview_flash_swap_order**](FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Initiate a flash swap order preview
+[**get_flash_swap_order**](FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Query single flash swap order
+[**preview_flash_swap_order**](FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Flash swap order preview
-# **list_flash_swap_currencies**
-> list[FlashSwapCurrency] list_flash_swap_currencies()
-
-List All Supported Currencies In Flash Swap (deprecated)
-
-### Example
-
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.FlashSwapApi(api_client)
-
-try:
- # List All Supported Currencies In Flash Swap (deprecated)
- api_response = api_instance.list_flash_swap_currencies()
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling FlashSwapApi->list_flash_swap_currencies: %s\n" % e)
-```
-
-### Parameters
-This endpoint does not need any parameter.
-
-### Return type
-
-[**list[FlashSwapCurrency]**](FlashSwapCurrency.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
-
-[[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)
-
# **list_flash_swap_currency_pair**
-> list[FlashSwapCurrencyPair] list_flash_swap_currency_pair(currency=currency)
+> list[FlashSwapCurrencyPair] list_flash_swap_currency_pair(currency=currency, page=page, limit=limit)
List All Supported Currency Pairs In Flash Swap
@@ -88,11 +33,13 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FlashSwapApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
+currency = 'BTC' # str | Query by specified currency name (optional)
+page = 1 # int | Page number (optional) (default to 1)
+limit = 1000 # int | Maximum number of items returned. Default: 1000, minimum: 1, maximum: 1000 (optional) (default to 1000)
try:
# List All Supported Currency Pairs In Flash Swap
- api_response = api_instance.list_flash_swap_currency_pair(currency=currency)
+ api_response = api_instance.list_flash_swap_currency_pair(currency=currency, page=page, limit=limit)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -104,7 +51,9 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency | [optional]
+ **currency** | **str**| Query by specified currency name | [optional]
+ **page** | **int**| Page number | [optional] [default to 1]
+ **limit** | **int**| Maximum number of items returned. Default: 1000, minimum: 1, maximum: 1000 | [optional] [default to 1000]
### Return type
@@ -122,14 +71,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_flash_swap_orders**
> list[FlashSwapOrder] list_flash_swap_orders(status=status, sell_currency=sell_currency, buy_currency=buy_currency, reverse=reverse, limit=limit, page=page)
-List all flash swap orders
+Query flash swap order list
### Example
@@ -155,15 +104,15 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FlashSwapApi(api_client)
-status = 1 # int | Flash swap order status `1` - success `2` - failure (optional)
-sell_currency = 'BTC' # str | Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` (optional)
-buy_currency = 'BTC' # str | Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` (optional)
-reverse = true # bool | If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+status = 1 # int | Flash swap order status `1` - success `2` - failed (optional)
+sell_currency = 'BTC' # str | Asset name to sell - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies (optional)
+buy_currency = 'BTC' # str | Asset name to buy - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies (optional)
+reverse = true # bool | Sort by ID in ascending or descending order, default `true` - `true`: ID descending order (most recent data first) - `false`: ID ascending order (oldest data first) (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
page = 1 # int | Page number (optional) (default to 1)
try:
- # List all flash swap orders
+ # Query flash swap order list
api_response = api_instance.list_flash_swap_orders(status=status, sell_currency=sell_currency, buy_currency=buy_currency, reverse=reverse, limit=limit, page=page)
print(api_response)
except GateApiException as ex:
@@ -176,11 +125,11 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **status** | **int**| Flash swap order status `1` - success `2` - failure | [optional]
- **sell_currency** | **str**| Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional]
- **buy_currency** | **str**| Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional]
- **reverse** | **bool**| If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **status** | **int**| Flash swap order status `1` - success `2` - failed | [optional]
+ **sell_currency** | **str**| Asset name to sell - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies | [optional]
+ **buy_currency** | **str**| Asset name to buy - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies | [optional]
+ **reverse** | **bool**| Sort by ID in ascending or descending order, default `true` - `true`: ID descending order (most recent data first) - `false`: ID ascending order (oldest data first) | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**page** | **int**| Page number | [optional] [default to 1]
### Return type
@@ -199,7 +148,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
@@ -268,14 +217,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**201** | The flash swap order is created successfully | - |
+**201** | Flash swap order created successfully | - |
[[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)
# **get_flash_swap_order**
> FlashSwapOrder get_flash_swap_order(order_id)
-Get a single flash swap order's detail
+Query single flash swap order
### Example
@@ -304,7 +253,7 @@ api_instance = gate_api.FlashSwapApi(api_client)
order_id = 1 # int | Flash swap order ID
try:
- # Get a single flash swap order's detail
+ # Query single flash swap order
api_response = api_instance.get_flash_swap_order(order_id)
print(api_response)
except GateApiException as ex:
@@ -335,14 +284,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **preview_flash_swap_order**
> FlashSwapOrderPreview preview_flash_swap_order(flash_swap_preview_request)
-Initiate a flash swap order preview
+Flash swap order preview
### Example
@@ -371,7 +320,7 @@ api_instance = gate_api.FlashSwapApi(api_client)
flash_swap_preview_request = gate_api.FlashSwapPreviewRequest() # FlashSwapPreviewRequest |
try:
- # Initiate a flash swap order preview
+ # Flash swap order preview
api_response = api_instance.preview_flash_swap_order(flash_swap_preview_request)
print(api_response)
except GateApiException as ex:
@@ -402,7 +351,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | The flash swap order successfully previewed | - |
+**200** | Flash swap order preview successful | - |
[[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)
diff --git a/docs/FlashSwapCurrency.md b/docs/FlashSwapCurrency.md
deleted file mode 100644
index 29fc81c..0000000
--- a/docs/FlashSwapCurrency.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# FlashSwapCurrency
-
-Currencies supported in flash swap
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**currency** | **str** | Currency name | [optional] [readonly]
-**min_amount** | **str** | Minimum amount required in flash swap | [optional] [readonly]
-**max_amount** | **str** | Maximum amount allowed in flash swap | [optional] [readonly]
-**swappable** | **list[str]** | Currencies which can be swapped to from this currency | [optional] [readonly]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/FlashSwapCurrencyPair.md b/docs/FlashSwapCurrencyPair.md
index 586c0a3..28eacbc 100644
--- a/docs/FlashSwapCurrencyPair.md
+++ b/docs/FlashSwapCurrencyPair.md
@@ -4,13 +4,13 @@ List all supported currencies in flash swap
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**currency_pair** | **str** | The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). | [optional] [readonly]
-**sell_currency** | **str** | The currency to be sold | [optional] [readonly]
-**buy_currency** | **str** | The currency to be bought | [optional] [readonly]
-**sell_min_amount** | **str** | The minimum quantity required for selling | [optional] [readonly]
-**sell_max_amount** | **str** | The maximum quantity allowed for selling | [optional] [readonly]
-**buy_min_amount** | **str** | The minimum quantity required for buying | [optional] [readonly]
-**buy_max_amount** | **str** | The maximum quantity allowed for buying | [optional] [readonly]
+**currency_pair** | **str** | Currency pair, `BTC_USDT` represents selling `BTC` and buying `USDT` | [optional] [readonly]
+**sell_currency** | **str** | Currency to sell | [optional] [readonly]
+**buy_currency** | **str** | Currency to buy | [optional] [readonly]
+**sell_min_amount** | **str** | Minimum sell quantity | [optional] [readonly]
+**sell_max_amount** | **str** | Maximum sell quantity | [optional] [readonly]
+**buy_min_amount** | **str** | Minimum buy quantity | [optional] [readonly]
+**buy_max_amount** | **str** | Maximum buy quantity | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/FlashSwapOrderPreview.md b/docs/FlashSwapOrderPreview.md
index 578ba75..4ee4133 100644
--- a/docs/FlashSwapOrderPreview.md
+++ b/docs/FlashSwapOrderPreview.md
@@ -1,13 +1,13 @@
# FlashSwapOrderPreview
-Initiate a flash swap order preview
+Flash swap order preview
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**preview_id** | **str** | Preview result ID | [optional]
-**sell_currency** | **str** | Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional]
+**sell_currency** | **str** | Name of the sold asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain | [optional]
**sell_amount** | **str** | Amount to sell | [optional]
-**buy_currency** | **str** | Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional]
+**buy_currency** | **str** | Name of the purchased asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain | [optional]
**buy_amount** | **str** | Amount to buy | [optional]
**price** | **str** | Price | [optional]
diff --git a/docs/FlashSwapOrderRequest.md b/docs/FlashSwapOrderRequest.md
index 5dd12c4..aea0466 100644
--- a/docs/FlashSwapOrderRequest.md
+++ b/docs/FlashSwapOrderRequest.md
@@ -5,9 +5,9 @@ Parameters of flash swap order creation
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**preview_id** | **str** | Preview result ID |
-**sell_currency** | **str** | 卖出的资产名称, 根据接口`查询支持闪兑的所有交易对列表 GET /flash_swap/currency_pairs`获取 |
+**sell_currency** | **str** | Name of the asset to be sold, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap |
**sell_amount** | **str** | Amount to sell (based on the preview result) |
-**buy_currency** | **str** | 买入的资产名称, 根据接口`查询支持闪兑的所有交易对列表 GET /flash_swap/currency_pairs`获取 |
+**buy_currency** | **str** | Name of the asset to be bought, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap |
**buy_amount** | **str** | Amount to buy (based on the preview result) |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/FlashSwapPreviewRequest.md b/docs/FlashSwapPreviewRequest.md
index 62c177c..3a45a36 100644
--- a/docs/FlashSwapPreviewRequest.md
+++ b/docs/FlashSwapPreviewRequest.md
@@ -4,9 +4,9 @@ Parameters of flash swap order creation
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**sell_currency** | **str** | 卖出的资产名称, 根据接口`查询支持闪兑的所有交易对列表 GET /flash_swap/currency_pairs`获取 |
+**sell_currency** | **str** | The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs |
**sell_amount** | **str** | Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` | [optional]
-**buy_currency** | **str** | 买入的资产名称, 根据接口`查询支持闪兑的所有交易对列表 GET /flash_swap/currency_pairs`获取 |
+**buy_currency** | **str** | The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs |
**buy_amount** | **str** | Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/FutureCancelOrderResult.md b/docs/FutureCancelOrderResult.md
new file mode 100644
index 0000000..865d529
--- /dev/null
+++ b/docs/FutureCancelOrderResult.md
@@ -0,0 +1,14 @@
+# FutureCancelOrderResult
+
+Order cancellation result
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Order ID | [optional]
+**user_id** | **int** | User ID | [optional]
+**succeeded** | **bool** | Whether cancellation succeeded | [optional]
+**message** | **str** | Error description when cancellation fails, empty if successful | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/FuturesAccount.md b/docs/FuturesAccount.md
index 706b9ab..590e0c8 100644
--- a/docs/FuturesAccount.md
+++ b/docs/FuturesAccount.md
@@ -7,14 +7,28 @@ Name | Type | Description | Notes
**unrealised_pnl** | **str** | Unrealized PNL | [optional]
**position_margin** | **str** | Position margin | [optional]
**order_margin** | **str** | Order margin of unfinished orders | [optional]
-**available** | **str** | The available balance for transferring or trading(including bonus. Bonus can't be be withdrawn. The transfer amount needs to deduct the bonus) | [optional]
-**point** | **str** | POINT amount | [optional]
-**currency** | **str** | Settle currency | [optional]
+**available** | **str** | Available balance for transferring or trading (including bonus. Bonus cannot be withdrawn, so transfer amount needs to deduct bonus) | [optional]
+**point** | **str** | Point card amount | [optional]
+**currency** | **str** | Settlement currency | [optional]
**in_dual_mode** | **bool** | Whether dual mode is enabled | [optional]
+**position_mode** | **str** | Position mode: single - one-way, dual - dual-side, split - sub-positions (in_dual_mode is deprecated) | [optional]
**enable_credit** | **bool** | Whether portfolio margin account mode is enabled | [optional]
-**position_initial_margin** | **str** | Initial margin position, applicable to the portfolio margin account model | [optional]
-**maintenance_margin** | **str** | Maintenance margin position, applicable to the portfolio margin account model | [optional]
-**bonus** | **str** | Perpetual Contract Bonus | [optional]
+**position_initial_margin** | **str** | Initial margin occupied by positions, applicable to unified account mode | [optional]
+**maintenance_margin** | **str** | Maintenance margin occupied by positions, applicable to new classic account margin mode and unified account mode | [optional]
+**bonus** | **str** | Bonus | [optional]
+**enable_evolved_classic** | **bool** | Classic account margin mode, true-new mode, false-old mode | [optional]
+**cross_order_margin** | **str** | Cross margin order margin, applicable to new classic account margin mode | [optional]
+**cross_initial_margin** | **str** | Cross margin initial margin, applicable to new classic account margin mode | [optional]
+**cross_maintenance_margin** | **str** | Cross margin maintenance margin, applicable to new classic account margin mode | [optional]
+**cross_unrealised_pnl** | **str** | Cross margin unrealized P&L, applicable to new classic account margin mode | [optional]
+**cross_available** | **str** | Cross margin available balance, applicable to new classic account margin mode | [optional]
+**cross_margin_balance** | **str** | Cross margin balance, applicable to new classic account margin mode | [optional]
+**cross_mmr** | **str** | Cross margin maintenance margin rate, applicable to new classic account margin mode | [optional]
+**cross_imr** | **str** | Cross margin initial margin rate, applicable to new classic account margin mode | [optional]
+**isolated_position_margin** | **str** | Isolated position margin, applicable to new classic account margin mode | [optional]
+**enable_new_dual_mode** | **bool** | Whether to open a new two-way position mode | [optional]
+**margin_mode** | **int** | Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode | [optional]
+**enable_tiered_mm** | **bool** | Whether to enable tiered maintenance margin calculation | [optional]
**history** | [**FuturesAccountHistory**](FuturesAccountHistory.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/FuturesAccountBook.md b/docs/FuturesAccountBook.md
index b1ba011..0056f17 100644
--- a/docs/FuturesAccountBook.md
+++ b/docs/FuturesAccountBook.md
@@ -6,8 +6,11 @@ Name | Type | Description | Notes
**time** | **float** | Change time | [optional]
**change** | **str** | Change amount | [optional]
**balance** | **str** | Balance after change | [optional]
-**type** | **str** | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional]
+**type** | **str** | Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction | [optional]
**text** | **str** | Comment | [optional]
+**contract** | **str** | Futures contract, the field is only available for data after 2023-10-30 | [optional]
+**trade_id** | **str** | trade id | [optional]
+**id** | **str** | Account change record ID | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/FuturesApi.md b/docs/FuturesApi.md
index a566faa..75ce6fe 100644
--- a/docs/FuturesApi.md
+++ b/docs/FuturesApi.md
@@ -4,56 +4,62 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**list_futures_contracts**](FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | List all futures contracts
-[**get_futures_contract**](FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Get a single contract
-[**list_futures_order_book**](FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Futures order book
-[**list_futures_trades**](FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures trading history
-[**list_futures_candlesticks**](FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Get futures candlesticks
-[**list_futures_premium_index**](FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-Line
-[**list_futures_tickers**](FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | List futures tickers
-[**list_futures_funding_rate_history**](FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Funding rate history
-[**list_futures_insurance_ledger**](FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures insurance balance history
-[**list_contract_stats**](FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures stats
-[**get_index_constituents**](FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Get index constituents
-[**list_liquidated_orders**](FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Retrieve liquidation history
-[**list_futures_accounts**](FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Query futures account
-[**list_futures_account_book**](FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query account book
-[**list_positions**](FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | List all positions of a user
-[**get_position**](FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position
+[**list_futures_contracts**](FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | Query all futures contracts
+[**get_futures_contract**](FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Query single contract information
+[**list_futures_order_book**](FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Query futures market depth information
+[**list_futures_trades**](FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures market transaction records
+[**list_futures_candlesticks**](FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Futures market K-line chart
+[**list_futures_premium_index**](FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-line chart
+[**list_futures_tickers**](FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | Get all futures trading statistics
+[**list_futures_funding_rate_history**](FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Futures market historical funding rate
+[**list_futures_insurance_ledger**](FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures market insurance fund history
+[**list_contract_stats**](FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures statistics
+[**get_index_constituents**](FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Query index constituents
+[**list_liquidated_orders**](FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Query liquidation order history
+[**list_futures_risk_limit_tiers**](FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | Query risk limit tiers
+[**list_futures_accounts**](FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Get futures account
+[**list_futures_account_book**](FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query futures account change history
+[**list_positions**](FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | Get user position list
+[**get_position**](FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position information
[**update_position_margin**](FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin
[**update_position_leverage**](FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage
+[**update_position_cross_mode**](FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch Position Margin Mode
+[**update_dual_comp_position_cross_mode**](FuturesApi.md#update_dual_comp_position_cross_mode) | **POST** /futures/{settle}/dual_comp/positions/cross_mode | Switch Between Cross and Isolated Margin Modes Under Hedge Mode
[**update_position_risk_limit**](FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit
-[**set_dual_mode**](FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode
-[**get_dual_mode_position**](FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode
+[**set_dual_mode**](FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Set position mode
+[**get_dual_mode_position**](FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Get position information in dual mode
[**update_dual_mode_position_margin**](FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode
[**update_dual_mode_position_leverage**](FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode
[**update_dual_mode_position_risk_limit**](FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode
-[**list_futures_orders**](FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | List futures orders
-[**create_futures_order**](FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Create a futures order
-[**cancel_futures_orders**](FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all `open` orders matched
-[**get_orders_with_time_range**](FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | List Futures Orders By Time Range
-[**create_batch_futures_order**](FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Create a batch of futures orders
-[**get_futures_order**](FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Get a single order
-[**amend_futures_order**](FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend an order
-[**cancel_futures_order**](FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel a single order
-[**get_my_trades**](FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | List personal trading history
-[**get_my_trades_with_time_range**](FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | List personal trading history by time range
-[**list_position_close**](FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | List position close history
-[**list_liquidates**](FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | List liquidation history
-[**list_auto_deleverages**](FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | List Auto-Deleveraging History
+[**list_futures_orders**](FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | Query futures order list
+[**create_futures_order**](FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Place futures order
+[**cancel_futures_orders**](FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all orders with 'open' status
+[**get_orders_with_time_range**](FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | Query futures order list by time range
+[**create_batch_futures_order**](FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Place batch futures orders
+[**get_futures_order**](FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Query single order details
+[**amend_futures_order**](FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend single order
+[**cancel_futures_order**](FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel single order
+[**get_my_trades**](FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | Query personal trading records
+[**get_my_trades_with_time_range**](FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | Query personal trading records by time range
+[**list_position_close**](FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | Query position close history
+[**list_liquidates**](FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | Query liquidation history
+[**list_auto_deleverages**](FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | Query ADL auto-deleveraging order information
[**countdown_cancel_all_futures**](FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders
-[**get_futures_fee**](FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates
-[**list_price_triggered_orders**](FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List all auto orders
-[**create_price_triggered_order**](FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order
-[**cancel_price_triggered_order_list**](FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel all open orders
-[**get_price_triggered_order**](FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order
-[**cancel_price_triggered_order**](FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order
+[**get_futures_fee**](FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query futures market trading fee rates
+[**cancel_batch_future_orders**](FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel batch orders by specified ID list
+[**amend_batch_future_orders**](FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders by specified IDs
+[**get_futures_risk_limit_table**](FuturesApi.md#get_futures_risk_limit_table) | **GET** /futures/{settle}/risk_limit_table | Query risk limit table by table_id
+[**list_price_triggered_orders**](FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | Query auto order list
+[**create_price_triggered_order**](FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create price-triggered order
+[**cancel_price_triggered_order_list**](FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel all auto orders
+[**get_price_triggered_order**](FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Query single auto order details
+[**cancel_price_triggered_order**](FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | Cancel single auto order
# **list_futures_contracts**
-> list[Contract] list_futures_contracts(settle)
+> list[Contract] list_futures_contracts(settle, limit=limit, offset=offset)
-List all futures contracts
+Query all futures contracts
### Example
@@ -71,10 +77,12 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
try:
- # List all futures contracts
- api_response = api_instance.list_futures_contracts(settle)
+ # Query all futures contracts
+ api_response = api_instance.list_futures_contracts(settle, limit=limit, offset=offset)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -87,6 +95,8 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
### Return type
@@ -104,14 +114,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **get_futures_contract**
> Contract get_futures_contract(settle, contract)
-Get a single contract
+Query single contract information
### Example
@@ -132,7 +142,7 @@ settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
try:
- # Get a single contract
+ # Query single contract information
api_response = api_instance.get_futures_contract(settle, contract)
print(api_response)
except GateApiException as ex:
@@ -171,7 +181,7 @@ No authorization required
# **list_futures_order_book**
> FuturesOrderBook list_futures_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id)
-Futures order book
+Query futures market depth information
Bids will be sorted by price from high to low, while asks sorted reversely
@@ -192,12 +202,12 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
-interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0')
-limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10)
-with_id = False # bool | Whether the order book update ID will be returned. This ID increases by 1 on every order book update (optional) (default to False)
+interval = '0' # str | Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified (optional) (default to '0')
+limit = 10 # int | Number of depth levels (optional) (default to 10)
+with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time depth changes (optional) (default to False)
try:
- # Futures order book
+ # Query futures market depth information
api_response = api_instance.list_futures_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id)
print(api_response)
except GateApiException as ex:
@@ -212,9 +222,9 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0']
- **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10]
- **with_id** | **bool**| Whether the order book update ID will be returned. This ID increases by 1 on every order book update | [optional] [default to False]
+ **interval** | **str**| Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified | [optional] [default to '0']
+ **limit** | **int**| Number of depth levels | [optional] [default to 10]
+ **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time depth changes | [optional] [default to False]
### Return type
@@ -232,14 +242,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Order book retrieved | - |
+**200** | Depth query successful | - |
[[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)
# **list_futures_trades**
> list[FuturesTrade] list_futures_trades(settle, contract, limit=limit, offset=offset, last_id=last_id, _from=_from, to=to)
-Futures trading history
+Futures market transaction records
### Example
@@ -258,14 +268,14 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range (optional)
_from = 1546905600 # int | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional)
-to = 1546935600 # int | Specify end time in Unix seconds, default to current time (optional)
+to = 1546935600 # int | Specify end time in Unix seconds, default to current time. (optional)
try:
- # Futures trading history
+ # Futures market transaction records
api_response = api_instance.list_futures_trades(settle, contract, limit=limit, offset=offset, last_id=last_id, _from=_from, to=to)
print(api_response)
except GateApiException as ex:
@@ -280,11 +290,11 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
**last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range | [optional]
**_from** | **int**| Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. | [optional]
- **to** | **int**| Specify end time in Unix seconds, default to current time | [optional]
+ **to** | **int**| Specify end time in Unix seconds, default to current time. | [optional]
### Return type
@@ -302,14 +312,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_futures_candlesticks**
-> list[FuturesCandlestick] list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval)
+> list[FuturesCandlestick] list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval, timezone=timezone)
-Get futures candlesticks
+Futures market K-line chart
Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval`
@@ -330,14 +340,15 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
-_from = 1546905600 # int | 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间 (optional)
-to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional)
-limit = 100 # int | 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝 (optional) (default to 100)
-interval = '5m' # str | 数据点的时间间隔,注意 1w 代表一个自然周,7d 的时间是和 Unix 初始时间对齐, 30d 代表一个自然月 (optional) (default to '5m')
+_from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional)
+to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision (optional)
+limit = 100 # int | Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100)
+interval = '5m' # str | Interval time between data points. Note that `1w` means natural week(Mon-Sun), while `7d` means every 7d since unix 0. 30d represents a natural month, not 30 days (optional) (default to '5m')
+timezone = 'utc0' # str | Time zone: all/utc0/utc8, default utc0 (optional) (default to 'utc0')
try:
- # Get futures candlesticks
- api_response = api_instance.list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval)
+ # Futures market K-line chart
+ api_response = api_instance.list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval, timezone=timezone)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -351,10 +362,11 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **_from** | **int**| 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间 | [optional]
- **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional]
- **limit** | **int**| 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝 | [optional] [default to 100]
- **interval** | **str**| 数据点的时间间隔,注意 1w 代表一个自然周,7d 的时间是和 Unix 初始时间对齐, 30d 代表一个自然月 | [optional] [default to '5m']
+ **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional]
+ **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision | [optional]
+ **limit** | **int**| Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100]
+ **interval** | **str**| Interval time between data points. Note that `1w` means natural week(Mon-Sun), while `7d` means every 7d since unix 0. 30d represents a natural month, not 30 days | [optional] [default to '5m']
+ **timezone** | **str**| Time zone: all/utc0/utc8, default utc0 | [optional] [default to 'utc0']
### Return type
@@ -372,14 +384,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_futures_premium_index**
> list[FuturesPremiumIndex] list_futures_premium_index(settle, contract, _from=_from, to=to, limit=limit, interval=interval)
-Premium Index K-Line
+Premium Index K-line chart
Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval
@@ -400,13 +412,13 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
-_from = 1546905600 # int | 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间 (optional)
-to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional)
-limit = 100 # int | 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝 (optional) (default to 100)
-interval = '5m' # str | Interval time between data points (optional) (default to '5m')
+_from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional)
+to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision (optional)
+limit = 100 # int | Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100)
+interval = '5m' # str | Time interval between data points (optional) (default to '5m')
try:
- # Premium Index K-Line
+ # Premium Index K-line chart
api_response = api_instance.list_futures_premium_index(settle, contract, _from=_from, to=to, limit=limit, interval=interval)
print(api_response)
except GateApiException as ex:
@@ -421,10 +433,10 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **_from** | **int**| 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间 | [optional]
- **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional]
- **limit** | **int**| 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝 | [optional] [default to 100]
- **interval** | **str**| Interval time between data points | [optional] [default to '5m']
+ **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional]
+ **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision | [optional]
+ **limit** | **int**| Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100]
+ **interval** | **str**| Time interval between data points | [optional] [default to '5m']
### Return type
@@ -442,14 +454,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_futures_tickers**
> list[FuturesTicker] list_futures_tickers(settle, contract=contract)
-List futures tickers
+Get all futures trading statistics
### Example
@@ -470,7 +482,7 @@ settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
try:
- # List futures tickers
+ # Get all futures trading statistics
api_response = api_instance.list_futures_tickers(settle, contract=contract)
print(api_response)
except GateApiException as ex:
@@ -502,14 +514,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_futures_funding_rate_history**
-> list[FundingRateRecord] list_futures_funding_rate_history(settle, contract, limit=limit)
+> list[FundingRateRecord] list_futures_funding_rate_history(settle, contract, limit=limit, _from=_from, to=to)
-Funding rate history
+Futures market historical funding rate
### Example
@@ -528,11 +540,13 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
try:
- # Funding rate history
- api_response = api_instance.list_futures_funding_rate_history(settle, contract, limit=limit)
+ # Futures market historical funding rate
+ api_response = api_instance.list_futures_funding_rate_history(settle, contract, limit=limit, _from=_from, to=to)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -546,7 +560,9 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
### Return type
@@ -564,14 +580,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | History retrieved | - |
+**200** | History query successful | - |
[[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)
# **list_futures_insurance_ledger**
> list[InsuranceRecord] list_futures_insurance_ledger(settle, limit=limit)
-Futures insurance balance history
+Futures market insurance fund history
### Example
@@ -589,10 +605,10 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
try:
- # Futures insurance balance history
+ # Futures market insurance fund history
api_response = api_instance.list_futures_insurance_ledger(settle, limit=limit)
print(api_response)
except GateApiException as ex:
@@ -606,7 +622,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
### Return type
@@ -624,14 +640,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_contract_stats**
> list[ContractStat] list_contract_stats(settle, contract, _from=_from, interval=interval, limit=limit)
-Futures stats
+Futures statistics
### Example
@@ -655,7 +671,7 @@ interval = '5m' # str | (optional) (default to '5m')
limit = 30 # int | (optional) (default to 30)
try:
- # Futures stats
+ # Futures statistics
api_response = api_instance.list_contract_stats(settle, contract, _from=_from, interval=interval, limit=limit)
print(api_response)
except GateApiException as ex:
@@ -690,14 +706,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **get_index_constituents**
> FuturesIndexConstituents get_index_constituents(settle, index)
-Get index constituents
+Query index constituents
### Example
@@ -718,7 +734,7 @@ settle = 'usdt' # str | Settle currency
index = 'BTC_USDT' # str | Index name
try:
- # Get index constituents
+ # Query index constituents
api_response = api_instance.get_index_constituents(settle, index)
print(api_response)
except GateApiException as ex:
@@ -750,16 +766,16 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_liquidated_orders**
> list[FuturesLiqOrder] list_liquidated_orders(settle, contract=contract, _from=_from, to=to, limit=limit)
-Retrieve liquidation history
+Query liquidation order history
-Interval between `from` and `to` cannot exceeds 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail.
+The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for details
### Example
@@ -778,12 +794,12 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
try:
- # Retrieve liquidation history
+ # Query liquidation order history
api_response = api_instance.list_liquidated_orders(settle, contract=contract, _from=_from, to=to, limit=limit)
print(api_response)
except GateApiException as ex:
@@ -798,9 +814,9 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract, return related data only if specified | [optional]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
### Return type
@@ -818,14 +834,80 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
+
+[[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)
+
+# **list_futures_risk_limit_tiers**
+> list[FuturesLimitRiskTiers] list_futures_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset)
+
+Query risk limit tiers
+
+When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty.
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.FuturesApi(api_client)
+settle = 'usdt' # str | Settle currency
+contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
+
+try:
+ # Query risk limit tiers
+ api_response = api_instance.list_futures_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling FuturesApi->list_futures_risk_limit_tiers: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **settle** | **str**| Settle currency |
+ **contract** | **str**| Futures contract, return related data only if specified | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
+
+### Return type
+
+[**list[FuturesLimitRiskTiers]**](FuturesLimitRiskTiers.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
[[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)
# **list_futures_accounts**
> FuturesAccount list_futures_accounts(settle)
-Query futures account
+Get futures account
### Example
@@ -854,7 +936,7 @@ api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
try:
- # Query futures account
+ # Get futures account
api_response = api_instance.list_futures_accounts(settle)
print(api_response)
except GateApiException as ex:
@@ -885,14 +967,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_futures_account_book**
-> list[FuturesAccountBook] list_futures_account_book(settle, limit=limit, _from=_from, to=to, type=type)
+> list[FuturesAccountBook] list_futures_account_book(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, type=type)
+
+Query futures account change history
-Query account book
+If the contract field is passed, only records containing this field after 2023-10-30 can be filtered.
### Example
@@ -919,14 +1003,16 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
-type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate (optional)
+contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
+type = 'dnw' # str | Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction (optional)
try:
- # Query account book
- api_response = api_instance.list_futures_account_book(settle, limit=limit, _from=_from, to=to, type=type)
+ # Query futures account change history
+ api_response = api_instance.list_futures_account_book(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, type=type)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -939,10 +1025,12 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
- **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional]
+ **contract** | **str**| Futures contract, return related data only if specified | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
+ **type** | **str**| Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction | [optional]
### Return type
@@ -960,14 +1048,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_positions**
-> list[Position] list_positions(settle, holding=holding)
+> list[Position] list_positions(settle, holding=holding, limit=limit, offset=offset)
-List all positions of a user
+Get user position list
### Example
@@ -994,11 +1082,13 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
-holding = true # bool | 只返回真实持仓-true,全部返回-false (optional)
+holding = true # bool | Return only real positions - true, return all - false (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
try:
- # List all positions of a user
- api_response = api_instance.list_positions(settle, holding=holding)
+ # Get user position list
+ api_response = api_instance.list_positions(settle, holding=holding, limit=limit, offset=offset)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -1011,7 +1101,9 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **holding** | **bool**| 只返回真实持仓-true,全部返回-false | [optional]
+ **holding** | **bool**| Return only real positions - true, return all - false | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
### Return type
@@ -1029,14 +1121,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **get_position**
> Position get_position(settle, contract)
-Get single position
+Get single position information
### Example
@@ -1066,7 +1158,7 @@ settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
try:
- # Get single position
+ # Get single position information
api_response = api_instance.get_position(settle, contract)
print(api_response)
except GateApiException as ex:
@@ -1133,7 +1225,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
-change = '0.01' # str | Margin change. Use positive number to increase margin, negative number otherwise.
+change = '0.01' # str | Margin change amount, positive number increases, negative number decreases
try:
# Update position margin
@@ -1151,7 +1243,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **change** | **str**| Margin change. Use positive number to increase margin, negative number otherwise. |
+ **change** | **str**| Margin change amount, positive number increases, negative number decreases |
### Return type
@@ -1174,7 +1266,7 @@ Name | Type | Description | Notes
[[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)
# **update_position_leverage**
-> Position update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit)
+> Position update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit, pid=pid)
Update position leverage
@@ -1205,11 +1297,12 @@ api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
leverage = '10' # str | New position leverage
-cross_leverage_limit = '10' # str | Cross margin leverage(valid only when `leverage` is 0) (optional)
+cross_leverage_limit = '10' # str | Cross margin leverage (valid only when `leverage` is 0) (optional)
+pid = 1 # int | Product ID (optional)
try:
# Update position leverage
- api_response = api_instance.update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit)
+ api_response = api_instance.update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit, pid=pid)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -1224,7 +1317,8 @@ Name | Type | Description | Notes
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
**leverage** | **str**| New position leverage |
- **cross_leverage_limit** | **str**| Cross margin leverage(valid only when `leverage` is 0) | [optional]
+ **cross_leverage_limit** | **str**| Cross margin leverage (valid only when `leverage` is 0) | [optional]
+ **pid** | **int**| Product ID | [optional]
### Return type
@@ -1246,6 +1340,144 @@ Name | Type | Description | Notes
[[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)
+# **update_position_cross_mode**
+> Position update_position_cross_mode(settle, futures_position_cross_mode)
+
+Switch Position Margin Mode
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.FuturesApi(api_client)
+settle = 'usdt' # str | Settle currency
+futures_position_cross_mode = gate_api.FuturesPositionCrossMode() # FuturesPositionCrossMode |
+
+try:
+ # Switch Position Margin Mode
+ api_response = api_instance.update_position_cross_mode(settle, futures_position_cross_mode)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling FuturesApi->update_position_cross_mode: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **settle** | **str**| Settle currency |
+ **futures_position_cross_mode** | [**FuturesPositionCrossMode**](FuturesPositionCrossMode.md)| |
+
+### Return type
+
+[**Position**](Position.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Position information | - |
+
+[[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)
+
+# **update_dual_comp_position_cross_mode**
+> list[Position] update_dual_comp_position_cross_mode(settle, inline_object)
+
+Switch Between Cross and Isolated Margin Modes Under Hedge Mode
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.FuturesApi(api_client)
+settle = 'usdt' # str | Settle currency
+inline_object = gate_api.InlineObject() # InlineObject |
+
+try:
+ # Switch Between Cross and Isolated Margin Modes Under Hedge Mode
+ api_response = api_instance.update_dual_comp_position_cross_mode(settle, inline_object)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling FuturesApi->update_dual_comp_position_cross_mode: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **settle** | **str**| Settle currency |
+ **inline_object** | [**InlineObject**](InlineObject.md)| |
+
+### Return type
+
+[**list[Position]**](Position.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
# **update_position_risk_limit**
> Position update_position_risk_limit(settle, contract, risk_limit)
@@ -1277,7 +1509,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
-risk_limit = '10' # str | New position risk limit
+risk_limit = '1000000' # str | New risk limit value
try:
# Update position risk limit
@@ -1295,7 +1527,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **risk_limit** | **str**| New position risk limit |
+ **risk_limit** | **str**| New risk limit value |
### Return type
@@ -1320,9 +1552,9 @@ Name | Type | Description | Notes
# **set_dual_mode**
> FuturesAccount set_dual_mode(settle, dual_mode)
-Enable or disable dual mode
+Set position mode
-Before setting dual mode, make sure all positions are closed and no orders are open
+The prerequisite for changing mode is that all positions have no holdings and no pending orders
### Example
@@ -1352,7 +1584,7 @@ settle = 'usdt' # str | Settle currency
dual_mode = true # bool | Whether to enable dual mode
try:
- # Enable or disable dual mode
+ # Set position mode
api_response = api_instance.set_dual_mode(settle, dual_mode)
print(api_response)
except GateApiException as ex:
@@ -1384,14 +1616,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Updated | - |
+**200** | Updated successfully | - |
[[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)
# **get_dual_mode_position**
> list[Position] get_dual_mode_position(settle, contract)
-Retrieve position detail in dual mode
+Get position information in dual mode
### Example
@@ -1421,7 +1653,7 @@ settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
try:
- # Retrieve position detail in dual mode
+ # Get position information in dual mode
api_response = api_instance.get_dual_mode_position(settle, contract)
print(api_response)
except GateApiException as ex:
@@ -1453,7 +1685,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
@@ -1488,7 +1720,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
-change = '0.01' # str | Margin change. Use positive number to increase margin, negative number otherwise.
+change = '0.01' # str | Margin change amount, positive number increases, negative number decreases
dual_side = 'dual_long' # str | Long or short position
try:
@@ -1507,7 +1739,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **change** | **str**| Margin change. Use positive number to increase margin, negative number otherwise. |
+ **change** | **str**| Margin change amount, positive number increases, negative number decreases |
**dual_side** | **str**| Long or short position |
### Return type
@@ -1526,7 +1758,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
@@ -1562,7 +1794,7 @@ api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
leverage = '10' # str | New position leverage
-cross_leverage_limit = '10' # str | Cross margin leverage(valid only when `leverage` is 0) (optional)
+cross_leverage_limit = '10' # str | Cross margin leverage (valid only when `leverage` is 0) (optional)
try:
# Update position leverage in dual mode
@@ -1581,7 +1813,7 @@ Name | Type | Description | Notes
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
**leverage** | **str**| New position leverage |
- **cross_leverage_limit** | **str**| Cross margin leverage(valid only when `leverage` is 0) | [optional]
+ **cross_leverage_limit** | **str**| Cross margin leverage (valid only when `leverage` is 0) | [optional]
### Return type
@@ -1599,7 +1831,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
@@ -1634,7 +1866,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
-risk_limit = '10' # str | New position risk limit
+risk_limit = '1000000' # str | New risk limit value
try:
# Update position risk limit in dual mode
@@ -1652,7 +1884,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **risk_limit** | **str**| New position risk limit |
+ **risk_limit** | **str**| New risk limit value |
### Return type
@@ -1670,16 +1902,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_futures_orders**
> list[FuturesOrder] list_futures_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id)
-List futures orders
+Query futures order list
-Zero-filled order cannot be retrieved 10 minutes after order cancellation
+- Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`.
### Example
@@ -1706,14 +1938,14 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
-status = 'open' # str | Only list the orders with this status
+status = 'open' # str | Query order list based on status
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
-last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional)
+last_id = '12345' # str | Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used (optional)
try:
- # List futures orders
+ # Query futures order list
api_response = api_instance.list_futures_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id)
print(api_response)
except GateApiException as ex:
@@ -1727,11 +1959,11 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **status** | **str**| Only list the orders with this status |
+ **status** | **str**| Query order list based on status |
**contract** | **str**| Futures contract, return related data only if specified | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
- **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional]
+ **last_id** | **str**| Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used | [optional]
### Return type
@@ -1749,16 +1981,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
|
+**200** | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination
* X-Pagination-Offset - Offset specified for pagination
|
[[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)
# **create_futures_order**
-> FuturesOrder create_futures_order(settle, futures_order)
+> FuturesOrder create_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime)
-Create a futures order
+Place futures order
-- 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
+- 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 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`
### Example
@@ -1786,10 +2018,11 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
futures_order = gate_api.FuturesOrder() # FuturesOrder |
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
try:
- # Create a futures order
- api_response = api_instance.create_futures_order(settle, futures_order)
+ # Place futures order
+ api_response = api_instance.create_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -1803,6 +2036,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**futures_order** | [**FuturesOrder**](FuturesOrder.md)| |
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
### Return type
@@ -1825,11 +2059,11 @@ Name | Type | Description | Notes
[[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)
# **cancel_futures_orders**
-> list[FuturesOrder] cancel_futures_orders(settle, contract, side=side)
+> list[FuturesOrder] cancel_futures_orders(settle, contract, x_gate_exptime=x_gate_exptime, side=side, exclude_reduce_only=exclude_reduce_only, text=text)
-Cancel all `open` orders matched
+Cancel all orders with 'open' status
-Zero-filled order cannot be retrieved 10 minutes after order cancellation
+Zero-fill orders cannot be retrieved 10 minutes after order cancellation
### Example
@@ -1857,11 +2091,14 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract
-side = 'ask' # str | All bids or asks. Both included if not specified (optional)
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
+side = 'ask' # str | Specify all buy orders or all sell orders, both are included if not specified. Set to bid to cancel all buy orders, set to ask to cancel all sell orders (optional)
+exclude_reduce_only = False # bool | Whether to exclude reduce-only orders (optional) (default to False)
+text = 'cancel by user' # str | Remark for order cancellation (optional)
try:
- # Cancel all `open` orders matched
- api_response = api_instance.cancel_futures_orders(settle, contract, side=side)
+ # Cancel all orders with 'open' status
+ api_response = api_instance.cancel_futures_orders(settle, contract, x_gate_exptime=x_gate_exptime, side=side, exclude_reduce_only=exclude_reduce_only, text=text)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -1875,7 +2112,10 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract |
- **side** | **str**| All bids or asks. Both included if not specified | [optional]
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
+ **side** | **str**| Specify all buy orders or all sell orders, both are included if not specified. Set to bid to cancel all buy orders, set to ask to cancel all sell orders | [optional]
+ **exclude_reduce_only** | **bool**| Whether to exclude reduce-only orders | [optional] [default to False]
+ **text** | **str**| Remark for order cancellation | [optional]
### Return type
@@ -1893,14 +2133,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | All orders matched cancelled | - |
+**200** | Batch cancellation successful | - |
[[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)
# **get_orders_with_time_range**
> list[FuturesOrder] get_orders_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset)
-List Futures Orders By Time Range
+Query futures order list by time range
### Example
@@ -1928,13 +2168,13 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
try:
- # List Futures Orders By Time Range
+ # Query futures order list by time range
api_response = api_instance.get_orders_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset)
print(api_response)
except GateApiException as ex:
@@ -1949,9 +2189,9 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract, return related data only if specified | [optional]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
### Return type
@@ -1970,14 +2210,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
|
+**200** | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination
* X-Pagination-Offset - Offset specified for pagination
|
[[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)
# **create_batch_futures_order**
-> list[BatchFuturesOrder] create_batch_futures_order(settle, futures_order)
+> list[BatchFuturesOrder] create_batch_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime)
-Create a batch of futures orders
+Place batch futures orders
- Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually
@@ -2007,10 +2247,11 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
futures_order = [gate_api.FuturesOrder()] # list[FuturesOrder] |
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
try:
- # Create a batch of futures orders
- api_response = api_instance.create_batch_futures_order(settle, futures_order)
+ # Place batch futures orders
+ api_response = api_instance.create_batch_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -2024,6 +2265,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**futures_order** | [**list[FuturesOrder]**](FuturesOrder.md)| |
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
### Return type
@@ -2041,16 +2283,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Request is completed | - |
+**200** | Request execution completed | - |
[[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)
# **get_futures_order**
> FuturesOrder get_futures_order(settle, order_id)
-Get a single order
+Query single order details
-Zero-filled order cannot be retrieved 10 minutes after order cancellation
+- Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported.
### Example
@@ -2077,10 +2319,10 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
-order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted.
+order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted.
try:
- # Get a single order
+ # Query single order details
api_response = api_instance.get_futures_order(settle, order_id)
print(api_response)
except GateApiException as ex:
@@ -2094,7 +2336,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. |
+ **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. |
### Return type
@@ -2117,9 +2359,9 @@ Name | Type | Description | Notes
[[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)
# **amend_futures_order**
-> FuturesOrder amend_futures_order(settle, order_id, futures_order_amendment)
+> FuturesOrder amend_futures_order(settle, order_id, futures_order_amendment, x_gate_exptime=x_gate_exptime)
-Amend an order
+Amend single order
### Example
@@ -2146,12 +2388,13 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
-order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted.
+order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted.
futures_order_amendment = gate_api.FuturesOrderAmendment() # FuturesOrderAmendment |
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
try:
- # Amend an order
- api_response = api_instance.amend_futures_order(settle, order_id, futures_order_amendment)
+ # Amend single order
+ api_response = api_instance.amend_futures_order(settle, order_id, futures_order_amendment, x_gate_exptime=x_gate_exptime)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -2164,8 +2407,9 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. |
+ **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. |
**futures_order_amendment** | [**FuturesOrderAmendment**](FuturesOrderAmendment.md)| |
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
### Return type
@@ -2188,9 +2432,9 @@ Name | Type | Description | Notes
[[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)
# **cancel_futures_order**
-> FuturesOrder cancel_futures_order(settle, order_id)
+> FuturesOrder cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime)
-Cancel a single order
+Cancel single order
### Example
@@ -2217,11 +2461,12 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
-order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted.
+order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted.
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
try:
- # Cancel a single order
- api_response = api_instance.cancel_futures_order(settle, order_id)
+ # Cancel single order
+ api_response = api_instance.cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -2234,7 +2479,8 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. |
+ **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. |
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
### Return type
@@ -2259,7 +2505,9 @@ Name | Type | Description | Notes
# **get_my_trades**
> list[MyFuturesTrade] get_my_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id)
-List personal trading history
+Query personal trading records
+
+By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`.
### Example
@@ -2288,12 +2536,12 @@ api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
order = 12345 # int | Futures order ID, return related data only if specified (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. (optional)
try:
- # List personal trading history
+ # Query personal trading records
api_response = api_instance.get_my_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id)
print(api_response)
except GateApiException as ex:
@@ -2309,7 +2557,7 @@ Name | Type | Description | Notes
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract, return related data only if specified | [optional]
**order** | **int**| Futures order ID, return related data only if specified | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
**last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. | [optional]
@@ -2329,14 +2577,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
|
+**200** | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination
* X-Pagination-Offset - Offset specified for pagination
|
[[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)
# **get_my_trades_with_time_range**
> list[MyFuturesTradeTimeRange] get_my_trades_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset, role=role)
-List personal trading history by time range
+Query personal trading records by time range
### Example
@@ -2364,14 +2612,14 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
-role = 'maker' # str | 查询角色,Maker 或 Taker (optional)
+role = 'maker' # str | Query role, maker or taker (optional)
try:
- # List personal trading history by time range
+ # Query personal trading records by time range
api_response = api_instance.get_my_trades_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset, role=role)
print(api_response)
except GateApiException as ex:
@@ -2386,11 +2634,11 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract, return related data only if specified | [optional]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
- **role** | **str**| 查询角色,Maker 或 Taker | [optional]
+ **role** | **str**| Query role, maker or taker | [optional]
### Return type
@@ -2408,14 +2656,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
|
+**200** | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination
* X-Pagination-Offset - Offset specified for pagination
|
[[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)
# **list_position_close**
> list[PositionClose] list_position_close(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, side=side, pnl=pnl)
-List position close history
+Query position close history
### Example
@@ -2443,15 +2691,15 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
-side = 'short' # str | 方向筛选,做多(long)或做空(short) (optional)
-pnl = 'profit' # str | 盈亏判断,盈利(profit)或亏损(loss) (optional)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
+side = 'short' # str | Query side. long or shot (optional)
+pnl = 'profit' # str | Query profit or loss (optional)
try:
- # List position close history
+ # Query position close history
api_response = api_instance.list_position_close(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, side=side, pnl=pnl)
print(api_response)
except GateApiException as ex:
@@ -2466,12 +2714,12 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract, return related data only if specified | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
- **side** | **str**| 方向筛选,做多(long)或做空(short) | [optional]
- **pnl** | **str**| 盈亏判断,盈利(profit)或亏损(loss) | [optional]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
+ **side** | **str**| Query side. long or shot | [optional]
+ **pnl** | **str**| Query profit or loss | [optional]
### Return type
@@ -2489,14 +2737,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_liquidates**
-> list[FuturesLiquidate] list_liquidates(settle, contract=contract, limit=limit, at=at)
+> list[FuturesLiquidate] list_liquidates(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at)
-List liquidation history
+Query liquidation history
### Example
@@ -2524,12 +2772,15 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-at = 0 # int | Specify a liquidation timestamp (optional) (default to 0)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
+at = 0 # int | Specify liquidation timestamp (optional) (default to 0)
try:
- # List liquidation history
- api_response = api_instance.list_liquidates(settle, contract=contract, limit=limit, at=at)
+ # Query liquidation history
+ api_response = api_instance.list_liquidates(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -2543,8 +2794,11 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract, return related data only if specified | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **at** | **int**| Specify a liquidation timestamp | [optional] [default to 0]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
+ **at** | **int**| Specify liquidation timestamp | [optional] [default to 0]
### Return type
@@ -2562,14 +2816,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_auto_deleverages**
-> list[FuturesAutoDeleverage] list_auto_deleverages(settle, contract=contract, limit=limit, at=at)
+> list[FuturesAutoDeleverage] list_auto_deleverages(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at)
-List Auto-Deleveraging History
+Query ADL auto-deleveraging order information
### Example
@@ -2597,12 +2851,15 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-at = 0 # int | Specify an auto-deleveraging timestamp (optional) (default to 0)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
+at = 0 # int | Specify auto-deleveraging timestamp (optional) (default to 0)
try:
- # List Auto-Deleveraging History
- api_response = api_instance.list_auto_deleverages(settle, contract=contract, limit=limit, at=at)
+ # Query ADL auto-deleveraging order information
+ api_response = api_instance.list_auto_deleverages(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -2616,8 +2873,11 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
**contract** | **str**| Futures contract, return related data only if specified | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **at** | **int**| Specify an auto-deleveraging timestamp | [optional] [default to 0]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
+ **at** | **int**| Specify auto-deleveraging timestamp | [optional] [default to 0]
### Return type
@@ -2635,7 +2895,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
@@ -2644,7 +2904,7 @@ Name | Type | Description | Notes
Countdown cancel orders
-When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled.
+Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled.
### Example
@@ -2706,14 +2966,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Set countdown successfully | - |
+**200** | Countdown set successfully | - |
[[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)
# **get_futures_fee**
> dict(str, FuturesFee) get_futures_fee(settle, contract=contract)
-Query user trading fee rates
+Query futures market trading fee rates
### Example
@@ -2743,7 +3003,7 @@ settle = 'usdt' # str | Settle currency
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
try:
- # Query user trading fee rates
+ # Query futures market trading fee rates
api_response = api_instance.get_futures_fee(settle, contract=contract)
print(api_response)
except GateApiException as ex:
@@ -2775,14 +3035,222 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
+
+[[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)
+
+# **cancel_batch_future_orders**
+> list[FutureCancelOrderResult] cancel_batch_future_orders(settle, request_body, x_gate_exptime=x_gate_exptime)
+
+Cancel batch orders by specified ID list
+
+Multiple different order IDs can be specified, maximum 20 records per request
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.FuturesApi(api_client)
+settle = 'usdt' # str | Settle currency
+request_body = ['request_body_example'] # list[str] |
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
+
+try:
+ # Cancel batch orders by specified ID list
+ api_response = api_instance.cancel_batch_future_orders(settle, request_body, x_gate_exptime=x_gate_exptime)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling FuturesApi->cancel_batch_future_orders: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **settle** | **str**| Settle currency |
+ **request_body** | [**list[str]**](str.md)| |
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
+
+### Return type
+
+[**list[FutureCancelOrderResult]**](FutureCancelOrderResult.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Order cancellation operation completed | - |
+
+[[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)
+
+# **amend_batch_future_orders**
+> list[BatchFuturesOrder] amend_batch_future_orders(settle, batch_amend_order_req, x_gate_exptime=x_gate_exptime)
+
+Batch modify orders by specified IDs
+
+Multiple different order IDs can be specified, maximum 10 orders per request
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.FuturesApi(api_client)
+settle = 'usdt' # str | Settle currency
+batch_amend_order_req = [gate_api.BatchAmendOrderReq()] # list[BatchAmendOrderReq] |
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
+
+try:
+ # Batch modify orders by specified IDs
+ api_response = api_instance.amend_batch_future_orders(settle, batch_amend_order_req, x_gate_exptime=x_gate_exptime)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling FuturesApi->amend_batch_future_orders: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **settle** | **str**| Settle currency |
+ **batch_amend_order_req** | [**list[BatchAmendOrderReq]**](BatchAmendOrderReq.md)| |
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
+
+### Return type
+
+[**list[BatchFuturesOrder]**](BatchFuturesOrder.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Request execution completed | - |
+
+[[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)
+
+# **get_futures_risk_limit_table**
+> list[FuturesRiskLimitTier] get_futures_risk_limit_table(settle, table_id)
+
+Query risk limit table by table_id
+
+Just pass table_id
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.FuturesApi(api_client)
+settle = 'usdt' # str | Settle currency
+table_id = 'CYBER_USDT_20241122' # str | Risk limit table ID
+
+try:
+ # Query risk limit table by table_id
+ api_response = api_instance.get_futures_risk_limit_table(settle, table_id)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling FuturesApi->get_futures_risk_limit_table: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **settle** | **str**| Settle currency |
+ **table_id** | **str**| Risk limit table ID |
+
+### Return type
+
+[**list[FuturesRiskLimitTier]**](FuturesRiskLimitTier.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
[[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)
# **list_price_triggered_orders**
> list[FuturesPriceTriggeredOrder] list_price_triggered_orders(settle, status, contract=contract, limit=limit, offset=offset)
-List all auto orders
+Query auto order list
### Example
@@ -2809,13 +3277,13 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
-status = 'status_example' # str | Only list the orders with this status
+status = 'status_example' # str | Query order list based on status
contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
try:
- # List all auto orders
+ # Query auto order list
api_response = api_instance.list_price_triggered_orders(settle, status, contract=contract, limit=limit, offset=offset)
print(api_response)
except GateApiException as ex:
@@ -2829,9 +3297,9 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **status** | **str**| Only list the orders with this status |
+ **status** | **str**| Query order list based on status |
**contract** | **str**| Futures contract, return related data only if specified | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
### Return type
@@ -2850,14 +3318,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **create_price_triggered_order**
> TriggerOrderResponse create_price_triggered_order(settle, futures_price_triggered_order)
-Create a price-triggered order
+Create price-triggered order
### Example
@@ -2887,7 +3355,7 @@ settle = 'usdt' # str | Settle currency
futures_price_triggered_order = gate_api.FuturesPriceTriggeredOrder() # FuturesPriceTriggeredOrder |
try:
- # Create a price-triggered order
+ # Create price-triggered order
api_response = api_instance.create_price_triggered_order(settle, futures_price_triggered_order)
print(api_response)
except GateApiException as ex:
@@ -2919,14 +3387,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**201** | Order created | - |
+**201** | Order created successfully | - |
[[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)
# **cancel_price_triggered_order_list**
-> list[FuturesPriceTriggeredOrder] cancel_price_triggered_order_list(settle, contract)
+> list[FuturesPriceTriggeredOrder] cancel_price_triggered_order_list(settle, contract=contract)
-Cancel all open orders
+Cancel all auto orders
### Example
@@ -2953,11 +3421,11 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
-contract = 'BTC_USDT' # str | Futures contract
+contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional)
try:
- # Cancel all open orders
- api_response = api_instance.cancel_price_triggered_order_list(settle, contract)
+ # Cancel all auto orders
+ api_response = api_instance.cancel_price_triggered_order_list(settle, contract=contract)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -2970,7 +3438,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **contract** | **str**| Futures contract |
+ **contract** | **str**| Futures contract, return related data only if specified | [optional]
### Return type
@@ -2988,14 +3456,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Batch cancellation request accepted. Query order status by listing orders | - |
+**200** | Batch cancellation request accepted and processed, success determined by order list | - |
[[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)
# **get_price_triggered_order**
> FuturesPriceTriggeredOrder get_price_triggered_order(settle, order_id)
-Get a price-triggered order
+Query single auto order details
### Example
@@ -3022,10 +3490,10 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
-order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID
+order_id = 'order_id_example' # str | ID returned when order is successfully created
try:
- # Get a price-triggered order
+ # Query single auto order details
api_response = api_instance.get_price_triggered_order(settle, order_id)
print(api_response)
except GateApiException as ex:
@@ -3039,7 +3507,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **order_id** | **str**| Retrieve the data of the order with the specified ID |
+ **order_id** | **str**| ID returned when order is successfully created |
### Return type
@@ -3057,14 +3525,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Auto order detail | - |
+**200** | Auto order details | - |
[[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)
# **cancel_price_triggered_order**
> FuturesPriceTriggeredOrder cancel_price_triggered_order(settle, order_id)
-cancel a price-triggered order
+Cancel single auto order
### Example
@@ -3091,10 +3559,10 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.FuturesApi(api_client)
settle = 'usdt' # str | Settle currency
-order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID
+order_id = 'order_id_example' # str | ID returned when order is successfully created
try:
- # cancel a price-triggered order
+ # Cancel single auto order
api_response = api_instance.cancel_price_triggered_order(settle, order_id)
print(api_response)
except GateApiException as ex:
@@ -3108,7 +3576,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**settle** | **str**| Settle currency |
- **order_id** | **str**| Retrieve the data of the order with the specified ID |
+ **order_id** | **str**| ID returned when order is successfully created |
### Return type
@@ -3126,7 +3594,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Auto order detail | - |
+**200** | Auto order details | - |
[[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)
diff --git a/docs/FuturesAutoDeleverage.md b/docs/FuturesAutoDeleverage.md
index ae4759c..1f2d674 100644
--- a/docs/FuturesAutoDeleverage.md
+++ b/docs/FuturesAutoDeleverage.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**order_id** | **int** | Order ID. Order IDs before 2023-02-20 are null | [optional] [readonly]
**contract** | **str** | Futures contract | [optional] [readonly]
**leverage** | **str** | Position leverage | [optional] [readonly]
-**cross_leverage_limit** | **str** | Cross margin leverage(valid only when `leverage` is 0) | [optional] [readonly]
+**cross_leverage_limit** | **str** | Cross margin leverage (valid only when `leverage` is 0) | [optional] [readonly]
**entry_price** | **str** | Average entry price | [optional] [readonly]
**fill_price** | **str** | Average fill price | [optional] [readonly]
**trade_size** | **int** | Trading size | [optional] [readonly]
diff --git a/docs/FuturesBatchAmendOrderRequest.md b/docs/FuturesBatchAmendOrderRequest.md
new file mode 100644
index 0000000..b8a8467
--- /dev/null
+++ b/docs/FuturesBatchAmendOrderRequest.md
@@ -0,0 +1,15 @@
+# FuturesBatchAmendOrderRequest
+
+Modify contract order parameters
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order_id** | **int** | Order id, order_id and text must contain at least one | [optional]
+**text** | **str** | User-defined order text, at least one of order_id and text must be passed | [optional]
+**size** | **int** | New order size, including filled size. - If less than or equal to the filled quantity, the order will be cancelled. - The new order side must be identical to the original one. - Close order size cannot be modified. - For reduce-only orders, increasing the size may cancel other reduce-only orders. - If the price is not modified, decreasing the size will not affect the depth queue, while increasing the size will place it at the end of the current price level. | [optional]
+**price** | **str** | New order price | [optional]
+**amend_text** | **str** | Custom info during order amendment | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/FuturesFee.md b/docs/FuturesFee.md
index 383ec9e..5b3c0df 100644
--- a/docs/FuturesFee.md
+++ b/docs/FuturesFee.md
@@ -1,6 +1,6 @@
# FuturesFee
-The returned result is a map type, where the key represents the market and the value represents the taker and maker fee rates.
+The returned result is a map type, where the key represents the market and taker and maker fee rates
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
diff --git a/docs/FuturesInitialOrder.md b/docs/FuturesInitialOrder.md
index 63af975..6c6dd28 100644
--- a/docs/FuturesInitialOrder.md
+++ b/docs/FuturesInitialOrder.md
@@ -4,13 +4,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**contract** | **str** | Futures contract |
-**size** | **int** | Order size. Positive size means to buy, while negative one means to sell. Set to 0 to close the position | [optional]
+**size** | **int** | Represents the number of contracts that need to be closed, full closing: size=0 Partial closing: plan-close-short-position size>0 Partial closing: plan-close-long-position size<0 | [optional]
**price** | **str** | Order price. Set to 0 to use market price |
-**close** | **bool** | Set to true if trying to close the position | [optional] [default to False]
-**tif** | **str** | Time in force. If using market price, only `ioc` is supported. - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled | [optional] [default to 'gtc']
-**text** | **str** | How the order is created. Possible values are: web, api and app | [optional]
-**reduce_only** | **bool** | Set to true to create a reduce-only order | [optional] [default to False]
-**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]
+**close** | **bool** | When all positions are closed in a single position mode, it must be set to true to perform the closing operation When partially closed positions in single-store mode/double-store mode, you can not set close, or close=false | [optional] [default to False]
+**tif** | **str** | Time in force strategy, default is gtc, market orders currently only support ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled | [optional] [default to 'gtc']
+**text** | **str** | The source of the order, including: - web: Web - api: API call - app: Mobile app | [optional]
+**reduce_only** | **bool** | When set to true, perform automatic position reduction operation. Set to true to ensure that the order will not open a new position, and is only used to close or reduce positions | [optional] [default to False]
+**auto_size** | **str** | Single position mode: auto_size is not required Dual position mode full closing (size=0): auto_size must be set, close_long for closing long positions, close_short for closing short positions Dual position mode partial closing (size≠0): auto_size is not required | [optional]
**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly]
**is_close** | **bool** | Is the order to close position | [optional] [readonly]
diff --git a/docs/FuturesLimitRiskTiers.md b/docs/FuturesLimitRiskTiers.md
new file mode 100644
index 0000000..704f833
--- /dev/null
+++ b/docs/FuturesLimitRiskTiers.md
@@ -0,0 +1,17 @@
+# FuturesLimitRiskTiers
+
+Retrieve risk limit configurations for different tiers under a specified contract
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**tier** | **int** | Tier | [optional]
+**risk_limit** | **str** | Position risk limit | [optional]
+**initial_rate** | **str** | Initial margin rate | [optional]
+**maintenance_rate** | **str** | Maintenance margin rate | [optional]
+**leverage_max** | **str** | Maximum leverage | [optional]
+**contract** | **str** | Market, only visible when market pagination is requested | [optional]
+**deduction** | **str** | Maintenance margin quick calculation deduction amount | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/FuturesLiqOrder.md b/docs/FuturesLiqOrder.md
index 3cc3b7d..daf3c5e 100644
--- a/docs/FuturesLiqOrder.md
+++ b/docs/FuturesLiqOrder.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
**time** | **int** | Liquidation time | [optional] [readonly]
**contract** | **str** | Futures contract | [optional] [readonly]
**size** | **int** | User position size | [optional] [readonly]
+**order_size** | **int** | Number of forced liquidation orders | [optional] [readonly]
**order_price** | **str** | Liquidation order price | [optional] [readonly]
**fill_price** | **str** | Liquidation order average taker price | [optional] [readonly]
**left** | **int** | System liquidation order maker size | [optional] [readonly]
diff --git a/docs/FuturesLiquidate.md b/docs/FuturesLiquidate.md
index c8575b9..78b62b2 100644
--- a/docs/FuturesLiquidate.md
+++ b/docs/FuturesLiquidate.md
@@ -5,13 +5,13 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time** | **int** | Liquidation time | [optional] [readonly]
**contract** | **str** | Futures contract | [optional] [readonly]
-**leverage** | **str** | Position leverage. Not returned in public endpoints. | [optional] [readonly]
+**leverage** | **str** | Position leverage. Not returned in public endpoints | [optional] [readonly]
**size** | **int** | Position size | [optional] [readonly]
-**margin** | **str** | Position margin. Not returned in public endpoints. | [optional] [readonly]
-**entry_price** | **str** | Average entry price. Not returned in public endpoints. | [optional] [readonly]
-**liq_price** | **str** | Liquidation price. Not returned in public endpoints. | [optional] [readonly]
-**mark_price** | **str** | Mark price. Not returned in public endpoints. | [optional] [readonly]
-**order_id** | **int** | Liquidation order ID. Not returned in public endpoints. | [optional] [readonly]
+**margin** | **str** | Position margin. Not returned in public endpoints | [optional] [readonly]
+**entry_price** | **str** | Average entry price. Not returned in public endpoints | [optional] [readonly]
+**liq_price** | **str** | Liquidation price. Not returned in public endpoints | [optional] [readonly]
+**mark_price** | **str** | Mark price. Not returned in public endpoints | [optional] [readonly]
+**order_id** | **int** | Liquidation order ID. Not returned in public endpoints | [optional] [readonly]
**order_price** | **str** | Liquidation order price | [optional] [readonly]
**fill_price** | **str** | Liquidation order average taker price | [optional] [readonly]
**left** | **int** | Liquidation order maker size | [optional] [readonly]
diff --git a/docs/FuturesOrder.md b/docs/FuturesOrder.md
index 309feb2..1d0de6a 100644
--- a/docs/FuturesOrder.md
+++ b/docs/FuturesOrder.md
@@ -7,29 +7,32 @@ Name | Type | Description | Notes
**id** | **int** | Futures order ID | [optional] [readonly]
**user** | **int** | User ID | [optional] [readonly]
**create_time** | **float** | Creation time of order | [optional] [readonly]
+**update_time** | **float** | OrderUpdateTime | [optional] [readonly]
**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly]
-**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]
-**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly]
+**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]
+**status** | **str** | Order status - `open`: Pending - `finished`: Completed | [optional] [readonly]
**contract** | **str** | Futures contract |
-**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask |
-**iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional]
-**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` | [optional]
+**size** | **int** | Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. |
+**iceberg** | **int** | Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. | [optional]
+**price** | **str** | Order price. Price of 0 with `tif` set to `ioc` represents a market order. | [optional]
**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False]
**is_close** | **bool** | Is the order to close position | [optional] [readonly]
**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False]
**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly]
**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly]
**tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc']
-**left** | **int** | Size left to be traded | [optional] [readonly]
-**fill_price** | **str** | Fill price of the order | [optional] [readonly]
-**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(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance | [optional]
+**left** | **int** | Unfilled quantity | [optional] [readonly]
+**fill_price** | **str** | Fill price | [optional] [readonly]
+**text** | **str** | Custom order 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(.) In addition to user-defined information, the following are internal reserved fields that identify the order source: - web: Web - api: API call - app: Mobile app - auto_deleveraging: Automatic deleveraging - liquidation: Forced liquidation of positions under the old classic mode - liq-xxx: a. Forced liquidation of positions under the new classic mode, including isolated margin, one-way cross margin, and non-hedged positions under two-way cross margin. b. Forced liquidation of isolated positions under the unified account single-currency margin mode - hedge-liq-xxx: Forced liquidation of hedged positions under the new classic mode two-way cross margin, i.e., simultaneously closing long and short positions - pm_liquidate: Forced liquidation under unified account multi-currency margin mode - comb_margin_liquidate: Forced liquidation under unified account portfolio margin mode - scm_liquidate: Forced liquidation of positions under unified account single-currency margin mode - insurance: Insurance | [optional]
**tkfr** | **str** | Taker fee | [optional] [readonly]
**mkfr** | **str** | Maker fee | [optional] [readonly]
-**refu** | **int** | Reference user ID | [optional] [readonly]
+**refu** | **int** | Referrer user ID | [optional] [readonly]
**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]
**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]
-**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]
+**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention 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]
**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly]
+**limit_vip** | **int** | Counterparty user's VIP level for limit order fills. Current order will only match with orders whose VIP level is less than or equal to the specified level. Only 11~16 are supported; default is 0 | [optional]
+**pid** | **int** | Position ID | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/FuturesOrderAmendment.md b/docs/FuturesOrderAmendment.md
index 6ae5547..4e3bce2 100644
--- a/docs/FuturesOrderAmendment.md
+++ b/docs/FuturesOrderAmendment.md
@@ -4,8 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**size** | **int** | New order size, including filled part. - If new size is less than or equal to filled size, the order will be cancelled. - Order side must be identical to the original one. - Close order size cannot be changed. - For reduce only orders, increasing size may leads to other reduce only orders being cancelled. - If price is not changed, decreasing size will not change its precedence in order book, while increasing will move it to the last at current price. | [optional]
-**price** | **str** | New order price. | [optional]
-**amend_text** | **str** | Custom info during amending order | [optional]
+**price** | **str** | New order price | [optional]
+**amend_text** | **str** | Custom info during order amendment | [optional]
+**text** | **str** | Internal users can modify information in the text field. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/FuturesOrderBook.md b/docs/FuturesOrderBook.md
index f8ed364..392c531 100644
--- a/docs/FuturesOrderBook.md
+++ b/docs/FuturesOrderBook.md
@@ -6,8 +6,8 @@ Name | Type | Description | Notes
**id** | **int** | Order Book ID. Increases by 1 on every order book change. Set `with_id=true` to include this field in response | [optional]
**current** | **float** | Response data generation timestamp | [optional]
**update** | **float** | Order book changed timestamp | [optional]
-**asks** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Asks order depth |
-**bids** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Bids order depth |
+**asks** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Ask Depth |
+**bids** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Bid Depth |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/FuturesPositionCrossMode.md b/docs/FuturesPositionCrossMode.md
new file mode 100644
index 0000000..65b0f1d
--- /dev/null
+++ b/docs/FuturesPositionCrossMode.md
@@ -0,0 +1,11 @@
+# FuturesPositionCrossMode
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**mode** | **str** | Cross margin or isolated margin mode. ISOLATED - isolated margin mode, CROSS - cross margin mode |
+**contract** | **str** | Futures market |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/FuturesPremiumIndex.md b/docs/FuturesPremiumIndex.md
index 73effc0..91041ef 100644
--- a/docs/FuturesPremiumIndex.md
+++ b/docs/FuturesPremiumIndex.md
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
**t** | **float** | Unix timestamp in seconds | [optional]
**c** | **str** | Close price | [optional]
**h** | **str** | Highest price | [optional]
-**l** | **str** | Lowest price` | [optional]
+**l** | **str** | Lowest price | [optional]
**o** | **str** | Open price | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/FuturesPriceTrigger.md b/docs/FuturesPriceTrigger.md
index 2ae520f..5fd4eeb 100644
--- a/docs/FuturesPriceTrigger.md
+++ b/docs/FuturesPriceTrigger.md
@@ -3,11 +3,11 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**strategy_type** | **int** | How the order will be triggered - `0`: by price, which means the order will be triggered if price condition is satisfied - `1`: by price gap, which means the order will be triggered if gap of recent two prices of specified `price_type` are satisfied. Only `0` is supported currently | [optional]
-**price_type** | **int** | Price type. 0 - latest deal price, 1 - mark price, 2 - index price | [optional]
-**price** | **str** | Value of price on price triggered, or price gap on price gap triggered | [optional]
-**rule** | **int** | Trigger condition type - `1`: calculated price based on `strategy_type` and `price_type` >= `price` - `2`: calculated price based on `strategy_type` and `price_type` <= `price` | [optional]
-**expiration** | **int** | How long (in seconds) to wait for the condition to be triggered before cancelling the order. | [optional]
+**strategy_type** | **int** | Trigger Strategy - 0: Price trigger, triggered when price meets conditions - 1: Price spread trigger, i.e. the difference between the latest price specified in `price_type` and the second-last price Currently only supports 0 (latest transaction price) | [optional]
+**price_type** | **int** | Reference price type. 0 - Latest trade price, 1 - Mark price, 2 - Index price | [optional]
+**price** | **str** | Price value for price trigger, or spread value for spread trigger | [optional]
+**rule** | **int** | Price Condition Type - 1: Trigger when the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price`, while Trigger.Price must > last_price - 2: Trigger when the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price`, and Trigger.Price must < last_price | [optional]
+**expiration** | **int** | Maximum wait time for trigger condition (in seconds). Order will be cancelled if timeout | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/FuturesPriceTriggeredOrder.md b/docs/FuturesPriceTriggeredOrder.md
index 3dc5e31..d28e980 100644
--- a/docs/FuturesPriceTriggeredOrder.md
+++ b/docs/FuturesPriceTriggeredOrder.md
@@ -1,6 +1,6 @@
# FuturesPriceTriggeredOrder
-Futures order details
+Futures price-triggered order details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
@@ -8,14 +8,14 @@ Name | Type | Description | Notes
**trigger** | [**FuturesPriceTrigger**](FuturesPriceTrigger.md) | |
**id** | **int** | Auto order ID | [optional] [readonly]
**user** | **int** | User ID | [optional] [readonly]
-**create_time** | **float** | Creation time | [optional] [readonly]
-**finish_time** | **float** | Finished time | [optional] [readonly]
-**trade_id** | **int** | ID of the newly created order on condition triggered | [optional] [readonly]
-**status** | **str** | Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is invalid, only for close-long-order or close-short-order | [optional] [readonly]
-**finish_as** | **str** | How order is finished | [optional] [readonly]
-**reason** | **str** | Additional remarks on how the order was finished | [optional] [readonly]
-**order_type** | **str** | Take-profit/stop-loss types, which include: - `close-long-order`: order take-profit/stop-loss, close long position - `close-short-order`: order take-profit/stop-loss, close short position - `close-long-position`: position take-profit/stop-loss, close long position - `close-short-position`: position take-profit/stop-loss, close short position - `plan-close-long-position`: position planned take-profit/stop-loss, close long position - `plan-close-short-position`: position planned take-profit/stop-loss, close short position The order take-profit/stop-loss can not be passed by request. These two types are read only. | [optional]
-**me_order_id** | **str** | Corresponding order ID of order take-profit/stop-loss. | [optional] [readonly]
+**create_time** | **float** | Created time | [optional] [readonly]
+**finish_time** | **float** | End time | [optional] [readonly]
+**trade_id** | **int** | ID of the order created after trigger | [optional] [readonly]
+**status** | **str** | Order status - `open`: Active - `finished`: Finished - `inactive`: Inactive, only applies to order take-profit/stop-loss - `invalid`: Invalid, only applies to order take-profit/stop-loss | [optional] [readonly]
+**finish_as** | **str** | Finish status: cancelled - Cancelled; succeeded - Succeeded; failed - Failed; expired - Expired | [optional] [readonly]
+**reason** | **str** | Additional description of how the order was completed | [optional] [readonly]
+**order_type** | **str** | Types of take-profit and stop-loss orders, including: - `close-long-order`: Order take-profit/stop-loss, close long position - `close-short-order`: Order take-profit/stop-loss, close short position - `close-long-position`: Position take-profit/stop-loss, used to close all long positions - `close-short-position`: Position take-profit/stop-loss, used to close all short positions - `plan-close-long-position`: Position plan take-profit/stop-loss, used to close all or partial long positions - `plan-close-short-position`: Position plan take-profit/stop-loss, used to close all or partial short positions The two types of order take-profit/stop-loss are read-only and cannot be passed in requests | [optional]
+**me_order_id** | **int** | Corresponding order ID for order take-profit/stop-loss orders | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/FuturesRiskLimitTier.md b/docs/FuturesRiskLimitTier.md
new file mode 100644
index 0000000..10b759a
--- /dev/null
+++ b/docs/FuturesRiskLimitTier.md
@@ -0,0 +1,16 @@
+# FuturesRiskLimitTier
+
+Information for each tier of the gradient risk limit table
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**tier** | **int** | Tier | [optional]
+**risk_limit** | **str** | Position risk limit | [optional]
+**initial_rate** | **str** | Initial margin rate | [optional]
+**maintenance_rate** | **str** | Maintenance margin rate | [optional]
+**leverage_max** | **str** | Maximum leverage | [optional]
+**deduction** | **str** | Maintenance margin quick calculation deduction amount | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/FuturesTicker.md b/docs/FuturesTicker.md
index 73cbe05..d0f8511 100644
--- a/docs/FuturesTicker.md
+++ b/docs/FuturesTicker.md
@@ -5,25 +5,30 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**contract** | **str** | Futures contract | [optional]
**last** | **str** | Last trading price | [optional]
-**change_percentage** | **str** | Change percentage. | [optional]
+**change_percentage** | **str** | Price change percentage. Negative values indicate price decrease, e.g. -7.45 | [optional]
**total_size** | **str** | Contract total size | [optional]
-**low_24h** | **str** | Lowest trading price in recent 24h | [optional]
-**high_24h** | **str** | Highest trading price in recent 24h | [optional]
-**volume_24h** | **str** | Trade size in recent 24h | [optional]
-**volume_24h_btc** | **str** | Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional]
-**volume_24h_usd** | **str** | Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional]
-**volume_24h_base** | **str** | Trade volume in recent 24h, in base currency | [optional]
-**volume_24h_quote** | **str** | Trade volume in recent 24h, in quote currency | [optional]
-**volume_24h_settle** | **str** | Trade volume in recent 24h, in settle currency | [optional]
+**low_24h** | **str** | 24-hour lowest price | [optional]
+**high_24h** | **str** | 24-hour highest price | [optional]
+**volume_24h** | **str** | 24-hour trading volume | [optional]
+**volume_24h_btc** | **str** | 24-hour trading volume in BTC (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional]
+**volume_24h_usd** | **str** | 24-hour trading volume in USD (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional]
+**volume_24h_base** | **str** | 24-hour trading volume in base currency | [optional]
+**volume_24h_quote** | **str** | 24-hour trading volume in quote currency | [optional]
+**volume_24h_settle** | **str** | 24-hour trading volume in settle currency | [optional]
**mark_price** | **str** | Recent mark price | [optional]
**funding_rate** | **str** | Funding rate | [optional]
-**funding_rate_indicative** | **str** | Indicative Funding rate in next period | [optional]
+**funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`) | [optional]
**index_price** | **str** | Index price | [optional]
**quanto_base_rate** | **str** | Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types | [optional]
-**basis_rate** | **str** | Basis rate | [optional]
-**basis_value** | **str** | Basis value | [optional]
**lowest_ask** | **str** | Recent lowest ask | [optional]
+**lowest_size** | **str** | The latest seller's lowest price order quantity | [optional]
**highest_bid** | **str** | Recent highest bid | [optional]
+**highest_size** | **str** | The latest buyer's highest price order volume | [optional]
+**change_utc0** | **str** | Percentage change at utc0. Negative values indicate a drop, e.g., -7.45% | [optional]
+**change_utc8** | **str** | Percentage change at utc8. Negative values indicate a drop, e.g., -7.45% | [optional]
+**change_price** | **str** | 24h change amount. Negative values indicate a drop, e.g., -7.45 | [optional]
+**change_utc0_price** | **str** | Change amount at utc0. Negative values indicate a drop, e.g., -7.45 | [optional]
+**change_utc8_price** | **str** | Change amount at utc8. Negative values indicate a drop, e.g., -7.45 | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/FuturesTrade.md b/docs/FuturesTrade.md
index 57e99c6..af3b9fe 100644
--- a/docs/FuturesTrade.md
+++ b/docs/FuturesTrade.md
@@ -3,13 +3,13 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**id** | **int** | Trade ID | [optional]
-**create_time** | **float** | Trading time | [optional]
-**create_time_ms** | **float** | Trading time, with milliseconds set to 3 decimal places. | [optional]
+**id** | **int** | Fill ID | [optional]
+**create_time** | **float** | Fill Time | [optional]
+**create_time_ms** | **float** | Trade time, with millisecond precision to 3 decimal places | [optional]
**contract** | **str** | Futures contract | [optional]
**size** | **int** | Trading size | [optional]
-**price** | **str** | Trading price (quote currency) | [optional]
-**is_internal** | **bool** | Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned. | [optional]
+**price** | **str** | Trade price (quote currency) | [optional]
+**is_internal** | **bool** | Whether it is an internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the trade price may deviate from the market, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/InlineObject.md b/docs/InlineObject.md
new file mode 100644
index 0000000..dccf5f1
--- /dev/null
+++ b/docs/InlineObject.md
@@ -0,0 +1,11 @@
+# InlineObject
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**mode** | **str** | Cross margin or isolated margin mode. ISOLATED - isolated margin mode, CROSS - cross margin mode |
+**contract** | **str** | Futures market |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md
new file mode 100644
index 0000000..30030f5
--- /dev/null
+++ b/docs/InlineResponse200.md
@@ -0,0 +1,11 @@
+# InlineResponse200
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**time** | **int** | | [optional]
+**value** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/InlineResponse2001.md b/docs/InlineResponse2001.md
new file mode 100644
index 0000000..31a5f58
--- /dev/null
+++ b/docs/InlineResponse2001.md
@@ -0,0 +1,11 @@
+# InlineResponse2001
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | | [optional]
+**est_rate** | **str** | Unconverted percentage | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/LedgerRecord.md b/docs/LedgerRecord.md
index 215dba9..869f179 100644
--- a/docs/LedgerRecord.md
+++ b/docs/LedgerRecord.md
@@ -5,13 +5,15 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Record ID | [optional] [readonly]
**txid** | **str** | Hash record of the withdrawal | [optional] [readonly]
-**withdraw_order_id** | **str** | Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional]
+**withdraw_order_id** | **str** | User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried | [optional]
**timestamp** | **str** | Operation time | [optional] [readonly]
-**amount** | **str** | Currency amount |
+**amount** | **str** | Token amount |
**currency** | **str** | Currency name |
**address** | **str** | Withdrawal address. Required for withdrawals | [optional]
**memo** | **str** | Additional remarks with regards to the withdrawal | [optional]
-**status** | **str** | Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval - SPLITPEND: the order is automatically split due to large amount | [optional] [readonly]
+**withdraw_id** | **str** | Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled | [optional]
+**asset_class** | **str** | Withdrawal record currency type, empty by default. Supports users to query withdrawal records in main area and innovation area on demand. Valid values: SPOT, PILOT SPOT: Main area PILOT: Innovation area | [optional]
+**status** | **str** | Transaction status - DONE: Completed - CANCEL: Cancelled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: GateCode operation - EXTPEND: Sent, waiting for confirmation - FAIL: Failed on chain, waiting for confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: Pending manual review - REVIEW: Under review | [optional] [readonly]
**chain** | **str** | Name of the chain used in withdrawals |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LiquidateOrder.md b/docs/LiquidateOrder.md
index cac8f04..df396e0 100644
--- a/docs/LiquidateOrder.md
+++ b/docs/LiquidateOrder.md
@@ -1,13 +1,14 @@
# LiquidateOrder
-Liquidate Order detail
+Spot liquidation order details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**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]
+**text** | **str** | Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) | [optional]
**currency_pair** | **str** | Currency pair |
**amount** | **str** | Trade amount |
**price** | **str** | Order price |
+**action_mode** | **str** | Processing mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request and is not included in the response `ACK`: Asynchronous mode, only returns key order fields `RESULT`: No liquidation information `FULL`: Full mode (default) | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/Loan.md b/docs/Loan.md
deleted file mode 100644
index dea5d2c..0000000
--- a/docs/Loan.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# Loan
-
-Margin loan details
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | **str** | Loan ID | [optional] [readonly]
-**create_time** | **str** | Creation time | [optional] [readonly]
-**expire_time** | **str** | Repay time of the loan. No value will be returned for lending loan | [optional] [readonly]
-**status** | **str** | Loan status open - not fully loaned loaned - all loaned out for lending loan; loaned in for borrowing side finished - loan is finished, either being all repaid or cancelled by the lender auto_repaid - automatically repaid by the system | [optional] [readonly]
-**side** | **str** | Loan side |
-**currency** | **str** | Loan currency |
-**rate** | **str** | Loan rate. Only rates in [0.0001, 0.01] are supported. Not required in lending. Market rate calculated from recent rates will be used if not set | [optional]
-**amount** | **str** | Loan amount |
-**days** | **int** | Loan days. Only 10 is supported for now | [optional]
-**auto_renew** | **bool** | Whether to auto renew the loan upon expiration | [optional] [default to False]
-**currency_pair** | **str** | Currency pair. Required if borrowing | [optional]
-**left** | **str** | Amount not lent out yet | [optional] [readonly]
-**repaid** | **str** | Repaid amount | [optional] [readonly]
-**paid_interest** | **str** | Repaid interest | [optional] [readonly]
-**unpaid_interest** | **str** | Outstanding interest yet to be paid | [optional] [readonly]
-**fee_rate** | **str** | Loan fee rate | [optional]
-**orig_id** | **str** | Original loan ID of the loan if auto-renewed, otherwise equals to id | [optional]
-**text** | **str** | User defined custom ID | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/LoanPatch.md b/docs/LoanPatch.md
deleted file mode 100644
index 0ba0c58..0000000
--- a/docs/LoanPatch.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# LoanPatch
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**currency** | **str** | Loan currency |
-**side** | **str** | Loan side. Possible values are `lend` and `borrow`. For `LoanRecord` patching, only `lend` is supported |
-**auto_renew** | **bool** | Auto renew |
-**currency_pair** | **str** | Currency pair. Required if borrowing | [optional]
-**loan_id** | **str** | Loan ID. Required for `LoanRecord` patching | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/LoanRecord.md b/docs/LoanRecord.md
deleted file mode 100644
index d821108..0000000
--- a/docs/LoanRecord.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# LoanRecord
-
-Margin loaned record details
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | **str** | Loan record ID | [optional]
-**loan_id** | **str** | Loan ID the record belongs to | [optional]
-**create_time** | **str** | Loan time | [optional]
-**expire_time** | **str** | Expiration time | [optional]
-**status** | **str** | Loan record status | [optional]
-**borrow_user_id** | **str** | Garbled user ID | [optional]
-**currency** | **str** | Loan currency | [optional]
-**rate** | **str** | Loan rate | [optional]
-**amount** | **str** | Loan amount | [optional]
-**days** | **int** | Loan days | [optional]
-**auto_renew** | **bool** | Whether the record will auto renew on expiration | [optional] [default to False]
-**repaid** | **str** | Repaid amount | [optional]
-**paid_interest** | **str** | Repaid interest | [optional] [readonly]
-**unpaid_interest** | **str** | Outstanding interest yet to be paid | [optional] [readonly]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/MarginAccount.md b/docs/MarginAccount.md
index 826fd90..265656e 100644
--- a/docs/MarginAccount.md
+++ b/docs/MarginAccount.md
@@ -1,12 +1,15 @@
# MarginAccount
-Margin account detail. `base` refers to base currency, while `quotes to quote currency
+Margin account information for a trading pair. `base` corresponds to base currency account information, `quote` corresponds to quote currency account information
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency_pair** | **str** | Currency pair | [optional]
-**locked** | **bool** | Whether account is locked | [optional]
-**risk** | **str** | Current risk rate of margin account | [optional]
+**account_type** | **str** | Account type: risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated | [optional]
+**leverage** | **str** | User's current market leverage multiplier | [optional]
+**locked** | **bool** | Whether the account is locked | [optional]
+**risk** | **str** | Current risk rate of the margin account (returned when the account is a risk rate account) | [optional]
+**mmr** | **str** | Leveraged Account Current Maintenance Margin Rate (returned when the Account is Account) | [optional]
**base** | [**MarginAccountCurrency**](MarginAccountCurrency.md) | | [optional]
**quote** | [**MarginAccountCurrency**](MarginAccountCurrency.md) | | [optional]
diff --git a/docs/MarginAccountBook.md b/docs/MarginAccountBook.md
index 9c62f12..f5f8c61 100644
--- a/docs/MarginAccountBook.md
+++ b/docs/MarginAccountBook.md
@@ -4,13 +4,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Balance change record ID | [optional]
-**time** | **str** | Balance changed timestamp | [optional]
+**time** | **str** | Account change timestamp | [optional]
**time_ms** | **int** | The timestamp of the change (in milliseconds) | [optional]
**currency** | **str** | Currency changed | [optional]
-**currency_pair** | **str** | Account currency pair | [optional]
+**currency_pair** | **str** | Account trading pair | [optional]
**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional]
**balance** | **str** | Balance after change | [optional]
-**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional]
+**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/MarginAccountCurrency.md b/docs/MarginAccountCurrency.md
index 01f80ab..edb06b6 100644
--- a/docs/MarginAccountCurrency.md
+++ b/docs/MarginAccountCurrency.md
@@ -1,14 +1,14 @@
# MarginAccountCurrency
-Account currency details
+Currency account information
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Currency name | [optional]
-**available** | **str** | Amount suitable for margin trading. | [optional]
-**locked** | **str** | Locked amount, used in margin trading | [optional]
-**borrowed** | **str** | Borrowed amount | [optional]
-**interest** | **str** | Unpaid interests | [optional]
+**available** | **str** | Amount available for margin trading, available = margin + borrowed | [optional]
+**locked** | **str** | Frozen funds, such as amounts already placed in margin market for order trading | [optional]
+**borrowed** | **str** | Borrowed funds | [optional]
+**interest** | **str** | Unpaid interest | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/MarginApi.md b/docs/MarginApi.md
index 98fe6e9..935da57 100644
--- a/docs/MarginApi.md
+++ b/docs/MarginApi.md
@@ -5,39 +5,17 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
[**list_margin_accounts**](MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list
-[**list_margin_account_book**](MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history
+[**list_margin_account_book**](MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | Query margin account balance change history
[**list_funding_accounts**](MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list
-[**get_auto_repay_status**](MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting
-[**set_auto_repay**](MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting
-[**get_margin_transferable**](MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency
-[**list_margin_currency_pairs**](MarginApi.md#list_margin_currency_pairs) | **GET** /margin/currency_pairs | List all supported currency pairs supported in margin trading(Deprecated)
-[**get_margin_currency_pair**](MarginApi.md#get_margin_currency_pair) | **GET** /margin/currency_pairs/{currency_pair} | Query one single margin currency pair(Deprecated)
-[**list_funding_book**](MarginApi.md#list_funding_book) | **GET** /margin/funding_book | Order book of lending loans(Deprecated)
-[**list_loans**](MarginApi.md#list_loans) | **GET** /margin/loans | List all loans(Deprecated)
-[**create_loan**](MarginApi.md#create_loan) | **POST** /margin/loans | Lend or borrow(Deprecated)
-[**merge_loans**](MarginApi.md#merge_loans) | **POST** /margin/merged_loans | Merge multiple lending loans(Deprecated)
-[**get_loan**](MarginApi.md#get_loan) | **GET** /margin/loans/{loan_id} | Retrieve one single loan detail(Deprecated)
-[**cancel_loan**](MarginApi.md#cancel_loan) | **DELETE** /margin/loans/{loan_id} | Cancel lending loan(Deprecated)
-[**update_loan**](MarginApi.md#update_loan) | **PATCH** /margin/loans/{loan_id} | Modify a loan(Deprecated)
-[**list_loan_repayments**](MarginApi.md#list_loan_repayments) | **GET** /margin/loans/{loan_id}/repayment | List loan repayment records(Deprecated)
-[**repay_loan**](MarginApi.md#repay_loan) | **POST** /margin/loans/{loan_id}/repayment | Repay a loan(Deprecated)
-[**list_loan_records**](MarginApi.md#list_loan_records) | **GET** /margin/loan_records | List repayment records of a specific loan(Deprecated)
-[**get_loan_record**](MarginApi.md#get_loan_record) | **GET** /margin/loan_records/{loan_record_id} | Get one single loan record(Deprecated)
-[**update_loan_record**](MarginApi.md#update_loan_record) | **PATCH** /margin/loan_records/{loan_record_id} | Modify a loan record(Deprecated)
-[**get_margin_borrowable**](MarginApi.md#get_margin_borrowable) | **GET** /margin/borrowable | Get the max borrowable amount for a specific margin currency(Deprecated)
-[**list_cross_margin_currencies**](MarginApi.md#list_cross_margin_currencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin.
-[**get_cross_margin_currency**](MarginApi.md#get_cross_margin_currency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin
-[**get_cross_margin_account**](MarginApi.md#get_cross_margin_account) | **GET** /margin/cross/accounts | Retrieve cross margin account
-[**list_cross_margin_account_book**](MarginApi.md#list_cross_margin_account_book) | **GET** /margin/cross/account_book | Retrieve cross margin account change history
-[**list_cross_margin_loans**](MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history
-[**create_cross_margin_loan**](MarginApi.md#create_cross_margin_loan) | **POST** /margin/cross/loans | Create a cross margin borrow loan
-[**get_cross_margin_loan**](MarginApi.md#get_cross_margin_loan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail
-[**list_cross_margin_repayments**](MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments
-[**repay_cross_margin_loan**](MarginApi.md#repay_cross_margin_loan) | **POST** /margin/cross/repayments | Cross margin repayments
-[**get_cross_margin_interest_records**](MarginApi.md#get_cross_margin_interest_records) | **GET** /margin/cross/interest_records | Interest records for the cross margin account
-[**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
-[**get_cross_margin_estimate_rate**](MarginApi.md#get_cross_margin_estimate_rate) | **GET** /margin/cross/estimate_rate | Estimated interest rates
-[**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
+[**get_auto_repay_status**](MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Query user auto repayment settings
+[**set_auto_repay**](MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user auto repayment settings
+[**get_margin_transferable**](MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get maximum transferable amount for isolated margin
+[**get_user_margin_tier**](MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Query user's own leverage lending tiers in current market
+[**get_market_margin_tier**](MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query current market leverage lending tiers
+[**set_user_market_leverage**](MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set user market leverage multiplier
+[**list_margin_user_account**](MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query user's isolated margin account list
+[**list_cross_margin_loans**](MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | Query cross margin borrow history (deprecated)
+[**list_cross_margin_repayments**](MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated)
# **list_margin_accounts**
@@ -103,16 +81,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_margin_account_book**
> list[MarginAccountBook] list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit)
-List margin account balance change history
+Query margin account balance change history
-Only transferals from and to margin account are provided for now. Time range allows 30 days at most
+Currently only provides transfer history to and from margin accounts. Query time range cannot exceed 30 days
### Example
@@ -138,16 +116,16 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginApi(api_client)
-currency = 'currency_example' # str | List records related to specified currency only. If specified, `currency_pair` is also required. (optional)
-currency_pair = 'currency_pair_example' # str | List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided (optional)
-type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional)
-_from = 1627706330 # int | Start timestamp of the query (optional)
-to = 1635329650 # int | Time range ending, default to current time (optional)
+currency = 'currency_example' # str | Query history for specified currency. If `currency` is specified, `currency_pair` must also be specified. (optional)
+currency_pair = 'currency_pair_example' # str | Specify margin account currency pair. Used in combination with `currency`. Ignored if `currency` is not specified (optional)
+type = 'lend' # str | Query by specified account change type. If not specified, all change types will be included. (optional)
+_from = 1627706330 # int | Start timestamp for the query (optional)
+to = 1635329650 # int | End timestamp for the query, defaults to current time if not specified (optional)
page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
try:
- # List margin account balance change history
+ # Query margin account balance change history
api_response = api_instance.list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit)
print(api_response)
except GateApiException as ex:
@@ -160,13 +138,13 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| List records related to specified currency only. If specified, `currency_pair` is also required. | [optional]
- **currency_pair** | **str**| List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided | [optional]
- **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional]
- **_from** | **int**| Start timestamp of the query | [optional]
- **to** | **int**| Time range ending, default to current time | [optional]
+ **currency** | **str**| Query history for specified currency. If `currency` is specified, `currency_pair` must also be specified. | [optional]
+ **currency_pair** | **str**| Specify margin account currency pair. Used in combination with `currency`. Ignored if `currency` is not specified | [optional]
+ **type** | **str**| Query by specified account change type. If not specified, all change types will be included. | [optional]
+ **_from** | **int**| Start timestamp for the query | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
**page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
### Return type
@@ -184,7 +162,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
@@ -217,7 +195,7 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
+currency = 'BTC' # str | Query by specified currency name (optional)
try:
# Funding account list
@@ -233,7 +211,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency | [optional]
+ **currency** | **str**| Query by specified currency name | [optional]
### Return type
@@ -251,14 +229,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **get_auto_repay_status**
> AutoRepaySetting get_auto_repay_status()
-Retrieve user auto repayment setting
+Query user auto repayment settings
### Example
@@ -286,7 +264,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.MarginApi(api_client)
try:
- # Retrieve user auto repayment setting
+ # Query user auto repayment settings
api_response = api_instance.get_auto_repay_status()
print(api_response)
except GateApiException as ex:
@@ -314,14 +292,14 @@ This endpoint does not need any parameter.
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Current auto repayment setting | - |
+**200** | User's current auto repayment settings | - |
[[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)
# **set_auto_repay**
> AutoRepaySetting set_auto_repay(status)
-Update user's auto repayment setting
+Update user auto repayment settings
### Example
@@ -347,10 +325,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginApi(api_client)
-status = 'on' # str | New auto repayment status. `on` - enabled, `off` - disabled
+status = 'on' # str | Whether to enable auto repayment: `on` - enabled, `off` - disabled
try:
- # Update user's auto repayment setting
+ # Update user auto repayment settings
api_response = api_instance.set_auto_repay(status)
print(api_response)
except GateApiException as ex:
@@ -363,7 +341,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **status** | **str**| New auto repayment status. `on` - enabled, `off` - disabled |
+ **status** | **str**| Whether to enable auto repayment: `on` - enabled, `off` - disabled |
### Return type
@@ -381,14 +359,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Current auto repayment setting | - |
+**200** | User's current auto repayment settings | - |
[[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)
# **get_margin_transferable**
> MarginTransferable get_margin_transferable(currency, currency_pair=currency_pair)
-Get the max transferable amount for a specific margin currency
+Get maximum transferable amount for isolated margin
### Example
@@ -414,11 +392,11 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency
+currency = 'BTC' # str | Query by specified currency name
currency_pair = 'BTC_USDT' # str | Currency pair (optional)
try:
- # Get the max transferable amount for a specific margin currency
+ # Get maximum transferable amount for isolated margin
api_response = api_instance.get_margin_transferable(currency, currency_pair=currency_pair)
print(api_response)
except GateApiException as ex:
@@ -431,7 +409,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency |
+ **currency** | **str**| Query by specified currency name |
**currency_pair** | **str**| Currency pair | [optional]
### Return type
@@ -450,1430 +428,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
-# **list_margin_currency_pairs**
-> list[MarginCurrencyPair] list_margin_currency_pairs()
+# **get_user_margin_tier**
+> list[MarginLeverageTier] get_user_margin_tier(currency_pair)
-List all supported currency pairs supported in margin trading(Deprecated)
-
-### Example
-
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-
-try:
- # List all supported currency pairs supported in margin trading(Deprecated)
- api_response = api_instance.list_margin_currency_pairs()
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->list_margin_currency_pairs: %s\n" % e)
-```
-
-### Parameters
-This endpoint does not need any parameter.
-
-### Return type
-
-[**list[MarginCurrencyPair]**](MarginCurrencyPair.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | List retrieved | - |
-
-[[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)
-
-# **get_margin_currency_pair**
-> MarginCurrencyPair get_margin_currency_pair(currency_pair)
-
-Query one single margin currency pair(Deprecated)
-
-### Example
-
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-currency_pair = 'BTC_USDT' # str | Margin currency pair
-
-try:
- # Query one single margin currency pair(Deprecated)
- api_response = api_instance.get_margin_currency_pair(currency_pair)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->get_margin_currency_pair: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **currency_pair** | **str**| Margin currency pair |
-
-### Return type
-
-[**MarginCurrencyPair**](MarginCurrencyPair.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
-
-[[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)
-
-# **list_funding_book**
-> list[FundingBookItem] list_funding_book(currency)
-
-Order book of lending loans(Deprecated)
-
-### Example
-
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency
-
-try:
- # Order book of lending loans(Deprecated)
- api_response = api_instance.list_funding_book(currency)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->list_funding_book: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency |
-
-### Return type
-
-[**list[FundingBookItem]**](FundingBookItem.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Order book retrieved | - |
-
-[[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)
-
-# **list_loans**
-> list[Loan] list_loans(status, side, currency=currency, currency_pair=currency_pair, sort_by=sort_by, reverse_sort=reverse_sort, page=page, limit=limit)
-
-List all loans(Deprecated)
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-status = 'open' # str | Loan status
-side = 'lend' # str | Lend or borrow
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
-currency_pair = 'BTC_USDT' # str | Currency pair (optional)
-sort_by = 'rate' # str | Specify which field is used to sort. `create_time` or `rate` is supported. Default to `create_time` (optional)
-reverse_sort = false # bool | Whether to sort in descending order. Default to `true` (optional)
-page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-
-try:
- # List all loans(Deprecated)
- api_response = api_instance.list_loans(status, side, currency=currency, currency_pair=currency_pair, sort_by=sort_by, reverse_sort=reverse_sort, page=page, limit=limit)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->list_loans: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **status** | **str**| Loan status |
- **side** | **str**| Lend or borrow |
- **currency** | **str**| Retrieve data of the specified currency | [optional]
- **currency_pair** | **str**| Currency pair | [optional]
- **sort_by** | **str**| Specify which field is used to sort. `create_time` or `rate` is supported. Default to `create_time` | [optional]
- **reverse_sort** | **bool**| Whether to sort in descending order. Default to `true` | [optional]
- **page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
-
-### Return type
-
-[**list[Loan]**](Loan.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | List retrieved | - |
-
-[[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)
-
-# **create_loan**
-> Loan create_loan(loan)
-
-Lend or borrow(Deprecated)
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-loan = gate_api.Loan() # Loan |
-
-try:
- # Lend or borrow(Deprecated)
- api_response = api_instance.create_loan(loan)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->create_loan: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **loan** | [**Loan**](Loan.md)| |
-
-### Return type
-
-[**Loan**](Loan.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**201** | Loan created | - |
-
-[[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)
-
-# **merge_loans**
-> Loan merge_loans(currency, ids)
-
-Merge multiple lending loans(Deprecated)
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency
-ids = '123,234,345' # str | A comma-separated (,) list of IDs of the loans lent. Maximum of 20 IDs are allowed in a request
-
-try:
- # Merge multiple lending loans(Deprecated)
- api_response = api_instance.merge_loans(currency, ids)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->merge_loans: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency |
- **ids** | **str**| A comma-separated (,) list of IDs of the loans lent. Maximum of 20 IDs are allowed in a request |
-
-### Return type
-
-[**Loan**](Loan.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**201** | Loans merged | - |
-
-[[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)
-
-# **get_loan**
-> Loan get_loan(loan_id, side)
-
-Retrieve one single loan detail(Deprecated)
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-loan_id = '12345' # str | Loan ID
-side = 'lend' # str | Lend or borrow
-
-try:
- # Retrieve one single loan detail(Deprecated)
- api_response = api_instance.get_loan(loan_id, side)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->get_loan: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **loan_id** | **str**| Loan ID |
- **side** | **str**| Lend or borrow |
-
-### Return type
-
-[**Loan**](Loan.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | List retrieved | - |
-
-[[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)
-
-# **cancel_loan**
-> Loan cancel_loan(loan_id, currency)
-
-Cancel lending loan(Deprecated)
-
-Only lent loans can be cancelled
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-loan_id = '12345' # str | Loan ID
-currency = 'BTC' # str | Retrieve data of the specified currency
-
-try:
- # Cancel lending loan(Deprecated)
- api_response = api_instance.cancel_loan(loan_id, currency)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->cancel_loan: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **loan_id** | **str**| Loan ID |
- **currency** | **str**| Retrieve data of the specified currency |
-
-### Return type
-
-[**Loan**](Loan.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Order cancelled | - |
-
-[[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)
-
-# **update_loan**
-> Loan update_loan(loan_id, loan_patch)
-
-Modify a loan(Deprecated)
-
-Only `auto_renew` modification is supported currently
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-loan_id = '12345' # str | Loan ID
-loan_patch = gate_api.LoanPatch() # LoanPatch |
-
-try:
- # Modify a loan(Deprecated)
- api_response = api_instance.update_loan(loan_id, loan_patch)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->update_loan: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **loan_id** | **str**| Loan ID |
- **loan_patch** | [**LoanPatch**](LoanPatch.md)| |
-
-### Return type
-
-[**Loan**](Loan.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Updated | - |
-
-[[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)
-
-# **list_loan_repayments**
-> list[Repayment] list_loan_repayments(loan_id)
-
-List loan repayment records(Deprecated)
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-loan_id = '12345' # str | Loan ID
-
-try:
- # List loan repayment records(Deprecated)
- api_response = api_instance.list_loan_repayments(loan_id)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->list_loan_repayments: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **loan_id** | **str**| Loan ID |
-
-### Return type
-
-[**list[Repayment]**](Repayment.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | List retrieved | - |
-
-[[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)
-
-# **repay_loan**
-> Loan repay_loan(loan_id, repay_request)
-
-Repay a loan(Deprecated)
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-loan_id = '12345' # str | Loan ID
-repay_request = gate_api.RepayRequest() # RepayRequest |
-
-try:
- # Repay a loan(Deprecated)
- api_response = api_instance.repay_loan(loan_id, repay_request)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->repay_loan: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **loan_id** | **str**| Loan ID |
- **repay_request** | [**RepayRequest**](RepayRequest.md)| |
-
-### Return type
-
-[**Loan**](Loan.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Loan repaid | - |
-
-[[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)
-
-# **list_loan_records**
-> list[LoanRecord] list_loan_records(loan_id, status=status, page=page, limit=limit)
-
-List repayment records of a specific loan(Deprecated)
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-loan_id = '12345' # str | Loan ID
-status = 'loaned' # str | Loan record status (optional)
-page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-
-try:
- # List repayment records of a specific loan(Deprecated)
- api_response = api_instance.list_loan_records(loan_id, status=status, page=page, limit=limit)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->list_loan_records: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **loan_id** | **str**| Loan ID |
- **status** | **str**| Loan record status | [optional]
- **page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
-
-### Return type
-
-[**list[LoanRecord]**](LoanRecord.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | List retrieved | - |
-
-[[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)
-
-# **get_loan_record**
-> LoanRecord get_loan_record(loan_record_id, loan_id)
-
-Get one single loan record(Deprecated)
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-loan_record_id = '12345' # str | Loan record ID
-loan_id = '12345' # str | Loan ID
-
-try:
- # Get one single loan record(Deprecated)
- api_response = api_instance.get_loan_record(loan_record_id, loan_id)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->get_loan_record: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **loan_record_id** | **str**| Loan record ID |
- **loan_id** | **str**| Loan ID |
-
-### Return type
-
-[**LoanRecord**](LoanRecord.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Detail retrieved | - |
-
-[[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)
-
-# **update_loan_record**
-> LoanRecord update_loan_record(loan_record_id, loan_patch)
-
-Modify a loan record(Deprecated)
-
-Only `auto_renew` modification is supported currently
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-loan_record_id = '12345' # str | Loan record ID
-loan_patch = gate_api.LoanPatch() # LoanPatch |
-
-try:
- # Modify a loan record(Deprecated)
- api_response = api_instance.update_loan_record(loan_record_id, loan_patch)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->update_loan_record: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **loan_record_id** | **str**| Loan record ID |
- **loan_patch** | [**LoanPatch**](LoanPatch.md)| |
-
-### Return type
-
-[**LoanRecord**](LoanRecord.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Loan record updated | - |
-
-[[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)
-
-# **get_margin_borrowable**
-> MarginBorrowable get_margin_borrowable(currency, currency_pair=currency_pair)
-
-Get the max borrowable amount for a specific margin currency(Deprecated)
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency
-currency_pair = 'BTC_USDT' # str | Currency pair (optional)
-
-try:
- # Get the max borrowable amount for a specific margin currency(Deprecated)
- api_response = api_instance.get_margin_borrowable(currency, currency_pair=currency_pair)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->get_margin_borrowable: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency |
- **currency_pair** | **str**| Currency pair | [optional]
-
-### Return type
-
-[**MarginBorrowable**](MarginBorrowable.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
-
-[[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)
-
-# **list_cross_margin_currencies**
-> list[CrossMarginCurrency] list_cross_margin_currencies()
-
-Currencies supported by cross margin.
-
-### Example
-
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-
-try:
- # Currencies supported by cross margin.
- api_response = api_instance.list_cross_margin_currencies()
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->list_cross_margin_currencies: %s\n" % e)
-```
-
-### Parameters
-This endpoint does not need any parameter.
-
-### Return type
-
-[**list[CrossMarginCurrency]**](CrossMarginCurrency.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | List retrieved | - |
-
-[[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)
-
-# **get_cross_margin_currency**
-> CrossMarginCurrency get_cross_margin_currency(currency)
-
-Retrieve detail of one single currency supported by cross margin
-
-### Example
-
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-currency = 'BTC' # str | Currency name
-
-try:
- # Retrieve detail of one single currency supported by cross margin
- api_response = api_instance.get_cross_margin_currency(currency)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->get_cross_margin_currency: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **currency** | **str**| Currency name |
-
-### Return type
-
-[**CrossMarginCurrency**](CrossMarginCurrency.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
-
-[[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)
-
-# **get_cross_margin_account**
-> CrossMarginAccount get_cross_margin_account()
-
-Retrieve cross margin account
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-
-try:
- # Retrieve cross margin account
- api_response = api_instance.get_cross_margin_account()
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->get_cross_margin_account: %s\n" % e)
-```
-
-### Parameters
-This endpoint does not need any parameter.
-
-### Return type
-
-[**CrossMarginAccount**](CrossMarginAccount.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
-
-[[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)
-
-# **list_cross_margin_account_book**
-> list[CrossMarginAccountBook] list_cross_margin_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type)
-
-Retrieve cross margin account change history
-
-Record time range cannot exceed 30 days
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-currency = 'currency_example' # str | Filter by currency (optional)
-_from = 1627706330 # int | Start timestamp of the query (optional)
-to = 1635329650 # int | Time range ending, default to current time (optional)
-page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-type = 'borrow' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional)
-
-try:
- # Retrieve cross margin account change history
- api_response = api_instance.list_cross_margin_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->list_cross_margin_account_book: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **currency** | **str**| Filter by currency | [optional]
- **_from** | **int**| Start timestamp of the query | [optional]
- **to** | **int**| Time range ending, default to current time | [optional]
- **page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional]
-
-### Return type
-
-[**list[CrossMarginAccountBook]**](CrossMarginAccountBook.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | List retrieved | - |
-
-[[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)
-
-# **list_cross_margin_loans**
-> list[CrossMarginLoan] list_cross_margin_loans(status, currency=currency, limit=limit, offset=offset, reverse=reverse)
-
-List cross margin borrow history
-
-Sort by creation time in descending order by default. Set `reverse=false` to return ascending results.
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-status = 56 # int | Filter by status. Supported values are 2 and 3. (deprecated.)
-currency = 'currency_example' # str | Filter by currency (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
-reverse = True # bool | Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results (optional) (default to True)
-
-try:
- # List cross margin borrow history
- api_response = api_instance.list_cross_margin_loans(status, currency=currency, limit=limit, offset=offset, reverse=reverse)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->list_cross_margin_loans: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **status** | **int**| Filter by status. Supported values are 2 and 3. (deprecated.) |
- **currency** | **str**| Filter by currency | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
- **reverse** | **bool**| Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results | [optional] [default to True]
-
-### Return type
-
-[**list[CrossMarginLoan]**](CrossMarginLoan.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
-
-[[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)
-
-# **create_cross_margin_loan**
-> CrossMarginLoan create_cross_margin_loan(cross_margin_loan)
-
-Create a cross margin borrow loan
-
-Borrow amount cannot be less than currency minimum borrow amount
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-cross_margin_loan = gate_api.CrossMarginLoan() # CrossMarginLoan |
-
-try:
- # Create a cross margin borrow loan
- api_response = api_instance.create_cross_margin_loan(cross_margin_loan)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->create_cross_margin_loan: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **cross_margin_loan** | [**CrossMarginLoan**](CrossMarginLoan.md)| |
-
-### Return type
-
-[**CrossMarginLoan**](CrossMarginLoan.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Successfully borrowed | - |
-
-[[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)
-
-# **get_cross_margin_loan**
-> CrossMarginLoan get_cross_margin_loan(loan_id)
-
-Retrieve single borrow loan detail
+Query user's own leverage lending tiers in current market
### Example
@@ -1899,27 +461,27 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginApi(api_client)
-loan_id = '12345' # str | Borrow loan ID
+currency_pair = 'BTC_USDT' # str | Currency pair
try:
- # Retrieve single borrow loan detail
- api_response = api_instance.get_cross_margin_loan(loan_id)
+ # Query user's own leverage lending tiers in current market
+ api_response = api_instance.get_user_margin_tier(currency_pair)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling MarginApi->get_cross_margin_loan: %s\n" % e)
+ print("Exception when calling MarginApi->get_user_margin_tier: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **loan_id** | **str**| Borrow loan ID |
+ **currency_pair** | **str**| Currency pair |
### Return type
-[**CrossMarginLoan**](CrossMarginLoan.md)
+[**list[MarginLeverageTier]**](MarginLeverageTier.md)
### Authorization
@@ -1933,74 +495,55 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
-# **list_cross_margin_repayments**
-> list[CrossMarginRepayment] list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse)
-
-Retrieve cross margin repayments
+# **get_market_margin_tier**
+> list[MarginLeverageTier] get_market_margin_tier(currency_pair)
-Sort by creation time in descending order by default. Set `reverse=false` to return ascending results.
+Query current market leverage lending tiers
### Example
-* Api Key Authentication (apiv4):
```python
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
+ host = "https://api.gateio.ws/api/v4"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginApi(api_client)
-currency = 'BTC' # str | (optional)
-loan_id = '12345' # str | (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
-reverse = True # bool | Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results (optional) (default to True)
+currency_pair = 'BTC_USDT' # str | Currency pair
try:
- # Retrieve cross margin repayments
- api_response = api_instance.list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse)
+ # Query current market leverage lending tiers
+ api_response = api_instance.get_market_margin_tier(currency_pair)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling MarginApi->list_cross_margin_repayments: %s\n" % e)
+ print("Exception when calling MarginApi->get_market_margin_tier: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| | [optional]
- **loan_id** | **str**| | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
- **reverse** | **bool**| Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results | [optional] [default to True]
+ **currency_pair** | **str**| Currency pair |
### Return type
-[**list[CrossMarginRepayment]**](CrossMarginRepayment.md)
+[**list[MarginLeverageTier]**](MarginLeverageTier.md)
### Authorization
-[apiv4](../README.md#apiv4)
+No authorization required
### HTTP request headers
@@ -2010,16 +553,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | Query successful | - |
[[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)
-# **repay_cross_margin_loan**
-> list[CrossMarginLoan] repay_cross_margin_loan(cross_margin_repay_request)
+# **set_user_market_leverage**
+> set_user_market_leverage(margin_market_leverage)
-Cross margin repayments
-
-When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred.When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first
+Set user market leverage multiplier
### Example
@@ -2045,27 +586,26 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginApi(api_client)
-cross_margin_repay_request = gate_api.CrossMarginRepayRequest() # CrossMarginRepayRequest |
+margin_market_leverage = gate_api.MarginMarketLeverage() # MarginMarketLeverage |
try:
- # Cross margin repayments
- api_response = api_instance.repay_cross_margin_loan(cross_margin_repay_request)
- print(api_response)
+ # Set user market leverage multiplier
+ api_instance.set_user_market_leverage(margin_market_leverage)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling MarginApi->repay_cross_margin_loan: %s\n" % e)
+ print("Exception when calling MarginApi->set_user_market_leverage: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **cross_margin_repay_request** | [**CrossMarginRepayRequest**](CrossMarginRepayRequest.md)| |
+ **margin_market_leverage** | [**MarginMarketLeverage**](MarginMarketLeverage.md)| |
### Return type
-[**list[CrossMarginLoan]**](CrossMarginLoan.md)
+void (empty response body)
### Authorization
@@ -2074,90 +614,21 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/json
+ - **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Loan repaid | - |
+**204** | Set successfully | - |
[[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)
-# **get_cross_margin_interest_records**
-> list[UniLoanInterestRecord] get_cross_margin_interest_records(currency=currency, page=page, limit=limit)
-
-Interest records for the cross margin account
-
-### Example
-
-* Api Key Authentication (apiv4):
-```python
-from __future__ import print_function
-import gate_api
-from gate_api.exceptions import ApiException, GateApiException
-# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
-# See configuration.py for a list of all supported configuration parameters.
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure APIv4 key authorization
-configuration = gate_api.Configuration(
- host = "https://api.gateio.ws/api/v4",
- key = "YOU_API_KEY",
- secret = "YOUR_API_SECRET"
-)
-
-api_client = gate_api.ApiClient(configuration)
-# Create an instance of the API class
-api_instance = gate_api.MarginApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
-page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100)
-
-try:
- # Interest records for the cross margin account
- api_response = api_instance.get_cross_margin_interest_records(currency=currency, page=page, limit=limit)
- print(api_response)
-except GateApiException as ex:
- print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
-except ApiException as e:
- print("Exception when calling MarginApi->get_cross_margin_interest_records: %s\n" % e)
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency | [optional]
- **page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100]
-
-### Return type
-
-[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md)
-
-### Authorization
-
-[apiv4](../README.md#apiv4)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
-
-[[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)
+# **list_margin_user_account**
+> list[MarginAccount] list_margin_user_account(currency_pair=currency_pair)
-# **get_cross_margin_transferable**
-> CrossMarginTransferable get_cross_margin_transferable(currency)
+Query user's isolated margin account list
-Get the max transferable amount for a specific cross margin currency
+Supports querying risk ratio isolated accounts and margin ratio isolated accounts
### Example
@@ -2183,27 +654,27 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency
+currency_pair = 'BTC_USDT' # str | Currency pair (optional)
try:
- # Get the max transferable amount for a specific cross margin currency
- api_response = api_instance.get_cross_margin_transferable(currency)
+ # Query user's isolated margin account list
+ api_response = api_instance.list_margin_user_account(currency_pair=currency_pair)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling MarginApi->get_cross_margin_transferable: %s\n" % e)
+ print("Exception when calling MarginApi->list_margin_user_account: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency |
+ **currency_pair** | **str**| Currency pair | [optional]
### Return type
-[**CrossMarginTransferable**](CrossMarginTransferable.md)
+[**list[MarginAccount]**](MarginAccount.md)
### Authorization
@@ -2217,16 +688,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
-# **get_cross_margin_estimate_rate**
-> dict(str, str) get_cross_margin_estimate_rate(currencies)
+# **list_cross_margin_loans**
+> list[CrossMarginLoan] list_cross_margin_loans(status, currency=currency, limit=limit, offset=offset, reverse=reverse)
-Estimated interest rates
+Query cross margin borrow history (deprecated)
-Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate.
+Sorted by creation time in descending order by default. Set `reverse=false` for ascending order
### Example
@@ -2252,27 +723,35 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginApi(api_client)
-currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name
+status = 56 # int | Filter by status. Supported values are 2 and 3. (deprecated.)
+currency = 'currency_example' # str | Query by specified currency, includes all currencies if not specified (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
+reverse = True # bool | Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results (optional) (default to True)
try:
- # Estimated interest rates
- api_response = api_instance.get_cross_margin_estimate_rate(currencies)
+ # Query cross margin borrow history (deprecated)
+ api_response = api_instance.list_cross_margin_loans(status, currency=currency, limit=limit, offset=offset, reverse=reverse)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling MarginApi->get_cross_margin_estimate_rate: %s\n" % e)
+ print("Exception when calling MarginApi->list_cross_margin_loans: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name |
+ **status** | **int**| Filter by status. Supported values are 2 and 3. (deprecated.) |
+ **currency** | **str**| Query by specified currency, includes all currencies if not specified | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
+ **reverse** | **bool**| Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results | [optional] [default to True]
### Return type
-**dict(str, str)**
+[**list[CrossMarginLoan]**](CrossMarginLoan.md)
### Authorization
@@ -2286,14 +765,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
-# **get_cross_margin_borrowable**
-> PortfolioBorrowable get_cross_margin_borrowable(currency)
+# **list_cross_margin_repayments**
+> list[CrossMarginRepayment] list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse)
+
+Retrieve cross margin repayments. (deprecated)
-Get the max borrowable amount for a specific cross margin currency
+Sorted by creation time in descending order by default. Set `reverse=false` for ascending order
### Example
@@ -2319,27 +800,35 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency
+currency = 'BTC' # str | (optional)
+loan_id = '12345' # str | (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
+reverse = True # bool | Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results (optional) (default to True)
try:
- # Get the max borrowable amount for a specific cross margin currency
- api_response = api_instance.get_cross_margin_borrowable(currency)
+ # Retrieve cross margin repayments. (deprecated)
+ api_response = api_instance.list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
- print("Exception when calling MarginApi->get_cross_margin_borrowable: %s\n" % e)
+ print("Exception when calling MarginApi->list_cross_margin_repayments: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency |
+ **currency** | **str**| | [optional]
+ **loan_id** | **str**| | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
+ **reverse** | **bool**| Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results | [optional] [default to True]
### Return type
-[**PortfolioBorrowable**](PortfolioBorrowable.md)
+[**list[CrossMarginRepayment]**](CrossMarginRepayment.md)
### Authorization
@@ -2353,7 +842,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
diff --git a/docs/MarginCurrencyPair.md b/docs/MarginCurrencyPair.md
deleted file mode 100644
index 7826f21..0000000
--- a/docs/MarginCurrencyPair.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# MarginCurrencyPair
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | **str** | Currency pair | [optional]
-**base** | **str** | Base currency | [optional]
-**quote** | **str** | Quote currency | [optional]
-**leverage** | **int** | Leverage | [optional]
-**min_base_amount** | **str** | Minimum base currency to loan, `null` means no limit | [optional]
-**min_quote_amount** | **str** | Minimum quote currency to loan, `null` means no limit | [optional]
-**max_quote_amount** | **str** | Maximum borrowable amount for quote currency. Base currency limit is calculated by quote maximum and market price. `null` means no limit | [optional]
-**status** | **int** | Currency pair status - `0`: disabled - `1`: enabled | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/MarginLeverageTier.md b/docs/MarginLeverageTier.md
new file mode 100644
index 0000000..0a36030
--- /dev/null
+++ b/docs/MarginLeverageTier.md
@@ -0,0 +1,13 @@
+# MarginLeverageTier
+
+Market gradient information
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**upper_limit** | **str** | Maximum loan limit | [optional]
+**mmr** | **str** | Maintenance margin rate | [optional]
+**leverage** | **str** | Maximum leverage multiple | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MarginMarketLeverage.md b/docs/MarginMarketLeverage.md
new file mode 100644
index 0000000..63ce686
--- /dev/null
+++ b/docs/MarginMarketLeverage.md
@@ -0,0 +1,12 @@
+# MarginMarketLeverage
+
+Market leverage settings
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency_pair** | **str** | Market | [optional]
+**leverage** | **str** | Position leverage |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MarginTiers.md b/docs/MarginTiers.md
new file mode 100644
index 0000000..455092c
--- /dev/null
+++ b/docs/MarginTiers.md
@@ -0,0 +1,14 @@
+# MarginTiers
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**tier** | **str** | Tier | [optional]
+**margin_rate** | **str** | Discount | [optional]
+**lower_limit** | **str** | Lower limit | [optional]
+**upper_limit** | **str** | Upper limit, \"\" indicates greater than (the last tier) | [optional]
+**leverage** | **str** | Position leverage | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MarginUniApi.md b/docs/MarginUniApi.md
index 1a912f3..02afa4e 100644
--- a/docs/MarginUniApi.md
+++ b/docs/MarginUniApi.md
@@ -5,13 +5,13 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
[**list_uni_currency_pairs**](MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets
-[**get_uni_currency_pair**](MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market
-[**get_margin_uni_estimate_rate**](MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate
-[**list_uni_loans**](MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans
+[**get_uni_currency_pair**](MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get lending market details
+[**get_margin_uni_estimate_rate**](MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest rate for isolated margin currencies
+[**list_uni_loans**](MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | Query loans
[**create_uni_loan**](MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay
-[**list_uni_loan_records**](MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records
-[**list_uni_loan_interest_records**](MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records
-[**get_uni_borrowable**](MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable
+[**list_uni_loan_records**](MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Query loan records
+[**list_uni_loan_interest_records**](MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | Query interest deduction records
+[**get_uni_borrowable**](MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Query maximum borrowable amount by currency
# **list_uni_currency_pairs**
@@ -64,14 +64,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **get_uni_currency_pair**
> UniCurrencyPair get_uni_currency_pair(currency_pair)
-Get detail of lending market
+Get lending market details
### Example
@@ -91,7 +91,7 @@ api_instance = gate_api.MarginUniApi(api_client)
currency_pair = 'AE_USDT' # str | Currency pair
try:
- # Get detail of lending market
+ # Get lending market details
api_response = api_instance.get_uni_currency_pair(currency_pair)
print(api_response)
except GateApiException as ex:
@@ -122,16 +122,16 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **get_margin_uni_estimate_rate**
> dict(str, str) get_margin_uni_estimate_rate(currencies)
-Estimate interest Rate
+Estimate interest rate for isolated margin currencies
-Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate.
+Interest rates change hourly based on lending depth, so completely accurate rates cannot be provided.
### Example
@@ -157,10 +157,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginUniApi(api_client)
-currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name
+currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Array of currency names to query, maximum 10
try:
- # Estimate interest Rate
+ # Estimate interest rate for isolated margin currencies
api_response = api_instance.get_margin_uni_estimate_rate(currencies)
print(api_response)
except GateApiException as ex:
@@ -173,7 +173,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name |
+ **currencies** | [**list[str]**](str.md)| Array of currency names to query, maximum 10 |
### Return type
@@ -191,14 +191,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_uni_loans**
> list[UniLoan] list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit)
-List loans
+Query loans
### Example
@@ -225,12 +225,12 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginUniApi(api_client)
currency_pair = 'BTC_USDT' # str | Currency pair (optional)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
+currency = 'BTC' # str | Query by specified currency name (optional)
page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100)
+limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100)
try:
- # List loans
+ # Query loans
api_response = api_instance.list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit)
print(api_response)
except GateApiException as ex:
@@ -244,9 +244,9 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**currency_pair** | **str**| Currency pair | [optional]
- **currency** | **str**| Retrieve data of the specified currency | [optional]
+ **currency** | **str**| Query by specified currency name | [optional]
**page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100]
+ **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100]
### Return type
@@ -264,7 +264,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
@@ -330,14 +330,14 @@ void (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | Operated successfully | - |
+**204** | Operation successful | - |
[[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)
# **list_uni_loan_records**
> list[UniLoanRecord] list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit)
-Get load records
+Query loan records
### Example
@@ -363,14 +363,14 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginUniApi(api_client)
-type = 'type_example' # str | type: borrow - borrow, repay - repay (optional)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
+type = 'type_example' # str | Type: `borrow` - borrow, `repay` - repay (optional)
+currency = 'BTC' # str | Query by specified currency name (optional)
currency_pair = 'BTC_USDT' # str | Currency pair (optional)
page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100)
+limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100)
try:
- # Get load records
+ # Query loan records
api_response = api_instance.list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit)
print(api_response)
except GateApiException as ex:
@@ -383,11 +383,11 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **type** | **str**| type: borrow - borrow, repay - repay | [optional]
- **currency** | **str**| Retrieve data of the specified currency | [optional]
+ **type** | **str**| Type: `borrow` - borrow, `repay` - repay | [optional]
+ **currency** | **str**| Query by specified currency name | [optional]
**currency_pair** | **str**| Currency pair | [optional]
**page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100]
+ **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100]
### Return type
@@ -405,14 +405,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_uni_loan_interest_records**
-> list[UniLoanInterestRecord] list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit)
+> list[UniLoanInterestRecord] list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to)
-List interest records
+Query interest deduction records
### Example
@@ -439,13 +439,15 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginUniApi(api_client)
currency_pair = 'BTC_USDT' # str | Currency pair (optional)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
+currency = 'BTC' # str | Query by specified currency name (optional)
page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
try:
- # List interest records
- api_response = api_instance.list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit)
+ # Query interest deduction records
+ api_response = api_instance.list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -458,9 +460,11 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**currency_pair** | **str**| Currency pair | [optional]
- **currency** | **str**| Retrieve data of the specified currency | [optional]
+ **currency** | **str**| Query by specified currency name | [optional]
**page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
### Return type
@@ -478,14 +482,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **get_uni_borrowable**
> MaxUniBorrowable get_uni_borrowable(currency, currency_pair)
-Get maximum borrowable
+Query maximum borrowable amount by currency
### Example
@@ -511,11 +515,11 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.MarginUniApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency
+currency = 'BTC' # str | Query by specified currency name
currency_pair = 'BTC_USDT' # str | Currency pair
try:
- # Get maximum borrowable
+ # Query maximum borrowable amount by currency
api_response = api_instance.get_uni_borrowable(currency, currency_pair)
print(api_response)
except GateApiException as ex:
@@ -528,7 +532,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency |
+ **currency** | **str**| Query by specified currency name |
**currency_pair** | **str**| Currency pair |
### Return type
@@ -547,7 +551,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
diff --git a/docs/MockFuturesOrder.md b/docs/MockFuturesOrder.md
new file mode 100644
index 0000000..0d03d06
--- /dev/null
+++ b/docs/MockFuturesOrder.md
@@ -0,0 +1,13 @@
+# MockFuturesOrder
+
+Futures order
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**contract** | **str** | Futures name, currently only supports USDT perpetual contracts for BTC and ETH |
+**size** | **str** | Contract quantity, representing the initial order quantity, not involved in actual settlement |
+**left** | **str** | Unfilled contract quantity, involved in actual calculation |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MockFuturesPosition.md b/docs/MockFuturesPosition.md
new file mode 100644
index 0000000..f6eccc7
--- /dev/null
+++ b/docs/MockFuturesPosition.md
@@ -0,0 +1,12 @@
+# MockFuturesPosition
+
+Futures positions
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**contract** | **str** | Futures name, currently only supports USDT perpetual contracts for BTC and ETH |
+**size** | **str** | Position size, measured in contract quantity |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MockMarginResult.md b/docs/MockMarginResult.md
new file mode 100644
index 0000000..0ea3b20
--- /dev/null
+++ b/docs/MockMarginResult.md
@@ -0,0 +1,17 @@
+# MockMarginResult
+
+Margin result
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**type** | **str** | Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position | [optional]
+**profit_loss_ranges** | [**list[ProfitLossRange]**](ProfitLossRange.md) | Results of 33 stress scenarios for MR1 | [optional]
+**max_loss** | [**ProfitLossRange**](.md) | 最大损失 | [optional]
+**mr1** | **str** | Stress testing | [optional]
+**mr2** | **str** | Basis spread risk | [optional]
+**mr3** | **str** | Volatility spread risk | [optional]
+**mr4** | **str** | Option short risk | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MockOptionsOrder.md b/docs/MockOptionsOrder.md
new file mode 100644
index 0000000..054d3f4
--- /dev/null
+++ b/docs/MockOptionsOrder.md
@@ -0,0 +1,13 @@
+# MockOptionsOrder
+
+Option orders
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**options_name** | **str** | Option name, currently only supports USDT options for BTC and ETH |
+**size** | **str** | Initial order quantity, not involved in actual calculation |
+**left** | **str** | Unfilled contract quantity, involved in actual calculation |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MockOptionsPosition.md b/docs/MockOptionsPosition.md
new file mode 100644
index 0000000..f7c0e53
--- /dev/null
+++ b/docs/MockOptionsPosition.md
@@ -0,0 +1,12 @@
+# MockOptionsPosition
+
+Options positions
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**options_name** | **str** | Option name, currently only supports USDT options for BTC and ETH |
+**size** | **str** | Position size, measured in contract quantity |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MockRiskUnit.md b/docs/MockRiskUnit.md
new file mode 100644
index 0000000..cf6f234
--- /dev/null
+++ b/docs/MockRiskUnit.md
@@ -0,0 +1,19 @@
+# MockRiskUnit
+
+Risk unit
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**symbol** | **str** | Risk unit name | [optional]
+**spot_in_use** | **str** | Spot hedge usage | [optional]
+**maintain_margin** | **str** | Maintenance margin | [optional]
+**initial_margin** | **str** | Initial margin | [optional]
+**margin_result** | [**list[MockMarginResult]**](MockMarginResult.md) | Margin result | [optional]
+**delta** | **str** | Total Delta of risk unit | [optional]
+**gamma** | **str** | Total Gamma of risk unit | [optional]
+**theta** | **str** | Total Theta of risk unit | [optional]
+**vega** | **str** | Total Vega of risk unit | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MockSpotBalance.md b/docs/MockSpotBalance.md
new file mode 100644
index 0000000..54bb762
--- /dev/null
+++ b/docs/MockSpotBalance.md
@@ -0,0 +1,12 @@
+# MockSpotBalance
+
+Spot
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency name |
+**equity** | **str** | Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports BTC and ETH |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MockSpotOrder.md b/docs/MockSpotOrder.md
new file mode 100644
index 0000000..3b3d340
--- /dev/null
+++ b/docs/MockSpotOrder.md
@@ -0,0 +1,15 @@
+# MockSpotOrder
+
+Spot orders
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency_pairs** | **str** | Market |
+**order_price** | **str** | Price |
+**count** | **str** | Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports BTC and ETH Currently only supports three currencies: BTC, ETH | [optional]
+**left** | **str** | Unfilled quantity, involved in actual calculation |
+**type** | **str** | Order type, sell - sell order, buy - buy order |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MultiCollateralCurrency.md b/docs/MultiCollateralCurrency.md
new file mode 100644
index 0000000..f309656
--- /dev/null
+++ b/docs/MultiCollateralCurrency.md
@@ -0,0 +1,12 @@
+# MultiCollateralCurrency
+
+Borrowing and collateral currencies supported for Multi-Collateral
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loan_currencies** | [**list[MultiLoanItem]**](MultiLoanItem.md) | List of supported borrowing currencies | [optional]
+**collateral_currencies** | [**list[MultiCollateralItem]**](MultiCollateralItem.md) | List of supported collateral currencies | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MultiCollateralItem.md b/docs/MultiCollateralItem.md
new file mode 100644
index 0000000..3e9ba07
--- /dev/null
+++ b/docs/MultiCollateralItem.md
@@ -0,0 +1,12 @@
+# MultiCollateralItem
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional]
+**index_price** | **str** | Currency Index Price | [optional]
+**discount** | **str** | Discount | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MultiCollateralLoanApi.md b/docs/MultiCollateralLoanApi.md
new file mode 100644
index 0000000..ab66f2a
--- /dev/null
+++ b/docs/MultiCollateralLoanApi.md
@@ -0,0 +1,808 @@
+# gate_api.MultiCollateralLoanApi
+
+All URIs are relative to *https://api.gateio.ws/api/v4*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**list_multi_collateral_orders**](MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | Query multi-currency collateral order list
+[**create_multi_collateral**](MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Place multi-currency collateral order
+[**get_multi_collateral_order_detail**](MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Query order details
+[**list_multi_repay_records**](MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | Query multi-currency collateral repayment records
+[**repay_multi_collateral_loan**](MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Multi-currency collateral repayment
+[**list_multi_collateral_records**](MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records
+[**operate_multi_collateral**](MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Add or withdraw collateral
+[**list_user_currency_quota**](MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | Query user's collateral and borrowing currency quota information
+[**list_multi_collateral_currencies**](MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies for multi-currency collateral
+[**get_multi_collateral_ltv**](MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Query collateralization ratio information
+[**get_multi_collateral_fix_rate**](MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query currency's 7-day and 30-day fixed interest rates
+[**get_multi_collateral_current_rate**](MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query currency's current interest rate
+
+
+# **list_multi_collateral_orders**
+> list[MultiCollateralOrder] list_multi_collateral_orders(page=page, limit=limit, sort=sort, order_type=order_type)
+
+Query multi-currency collateral order list
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.MultiCollateralLoanApi(api_client)
+page = 1 # int | Page number (optional) (default to 1)
+limit = 10 # int | Maximum number of records returned in a single list (optional) (default to 10)
+sort = 'ltv_asc' # str | Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending. (optional)
+order_type = 'current' # str | Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified (optional)
+
+try:
+ # Query multi-currency collateral order list
+ api_response = api_instance.list_multi_collateral_orders(page=page, limit=limit, sort=sort, order_type=order_type)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling MultiCollateralLoanApi->list_multi_collateral_orders: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **page** | **int**| Page number | [optional] [default to 1]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 10]
+ **sort** | **str**| Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending. | [optional]
+ **order_type** | **str**| Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified | [optional]
+
+### Return type
+
+[**list[MultiCollateralOrder]**](MultiCollateralOrder.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | List retrieved successfully | - |
+
+[[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)
+
+# **create_multi_collateral**
+> OrderResp create_multi_collateral(create_multi_collateral_order)
+
+Place multi-currency collateral order
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.MultiCollateralLoanApi(api_client)
+create_multi_collateral_order = gate_api.CreateMultiCollateralOrder() # CreateMultiCollateralOrder |
+
+try:
+ # Place multi-currency collateral order
+ api_response = api_instance.create_multi_collateral(create_multi_collateral_order)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling MultiCollateralLoanApi->create_multi_collateral: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **create_multi_collateral_order** | [**CreateMultiCollateralOrder**](CreateMultiCollateralOrder.md)| |
+
+### Return type
+
+[**OrderResp**](OrderResp.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Order placed successfully | - |
+
+[[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)
+
+# **get_multi_collateral_order_detail**
+> MultiCollateralOrder get_multi_collateral_order_detail(order_id)
+
+Query order details
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.MultiCollateralLoanApi(api_client)
+order_id = '12345' # str | Order ID returned when order is successfully created
+
+try:
+ # Query order details
+ api_response = api_instance.get_multi_collateral_order_detail(order_id)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling MultiCollateralLoanApi->get_multi_collateral_order_detail: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **order_id** | **str**| Order ID returned when order is successfully created |
+
+### Return type
+
+[**MultiCollateralOrder**](MultiCollateralOrder.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Order details queried successfully | - |
+
+[[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)
+
+# **list_multi_repay_records**
+> list[MultiRepayRecord] list_multi_repay_records(type, borrow_currency=borrow_currency, page=page, limit=limit, _from=_from, to=to)
+
+Query multi-currency collateral repayment records
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.MultiCollateralLoanApi(api_client)
+type = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation
+borrow_currency = 'USDT' # str | Borrowed currency (optional)
+page = 1 # int | Page number (optional) (default to 1)
+limit = 10 # int | Maximum number of records returned in a single list (optional) (default to 10)
+_from = 1609459200 # int | Start timestamp for the query (optional)
+to = 1609459200 # int | End timestamp for the query, defaults to current time if not specified (optional)
+
+try:
+ # Query multi-currency collateral repayment records
+ api_response = api_instance.list_multi_repay_records(type, borrow_currency=borrow_currency, page=page, limit=limit, _from=_from, to=to)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling MultiCollateralLoanApi->list_multi_repay_records: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **type** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation |
+ **borrow_currency** | **str**| Borrowed currency | [optional]
+ **page** | **int**| Page number | [optional] [default to 1]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 10]
+ **_from** | **int**| Start timestamp for the query | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+
+### Return type
+
+[**list[MultiRepayRecord]**](MultiRepayRecord.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **repay_multi_collateral_loan**
+> MultiRepayResp repay_multi_collateral_loan(repay_multi_loan)
+
+Multi-currency collateral repayment
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.MultiCollateralLoanApi(api_client)
+repay_multi_loan = gate_api.RepayMultiLoan() # RepayMultiLoan |
+
+try:
+ # Multi-currency collateral repayment
+ api_response = api_instance.repay_multi_collateral_loan(repay_multi_loan)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling MultiCollateralLoanApi->repay_multi_collateral_loan: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **repay_multi_loan** | [**RepayMultiLoan**](RepayMultiLoan.md)| |
+
+### Return type
+
+[**MultiRepayResp**](MultiRepayResp.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Operation successful | - |
+
+[[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)
+
+# **list_multi_collateral_records**
+> list[MultiCollateralRecord] list_multi_collateral_records(page=page, limit=limit, _from=_from, to=to, collateral_currency=collateral_currency)
+
+Query collateral adjustment records
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.MultiCollateralLoanApi(api_client)
+page = 1 # int | Page number (optional) (default to 1)
+limit = 10 # int | Maximum number of records returned in a single list (optional) (default to 10)
+_from = 1609459200 # int | Start timestamp for the query (optional)
+to = 1609459200 # int | End timestamp for the query, defaults to current time if not specified (optional)
+collateral_currency = 'BTC' # str | Collateral currency (optional)
+
+try:
+ # Query collateral adjustment records
+ api_response = api_instance.list_multi_collateral_records(page=page, limit=limit, _from=_from, to=to, collateral_currency=collateral_currency)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling MultiCollateralLoanApi->list_multi_collateral_records: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **page** | **int**| Page number | [optional] [default to 1]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 10]
+ **_from** | **int**| Start timestamp for the query | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+ **collateral_currency** | **str**| Collateral currency | [optional]
+
+### Return type
+
+[**list[MultiCollateralRecord]**](MultiCollateralRecord.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | List retrieved successfully | - |
+
+[[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)
+
+# **operate_multi_collateral**
+> CollateralAdjustRes operate_multi_collateral(collateral_adjust)
+
+Add or withdraw collateral
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.MultiCollateralLoanApi(api_client)
+collateral_adjust = gate_api.CollateralAdjust() # CollateralAdjust |
+
+try:
+ # Add or withdraw collateral
+ api_response = api_instance.operate_multi_collateral(collateral_adjust)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling MultiCollateralLoanApi->operate_multi_collateral: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **collateral_adjust** | [**CollateralAdjust**](CollateralAdjust.md)| |
+
+### Return type
+
+[**CollateralAdjustRes**](CollateralAdjustRes.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Operation successful | - |
+
+[[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)
+
+# **list_user_currency_quota**
+> list[CurrencyQuota] list_user_currency_quota(type, currency)
+
+Query user's collateral and borrowing currency quota information
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.MultiCollateralLoanApi(api_client)
+type = 'collateral' # str | Currency type: collateral - Collateral currency, borrow - Borrowing currency
+currency = 'BTC' # str | When it is a collateral currency, multiple currencies can be provided separated by commas; when it is a borrowing currency, only one currency can be provided.
+
+try:
+ # Query user's collateral and borrowing currency quota information
+ api_response = api_instance.list_user_currency_quota(type, currency)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling MultiCollateralLoanApi->list_user_currency_quota: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **type** | **str**| Currency type: collateral - Collateral currency, borrow - Borrowing currency |
+ **currency** | **str**| When it is a collateral currency, multiple currencies can be provided separated by commas; when it is a borrowing currency, only one currency can be provided. |
+
+### Return type
+
+[**list[CurrencyQuota]**](CurrencyQuota.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **list_multi_collateral_currencies**
+> MultiCollateralCurrency list_multi_collateral_currencies()
+
+Query supported borrowing and collateral currencies for multi-currency collateral
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.MultiCollateralLoanApi(api_client)
+
+try:
+ # Query supported borrowing and collateral currencies for multi-currency collateral
+ api_response = api_instance.list_multi_collateral_currencies()
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling MultiCollateralLoanApi->list_multi_collateral_currencies: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**MultiCollateralCurrency**](MultiCollateralCurrency.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **get_multi_collateral_ltv**
+> CollateralLtv get_multi_collateral_ltv()
+
+Query collateralization ratio information
+
+Multi-currency collateral ratio is fixed, independent of currency
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.MultiCollateralLoanApi(api_client)
+
+try:
+ # Query collateralization ratio information
+ api_response = api_instance.get_multi_collateral_ltv()
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling MultiCollateralLoanApi->get_multi_collateral_ltv: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**CollateralLtv**](CollateralLtv.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **get_multi_collateral_fix_rate**
+> list[CollateralFixRate] get_multi_collateral_fix_rate()
+
+Query currency's 7-day and 30-day fixed interest rates
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.MultiCollateralLoanApi(api_client)
+
+try:
+ # Query currency's 7-day and 30-day fixed interest rates
+ api_response = api_instance.get_multi_collateral_fix_rate()
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling MultiCollateralLoanApi->get_multi_collateral_fix_rate: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**list[CollateralFixRate]**](CollateralFixRate.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **get_multi_collateral_current_rate**
+> list[CollateralCurrentRate] get_multi_collateral_current_rate(currencies, vip_level=vip_level)
+
+Query currency's current interest rate
+
+Query currency's current interest rate for the previous hour, current interest rate updates hourly
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.MultiCollateralLoanApi(api_client)
+currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify currency name query array, separated by commas, maximum 100 items
+vip_level = '0' # str | VIP level, defaults to 0 if not specified (optional) (default to '0')
+
+try:
+ # Query currency's current interest rate
+ api_response = api_instance.get_multi_collateral_current_rate(currencies, vip_level=vip_level)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling MultiCollateralLoanApi->get_multi_collateral_current_rate: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currencies** | [**list[str]**](str.md)| Specify currency name query array, separated by commas, maximum 100 items |
+ **vip_level** | **str**| VIP level, defaults to 0 if not specified | [optional] [default to '0']
+
+### Return type
+
+[**list[CollateralCurrentRate]**](CollateralCurrentRate.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
diff --git a/docs/MultiCollateralOrder.md b/docs/MultiCollateralOrder.md
new file mode 100644
index 0000000..3162049
--- /dev/null
+++ b/docs/MultiCollateralOrder.md
@@ -0,0 +1,24 @@
+# MultiCollateralOrder
+
+Multi-Collateral Order
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order_id** | **str** | Order ID | [optional]
+**order_type** | **str** | current - current, fixed - fixed | [optional]
+**fixed_type** | **str** | Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days | [optional]
+**fixed_rate** | **str** | Fixed interest rate | [optional]
+**expire_time** | **int** | Expiration time, timestamp, unit in seconds | [optional]
+**auto_renew** | **bool** | Fixed interest rate, auto-renewal | [optional]
+**auto_repay** | **bool** | Fixed interest rate, auto-repayment | [optional]
+**current_ltv** | **str** | Current collateralization rate | [optional]
+**status** | **str** | Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed | [optional]
+**borrow_time** | **int** | Borrowing time, timestamp in seconds | [optional]
+**total_left_repay_usdt** | **str** | Total outstanding value converted to USDT | [optional]
+**total_left_collateral_usdt** | **str** | Total collateral value converted to USDT | [optional]
+**borrow_currencies** | [**list[BorrowCurrencyInfo]**](BorrowCurrencyInfo.md) | Borrowing Currency List | [optional]
+**collateral_currencies** | [**list[CollateralCurrencyInfo]**](CollateralCurrencyInfo.md) | Collateral Currency List | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MultiCollateralRecord.md b/docs/MultiCollateralRecord.md
new file mode 100644
index 0000000..5f48cd6
--- /dev/null
+++ b/docs/MultiCollateralRecord.md
@@ -0,0 +1,17 @@
+# MultiCollateralRecord
+
+Multi-Collateral adjustment record
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order_id** | **int** | Order ID | [optional]
+**record_id** | **int** | Collateral record ID | [optional]
+**before_ltv** | **str** | Collateral ratio before adjustment | [optional]
+**after_ltv** | **str** | Collateral ratio before adjustment | [optional]
+**operate_time** | **int** | Operation time, timestamp in seconds | [optional]
+**borrow_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Borrowing Currency List | [optional]
+**collateral_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Collateral Currency List | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MultiCollateralRecordCurrency.md b/docs/MultiCollateralRecordCurrency.md
new file mode 100644
index 0000000..9e3f5e1
--- /dev/null
+++ b/docs/MultiCollateralRecordCurrency.md
@@ -0,0 +1,15 @@
+# MultiCollateralRecordCurrency
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional]
+**index_price** | **str** | Currency Index Price | [optional]
+**before_amount** | **str** | Amount before the operation | [optional]
+**before_amount_usdt** | **str** | USDT Amount before the operation | [optional]
+**after_amount** | **str** | Amount after the operation | [optional]
+**after_amount_usdt** | **str** | USDT Amount after the operation | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MultiLoanItem.md b/docs/MultiLoanItem.md
new file mode 100644
index 0000000..3c45fc2
--- /dev/null
+++ b/docs/MultiLoanItem.md
@@ -0,0 +1,11 @@
+# MultiLoanItem
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional]
+**price** | **str** | Latest price of the currency | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/FundingBookItem.md b/docs/MultiLoanRepayItem.md
similarity index 54%
rename from docs/FundingBookItem.md
rename to docs/MultiLoanRepayItem.md
index 83f5d7d..f381f48 100644
--- a/docs/FundingBookItem.md
+++ b/docs/MultiLoanRepayItem.md
@@ -1,11 +1,11 @@
-# FundingBookItem
+# MultiLoanRepayItem
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**rate** | **str** | Loan rate (daily rate) | [optional]
-**amount** | **str** | Borrowable amount | [optional]
-**days** | **int** | The number of days till the loan repayment's dateline | [optional]
+**currency** | **str** | Repayment currency | [optional]
+**amount** | **str** | Size | [optional]
+**repaid_all** | **bool** | Repayment method, set to true for full repayment, false for partial repayment |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/MultiRepayRecord.md b/docs/MultiRepayRecord.md
new file mode 100644
index 0000000..93e37d8
--- /dev/null
+++ b/docs/MultiRepayRecord.md
@@ -0,0 +1,22 @@
+# MultiRepayRecord
+
+Multi-Collateral Repayment Record
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order_id** | **int** | Order ID | [optional]
+**record_id** | **int** | Repayment record ID | [optional]
+**init_ltv** | **str** | Initial collateralization rate | [optional]
+**before_ltv** | **str** | Ltv before the operation | [optional]
+**after_ltv** | **str** | Ltv after the operation | [optional]
+**borrow_time** | **int** | Borrowing time, timestamp in seconds | [optional]
+**repay_time** | **int** | Repayment time, timestamp in seconds | [optional]
+**borrow_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of borrowing information | [optional]
+**collateral_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of collateral information | [optional]
+**repaid_currencies** | [**list[RepayRecordRepaidCurrency]**](RepayRecordRepaidCurrency.md) | Repay Currency List | [optional]
+**total_interest_list** | [**list[RepayRecordTotalInterest]**](RepayRecordTotalInterest.md) | Total Interest List | [optional]
+**left_repay_interest_list** | [**list[RepayRecordLeftInterest]**](RepayRecordLeftInterest.md) | List of remaining interest to be repaid | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MultiRepayResp.md b/docs/MultiRepayResp.md
new file mode 100644
index 0000000..2d7ebe0
--- /dev/null
+++ b/docs/MultiRepayResp.md
@@ -0,0 +1,12 @@
+# MultiRepayResp
+
+Multi-currency collateral repayment
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order_id** | **int** | Order ID | [optional]
+**repaid_currencies** | [**list[RepayCurrencyRes]**](RepayCurrencyRes.md) | Repay Currency List | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MyFuturesTrade.md b/docs/MyFuturesTrade.md
index eec5a74..34cc347 100644
--- a/docs/MyFuturesTrade.md
+++ b/docs/MyFuturesTrade.md
@@ -3,16 +3,17 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**id** | **int** | Trade ID | [optional]
-**create_time** | **float** | Trading time | [optional]
+**id** | **int** | Fill ID | [optional]
+**create_time** | **float** | Fill Time | [optional]
**contract** | **str** | Futures contract | [optional]
-**order_id** | **str** | Order ID related | [optional]
+**order_id** | **str** | Related order ID | [optional]
**size** | **int** | Trading size | [optional]
-**price** | **str** | Trading price | [optional]
-**role** | **str** | Trade role. Available values are `taker` and `maker` | [optional]
-**text** | **str** | User defined information | [optional]
-**fee** | **str** | Fee deducted | [optional]
-**point_fee** | **str** | Points used to deduct fee | [optional]
+**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short position close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long position close_size<0 && size<0 && size < close_size Close long position and open short position | [optional]
+**price** | **str** | Fill Price | [optional]
+**role** | **str** | Trade role. taker - taker, maker - maker | [optional]
+**text** | **str** | Order custom information | [optional]
+**fee** | **str** | Trade fee | [optional]
+**point_fee** | **str** | Points used to deduct trade fee | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/MyFuturesTradeTimeRange.md b/docs/MyFuturesTradeTimeRange.md
index 1a8ff82..ff9e786 100644
--- a/docs/MyFuturesTradeTimeRange.md
+++ b/docs/MyFuturesTradeTimeRange.md
@@ -3,16 +3,17 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**trade_id** | **str** | Trade ID | [optional]
-**create_time** | **float** | Trading time | [optional]
+**trade_id** | **str** | Fill ID | [optional]
+**create_time** | **float** | Fill Time | [optional]
**contract** | **str** | Futures contract | [optional]
-**order_id** | **str** | Order ID related | [optional]
+**order_id** | **str** | Related order ID | [optional]
**size** | **int** | Trading size | [optional]
-**price** | **str** | Trading price | [optional]
-**role** | **str** | Trade role. Available values are `taker` and `maker` | [optional]
-**text** | **str** | User defined information | [optional]
-**fee** | **str** | Fee deducted | [optional]
-**point_fee** | **str** | Points used to deduct fee | [optional]
+**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short position close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long position close_size<0 && size<0 && size < close_size Close long position and open short position | [optional]
+**price** | **str** | Fill Price | [optional]
+**role** | **str** | Trade role. taker - taker, maker - maker | [optional]
+**text** | **str** | Order custom information | [optional]
+**fee** | **str** | Trade fee | [optional]
+**point_fee** | **str** | Points used to deduct trade fee | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OpenOrders.md b/docs/OpenOrders.md
index e57cbf6..ec395b5 100644
--- a/docs/OpenOrders.md
+++ b/docs/OpenOrders.md
@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency_pair** | **str** | Currency pair | [optional]
-**total** | **int** | Total open orders in this currency pair | [optional]
+**total** | **int** | Total number of open orders for this trading pair on the current page | [optional]
**orders** | [**list[Order]**](Order.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OptionsAccount.md b/docs/OptionsAccount.md
index df0bf57..d9a6eec 100644
--- a/docs/OptionsAccount.md
+++ b/docs/OptionsAccount.md
@@ -4,15 +4,24 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**user** | **int** | User ID | [optional]
-**total** | **str** | Total account balance | [optional]
+**total** | **str** | Account Balance | [optional]
+**position_value** | **str** | Position value, long position value is positive, short position value is negative | [optional]
+**equity** | **str** | Account equity, the sum of account balance and position value | [optional]
**short_enabled** | **bool** | If the account is allowed to short | [optional]
+**mmp_enabled** | **bool** | Whether to enable MMP | [optional]
+**liq_triggered** | **bool** | Whether to trigger position liquidation | [optional]
+**margin_mode** | **int** | | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 | [optional]
**unrealised_pnl** | **str** | Unrealized PNL | [optional]
**init_margin** | **str** | Initial position margin | [optional]
**maint_margin** | **str** | Position maintenance margin | [optional]
**order_margin** | **str** | Order margin of unfinished orders | [optional]
+**ask_order_margin** | **str** | Margin for outstanding sell orders | [optional]
+**bid_order_margin** | **str** | Margin for outstanding buy orders | [optional]
**available** | **str** | Available balance to transfer out or trade | [optional]
-**point** | **str** | POINT amount | [optional]
-**currency** | **str** | Settle currency | [optional]
+**point** | **str** | Point card amount | [optional]
+**currency** | **str** | Settlement currency | [optional]
+**orders_limit** | **int** | Maximum number of outstanding orders | [optional]
+**position_notional_limit** | **int** | Notional value upper limit, including the nominal value of positions and outstanding orders | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OptionsAccountBook.md b/docs/OptionsAccountBook.md
index 2b4a4a5..8ae81ce 100644
--- a/docs/OptionsAccountBook.md
+++ b/docs/OptionsAccountBook.md
@@ -6,8 +6,8 @@ Name | Type | Description | Notes
**time** | **float** | Change time | [optional]
**change** | **str** | Amount changed (USDT) | [optional]
**balance** | **str** | Account total balance after change (USDT) | [optional]
-**type** | **str** | Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional]
-**text** | **str** | custom text | [optional]
+**type** | **str** | Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional]
+**text** | **str** | Remark | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OptionsApi.md b/docs/OptionsApi.md
index 9017982..de8bf8b 100644
--- a/docs/OptionsApi.md
+++ b/docs/OptionsApi.md
@@ -4,36 +4,40 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**list_options_underlyings**](OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlyings
-[**list_options_expirations**](OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration times
-[**list_options_contracts**](OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time
-[**get_options_contract**](OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract detail
+[**list_options_underlyings**](OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlying assets
+[**list_options_expirations**](OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration dates
+[**list_options_contracts**](OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all contracts for specified underlying and expiration date
+[**get_options_contract**](OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract details
[**list_options_settlements**](OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history
-[**get_options_settlement**](OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract's settlement
-[**list_my_options_settlements**](OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | List my options settlements
-[**list_options_order_book**](OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Options order book
-[**list_options_tickers**](OptionsApi.md#list_options_tickers) | **GET** /options/tickers | List tickers of options contracts
-[**list_options_underlying_tickers**](OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Get underlying ticker
-[**list_options_candlesticks**](OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Get options candlesticks
-[**list_options_underlying_candlesticks**](OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Mark price candlesticks of an underlying
-[**list_options_trades**](OptionsApi.md#list_options_trades) | **GET** /options/trades | Options trade history
-[**list_options_account**](OptionsApi.md#list_options_account) | **GET** /options/accounts | List options account
-[**list_options_account_book**](OptionsApi.md#list_options_account_book) | **GET** /options/account_book | List account changing history
+[**get_options_settlement**](OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract settlement information
+[**list_my_options_settlements**](OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | Query personal settlement records
+[**list_options_order_book**](OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Query options contract order book
+[**list_options_tickers**](OptionsApi.md#list_options_tickers) | **GET** /options/tickers | Query options market ticker information
+[**list_options_underlying_tickers**](OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Query underlying ticker information
+[**list_options_candlesticks**](OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Options contract market candlestick chart
+[**list_options_underlying_candlesticks**](OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Underlying index price candlestick chart
+[**list_options_trades**](OptionsApi.md#list_options_trades) | **GET** /options/trades | Market trade records
+[**list_options_account**](OptionsApi.md#list_options_account) | **GET** /options/accounts | Query account information
+[**list_options_account_book**](OptionsApi.md#list_options_account_book) | **GET** /options/account_book | Query account change history
[**list_options_positions**](OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying
[**get_options_position**](OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position
[**list_options_position_close**](OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying
[**list_options_orders**](OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders
[**create_options_order**](OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order
-[**cancel_options_orders**](OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all `open` orders matched
-[**get_options_order**](OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Get a single order
-[**cancel_options_order**](OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel a single order
-[**list_my_options_trades**](OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | List personal trading history
+[**cancel_options_orders**](OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all orders with 'open' status
+[**get_options_order**](OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Query single order details
+[**cancel_options_order**](OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel single order
+[**countdown_cancel_all_options**](OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders
+[**list_my_options_trades**](OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | Query personal trading records
+[**get_options_mmp**](OptionsApi.md#get_options_mmp) | **GET** /options/mmp | MMP Query.
+[**set_options_mmp**](OptionsApi.md#set_options_mmp) | **POST** /options/mmp | MMP Settings
+[**reset_options_mmp**](OptionsApi.md#reset_options_mmp) | **POST** /options/mmp/reset | MMP Reset
# **list_options_underlyings**
> list[OptionsUnderlying] list_options_underlyings()
-List all underlyings
+List all underlying assets
### Example
@@ -52,7 +56,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.OptionsApi(api_client)
try:
- # List all underlyings
+ # List all underlying assets
api_response = api_instance.list_options_underlyings()
print(api_response)
except GateApiException as ex:
@@ -80,14 +84,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_options_expirations**
> list[int] list_options_expirations(underlying)
-List all expiration times
+List all expiration dates
### Example
@@ -107,7 +111,7 @@ api_instance = gate_api.OptionsApi(api_client)
underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint)
try:
- # List all expiration times
+ # List all expiration dates
api_response = api_instance.list_options_expirations(underlying)
print(api_response)
except GateApiException as ex:
@@ -138,14 +142,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List expiration times of specified underlying | - |
+**200** | List expiration dates for specified underlying | - |
[[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)
# **list_options_contracts**
> list[OptionsContract] list_options_contracts(underlying, expiration=expiration)
-List all the contracts with specified underlying and expiration time
+List all contracts for specified underlying and expiration date
### Example
@@ -163,10 +167,10 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.OptionsApi(api_client)
underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint)
-expiration = 1636588800 # int | Unix timestamp of the expiration time (optional)
+expiration = 1636588800 # int | Unix timestamp of expiration date (optional)
try:
- # List all the contracts with specified underlying and expiration time
+ # List all contracts for specified underlying and expiration date
api_response = api_instance.list_options_contracts(underlying, expiration=expiration)
print(api_response)
except GateApiException as ex:
@@ -180,7 +184,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**underlying** | **str**| Underlying (Obtained by listing underlying endpoint) |
- **expiration** | **int**| Unix timestamp of the expiration time | [optional]
+ **expiration** | **int**| Unix timestamp of expiration date | [optional]
### Return type
@@ -198,14 +202,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **get_options_contract**
> OptionsContract get_options_contract(contract)
-Query specified contract detail
+Query specified contract details
### Example
@@ -225,7 +229,7 @@ api_instance = gate_api.OptionsApi(api_client)
contract = 'BTC_USDT-20211130-65000-C' # str |
try:
- # Query specified contract detail
+ # Query specified contract details
api_response = api_instance.get_options_contract(contract)
print(api_response)
except GateApiException as ex:
@@ -256,7 +260,7 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
@@ -281,10 +285,10 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.OptionsApi(api_client)
underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
try:
# List settlement history
@@ -301,10 +305,10 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**underlying** | **str**| Underlying (Obtained by listing underlying endpoint) |
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
### Return type
@@ -322,14 +326,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **get_options_settlement**
> OptionsSettlement get_options_settlement(contract, underlying, at)
-Get specified contract's settlement
+Get specified contract settlement information
### Example
@@ -351,7 +355,7 @@ underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpo
at = 56 # int |
try:
- # Get specified contract's settlement
+ # Get specified contract settlement information
api_response = api_instance.get_options_settlement(contract, underlying, at)
print(api_response)
except GateApiException as ex:
@@ -384,14 +388,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_my_options_settlements**
> list[OptionsMySettlements] list_my_options_settlements(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to)
-List my options settlements
+Query personal settlement records
### Example
@@ -419,13 +423,13 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.OptionsApi(api_client)
underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint)
contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
try:
- # List my options settlements
+ # Query personal settlement records
api_response = api_instance.list_my_options_settlements(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to)
print(api_response)
except GateApiException as ex:
@@ -440,10 +444,10 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**underlying** | **str**| Underlying (Obtained by listing underlying endpoint) |
**contract** | **str**| Options contract name | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
### Return type
@@ -461,14 +465,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_options_order_book**
> FuturesOrderBook list_options_order_book(contract, interval=interval, limit=limit, with_id=with_id)
-Options order book
+Query options contract order book
Bids will be sorted by price from high to low, while asks sorted reversely
@@ -488,12 +492,12 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.OptionsApi(api_client)
contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name
-interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0')
-limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10)
-with_id = False # bool | Whether the order book update ID will be returned. This ID increases by 1 on every order book update (optional) (default to False)
+interval = '0' # str | Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified (optional) (default to '0')
+limit = 10 # int | Number of depth levels (optional) (default to 10)
+with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time depth changes (optional) (default to False)
try:
- # Options order book
+ # Query options contract order book
api_response = api_instance.list_options_order_book(contract, interval=interval, limit=limit, with_id=with_id)
print(api_response)
except GateApiException as ex:
@@ -507,9 +511,9 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**contract** | **str**| Options contract name |
- **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0']
- **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10]
- **with_id** | **bool**| Whether the order book update ID will be returned. This ID increases by 1 on every order book update | [optional] [default to False]
+ **interval** | **str**| Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified | [optional] [default to '0']
+ **limit** | **int**| Number of depth levels | [optional] [default to 10]
+ **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time depth changes | [optional] [default to False]
### Return type
@@ -527,14 +531,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Order book retrieved | - |
+**200** | Depth query successful | - |
[[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)
# **list_options_tickers**
> list[OptionsTicker] list_options_tickers(underlying)
-List tickers of options contracts
+Query options market ticker information
### Example
@@ -554,7 +558,7 @@ api_instance = gate_api.OptionsApi(api_client)
underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint)
try:
- # List tickers of options contracts
+ # Query options market ticker information
api_response = api_instance.list_options_tickers(underlying)
print(api_response)
except GateApiException as ex:
@@ -585,14 +589,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_options_underlying_tickers**
> OptionsUnderlyingTicker list_options_underlying_tickers(underlying)
-Get underlying ticker
+Query underlying ticker information
### Example
@@ -612,7 +616,7 @@ api_instance = gate_api.OptionsApi(api_client)
underlying = 'BTC_USDT' # str | Underlying
try:
- # Get underlying ticker
+ # Query underlying ticker information
api_response = api_instance.list_options_underlying_tickers(underlying)
print(api_response)
except GateApiException as ex:
@@ -643,14 +647,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_options_candlesticks**
> list[OptionsCandlestick] list_options_candlesticks(contract, limit=limit, _from=_from, to=to, interval=interval)
-Get options candlesticks
+Options contract market candlestick chart
### Example
@@ -668,13 +672,13 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.OptionsApi(api_client)
contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
-interval = '5m' # str | Interval time between data points (optional) (default to '5m')
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
+interval = '5m' # str | Time interval between data points (optional) (default to '5m')
try:
- # Get options candlesticks
+ # Options contract market candlestick chart
api_response = api_instance.list_options_candlesticks(contract, limit=limit, _from=_from, to=to, interval=interval)
print(api_response)
except GateApiException as ex:
@@ -688,10 +692,10 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**contract** | **str**| Options contract name |
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
- **interval** | **str**| Interval time between data points | [optional] [default to '5m']
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
+ **interval** | **str**| Time interval between data points | [optional] [default to '5m']
### Return type
@@ -709,14 +713,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_options_underlying_candlesticks**
> list[FuturesCandlestick] list_options_underlying_candlesticks(underlying, limit=limit, _from=_from, to=to, interval=interval)
-Mark price candlesticks of an underlying
+Underlying index price candlestick chart
### Example
@@ -734,13 +738,13 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.OptionsApi(api_client)
underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
-interval = '5m' # str | Interval time between data points (optional) (default to '5m')
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
+interval = '5m' # str | Time interval between data points (optional) (default to '5m')
try:
- # Mark price candlesticks of an underlying
+ # Underlying index price candlestick chart
api_response = api_instance.list_options_underlying_candlesticks(underlying, limit=limit, _from=_from, to=to, interval=interval)
print(api_response)
except GateApiException as ex:
@@ -754,10 +758,10 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**underlying** | **str**| Underlying (Obtained by listing underlying endpoint) |
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
- **interval** | **str**| Interval time between data points | [optional] [default to '5m']
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
+ **interval** | **str**| Time interval between data points | [optional] [default to '5m']
### Return type
@@ -775,14 +779,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_options_trades**
> list[FuturesTrade] list_options_trades(contract=contract, type=type, limit=limit, offset=offset, _from=_from, to=to)
-Options trade history
+Market trade records
### Example
@@ -800,14 +804,14 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.OptionsApi(api_client)
contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional)
-type = '1546935600' # str | `C` is call, while `P` is put (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+type = '1546935600' # str | `C` for call, `P` for put (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
try:
- # Options trade history
+ # Market trade records
api_response = api_instance.list_options_trades(contract=contract, type=type, limit=limit, offset=offset, _from=_from, to=to)
print(api_response)
except GateApiException as ex:
@@ -821,11 +825,11 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**contract** | **str**| Options contract name | [optional]
- **type** | **str**| `C` is call, while `P` is put | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **type** | **str**| `C` for call, `P` for put | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
### Return type
@@ -843,14 +847,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_options_account**
> OptionsAccount list_options_account()
-List options account
+Query account information
### Example
@@ -878,7 +882,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.OptionsApi(api_client)
try:
- # List options account
+ # Query account information
api_response = api_instance.list_options_account()
print(api_response)
except GateApiException as ex:
@@ -906,14 +910,14 @@ This endpoint does not need any parameter.
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_options_account_book**
> list[OptionsAccountBook] list_options_account_book(limit=limit, offset=offset, _from=_from, to=to, type=type)
-List account changing history
+Query account change history
### Example
@@ -939,14 +943,14 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.OptionsApi(api_client)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
-type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL (optional)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
+type = 'dnw' # str | Change types: - dnw: Deposit & Withdrawal - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: Settlement P&L (optional)
try:
- # List account changing history
+ # Query account change history
api_response = api_instance.list_options_account_book(limit=limit, offset=offset, _from=_from, to=to, type=type)
print(api_response)
except GateApiException as ex:
@@ -959,11 +963,11 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
- **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL | [optional]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
+ **type** | **str**| Change types: - dnw: Deposit & Withdrawal - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: Settlement P&L | [optional]
### Return type
@@ -981,7 +985,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
@@ -1048,7 +1052,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
@@ -1115,7 +1119,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
@@ -1184,7 +1188,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
@@ -1217,13 +1221,13 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.OptionsApi(api_client)
-status = 'open' # str | Only list the orders with this status
+status = 'open' # str | Query order list based on status
contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional)
underlying = 'BTC_USDT' # str | Underlying (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
try:
# List options orders
@@ -1239,13 +1243,13 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **status** | **str**| Only list the orders with this status |
+ **status** | **str**| Query order list based on status |
**contract** | **str**| Options contract name | [optional]
**underlying** | **str**| Underlying | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
### Return type
@@ -1263,7 +1267,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
@@ -1337,7 +1341,7 @@ Name | Type | Description | Notes
# **cancel_options_orders**
> list[OptionsOrder] cancel_options_orders(contract=contract, underlying=underlying, side=side)
-Cancel all `open` orders matched
+Cancel all orders with 'open' status
### Example
@@ -1365,10 +1369,10 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.OptionsApi(api_client)
contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional)
underlying = 'BTC_USDT' # str | Underlying (optional)
-side = 'ask' # str | All bids or asks. Both included if not specified (optional)
+side = 'ask' # str | Specify all bids or all asks, both included if not specified (optional)
try:
- # Cancel all `open` orders matched
+ # Cancel all orders with 'open' status
api_response = api_instance.cancel_options_orders(contract=contract, underlying=underlying, side=side)
print(api_response)
except GateApiException as ex:
@@ -1383,7 +1387,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**contract** | **str**| Options contract name | [optional]
**underlying** | **str**| Underlying | [optional]
- **side** | **str**| All bids or asks. Both included if not specified | [optional]
+ **side** | **str**| Specify all bids or all asks, both included if not specified | [optional]
### Return type
@@ -1401,14 +1405,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | All orders matched cancelled | - |
+**200** | Batch cancellation successful | - |
[[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)
# **get_options_order**
> OptionsOrder get_options_order(order_id)
-Get a single order
+Query single order details
### Example
@@ -1434,10 +1438,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.OptionsApi(api_client)
-order_id = 12345 # int | Order ID returned on successful order creation
+order_id = 12345 # int | Order ID returned when order is successfully created
try:
- # Get a single order
+ # Query single order details
api_response = api_instance.get_options_order(order_id)
print(api_response)
except GateApiException as ex:
@@ -1450,7 +1454,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **order_id** | **int**| Order ID returned on successful order creation |
+ **order_id** | **int**| Order ID returned when order is successfully created |
### Return type
@@ -1475,7 +1479,7 @@ Name | Type | Description | Notes
# **cancel_options_order**
> OptionsOrder cancel_options_order(order_id)
-Cancel a single order
+Cancel single order
### Example
@@ -1501,10 +1505,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.OptionsApi(api_client)
-order_id = 12345 # int | Order ID returned on successful order creation
+order_id = 12345 # int | Order ID returned when order is successfully created
try:
- # Cancel a single order
+ # Cancel single order
api_response = api_instance.cancel_options_order(order_id)
print(api_response)
except GateApiException as ex:
@@ -1517,7 +1521,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **order_id** | **int**| Order ID returned on successful order creation |
+ **order_id** | **int**| Order ID returned when order is successfully created |
### Return type
@@ -1539,10 +1543,79 @@ Name | Type | Description | Notes
[[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)
+# **countdown_cancel_all_options**
+> TriggerTime countdown_cancel_all_options(countdown_cancel_all_options_task)
+
+Countdown cancel orders
+
+Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled.
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.OptionsApi(api_client)
+countdown_cancel_all_options_task = gate_api.CountdownCancelAllOptionsTask() # CountdownCancelAllOptionsTask |
+
+try:
+ # Countdown cancel orders
+ api_response = api_instance.countdown_cancel_all_options(countdown_cancel_all_options_task)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling OptionsApi->countdown_cancel_all_options: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **countdown_cancel_all_options_task** | [**CountdownCancelAllOptionsTask**](CountdownCancelAllOptionsTask.md)| |
+
+### Return type
+
+[**TriggerTime**](TriggerTime.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Countdown set successfully | - |
+
+[[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)
+
# **list_my_options_trades**
> list[OptionsMyTrade] list_my_options_trades(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to)
-List personal trading history
+Query personal trading records
### Example
@@ -1570,13 +1643,13 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.OptionsApi(api_client)
underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint)
contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
-_from = 1547706332 # int | Start timestamp (optional)
-to = 1547706332 # int | End timestamp (optional)
+_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
+to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
try:
- # List personal trading history
+ # Query personal trading records
api_response = api_instance.list_my_options_trades(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to)
print(api_response)
except GateApiException as ex:
@@ -1591,10 +1664,10 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**underlying** | **str**| Underlying (Obtained by listing underlying endpoint) |
**contract** | **str**| Options contract name | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
- **_from** | **int**| Start timestamp | [optional]
- **to** | **int**| End timestamp | [optional]
+ **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional]
+ **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional]
### Return type
@@ -1612,7 +1685,208 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
+
+[[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)
+
+# **get_options_mmp**
+> list[OptionsMMP] get_options_mmp(underlying=underlying)
+
+MMP Query.
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.OptionsApi(api_client)
+underlying = 'BTC_USDT' # str | Underlying (optional)
+
+try:
+ # MMP Query.
+ api_response = api_instance.get_options_mmp(underlying=underlying)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling OptionsApi->get_options_mmp: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **underlying** | **str**| Underlying | [optional]
+
+### Return type
+
+[**list[OptionsMMP]**](OptionsMMP.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **set_options_mmp**
+> OptionsMMP set_options_mmp(options_mmp)
+
+MMP Settings
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.OptionsApi(api_client)
+options_mmp = gate_api.OptionsMMP() # OptionsMMP |
+
+try:
+ # MMP Settings
+ api_response = api_instance.set_options_mmp(options_mmp)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling OptionsApi->set_options_mmp: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **options_mmp** | [**OptionsMMP**](OptionsMMP.md)| |
+
+### Return type
+
+[**OptionsMMP**](OptionsMMP.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | MMP Information | - |
+
+[[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)
+
+# **reset_options_mmp**
+> OptionsMMP reset_options_mmp(options_mmp_reset)
+
+MMP Reset
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.OptionsApi(api_client)
+options_mmp_reset = gate_api.OptionsMMPReset() # OptionsMMPReset |
+
+try:
+ # MMP Reset
+ api_response = api_instance.reset_options_mmp(options_mmp_reset)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling OptionsApi->reset_options_mmp: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **options_mmp_reset** | [**OptionsMMPReset**](OptionsMMPReset.md)| |
+
+### Return type
+
+[**OptionsMMP**](OptionsMMP.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | MMP Information | - |
[[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)
diff --git a/docs/OptionsContract.md b/docs/OptionsContract.md
index c4572aa..ea9845a 100644
--- a/docs/OptionsContract.md
+++ b/docs/OptionsContract.md
@@ -1,34 +1,34 @@
# OptionsContract
-Options contract detail
+Options contract details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Options contract name | [optional]
-**tag** | **str** | tag | [optional]
-**create_time** | **float** | Creation time | [optional]
+**tag** | **str** | Tag | [optional]
+**create_time** | **float** | Created time | [optional]
**expiration_time** | **float** | Expiration time | [optional]
-**is_call** | **bool** | `true` means call options, while `false` is put options | [optional]
+**is_call** | **bool** | `true` means call options, `false` means put options | [optional]
**multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional]
**underlying** | **str** | Underlying | [optional]
**underlying_price** | **str** | Underlying price (quote currency) | [optional]
**last_price** | **str** | Last trading price | [optional]
**mark_price** | **str** | Current mark price (quote currency) | [optional]
**index_price** | **str** | Current index price (quote currency) | [optional]
-**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate | [optional]
+**maker_fee_rate** | **str** | Maker fee rate, negative values indicate rebates | [optional]
**taker_fee_rate** | **str** | Taker fee rate | [optional]
**order_price_round** | **str** | Minimum order price increment | [optional]
**mark_price_round** | **str** | Minimum mark price increment | [optional]
-**order_size_min** | **int** | Minimum order size the contract allowed | [optional]
-**order_size_max** | **int** | Maximum order size the contract allowed | [optional]
-**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional]
-**ref_discount_rate** | **str** | Referral fee rate discount | [optional]
-**ref_rebate_rate** | **str** | Referrer commission rate | [optional]
-**orderbook_id** | **int** | Current orderbook ID | [optional]
+**order_size_min** | **int** | Minimum order size allowed by the contract | [optional]
+**order_size_max** | **int** | Maximum order size allowed by the contract | [optional]
+**order_price_deviate** | **str** | The positive and negative offset allowed between the order price and the current mark price, that `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders | [optional]
+**ref_discount_rate** | **str** | Trading fee discount for referred users | [optional]
+**ref_rebate_rate** | **str** | Commission rate for referrers | [optional]
+**orderbook_id** | **int** | Orderbook update ID | [optional]
**trade_id** | **int** | Current trade ID | [optional]
-**trade_size** | **int** | Historical accumulated trade size | [optional]
+**trade_size** | **int** | Historical cumulative trading volume | [optional]
**position_size** | **int** | Current total long position size | [optional]
-**orders_limit** | **int** | Maximum number of open orders | [optional]
+**orders_limit** | **int** | Maximum number of pending orders | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OptionsMMP.md b/docs/OptionsMMP.md
new file mode 100644
index 0000000..2e8b73f
--- /dev/null
+++ b/docs/OptionsMMP.md
@@ -0,0 +1,17 @@
+# OptionsMMP
+
+MMP Settings
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**underlying** | **str** | Underlying |
+**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disable MMP |
+**frozen_period** | **int** | Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze |
+**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places) |
+**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places) |
+**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered | [optional] [readonly]
+**frozen_until_ms** | **int** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered | [optional] [readonly]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/OptionsMMPReset.md b/docs/OptionsMMPReset.md
new file mode 100644
index 0000000..1244357
--- /dev/null
+++ b/docs/OptionsMMPReset.md
@@ -0,0 +1,17 @@
+# OptionsMMPReset
+
+MMP Reset
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**underlying** | **str** | Underlying |
+**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disable MMP | [optional] [readonly]
+**frozen_period** | **int** | Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze | [optional] [readonly]
+**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places) | [optional] [readonly]
+**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places) | [optional] [readonly]
+**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered | [optional] [readonly]
+**frozen_until_ms** | **int** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered | [optional] [readonly]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/OptionsMySettlements.md b/docs/OptionsMySettlements.md
index fc2ef9d..c6df4a3 100644
--- a/docs/OptionsMySettlements.md
+++ b/docs/OptionsMySettlements.md
@@ -8,10 +8,10 @@ Name | Type | Description | Notes
**contract** | **str** | Options contract name | [optional]
**strike_price** | **str** | Strike price (quote currency) | [optional]
**settle_price** | **str** | Settlement price (quote currency) | [optional]
-**size** | **int** | Size | [optional]
+**size** | **int** | Settlement size | [optional]
**settle_profit** | **str** | Settlement profit (quote currency) | [optional]
-**fee** | **str** | Fee (quote currency) | [optional]
-**realised_pnl** | **str** | The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) | [optional]
+**fee** | **str** | Settlement fee (quote currency) | [optional]
+**realised_pnl** | **str** | Accumulated profit and loss from opening positions, including premium, fees, settlement profit, etc. (quote currency) | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OptionsMyTrade.md b/docs/OptionsMyTrade.md
index 44eb069..115f8ca 100644
--- a/docs/OptionsMyTrade.md
+++ b/docs/OptionsMyTrade.md
@@ -3,14 +3,14 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**id** | **int** | Trade ID | [optional]
-**create_time** | **float** | Trading time | [optional]
+**id** | **int** | Fill ID | [optional]
+**create_time** | **float** | Fill Time | [optional]
**contract** | **str** | Options contract name | [optional]
-**order_id** | **int** | Order ID related | [optional]
+**order_id** | **int** | Related order ID | [optional]
**size** | **int** | Trading size | [optional]
-**price** | **str** | Trading price (quote currency) | [optional]
+**price** | **str** | Trade price (quote currency) | [optional]
**underlying_price** | **str** | Underlying price (quote currency) | [optional]
-**role** | **str** | Trade role. Available values are `taker` and `maker` | [optional]
+**role** | **str** | Trade role. taker - taker, maker - maker | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OptionsOrder.md b/docs/OptionsOrder.md
index df3bf40..484b6e0 100644
--- a/docs/OptionsOrder.md
+++ b/docs/OptionsOrder.md
@@ -1,6 +1,6 @@
# OptionsOrder
-Options order detail
+Options order details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
@@ -8,24 +8,26 @@ Name | Type | Description | Notes
**user** | **int** | User ID | [optional] [readonly]
**create_time** | **float** | Creation time of order | [optional] [readonly]
**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly]
-**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]
-**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly]
-**contract** | **str** | Contract name |
-**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask |
-**iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional]
-**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` (USDT) | [optional]
+**finish_as** | **str** | Order finish reason: - filled: Fully filled - cancelled: User cancelled - liquidated: Cancelled due to liquidation - ioc: Not immediately fully filled due to IOC time-in-force setting - auto_deleveraged: Cancelled due to auto-deleveraging - reduce_only: Cancelled due to position increase while reduce-only is set - position_closed: Cancelled because the position was closed - reduce_out: Only reduce positions by excluding hard-to-fill orders - mmp_cancelled: Cancelled by MMP | [optional] [readonly]
+**status** | **str** | Order status - `open`: Pending - `finished`: Completed | [optional] [readonly]
+**contract** | **str** | Options identifier |
+**size** | **int** | Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. |
+**iceberg** | **int** | Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. | [optional]
+**price** | **str** | Order price. Price of 0 with `tif` set as `ioc` represents market order (quote currency) | [optional]
**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False]
**is_close** | **bool** | Is the order to close position | [optional] [readonly]
**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False]
**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly]
**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly]
-**tif** | **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']
-**left** | **int** | Size left to be traded | [optional] [readonly]
-**fill_price** | **str** | Fill price of the order | [optional] [readonly]
+**mmp** | **bool** | When set to true, it is an MMP order | [optional] [default to False]
+**is_mmp** | **bool** | Whether it is an MMP order. Corresponds to `mmp` in the request | [optional] [readonly]
+**tif** | **str** | Time in force strategy. Market orders currently only support IOC mode - gtc: Good Till Cancelled - ioc: Immediate Or Cancelled, execute immediately or cancel, taker only - poc: Pending Or Cancelled, passive order, maker only | [optional] [default to 'gtc']
+**left** | **int** | Unfilled quantity | [optional] [readonly]
+**fill_price** | **str** | Fill price | [optional] [readonly]
**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(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance | [optional]
**tkfr** | **str** | Taker fee | [optional] [readonly]
**mkfr** | **str** | Maker fee | [optional] [readonly]
-**refu** | **int** | Reference user ID | [optional] [readonly]
+**refu** | **int** | Referrer user ID | [optional] [readonly]
**refr** | **str** | Referrer rebate | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OptionsPosition.md b/docs/OptionsPosition.md
index 282039d..b6dbefe 100644
--- a/docs/OptionsPosition.md
+++ b/docs/OptionsPosition.md
@@ -1,6 +1,6 @@
# OptionsPosition
-Options position information
+Options contract position details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
@@ -8,18 +8,18 @@ Name | Type | Description | Notes
**underlying** | **str** | Underlying | [optional] [readonly]
**underlying_price** | **str** | Underlying price (quote currency) | [optional] [readonly]
**contract** | **str** | Options contract name | [optional] [readonly]
-**size** | **int** | Position size (contract size) | [optional] [readonly]
+**size** | **int** | Position size (contract quantity) | [optional] [readonly]
**entry_price** | **str** | Entry size (quote currency) | [optional] [readonly]
**mark_price** | **str** | Current mark price (quote currency) | [optional] [readonly]
**mark_iv** | **str** | Implied volatility | [optional] [readonly]
-**realised_pnl** | **str** | Realized PNL | [optional] [readonly]
+**realised_pnl** | **str** | Realized PnL | [optional] [readonly]
**unrealised_pnl** | **str** | Unrealized PNL | [optional] [readonly]
-**pending_orders** | **int** | Current open orders | [optional] [readonly]
+**pending_orders** | **int** | Current pending order quantity | [optional] [readonly]
**close_order** | [**OptionsPositionCloseOrder**](OptionsPositionCloseOrder.md) | | [optional]
-**delta** | **str** | Delta | [optional] [readonly]
-**gamma** | **str** | Gamma | [optional] [readonly]
-**vega** | **str** | Vega | [optional] [readonly]
-**theta** | **str** | Theta | [optional] [readonly]
+**delta** | **str** | Greek letter delta | [optional] [readonly]
+**gamma** | **str** | Greek letter gamma | [optional] [readonly]
+**vega** | **str** | Greek letter vega | [optional] [readonly]
+**theta** | **str** | Greek letter theta | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OptionsPositionClose.md b/docs/OptionsPositionClose.md
index bf5479d..ea97971 100644
--- a/docs/OptionsPositionClose.md
+++ b/docs/OptionsPositionClose.md
@@ -5,10 +5,10 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time** | **float** | Position close time | [optional] [readonly]
**contract** | **str** | Options contract name | [optional] [readonly]
-**side** | **str** | Position side, long or short | [optional] [readonly]
-**pnl** | **str** | PNL | [optional] [readonly]
-**text** | **str** | Text of close order | [optional] [readonly]
-**settle_size** | **str** | settlement size | [optional] [readonly]
+**side** | **str** | Position side - `long`: Long position - `short`: Short position | [optional] [readonly]
+**pnl** | **str** | PnL | [optional] [readonly]
+**text** | **str** | Source of close order. See `order.text` field for specific values | [optional] [readonly]
+**settle_size** | **str** | Settlement size | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OptionsPositionCloseOrder.md b/docs/OptionsPositionCloseOrder.md
index 53044b1..77d345c 100644
--- a/docs/OptionsPositionCloseOrder.md
+++ b/docs/OptionsPositionCloseOrder.md
@@ -1,12 +1,12 @@
# OptionsPositionCloseOrder
-Current close order if any, or `null`
+Current close order information, or `null` if no close order
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**id** | **int** | Close order ID | [optional]
-**price** | **str** | Close order price (quote currency) | [optional]
-**is_liq** | **bool** | Is the close order from liquidation | [optional]
+**id** | **int** | Order ID | [optional]
+**price** | **str** | Order price (quote currency) | [optional]
+**is_liq** | **bool** | Whether the close order is from liquidation | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OptionsSettlement.md b/docs/OptionsSettlement.md
index 6e5b8b6..651d917 100644
--- a/docs/OptionsSettlement.md
+++ b/docs/OptionsSettlement.md
@@ -3,10 +3,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**time** | **float** | Last changed time of configuration | [optional]
+**time** | **float** | Last configuration update time | [optional]
**contract** | **str** | Options contract name | [optional]
-**profit** | **str** | Settlement profit per size (quote currency) | [optional]
-**fee** | **str** | Settlement fee per size (quote currency) | [optional]
+**profit** | **str** | Settlement profit per contract (quote currency) | [optional]
+**fee** | **str** | Settlement fee per contract (quote currency) | [optional]
**strike_price** | **str** | Strike price (quote currency) | [optional]
**settle_price** | **str** | Settlement price (quote currency) | [optional]
diff --git a/docs/OptionsTicker.md b/docs/OptionsTicker.md
index 43b4b46..1fef6d8 100644
--- a/docs/OptionsTicker.md
+++ b/docs/OptionsTicker.md
@@ -1,11 +1,11 @@
# OptionsTicker
-Options contract detail
+Options contract details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Options contract name | [optional]
-**last_price** | **str** | Last trading price (quote currency) | [optional]
+**last_price** | **str** | Last trade price (quote currency) | [optional]
**mark_price** | **str** | Current mark price (quote currency) | [optional]
**index_price** | **str** | Current index price (quote currency) | [optional]
**ask1_size** | **int** | Best ask size | [optional]
@@ -17,10 +17,10 @@ Name | Type | Description | Notes
**bid_iv** | **str** | Bid side implied volatility | [optional]
**ask_iv** | **str** | Ask side implied volatility | [optional]
**leverage** | **str** | Current leverage. Formula: underlying_price / mark_price * delta | [optional]
-**delta** | **str** | Delta | [optional]
-**gamma** | **str** | Gamma | [optional]
-**vega** | **str** | Vega | [optional]
-**theta** | **str** | Theta | [optional]
+**delta** | **str** | Greek letter delta | [optional]
+**gamma** | **str** | Greek letter gamma | [optional]
+**vega** | **str** | Greek letter vega | [optional]
+**theta** | **str** | Greek letter theta | [optional]
**rho** | **str** | Rho | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/Order.md b/docs/Order.md
index ea4181a..7eb5f0a 100644
--- a/docs/Order.md
+++ b/docs/Order.md
@@ -13,16 +13,17 @@ Name | Type | Description | Notes
**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly]
**status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly]
**currency_pair** | **str** | Currency pair |
-**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit']
-**account** | **str** | Account type. spot - use spot account; margin - use margin account; cross_margin - use cross margin account. Portfolio margin account must set to `cross-margin` | [optional] [default to 'spot']
-**side** | **str** | Order side |
-**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` |
-**price** | **str** | Price can't be empty when `type`= `limit` | [optional]
+**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit']
+**account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot']
+**side** | **str** | Buy or sell order |
+**amount** | **str** | Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` |
+**price** | **str** | Trading price, required when `type`=`limit` | [optional]
**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 - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` | [optional] [default to 'gtc']
-**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional]
-**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional]
-**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]
+**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported | [optional]
+**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough | [optional]
+**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` can be both set to true in one order | [optional]
**left** | **str** | Amount left to fill | [optional] [readonly]
+**filled_amount** | **str** | Amount filled | [optional] [readonly]
**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly]
**filled_total** | **str** | Total filled in quote currency | [optional] [readonly]
**avg_deal_price** | **str** | Average fill price | [optional] [readonly]
@@ -30,14 +31,15 @@ Name | Type | Description | Notes
**fee_currency** | **str** | Fee currency unit | [optional] [readonly]
**point_fee** | **str** | Points used to deduct fee | [optional] [readonly]
**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly]
-**gt_maker_fee** | **str** | GT used to deduct maker fee | [optional] [readonly]
-**gt_taker_fee** | **str** | GT used to deduct taker fee | [optional] [readonly]
-**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly]
+**gt_maker_fee** | **str** | GT amount used to deduct maker fee | [optional] [readonly]
+**gt_taker_fee** | **str** | GT amount used to deduct taker fee | [optional] [readonly]
+**gt_discount** | **bool** | Whether GT fee deduction is enabled | [optional] [readonly]
**rebated_fee** | **str** | Rebated fee | [optional] [readonly]
**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly]
**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]
-**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]
-**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]
+**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention 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]
+**finish_as** | **str** | Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown | [optional] [readonly]
+**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]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OrderBook.md b/docs/OrderBook.md
index 1cd4f55..2bfae72 100644
--- a/docs/OrderBook.md
+++ b/docs/OrderBook.md
@@ -6,8 +6,8 @@ Name | Type | Description | Notes
**id** | **int** | Order book ID, which is updated whenever the order book is changed. Valid only when `with_id` is set to `true` | [optional]
**current** | **int** | The timestamp of the response data being generated (in milliseconds) | [optional]
**update** | **int** | The timestamp of when the orderbook last changed (in milliseconds) | [optional]
-**asks** | **list[list[str]]** | Asks order depth |
-**bids** | **list[list[str]]** | Bids order depth |
+**asks** | **list[list[str]]** | Ask Depth |
+**bids** | **list[list[str]]** | Bid Depth |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/PortfolioSpotOrders.md b/docs/OrderCancel.md
similarity index 55%
rename from docs/PortfolioSpotOrders.md
rename to docs/OrderCancel.md
index a814054..0a14fe2 100644
--- a/docs/PortfolioSpotOrders.md
+++ b/docs/OrderCancel.md
@@ -1,27 +1,32 @@
-# PortfolioSpotOrders
+# OrderCancel
-Portfolio order detail
+Spot order details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Order ID | [optional] [readonly]
**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(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 | [optional]
**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly]
+**succeeded** | **bool** | Request execution result | [optional]
+**label** | **str** | Error label, if any, otherwise an empty string | [optional]
+**message** | **str** | Detailed error message, if any, otherwise an empty string | [optional]
**create_time** | **str** | Creation time of order | [optional] [readonly]
**update_time** | **str** | Last modification time of order | [optional] [readonly]
**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly]
**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly]
**status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly]
**currency_pair** | **str** | Currency pair |
-**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit']
-**side** | **str** | Order side |
-**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` |
-**price** | **str** | Price can't be empty when `type`= `limit` | [optional]
+**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit']
+**account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot']
+**side** | **str** | Buy or sell order |
+**amount** | **str** | Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` |
+**price** | **str** | Trading price, required when `type`=`limit` | [optional]
**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 - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` | [optional] [default to 'gtc']
-**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional]
-**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional]
-**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan. Default is disabled. Note that: `auto_borrow` and `auto_repay` cannot be both set to true in one order. | [optional]
+**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported | [optional]
+**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough | [optional]
+**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` can be both set to true in one order | [optional]
**left** | **str** | Amount left to fill | [optional] [readonly]
+**filled_amount** | **str** | Amount filled | [optional] [readonly]
**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly]
**filled_total** | **str** | Total filled in quote currency | [optional] [readonly]
**avg_deal_price** | **str** | Average fill price | [optional] [readonly]
@@ -29,14 +34,15 @@ Name | Type | Description | Notes
**fee_currency** | **str** | Fee currency unit | [optional] [readonly]
**point_fee** | **str** | Points used to deduct fee | [optional] [readonly]
**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly]
-**gt_maker_fee** | **str** | GT used to deduct maker fee | [optional] [readonly]
-**gt_taker_fee** | **str** | GT used to deduct taker fee | [optional] [readonly]
-**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly]
+**gt_maker_fee** | **str** | GT amount used to deduct maker fee | [optional] [readonly]
+**gt_taker_fee** | **str** | GT amount used to deduct taker fee | [optional] [readonly]
+**gt_discount** | **bool** | Whether GT fee deduction is enabled | [optional] [readonly]
**rebated_fee** | **str** | Rebated fee | [optional] [readonly]
**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly]
**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]
-**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]
+**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention 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]
**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]
+**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]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OrderPatch.md b/docs/OrderPatch.md
index 045deea..f5c838e 100644
--- a/docs/OrderPatch.md
+++ b/docs/OrderPatch.md
@@ -4,9 +4,12 @@ Spot order details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**amount** | **str** | New order amount. `amount` and `price` must specify one of them | [optional]
-**price** | **str** | New order price. `amount` and `Price` must specify one of them\" | [optional]
-**amend_text** | **str** | Custom info during amending order | [optional]
+**currency_pair** | **str** | Currency pair | [optional]
+**account** | **str** | Specify query account | [optional]
+**amount** | **str** | Trading quantity. Either `amount` or `price` must be specified | [optional]
+**price** | **str** | Trading price. Either `amount` or `price` must be specified | [optional]
+**amend_text** | **str** | Custom info during order amendment | [optional]
+**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]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OrderResp.md b/docs/OrderResp.md
index caf22f1..c89354c 100644
--- a/docs/OrderResp.md
+++ b/docs/OrderResp.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**order_id** | **int** | 订单id | [optional]
+**order_id** | **int** | Order ID | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/PartnerCommissionHistory.md b/docs/PartnerCommissionHistory.md
new file mode 100644
index 0000000..057575b
--- /dev/null
+++ b/docs/PartnerCommissionHistory.md
@@ -0,0 +1,11 @@
+# PartnerCommissionHistory
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**total** | **int** | Total | [optional]
+**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of commission history | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PartnerSub.md b/docs/PartnerSub.md
new file mode 100644
index 0000000..9337d3a
--- /dev/null
+++ b/docs/PartnerSub.md
@@ -0,0 +1,12 @@
+# PartnerSub
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**user_id** | **int** | User ID | [optional]
+**user_join_time** | **int** | Time when user joined the system, Unix timestamp in seconds | [optional]
+**type** | **int** | Type (1-Sub-agent 2-Indirect direct customer 3-Direct direct customer) | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PartnerSubList.md b/docs/PartnerSubList.md
new file mode 100644
index 0000000..c77bc6f
--- /dev/null
+++ b/docs/PartnerSubList.md
@@ -0,0 +1,11 @@
+# PartnerSubList
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**total** | **int** | Total | [optional]
+**list** | [**list[PartnerSub]**](PartnerSub.md) | Subordinate list | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PartnerTransactionHistory.md b/docs/PartnerTransactionHistory.md
new file mode 100644
index 0000000..707f40b
--- /dev/null
+++ b/docs/PartnerTransactionHistory.md
@@ -0,0 +1,11 @@
+# PartnerTransactionHistory
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**total** | **int** | Total | [optional]
+**list** | [**list[AgencyTransaction]**](AgencyTransaction.md) | List of transaction history | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PlaceDualInvestmentOrder.md b/docs/PlaceDualInvestmentOrder.md
new file mode 100644
index 0000000..f957b47
--- /dev/null
+++ b/docs/PlaceDualInvestmentOrder.md
@@ -0,0 +1,13 @@
+# PlaceDualInvestmentOrder
+
+Dual Investment Order
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**plan_id** | **str** | Product ID |
+**amount** | **str** | Subscription amount, mutually exclusive with copies field |
+**text** | **str** | Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PortfolioAccount.md b/docs/PortfolioAccount.md
deleted file mode 100644
index 5bc12b9..0000000
--- a/docs/PortfolioAccount.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# PortfolioAccount
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**user_id** | **int** | User ID | [optional]
-**refresh_time** | **int** | Time of the most recent refresh | [optional]
-**locked** | **bool** | Whether account is locked | [optional]
-**balances** | [**dict(str, PortfolioMarginBalance)**](PortfolioMarginBalance.md) | | [optional]
-**total** | **str** | Total account value in USDT, i.e., the sum of all currencies' | [optional]
-**borrowed** | **str** | Total borrowed value in USDT, i.e., the sum of all currencies | [optional]
-**interest** | **str** | Total unpaid interests in USDT, i.e., the sum of all currencies | [optional]
-**total_initial_margin** | **str** | Total initial margin | [optional]
-**total_margin_balance** | **str** | Total margin balance | [optional]
-**total_maintenance_margin** | **str** | Total maintenance margin | [optional]
-**total_initial_margin_rate** | **str** | Total initial margin rate | [optional]
-**total_maintenance_margin_rate** | **str** | Total maintenance margin rate | [optional]
-**total_available_margin** | **str** | Total available margin | [optional]
-**portfolio_margin_total** | **str** | Total amount of the portfolio margin account | [optional]
-**portfolio_margin_total_liab** | **str** | Total liabilities of the portfolio margin account | [optional]
-**portfolio_margin_total_equity** | **str** | Total equity of the portfolio margin account | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/PortfolioLoanRecord.md b/docs/PortfolioLoanRecord.md
deleted file mode 100644
index 9a6362c..0000000
--- a/docs/PortfolioLoanRecord.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# PortfolioLoanRecord
-
-Loan records
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | **int** | id | [optional] [readonly]
-**type** | **str** | type: borrow - borrow, repay - repay | [optional] [readonly]
-**repayment_type** | **str** | 还款类型 , none - 无还款类型, manual_repay - 手动还款 , auto_repay - 自动还款, cancel_auto_repay - 撤单后自动还款 | [optional] [readonly]
-**currency_pair** | **str** | Currency pair | [optional] [readonly]
-**currency** | **str** | Currency | [optional] [readonly]
-**amount** | **str** | The amount of lending or repaying | [optional] [readonly]
-**create_time** | **int** | Created time | [optional] [readonly]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/PortfolioMarginBalance.md b/docs/PortfolioMarginBalance.md
deleted file mode 100644
index 56b0e02..0000000
--- a/docs/PortfolioMarginBalance.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# PortfolioMarginBalance
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**available** | **str** | Available amount | [optional]
-**freeze** | **str** | Locked amount | [optional]
-**borrowed** | **str** | Borrowed amount | [optional]
-**interest** | **str** | Unpaid interests | [optional]
-**negative_liab** | **str** | Negative Liabilities | [optional]
-**futures_pos_liab** | **str** | Borrowing to Open Positions in Futures | [optional]
-**equity** | **str** | Equity | [optional]
-**total_freeze** | **str** | Total freeze | [optional]
-**total_liab** | **str** | Total liabilities | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/PortfolioTransferable.md b/docs/PortfolioTransferable.md
deleted file mode 100644
index 1d0c488..0000000
--- a/docs/PortfolioTransferable.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# PortfolioTransferable
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**currency** | **str** | Currency detail | [optional]
-**amount** | **str** | The maximum amount that can be transferred out | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/Position.md b/docs/Position.md
index cddc6a0..5c4065b 100644
--- a/docs/Position.md
+++ b/docs/Position.md
@@ -19,17 +19,25 @@ Name | Type | Description | Notes
**initial_margin** | **str** | The initial margin occupied by the position, applicable to the portfolio margin account | [optional] [readonly]
**maintenance_margin** | **str** | Maintenance margin required for the position, applicable to portfolio margin account | [optional] [readonly]
**unrealised_pnl** | **str** | Unrealized PNL | [optional] [readonly]
-**realised_pnl** | **str** | Realized PNL | [optional] [readonly]
-**history_pnl** | **str** | History realized PNL | [optional] [readonly]
+**realised_pnl** | **str** | Realized PnL | [optional] [readonly]
+**pnl_pnl** | **str** | Realized PNL - Position P/L | [optional] [readonly]
+**pnl_fund** | **str** | Realized PNL - Funding Fees | [optional] [readonly]
+**pnl_fee** | **str** | Realized PNL - Transaction Fees | [optional] [readonly]
+**history_pnl** | **str** | Total realized PnL from closed positions | [optional] [readonly]
**last_close_pnl** | **str** | PNL of last position close | [optional] [readonly]
**realised_point** | **str** | Realized POINT PNL | [optional] [readonly]
**history_point** | **str** | History realized POINT PNL | [optional] [readonly]
**adl_ranking** | **int** | Ranking of auto deleveraging, a total of 1-5 grades, `1` is the highest, `5` is the lowest, and `6` is the special case when there is no position held or in liquidation | [optional] [readonly]
-**pending_orders** | **int** | Current open orders | [optional] [readonly]
+**pending_orders** | **int** | Current pending order quantity | [optional] [readonly]
**close_order** | [**PositionCloseOrder**](PositionCloseOrder.md) | | [optional]
-**mode** | **str** | Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode | [optional]
-**cross_leverage_limit** | **str** | Cross margin leverage(valid only when `leverage` is 0) | [optional]
+**mode** | **str** | Position mode, including: - `single`: Single position mode - `dual_long`: Long position in dual position mode - `dual_short`: Short position in dual position mode | [optional]
+**cross_leverage_limit** | **str** | Cross margin leverage (valid only when `leverage` is 0) | [optional]
**update_time** | **int** | Last update time | [optional] [readonly]
+**update_id** | **int** | Update ID. The value increments by 1 each time the position is updated | [optional] [readonly]
+**open_time** | **int** | First Open Time | [optional]
+**risk_limit_table** | **str** | Risk limit table ID | [optional] [readonly]
+**average_maintenance_rate** | **str** | Average maintenance margin rate | [optional] [readonly]
+**pid** | **int** | Sub-account position ID | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/PositionClose.md b/docs/PositionClose.md
index 2573f6b..93bf9cf 100644
--- a/docs/PositionClose.md
+++ b/docs/PositionClose.md
@@ -5,9 +5,17 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time** | **float** | Position close time | [optional] [readonly]
**contract** | **str** | Futures contract | [optional] [readonly]
-**side** | **str** | Position side, long or short | [optional] [readonly]
-**pnl** | **str** | PNL | [optional] [readonly]
-**text** | **str** | Text of close order | [optional] [readonly]
+**side** | **str** | Position side - `long`: Long position - `short`: Short position | [optional] [readonly]
+**pnl** | **str** | PnL | [optional] [readonly]
+**pnl_pnl** | **str** | PNL - Position P/L | [optional] [readonly]
+**pnl_fund** | **str** | PNL - Funding Fees | [optional] [readonly]
+**pnl_fee** | **str** | PNL - Transaction Fees | [optional] [readonly]
+**text** | **str** | Source of close order. See `order.text` field for specific values | [optional] [readonly]
+**max_size** | **str** | Max Trade Size | [optional] [readonly]
+**accum_size** | **str** | Cumulative closed position volume | [optional] [readonly]
+**first_open_time** | **int** | First Open Time | [optional] [readonly]
+**long_price** | **str** | When side is 'long', it indicates the opening average price; when side is 'short', it indicates the closing average price | [optional] [readonly]
+**short_price** | **str** | When side is 'long', it indicates the closing average price; when side is 'short', it indicates the opening average price | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/PositionCloseOrder.md b/docs/PositionCloseOrder.md
index 6f5540d..20d1088 100644
--- a/docs/PositionCloseOrder.md
+++ b/docs/PositionCloseOrder.md
@@ -1,12 +1,12 @@
# PositionCloseOrder
-Current close order if any, or `null`
+Current close order information, or `null` if no close order
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**id** | **int** | Close order ID | [optional]
-**price** | **str** | Close order price | [optional]
-**is_liq** | **bool** | Is the close order from liquidation | [optional]
+**id** | **int** | Order ID | [optional]
+**price** | **str** | Order price | [optional]
+**is_liq** | **bool** | Whether the close order is from liquidation | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ProfitLossRange.md b/docs/ProfitLossRange.md
new file mode 100644
index 0000000..963c54a
--- /dev/null
+++ b/docs/ProfitLossRange.md
@@ -0,0 +1,13 @@
+# ProfitLossRange
+
+Profit and loss range
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**price_percentage** | **str** | Percentage change in price | [optional]
+**implied_volatility_percentage** | **str** | Percentage change in implied volatility | [optional]
+**profit_loss** | **str** | PnL | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RebateApi.md b/docs/RebateApi.md
index 0a1bccf..f7e8f50 100644
--- a/docs/RebateApi.md
+++ b/docs/RebateApi.md
@@ -4,16 +4,23 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**agency_transaction_history**](RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | The broker obtains the transaction history of the recommended user
-[**agency_commissions_history**](RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | The broker obtains the commission history of the recommended user
+[**agency_transaction_history**](RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | Broker obtains transaction history of recommended users
+[**agency_commissions_history**](RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | Broker obtains rebate history of recommended users
+[**partner_transaction_history**](RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction history of recommended users
+[**partner_commissions_history**](RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains rebate records of recommended users
+[**partner_sub_list**](RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list
+[**rebate_broker_commission_history**](RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | Broker obtains user's rebate records
+[**rebate_broker_transaction_history**](RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | Broker obtains user's trading history
+[**rebate_user_info**](RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User obtains rebate information
+[**user_sub_relation**](RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User subordinate relationship
# **agency_transaction_history**
> list[AgencyTransactionHistory] agency_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset)
-The broker obtains the transaction history of the recommended user
+Broker obtains transaction history of recommended users
-Record time range cannot exceed 30 days
+Record query time range cannot exceed 30 days
### Example
@@ -39,15 +46,15 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.RebateApi(api_client)
-currency_pair = 'BTC_USDT' # str | Specify the currency pair, if not specified, return all currency pairs (optional)
-user_id = '10003' # str | User ID. If not specified, all user records will be returned (optional)
-_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional)
-to = 1602123600 # int | Time range ending, default to current time (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+currency_pair = 'BTC_USDT' # str | Specify the trading pair. If not specified, returns all trading pairs (optional)
+user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional)
+_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional)
+to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
try:
- # The broker obtains the transaction history of the recommended user
+ # Broker obtains transaction history of recommended users
api_response = api_instance.agency_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset)
print(api_response)
except GateApiException as ex:
@@ -60,11 +67,11 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency_pair** | **str**| Specify the currency pair, if not specified, return all currency pairs | [optional]
- **user_id** | **str**| User ID. If not specified, all user records will be returned | [optional]
- **_from** | **int**| Time range beginning, default to 7 days before current time | [optional]
- **to** | **int**| Time range ending, default to current time | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **currency_pair** | **str**| Specify the trading pair. If not specified, returns all trading pairs | [optional]
+ **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional]
+ **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
### Return type
@@ -83,16 +90,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **agency_commissions_history**
-> list[AgencyCommissionHistory] agency_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset)
+> list[AgencyCommissionHistory] agency_commissions_history(currency=currency, commission_type=commission_type, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset)
-The broker obtains the commission history of the recommended user
+Broker obtains rebate history of recommended users
-Record time range cannot exceed 30 days
+Record query time range cannot exceed 30 days
### Example
@@ -118,16 +125,17 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.RebateApi(api_client)
-currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional)
-user_id = '10003' # str | User ID. If not specified, all user records will be returned (optional)
-_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional)
-to = 1602123600 # int | Time range ending, default to current time (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+currency = 'BTC' # str | Specify the currency. If not specified, returns all currencies (optional)
+commission_type = 1 # int | Rebate type: 1 - Direct rebate, 2 - Indirect rebate, 3 - Self rebate (optional)
+user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional)
+_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional)
+to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
try:
- # The broker obtains the commission history of the recommended user
- api_response = api_instance.agency_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset)
+ # Broker obtains rebate history of recommended users
+ api_response = api_instance.agency_commissions_history(currency=currency, commission_type=commission_type, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -139,11 +147,12 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional]
- **user_id** | **str**| User ID. If not specified, all user records will be returned | [optional]
- **_from** | **int**| Time range beginning, default to 7 days before current time | [optional]
- **to** | **int**| Time range ending, default to current time | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **currency** | **str**| Specify the currency. If not specified, returns all currencies | [optional]
+ **commission_type** | **int**| Rebate type: 1 - Direct rebate, 2 - Indirect rebate, 3 - Self rebate | [optional]
+ **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional]
+ **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
### Return type
@@ -162,7 +171,524 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
+
+[[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)
+
+# **partner_transaction_history**
+> PartnerTransactionHistory partner_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset)
+
+Partner obtains transaction history of recommended users
+
+Record query time range cannot exceed 30 days
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.RebateApi(api_client)
+currency_pair = 'BTC_USDT' # str | Specify the trading pair. If not specified, returns all trading pairs (optional)
+user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional)
+_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional)
+to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
+
+try:
+ # Partner obtains transaction history of recommended users
+ api_response = api_instance.partner_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling RebateApi->partner_transaction_history: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currency_pair** | **str**| Specify the trading pair. If not specified, returns all trading pairs | [optional]
+ **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional]
+ **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
+
+### Return type
+
+[**PartnerTransactionHistory**](PartnerTransactionHistory.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | List retrieved successfully | - |
+
+[[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)
+
+# **partner_commissions_history**
+> PartnerCommissionHistory partner_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset)
+
+Partner obtains rebate records of recommended users
+
+Record query time range cannot exceed 30 days
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.RebateApi(api_client)
+currency = 'BTC' # str | Specify the currency. If not specified, returns all currencies (optional)
+user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional)
+_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional)
+to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
+
+try:
+ # Partner obtains rebate records of recommended users
+ api_response = api_instance.partner_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling RebateApi->partner_commissions_history: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currency** | **str**| Specify the currency. If not specified, returns all currencies | [optional]
+ **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional]
+ **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
+
+### Return type
+
+[**PartnerCommissionHistory**](PartnerCommissionHistory.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | List retrieved successfully | - |
+
+[[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)
+
+# **partner_sub_list**
+> PartnerSubList partner_sub_list(user_id=user_id, limit=limit, offset=offset)
+
+Partner subordinate list
+
+Including sub-agents, direct customers, and indirect customers
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.RebateApi(api_client)
+user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
+
+try:
+ # Partner subordinate list
+ api_response = api_instance.partner_sub_list(user_id=user_id, limit=limit, offset=offset)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling RebateApi->partner_sub_list: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
+
+### Return type
+
+[**PartnerSubList**](PartnerSubList.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | List retrieved successfully | - |
+
+[[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)
+
+# **rebate_broker_commission_history**
+> list[BrokerCommission] rebate_broker_commission_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to)
+
+Broker obtains user's rebate records
+
+Record query time range cannot exceed 30 days
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.RebateApi(api_client)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
+user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional)
+_from = 1711929600 # int | Start time of the query record. If not specified, defaults to 30 days before the current time (optional)
+to = 1714521600 # int | End timestamp for the query, defaults to current time if not specified (optional)
+
+try:
+ # Broker obtains user's rebate records
+ api_response = api_instance.rebate_broker_commission_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling RebateApi->rebate_broker_commission_history: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
+ **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional]
+ **_from** | **int**| Start time of the query record. If not specified, defaults to 30 days before the current time | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+
+### Return type
+
+[**list[BrokerCommission]**](BrokerCommission.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | List retrieved successfully | - |
+
+[[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)
+
+# **rebate_broker_transaction_history**
+> list[BrokerTransaction] rebate_broker_transaction_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to)
+
+Broker obtains user's trading history
+
+Record query time range cannot exceed 30 days
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.RebateApi(api_client)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
+user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional)
+_from = 1711929600 # int | Start time of the query record. If not specified, defaults to 30 days before the current time (optional)
+to = 1714521600 # int | End timestamp for the query, defaults to current time if not specified (optional)
+
+try:
+ # Broker obtains user's trading history
+ api_response = api_instance.rebate_broker_transaction_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling RebateApi->rebate_broker_transaction_history: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
+ **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional]
+ **_from** | **int**| Start time of the query record. If not specified, defaults to 30 days before the current time | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+
+### Return type
+
+[**list[BrokerTransaction]**](BrokerTransaction.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | List retrieved successfully | - |
+
+[[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)
+
+# **rebate_user_info**
+> list[RebateUserInfo] rebate_user_info()
+
+User obtains rebate information
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.RebateApi(api_client)
+
+try:
+ # User obtains rebate information
+ api_response = api_instance.rebate_user_info()
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling RebateApi->rebate_user_info: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**list[RebateUserInfo]**](RebateUserInfo.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **user_sub_relation**
+> UserSubRelation user_sub_relation(user_id_list)
+
+User subordinate relationship
+
+Query whether the specified user is within the system
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.RebateApi(api_client)
+user_id_list = '1, 2, 3' # str | Query user ID list, separated by commas. If more than 100, only 100 will be returned
+
+try:
+ # User subordinate relationship
+ api_response = api_instance.user_sub_relation(user_id_list)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling RebateApi->user_sub_relation: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **user_id_list** | **str**| Query user ID list, separated by commas. If more than 100, only 100 will be returned |
+
+### Return type
+
+[**UserSubRelation**](UserSubRelation.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | List retrieved successfully | - |
[[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)
diff --git a/docs/RebateUserInfo.md b/docs/RebateUserInfo.md
new file mode 100644
index 0000000..0f97b11
--- /dev/null
+++ b/docs/RebateUserInfo.md
@@ -0,0 +1,11 @@
+# RebateUserInfo
+
+Retrieve user rebate information
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**invite_uid** | **int** | My inviter's UID | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RepayCurrencyRes.md b/docs/RepayCurrencyRes.md
new file mode 100644
index 0000000..9715d48
--- /dev/null
+++ b/docs/RepayCurrencyRes.md
@@ -0,0 +1,15 @@
+# RepayCurrencyRes
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**succeeded** | **bool** | Whether the repayment was successful | [optional]
+**label** | **str** | Error identifier for failed operations; empty when successful | [optional]
+**message** | **str** | Error description for failed operations; empty when successful | [optional]
+**currency** | **str** | Repayment currency | [optional]
+**repaid_principal** | **str** | Principal | [optional]
+**repaid_interest** | **str** | Principal | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RepayLoan.md b/docs/RepayLoan.md
index 5e28b1c..92c8463 100644
--- a/docs/RepayLoan.md
+++ b/docs/RepayLoan.md
@@ -1,12 +1,12 @@
# RepayLoan
-还款
+Repay
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**order_id** | **int** | 订单id |
-**repay_amount** | **str** | 还款数量,部分还款时候是必须 |
-**repaid_all** | **bool** | 还款方式, 为`true`时全部还款, 为`false`时部分还款; 当为`false`部分还款时,不允许repay_amount参数大于用户剩余待还 |
+**order_id** | **int** | Order ID |
+**repay_amount** | **str** | Repayment amount, it is mandatory when making partial repayments |
+**repaid_all** | **bool** | Repayment method, set to `true` for full repayment, and `false` for partial repayment; When partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RepayMultiLoan.md b/docs/RepayMultiLoan.md
new file mode 100644
index 0000000..eb1c0ab
--- /dev/null
+++ b/docs/RepayMultiLoan.md
@@ -0,0 +1,12 @@
+# RepayMultiLoan
+
+Multi-currency collateral repayment
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**order_id** | **int** | Order ID |
+**repay_items** | [**list[MultiLoanRepayItem]**](MultiLoanRepayItem.md) | Repay Currency Item |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RepayRecord.md b/docs/RepayRecord.md
index 104f645..a9cf6cf 100644
--- a/docs/RepayRecord.md
+++ b/docs/RepayRecord.md
@@ -1,22 +1,22 @@
# RepayRecord
-还款记录
+Repayment record
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**order_id** | **int** | 订单id | [optional]
-**record_id** | **int** | 还款记录 id | [optional]
+**order_id** | **int** | Order ID | [optional]
+**record_id** | **int** | Repayment record ID | [optional]
**repaid_amount** | **str** | Repayment amount | [optional]
-**borrow_currency** | **str** | 借款币种 | [optional]
-**collateral_currency** | **str** | 质押币种 | [optional]
-**init_ltv** | **str** | 初始质押率 | [optional]
-**borrow_time** | **int** | 借款时间,时间戳 | [optional]
-**repay_time** | **int** | 还款时间,时间戳 | [optional]
-**total_interest** | **str** | 总计息 | [optional]
-**before_left_principal** | **str** | 还款前待还本金 | [optional]
-**after_left_principal** | **str** | 还款后待还本金 | [optional]
-**before_left_collateral** | **str** | 还款前质押物数量 | [optional]
-**after_left_collateral** | **str** | 还款后质押物数量 | [optional]
+**borrow_currency** | **str** | Borrowed currency | [optional]
+**collateral_currency** | **str** | Collateral currency | [optional]
+**init_ltv** | **str** | Initial collateralization rate | [optional]
+**borrow_time** | **int** | Borrowing time, timestamp | [optional]
+**repay_time** | **int** | Repayment time, timestamp | [optional]
+**total_interest** | **str** | Total interest | [optional]
+**before_left_principal** | **str** | Principal to be repaid before repayment | [optional]
+**after_left_principal** | **str** | Principal to be repaid after repayment | [optional]
+**before_left_collateral** | **str** | Collateral amount before repayment | [optional]
+**after_left_collateral** | **str** | Collateral amount after repayment | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RepayRecordCurrency.md b/docs/RepayRecordCurrency.md
new file mode 100644
index 0000000..d8a1c90
--- /dev/null
+++ b/docs/RepayRecordCurrency.md
@@ -0,0 +1,15 @@
+# RepayRecordCurrency
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional]
+**index_price** | **str** | Currency Index Price | [optional]
+**before_amount** | **str** | Amount before the operation | [optional]
+**before_amount_usdt** | **str** | USDT Amount before the operation | [optional]
+**after_amount** | **str** | Amount after the operation | [optional]
+**after_amount_usdt** | **str** | USDT Amount after the operation | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RepayRecordLeftInterest.md b/docs/RepayRecordLeftInterest.md
new file mode 100644
index 0000000..79ca1d9
--- /dev/null
+++ b/docs/RepayRecordLeftInterest.md
@@ -0,0 +1,15 @@
+# RepayRecordLeftInterest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional]
+**index_price** | **str** | Currency Index Price | [optional]
+**before_amount** | **str** | Interest amount before repayment | [optional]
+**before_amount_usdt** | **str** | Converted value of interest before repayment in USDT | [optional]
+**after_amount** | **str** | Interest amount after repayment | [optional]
+**after_amount_usdt** | **str** | Converted value of interest after repayment in USDT | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RepayRecordRepaidCurrency.md b/docs/RepayRecordRepaidCurrency.md
new file mode 100644
index 0000000..b49320d
--- /dev/null
+++ b/docs/RepayRecordRepaidCurrency.md
@@ -0,0 +1,15 @@
+# RepayRecordRepaidCurrency
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Repayment currency | [optional]
+**index_price** | **str** | Currency Index Price | [optional]
+**repaid_amount** | **str** | Repayment amount | [optional]
+**repaid_principal** | **str** | Principal | [optional]
+**repaid_interest** | **str** | Interest | [optional]
+**repaid_amount_usdt** | **str** | Repayment amount converted to USDT | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RepayRecordTotalInterest.md b/docs/RepayRecordTotalInterest.md
new file mode 100644
index 0000000..8c7a2cc
--- /dev/null
+++ b/docs/RepayRecordTotalInterest.md
@@ -0,0 +1,13 @@
+# RepayRecordTotalInterest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional]
+**index_price** | **str** | Currency Index Price | [optional]
+**amount** | **str** | Interest Amount | [optional]
+**amount_usdt** | **str** | Interest amount converted to USDT | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RepayRequest.md b/docs/RepayRequest.md
deleted file mode 100644
index 6663e18..0000000
--- a/docs/RepayRequest.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# RepayRequest
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**currency_pair** | **str** | Currency pair |
-**currency** | **str** | Loan currency |
-**mode** | **str** | Repay mode. all - repay all; partial - repay only some portion |
-**amount** | **str** | Repay amount. Required in `partial` mode | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/RepayResp.md b/docs/RepayResp.md
index f67c4a7..f7124e3 100644
--- a/docs/RepayResp.md
+++ b/docs/RepayResp.md
@@ -1,10 +1,10 @@
# RepayResp
-还款
+Repay
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**repaid_principal** | **str** | 本金 | [optional]
+**repaid_principal** | **str** | Principal | [optional]
**repaid_interest** | **str** | Interest | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/Repayment.md b/docs/Repayment.md
deleted file mode 100644
index a46c5c5..0000000
--- a/docs/Repayment.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Repayment
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | **str** | Loan record ID | [optional]
-**create_time** | **str** | Repayment time | [optional]
-**principal** | **str** | Repaid principal | [optional]
-**interest** | **str** | Repaid interest | [optional]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/RiskUnits.md b/docs/RiskUnits.md
new file mode 100644
index 0000000..dcff46e
--- /dev/null
+++ b/docs/RiskUnits.md
@@ -0,0 +1,17 @@
+# RiskUnits
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**symbol** | **str** | Risk unit flag | [optional]
+**spot_in_use** | **str** | Spot hedging occupied amount | [optional]
+**maintain_margin** | **str** | Maintenance margin for risk unit | [optional]
+**initial_margin** | **str** | Initial margin for risk unit | [optional]
+**delta** | **str** | Total Delta of risk unit | [optional]
+**gamma** | **str** | Total Gamma of risk unit | [optional]
+**theta** | **str** | Total Theta of risk unit | [optional]
+**vega** | **str** | Total Vega of risk unit | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SmallBalance.md b/docs/SmallBalance.md
new file mode 100644
index 0000000..7302d38
--- /dev/null
+++ b/docs/SmallBalance.md
@@ -0,0 +1,14 @@
+# SmallBalance
+
+Small Balance Conversion
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional]
+**available_balance** | **str** | Available balance | [optional]
+**estimated_as_btc** | **str** | Estimated as BTC | [optional]
+**convertible_to_gt** | **str** | Estimated conversion to GT | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SmallBalanceHistory.md b/docs/SmallBalanceHistory.md
new file mode 100644
index 0000000..5a5f5b0
--- /dev/null
+++ b/docs/SmallBalanceHistory.md
@@ -0,0 +1,15 @@
+# SmallBalanceHistory
+
+Small Balance Conversion
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Order ID | [optional] [readonly]
+**currency** | **str** | Currency | [optional] [readonly]
+**amount** | **str** | Swap Amount | [optional] [readonly]
+**gt_amount** | **str** | GT amount | [optional] [readonly]
+**create_time** | **int** | Exchange time (in seconds) | [optional] [readonly]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SpotAccount.md b/docs/SpotAccount.md
index c6c6a66..6bb761e 100644
--- a/docs/SpotAccount.md
+++ b/docs/SpotAccount.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
**currency** | **str** | Currency detail | [optional]
**available** | **str** | Available amount | [optional]
**locked** | **str** | Locked amount, used in trading | [optional]
+**update_id** | **int** | Version number | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/SpotAccountBook.md b/docs/SpotAccountBook.md
index 86c1753..80d34cb 100644
--- a/docs/SpotAccountBook.md
+++ b/docs/SpotAccountBook.md
@@ -8,7 +8,9 @@ Name | Type | Description | Notes
**currency** | **str** | Currency changed | [optional]
**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional]
**balance** | **str** | Balance after change | [optional]
-**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional]
+**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional]
+**code** | **str** | Account change code, see [Asset Record Code] (Asset Record Code) | [optional]
+**text** | **str** | Additional information | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/SpotApi.md b/docs/SpotApi.md
index 2b40633..9b2c765 100644
--- a/docs/SpotApi.md
+++ b/docs/SpotApi.md
@@ -4,44 +4,46 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**list_currencies**](SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details
-[**get_currency**](SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency
-[**list_currency_pairs**](SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported
-[**get_currency_pair**](SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc currency pair
-[**list_tickers**](SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information
-[**list_order_book**](SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book
-[**list_trades**](SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades
-[**list_candlesticks**](SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market candlesticks
-[**get_fee**](SpotApi.md#get_fee) | **GET** /spot/fee | Query user trading fee rates
-[**get_batch_spot_fee**](SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Query a batch of user trading fee rates
-[**list_spot_accounts**](SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot accounts
-[**list_spot_account_book**](SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query account book
-[**create_batch_orders**](SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Create a batch of orders
+[**list_currencies**](SpotApi.md#list_currencies) | **GET** /spot/currencies | Query all currency information
+[**get_currency**](SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Query single currency information
+[**list_currency_pairs**](SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | Query all supported currency pairs
+[**get_currency_pair**](SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Query single currency pair details
+[**list_tickers**](SpotApi.md#list_tickers) | **GET** /spot/tickers | Get currency pair ticker information
+[**list_order_book**](SpotApi.md#list_order_book) | **GET** /spot/order_book | Get market depth information
+[**list_trades**](SpotApi.md#list_trades) | **GET** /spot/trades | Query market transaction records
+[**list_candlesticks**](SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market K-line chart
+[**get_fee**](SpotApi.md#get_fee) | **GET** /spot/fee | Query account fee rates
+[**get_batch_spot_fee**](SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Batch query account fee rates
+[**list_spot_accounts**](SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot trading accounts
+[**list_spot_account_book**](SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query spot account transaction history
+[**create_batch_orders**](SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Batch place orders
[**list_all_open_orders**](SpotApi.md#list_all_open_orders) | **GET** /spot/open_orders | List all open orders
-[**create_cross_liquidate_order**](SpotApi.md#create_cross_liquidate_order) | **POST** /spot/cross_liquidate_orders | close position when cross-currency is disabled
+[**create_cross_liquidate_order**](SpotApi.md#create_cross_liquidate_order) | **POST** /spot/cross_liquidate_orders | Close position when cross-currency is disabled
[**list_orders**](SpotApi.md#list_orders) | **GET** /spot/orders | List orders
[**create_order**](SpotApi.md#create_order) | **POST** /spot/orders | Create an order
[**cancel_orders**](SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair
-[**cancel_batch_orders**](SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel a batch of orders with an ID list
-[**get_order**](SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Get a single order
-[**cancel_order**](SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel a single order
-[**amend_order**](SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend an order
-[**list_my_trades**](SpotApi.md#list_my_trades) | **GET** /spot/my_trades | List personal trading history
+[**cancel_batch_orders**](SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel batch orders by specified ID list
+[**get_order**](SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Query single order details
+[**cancel_order**](SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel single order
+[**amend_order**](SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend single order
+[**list_my_trades**](SpotApi.md#list_my_trades) | **GET** /spot/my_trades | Query personal trading records
[**get_system_time**](SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time
[**countdown_cancel_all_spot**](SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders
-[**list_spot_price_triggered_orders**](SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Retrieve running auto order list
-[**create_spot_price_triggered_order**](SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create a price-triggered order
-[**cancel_spot_price_triggered_order_list**](SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel all open orders
-[**get_spot_price_triggered_order**](SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Get a price-triggered order
-[**cancel_spot_price_triggered_order**](SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | cancel a price-triggered order
+[**amend_batch_orders**](SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders
+[**get_spot_insurance_history**](SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data
+[**list_spot_price_triggered_orders**](SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Query running auto order list
+[**create_spot_price_triggered_order**](SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create price-triggered order
+[**cancel_spot_price_triggered_order_list**](SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel all auto orders
+[**get_spot_price_triggered_order**](SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Query single auto order details
+[**cancel_spot_price_triggered_order**](SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | Cancel single auto order
# **list_currencies**
> list[Currency] list_currencies()
-List all currencies' details
+Query all currency information
-Currency has two forms: 1. Only currency name, e.g., BTC, USDT 2. `_`, e.g., `HT_ETH` The latter one occurs when one currency has multiple chains. Currency detail contains a `chain` field whatever the form is. To retrieve all chains of one currency, you can use use all the details which has the name of the currency or name starting with `_`.
+When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain
### Example
@@ -60,7 +62,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.SpotApi(api_client)
try:
- # List all currencies' details
+ # Query all currency information
api_response = api_instance.list_currencies()
print(api_response)
except GateApiException as ex:
@@ -88,14 +90,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **get_currency**
> Currency get_currency(currency)
-Get details of a specific currency
+Query single currency information
### Example
@@ -115,7 +117,7 @@ api_instance = gate_api.SpotApi(api_client)
currency = 'GT' # str | Currency name
try:
- # Get details of a specific currency
+ # Query single currency information
api_response = api_instance.get_currency(currency)
print(api_response)
except GateApiException as ex:
@@ -146,14 +148,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_currency_pairs**
> list[CurrencyPair] list_currency_pairs()
-List all currency pairs supported
+Query all supported currency pairs
### Example
@@ -172,7 +174,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.SpotApi(api_client)
try:
- # List all currency pairs supported
+ # Query all supported currency pairs
api_response = api_instance.list_currency_pairs()
print(api_response)
except GateApiException as ex:
@@ -207,7 +209,7 @@ No authorization required
# **get_currency_pair**
> CurrencyPair get_currency_pair(currency_pair)
-Get details of a specifc currency pair
+Query single currency pair details
### Example
@@ -227,7 +229,7 @@ api_instance = gate_api.SpotApi(api_client)
currency_pair = 'ETH_BTC' # str | Currency pair
try:
- # Get details of a specifc currency pair
+ # Query single currency pair details
api_response = api_instance.get_currency_pair(currency_pair)
print(api_response)
except GateApiException as ex:
@@ -258,16 +260,16 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_tickers**
> list[Ticker] list_tickers(currency_pair=currency_pair, timezone=timezone)
-Retrieve ticker information
+Get currency pair ticker information
-Return only related data if `currency_pair` is specified; otherwise return all of them
+If `currency_pair` is specified, only query that currency pair; otherwise return all information
### Example
@@ -288,7 +290,7 @@ currency_pair = 'BTC_USDT' # str | Currency pair (optional)
timezone = 'utc0' # str | Timezone (optional)
try:
- # Retrieve ticker information
+ # Get currency pair ticker information
api_response = api_instance.list_tickers(currency_pair=currency_pair, timezone=timezone)
print(api_response)
except GateApiException as ex:
@@ -320,16 +322,16 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_order_book**
> OrderBook list_order_book(currency_pair, interval=interval, limit=limit, with_id=with_id)
-Retrieve order book
+Get market depth information
-Order book will be sorted by price from high to low on bids; low to high on asks
+Market depth buy orders are sorted by price from high to low, sell orders are sorted from low to high
### Example
@@ -347,12 +349,12 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
currency_pair = 'BTC_USDT' # str | Currency pair
-interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0')
-limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10)
-with_id = False # bool | Return order book ID (optional) (default to False)
+interval = '0' # str | Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified (optional) (default to '0')
+limit = 10 # int | Number of depth levels (optional) (default to 10)
+with_id = False # bool | Return order book update ID (optional) (default to False)
try:
- # Retrieve order book
+ # Get market depth information
api_response = api_instance.list_order_book(currency_pair, interval=interval, limit=limit, with_id=with_id)
print(api_response)
except GateApiException as ex:
@@ -366,9 +368,9 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**currency_pair** | **str**| Currency pair |
- **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0']
- **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10]
- **with_id** | **bool**| Return order book ID | [optional] [default to False]
+ **interval** | **str**| Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified | [optional] [default to '0']
+ **limit** | **int**| Number of depth levels | [optional] [default to 10]
+ **with_id** | **bool**| Return order book update ID | [optional] [default to False]
### Return type
@@ -386,16 +388,16 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_trades**
> list[Trade] list_trades(currency_pair, limit=limit, last_id=last_id, reverse=reverse, _from=_from, to=to, page=page)
-Retrieve market trades
+Query market transaction records
-You can use `from` and `to` to query by time range, or use `last_id` by scrolling page. The default behavior is by time range. Scrolling query using `last_id` is not recommended any more. If `last_id` is specified, time range query parameters will be ignored.
+Supports querying by time range using `from` and `to` parameters or pagination based on `last_id`. By default, queries the last 30 days. Pagination based on `last_id` is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. When using limit&page pagination to retrieve data, the maximum number of pages is 100,000, that is, limit * (page - 1) <= 100,000.
### Example
@@ -413,15 +415,15 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
currency_pair = 'BTC_USDT' # str | Currency pair
-limit = 100 # int | Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 (optional) (default to 100)
-last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional)
-reverse = False # bool | Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. (optional) (default to False)
-_from = 1627706330 # int | Start timestamp of the query (optional)
-to = 1635329650 # int | Time range ending, default to current time (optional)
+limit = 100 # int | Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 (optional) (default to 100)
+last_id = '12345' # str | Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used (optional)
+reverse = False # bool | Whether to retrieve data less than `last_id`. Default returns records greater than `last_id`. Set to `true` to trace back market trade records, `false` to get latest trades. No effect when `last_id` is not set. (optional) (default to False)
+_from = 1627706330 # int | Start timestamp for the query (optional)
+to = 1635329650 # int | End timestamp for the query, defaults to current time if not specified (optional)
page = 1 # int | Page number (optional) (default to 1)
try:
- # Retrieve market trades
+ # Query market transaction records
api_response = api_instance.list_trades(currency_pair, limit=limit, last_id=last_id, reverse=reverse, _from=_from, to=to, page=page)
print(api_response)
except GateApiException as ex:
@@ -435,11 +437,11 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**currency_pair** | **str**| Currency pair |
- **limit** | **int**| Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 | [optional] [default to 100]
- **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional]
- **reverse** | **bool**| Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. | [optional] [default to False]
- **_from** | **int**| Start timestamp of the query | [optional]
- **to** | **int**| Time range ending, default to current time | [optional]
+ **limit** | **int**| Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 | [optional] [default to 100]
+ **last_id** | **str**| Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used | [optional]
+ **reverse** | **bool**| Whether to retrieve data less than `last_id`. Default returns records greater than `last_id`. Set to `true` to trace back market trade records, `false` to get latest trades. No effect when `last_id` is not set. | [optional] [default to False]
+ **_from** | **int**| Start timestamp for the query | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
**page** | **int**| Page number | [optional] [default to 1]
### Return type
@@ -458,14 +460,14 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_candlesticks**
> list[list[str]] list_candlesticks(currency_pair, limit=limit, _from=_from, to=to, interval=interval)
-Market candlesticks
+Market K-line chart
Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval
@@ -485,13 +487,13 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
currency_pair = 'BTC_USDT' # str | Currency pair
-limit = 100 # int | 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝 (optional) (default to 100)
-_from = 1546905600 # int | 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间 (optional)
-to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional)
-interval = '30m' # str | Interval time between data points. Note that `30d` means 1 natual month, not 30 days (optional) (default to '30m')
+limit = 100 # int | Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100)
+_from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional)
+to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision (optional)
+interval = '30m' # str | Time interval between data points. Note that `30d` represents a calendar month, not aligned to 30 days (optional) (default to '30m')
try:
- # Market candlesticks
+ # Market K-line chart
api_response = api_instance.list_candlesticks(currency_pair, limit=limit, _from=_from, to=to, interval=interval)
print(api_response)
except GateApiException as ex:
@@ -505,10 +507,10 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**currency_pair** | **str**| Currency pair |
- **limit** | **int**| 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝 | [optional] [default to 100]
- **_from** | **int**| 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间 | [optional]
- **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional]
- **interval** | **str**| Interval time between data points. Note that `30d` means 1 natual month, not 30 days | [optional] [default to '30m']
+ **limit** | **int**| Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100]
+ **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional]
+ **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision | [optional]
+ **interval** | **str**| Time interval between data points. Note that `30d` represents a calendar month, not aligned to 30 days | [optional] [default to '30m']
### Return type
@@ -526,16 +528,16 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **get_fee**
-> TradeFee get_fee(currency_pair=currency_pair)
+> SpotFee get_fee(currency_pair=currency_pair)
-Query user trading fee rates
+Query account fee rates
-This API is deprecated in favour of new fee retrieving API `/wallet/fee`.
+This API is deprecated. The new fee query API is `/wallet/fee`
### Example
@@ -561,10 +563,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
-currency_pair = 'BTC_USDT' # str | Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs (optional)
+currency_pair = 'BTC_USDT' # str | Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs. (optional)
try:
- # Query user trading fee rates
+ # Query account fee rates
api_response = api_instance.get_fee(currency_pair=currency_pair)
print(api_response)
except GateApiException as ex:
@@ -577,11 +579,11 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency_pair** | **str**| Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs | [optional]
+ **currency_pair** | **str**| Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs. | [optional]
### Return type
-[**TradeFee**](TradeFee.md)
+[**SpotFee**](SpotFee.md)
### Authorization
@@ -595,14 +597,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **get_batch_spot_fee**
> dict(str, SpotFee) get_batch_spot_fee(currency_pairs)
-Query a batch of user trading fee rates
+Batch query account fee rates
### Example
@@ -628,10 +630,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
-currency_pairs = 'BTC_USDT,ETH_USDT' # str | A request can only query up to 50 currency pairs
+currency_pairs = 'BTC_USDT,ETH_USDT' # str | Maximum 50 currency pairs per request
try:
- # Query a batch of user trading fee rates
+ # Batch query account fee rates
api_response = api_instance.get_batch_spot_fee(currency_pairs)
print(api_response)
except GateApiException as ex:
@@ -644,7 +646,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency_pairs** | **str**| A request can only query up to 50 currency pairs |
+ **currency_pairs** | **str**| Maximum 50 currency pairs per request |
### Return type
@@ -662,14 +664,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **list_spot_accounts**
> list[SpotAccount] list_spot_accounts(currency=currency)
-List spot accounts
+List spot trading accounts
### Example
@@ -695,10 +697,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
+currency = 'BTC' # str | Query by specified currency name (optional)
try:
- # List spot accounts
+ # List spot trading accounts
api_response = api_instance.list_spot_accounts(currency=currency)
print(api_response)
except GateApiException as ex:
@@ -711,7 +713,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency | [optional]
+ **currency** | **str**| Query by specified currency name | [optional]
### Return type
@@ -729,16 +731,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_spot_account_book**
-> list[SpotAccountBook] list_spot_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type)
+> list[SpotAccountBook] list_spot_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type, code=code)
-Query account book
+Query spot account transaction history
-Record time range cannot exceed 30 days
+Record query time range cannot exceed 30 days. When using limit&page pagination to retrieve data, the maximum number of pages is 100,000, that is, limit * (page - 1) <= 100,000.
### Example
@@ -764,16 +766,17 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
-_from = 1627706330 # int | Start timestamp of the query (optional)
-to = 1635329650 # int | Time range ending, default to current time (optional)
+currency = 'BTC' # str | Query by specified currency name (optional)
+_from = 1627706330 # int | Start timestamp for the query (optional)
+to = 1635329650 # int | End timestamp for the query, defaults to current time if not specified (optional)
page = 1 # int | Page number (optional) (default to 1)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
-type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
+type = 'lend' # str | Query by specified account change type. If not specified, all change types will be included. (optional)
+code = 'code_example' # str | Specify account change code for query. If not specified, all change types are included. This parameter has higher priority than `type` (optional)
try:
- # Query account book
- api_response = api_instance.list_spot_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type)
+ # Query spot account transaction history
+ api_response = api_instance.list_spot_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type, code=code)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -785,12 +788,13 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency | [optional]
- **_from** | **int**| Start timestamp of the query | [optional]
- **to** | **int**| Time range ending, default to current time | [optional]
+ **currency** | **str**| Query by specified currency name | [optional]
+ **_from** | **int**| Start timestamp for the query | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
**page** | **int**| Page number | [optional] [default to 1]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
- **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
+ **type** | **str**| Query by specified account change type. If not specified, all change types will be included. | [optional]
+ **code** | **str**| Specify account change code for query. If not specified, all change types are included. This parameter has higher priority than `type` | [optional]
### Return type
@@ -808,16 +812,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **create_batch_orders**
-> list[BatchOrder] create_batch_orders(order)
+> list[BatchOrder] create_batch_orders(order, x_gate_exptime=x_gate_exptime)
-Create a batch of orders
+Batch place orders
-Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders
+Batch order requirements: 1. Custom order field `text` must be specified 2. Up to 4 currency pairs per request, with up to 10 orders per currency pair 3. Spot orders and margin orders cannot be mixed; all `account` fields in the same request must be identical
### Example
@@ -844,10 +848,11 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
order = [gate_api.Order()] # list[Order] |
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
try:
- # Create a batch of orders
- api_response = api_instance.create_batch_orders(order)
+ # Batch place orders
+ api_response = api_instance.create_batch_orders(order, x_gate_exptime=x_gate_exptime)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -860,6 +865,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order** | [**list[Order]**](Order.md)| |
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
### Return type
@@ -877,7 +883,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Request is completed | - |
+**200** | Request execution completed | - |
[[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)
@@ -886,7 +892,7 @@ Name | Type | Description | Notes
List all open orders
-List open orders in all currency pairs. Note that pagination parameters affect record number in each currency pair's open order list. No pagination is applied to the number of currency pairs returned. All currency pairs with open orders will be returned. Spot and margin orders are returned by default. To list cross margin orders, `account` must be set to `cross_margin`
+Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control trading pairs. All trading pairs with pending orders will be returned.
### Example
@@ -914,7 +920,7 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.SpotApi(api_client)
page = 1 # int | Page number (optional) (default to 1)
limit = 100 # int | Maximum number of records returned in one page in each currency pair (optional) (default to 100)
-account = 'cross_margin' # str | Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)
+account = 'spot' # str | Specify query account (optional)
try:
# List all open orders
@@ -932,7 +938,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page** | **int**| Page number | [optional] [default to 1]
**limit** | **int**| Maximum number of records returned in one page in each currency pair | [optional] [default to 100]
- **account** | **str**| Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only | [optional]
+ **account** | **str**| Specify query account | [optional]
### Return type
@@ -950,16 +956,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **create_cross_liquidate_order**
> Order create_cross_liquidate_order(liquidate_order)
-close position when cross-currency is disabled
+Close position when cross-currency is disabled
-Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998
+Currently, only cross-margin accounts are supported to place buy orders for disabled currencies. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in pending orders) / 0.998
### Example
@@ -988,7 +994,7 @@ api_instance = gate_api.SpotApi(api_client)
liquidate_order = gate_api.LiquidateOrder() # LiquidateOrder |
try:
- # close position when cross-currency is disabled
+ # Close position when cross-currency is disabled
api_response = api_instance.create_cross_liquidate_order(liquidate_order)
print(api_response)
except GateApiException as ex:
@@ -1019,7 +1025,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**201** | order created | - |
+**201** | Order created successfully | - |
[[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)
@@ -1028,7 +1034,7 @@ Name | Type | Description | Notes
List orders
-Spot and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported. Time range parameters are handled as order finish time.
+Note that query results default to spot order lists for spot, unified account, and isolated margin accounts. When `status` is set to `open` (i.e., when querying pending order lists), only `page` and `limit` pagination controls are supported. `limit` can only be set to a maximum of 100. The `side` parameter and time range query parameters `from` and `to` are not supported. When `status` is set to `finished` (i.e., when querying historical orders), in addition to pagination queries, `from` and `to` time range queries are also supported. Additionally, the `side` parameter can be set to filter one-sided history. Time range filter parameters are processed according to the order end time.
### Example
@@ -1054,14 +1060,14 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
-currency_pair = 'BTC_USDT' # str | Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones.
+currency_pair = 'BTC_USDT' # str | Query by specified currency pair. Required for open orders, optional for filled orders
status = 'open' # str | List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled
page = 1 # int | Page number (optional) (default to 1)
limit = 100 # int | Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 (optional) (default to 100)
-account = 'cross_margin' # str | Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)
-_from = 1627706330 # int | Start timestamp of the query (optional)
-to = 1635329650 # int | Time range ending, default to current time (optional)
-side = 'sell' # str | All bids or asks. Both included if not specified (optional)
+account = 'spot' # str | Specify query account (optional)
+_from = 1627706330 # int | Start timestamp for the query (optional)
+to = 1635329650 # int | End timestamp for the query, defaults to current time if not specified (optional)
+side = 'sell' # str | Specify all bids or all asks, both included if not specified (optional)
try:
# List orders
@@ -1077,14 +1083,14 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency_pair** | **str**| Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. |
+ **currency_pair** | **str**| Query by specified currency pair. Required for open orders, optional for filled orders |
**status** | **str**| List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled |
**page** | **int**| Page number | [optional] [default to 1]
**limit** | **int**| Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 | [optional] [default to 100]
- **account** | **str**| Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only | [optional]
- **_from** | **int**| Start timestamp of the query | [optional]
- **to** | **int**| Time range ending, default to current time | [optional]
- **side** | **str**| All bids or asks. Both included if not specified | [optional]
+ **account** | **str**| Specify query account | [optional]
+ **_from** | **int**| Start timestamp for the query | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+ **side** | **str**| Specify all bids or all asks, both included if not specified | [optional]
### Return type
@@ -1102,16 +1108,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **create_order**
-> Order create_order(order)
+> Order create_order(order, x_gate_exptime=x_gate_exptime)
Create an order
-支持现货、杠杆、全仓杠杆下单。通过 `account` 字段来使用不同的账户,默认为 `spot` ,即使用现货账户下单。 使用杠杆账户交易,即 `account` 设置为 `margin` 的时候,可以设置 `auto_borrow` 为 `true`, 在账户余额不足的情况,由系统自动执行 `POST /margin/loans` 借入不足部分。 杠杆下单成交之后的获取到的资产是否自动用于归还逐仓杠杆账户的借入单,取决于用户逐仓杠杆**账户**的自动还款设置, 该账户自动还款设置可以通过 `/margin/auto_repay` 来查询和设置。 使用全仓杠杆账户交易,即 `account` 设置为 `cross_margin` 的时候,同样可以启用 `auto_borrow` 来实现自动借入不足部分,但是与逐仓杠杆账户不同的是,全仓杠杆账户的委托是否自动还款取决于下单时的 `auto_repay` 设置,该设置只对当前委托生效,即只有该委托成交之后获取到的资产会用来还款全仓杠杆账户的借入单。 全仓杠杆账户下单目前支持同时开启 `auto_borrow` 和 `auto_repay`。 自动还款会在订单结束时触发,即 `status` 为 `cancelled` 或者 `closed` 。 **委托状态** 挂单中的委托状态是 `open` ,在数量全部成交之前保持为 `open` 。如果被全部吃掉,则订单结束,状态变成 `closed` 。 假如全部成交之前,订单被撤销,不管是否有部分成交,状态都会变为 `cancelled` **冰山委托** `iceberg` 用来设置冰山委托显示的数量,如果需要完全隐藏,设置为 `-1` 。注意隐藏部分成交时按照 taker 的手续费率收取。 **限制用户自成交** 设置 `stp_act` 来决定使用限制用户自成交的策略
+Supports spot, margin, leverage, and cross-margin leverage orders. Use different accounts through the `account` field. Default is `spot`, which means using the spot account to place orders. If the user has a `unified` account, the default is to place orders with the unified account. When using leveraged account trading (i.e., when `account` is set to `margin`), you can set `auto_borrow` to `true`. In case of insufficient account balance, the system will automatically execute `POST /margin/uni/loans` to borrow the insufficient amount. Whether assets obtained after leveraged order execution are automatically used to repay borrowing orders of the isolated margin account depends on the automatic repayment settings of the user's isolated margin account. Account automatic repayment settings can be queried and set through `/margin/auto_repay`. When using unified account trading (i.e., when `account` is set to `unified`), `auto_borrow` can also be enabled to realize automatic borrowing of insufficient amounts. However, unlike the isolated margin account, whether unified account orders are automatically repaid depends on the `auto_repay` setting when placing the order. This setting only applies to the current order, meaning only assets obtained after order execution will be used to repay borrowing orders of the cross-margin account. Unified account ordering currently supports enabling both `auto_borrow` and `auto_repay` simultaneously. Auto repayment will be triggered when the order ends, i.e., when `status` is `cancelled` or `closed`. **Order Status** The order status in pending orders is `open`, which remains `open` until all quantity is filled. If fully filled, the order ends and status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of partial fills, the status will become `cancelled`. **Iceberg Orders** `iceberg` is used to set the displayed quantity of iceberg orders and does not support complete hiding. Note that hidden portions are charged according to the taker's fee rate. **Self-Trade Prevention** Set `stp_act` to determine the self-trade prevention strategy to use
### Example
@@ -1138,10 +1144,11 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
order = gate_api.Order() # Order |
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
try:
# Create an order
- api_response = api_instance.create_order(order)
+ api_response = api_instance.create_order(order, x_gate_exptime=x_gate_exptime)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -1154,6 +1161,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order** | [**Order**](Order.md)| |
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
### Return type
@@ -1171,16 +1179,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**201** | Order created. | - |
+**201** | Order created | - |
[[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)
# **cancel_orders**
-> list[Order] cancel_orders(currency_pair, side=side, account=account)
+> list[OrderCancel] cancel_orders(currency_pair=currency_pair, side=side, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime)
Cancel all `open` orders in specified currency pair
-If `account` is not set, all open orders, including spot, margin and cross margin ones, will be cancelled. You can set `account` to cancel only orders within the specified account
+When the `account` parameter is not specified, all pending orders including spot, unified account, and isolated margin will be cancelled. When `currency_pair` is not specified, all trading pair pending orders will be cancelled. You can specify a particular account to cancel all pending orders under that account
### Example
@@ -1206,13 +1214,15 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
-currency_pair = 'BTC_USDT' # str | Currency pair
-side = 'sell' # str | All bids or asks. Both included if not specified (optional)
-account = 'spot' # str | Specify account type - classic account:Default to all account types being included - portfolio margin account:`cross_margin` only (optional)
+currency_pair = 'BTC_USDT' # str | Currency pair (optional)
+side = 'sell' # str | Specify all bids or all asks, both included if not specified (optional)
+account = 'spot' # str | Specify account type Classic account: All are included if not specified Unified account: Specify `unified` (optional)
+action_mode = 'ACK' # str | Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default) (optional)
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
try:
# Cancel all `open` orders in specified currency pair
- api_response = api_instance.cancel_orders(currency_pair, side=side, account=account)
+ api_response = api_instance.cancel_orders(currency_pair=currency_pair, side=side, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -1224,13 +1234,15 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency_pair** | **str**| Currency pair |
- **side** | **str**| All bids or asks. Both included if not specified | [optional]
- **account** | **str**| Specify account type - classic account:Default to all account types being included - portfolio margin account:`cross_margin` only | [optional]
+ **currency_pair** | **str**| Currency pair | [optional]
+ **side** | **str**| Specify all bids or all asks, both included if not specified | [optional]
+ **account** | **str**| Specify account type Classic account: All are included if not specified Unified account: Specify `unified` | [optional]
+ **action_mode** | **str**| Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default) | [optional]
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
### Return type
-[**list[Order]**](Order.md)
+[**list[OrderCancel]**](OrderCancel.md)
### Authorization
@@ -1244,14 +1256,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Batch cancellation request accepted. Query order status by listing orders | - |
+**200** | Batch cancellation request accepted and processed, success determined by order list | - |
[[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)
# **cancel_batch_orders**
-> list[CancelOrderResult] cancel_batch_orders(cancel_batch_order)
+> list[CancelOrderResult] cancel_batch_orders(cancel_batch_order, x_gate_exptime=x_gate_exptime)
-Cancel a batch of orders with an ID list
+Cancel batch orders by specified ID list
Multiple currency pairs can be specified, but maximum 20 orders are allowed per request
@@ -1280,10 +1292,11 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
cancel_batch_order = [gate_api.CancelBatchOrder()] # list[CancelBatchOrder] |
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
try:
- # Cancel a batch of orders with an ID list
- api_response = api_instance.cancel_batch_orders(cancel_batch_order)
+ # Cancel batch orders by specified ID list
+ api_response = api_instance.cancel_batch_orders(cancel_batch_order, x_gate_exptime=x_gate_exptime)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -1296,6 +1309,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**cancel_batch_order** | [**list[CancelBatchOrder]**](CancelBatchOrder.md)| |
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
### Return type
@@ -1320,9 +1334,9 @@ Name | Type | Description | Notes
# **get_order**
> Order get_order(order_id, currency_pair, account=account)
-Get a single order
+Query single order details
-Spot and margin orders are queried by default. If cross margin orders are needed or portfolio margin account are used, account must be set to cross_margin.
+By default, queries orders for spot, unified account, and isolated margin accounts.
### Example
@@ -1348,12 +1362,12 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
-order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted.
-currency_pair = 'BTC_USDT' # str | Currency pair
-account = 'cross_margin' # str | Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)
+order_id = '12345' # str | The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel)
+currency_pair = 'BTC_USDT' # str | Specify the trading pair to query. This field is required when querying pending order records. This field can be omitted when querying filled order records.
+account = 'spot' # str | Specify query account (optional)
try:
- # Get a single order
+ # Query single order details
api_response = api_instance.get_order(order_id, currency_pair, account=account)
print(api_response)
except GateApiException as ex:
@@ -1366,9 +1380,9 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. |
- **currency_pair** | **str**| Currency pair |
- **account** | **str**| Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only | [optional]
+ **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) |
+ **currency_pair** | **str**| Specify the trading pair to query. This field is required when querying pending order records. This field can be omitted when querying filled order records. |
+ **account** | **str**| Specify query account | [optional]
### Return type
@@ -1391,11 +1405,11 @@ Name | Type | Description | Notes
[[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)
# **cancel_order**
-> Order cancel_order(order_id, currency_pair, account=account)
+> Order cancel_order(order_id, currency_pair, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime)
-Cancel a single order
+Cancel single order
-Spot and margin orders are cancelled by default. If trying to cancel cross margin orders or portfolio margin account are used, account must be set to cross_margin
+By default, orders for spot, unified accounts and leveraged accounts are revoked.
### Example
@@ -1421,13 +1435,15 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
-order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted.
+order_id = '12345' # str | The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel)
currency_pair = 'BTC_USDT' # str | Currency pair
-account = 'cross_margin' # str | Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)
+account = 'spot' # str | Specify query account (optional)
+action_mode = 'ACK' # str | Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default) (optional)
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
try:
- # Cancel a single order
- api_response = api_instance.cancel_order(order_id, currency_pair, account=account)
+ # Cancel single order
+ api_response = api_instance.cancel_order(order_id, currency_pair, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -1439,9 +1455,11 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. |
+ **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) |
**currency_pair** | **str**| Currency pair |
- **account** | **str**| Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only | [optional]
+ **account** | **str**| Specify query account | [optional]
+ **action_mode** | **str**| Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default) | [optional]
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
### Return type
@@ -1464,11 +1482,11 @@ Name | Type | Description | Notes
[[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)
# **amend_order**
-> Order amend_order(order_id, currency_pair, order_patch, account=account)
+> Order amend_order(order_id, order_patch, currency_pair=currency_pair, account=account, x_gate_exptime=x_gate_exptime)
-Amend an order
+Amend single order
-默认修改现货、逐仓杠杆账户的订单,如果需要修改全仓杠杆账户订单,必须指定 `account` 为 `cross_margin`,统一账户 `account` 只能指定为 `cross_margin`。 目前只支持修改价格或数量(二选一) 关于限速:修改订单和创建订单共享限速规则 关于匹配优先级:只修改数量变小不影响匹配优先级,修改价格或修改数量变大则优先级将调整到新价格最后面 注意事项:修改数量小于已成交数量会触发撤单操作
+Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation.
### Example
@@ -1494,14 +1512,15 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
-order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted.
-currency_pair = 'BTC_USDT' # str | Currency pair
+order_id = '12345' # str | The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel)
order_patch = gate_api.OrderPatch() # OrderPatch |
-account = 'cross_margin' # str | Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)
+currency_pair = 'BTC_USDT' # str | Currency pair (optional)
+account = 'spot' # str | Specify query account (optional)
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
try:
- # Amend an order
- api_response = api_instance.amend_order(order_id, currency_pair, order_patch, account=account)
+ # Amend single order
+ api_response = api_instance.amend_order(order_id, order_patch, currency_pair=currency_pair, account=account, x_gate_exptime=x_gate_exptime)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -1513,10 +1532,11 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. |
- **currency_pair** | **str**| Currency pair |
+ **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) |
**order_patch** | [**OrderPatch**](OrderPatch.md)| |
- **account** | **str**| Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only | [optional]
+ **currency_pair** | **str**| Currency pair | [optional]
+ **account** | **str**| Specify query account | [optional]
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
### Return type
@@ -1534,16 +1554,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Updated | - |
+**200** | Updated successfully | - |
[[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)
# **list_my_trades**
> list[Trade] list_my_trades(currency_pair=currency_pair, limit=limit, page=page, order_id=order_id, account=account, _from=_from, to=to)
-List personal trading history
+Query personal trading records
-Spot and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range. If you don't specify `from` and/or `to` parameters, only the last 7 days of data will be retured. The range of `from` and `to` is not alloed to exceed 30 days. Time range parameters are handled as order finish time.
+By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0.
### Example
@@ -1570,15 +1590,15 @@ api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
currency_pair = 'BTC_USDT' # str | Retrieve results with specified currency pair (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+limit = 100 # int | Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 (optional) (default to 100)
page = 1 # int | Page number (optional) (default to 1)
order_id = '12345' # str | Filter trades with specified order ID. `currency_pair` is also required if this field is present (optional)
-account = 'cross_margin' # str | Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)
-_from = 1627706330 # int | Start timestamp of the query (optional)
-to = 1635329650 # int | Time range ending, default to current time (optional)
+account = 'spot' # str | Specify query account (optional)
+_from = 1627706330 # int | Start timestamp for the query (optional)
+to = 1635329650 # int | End timestamp for the query, defaults to current time if not specified (optional)
try:
- # List personal trading history
+ # Query personal trading records
api_response = api_instance.list_my_trades(currency_pair=currency_pair, limit=limit, page=page, order_id=order_id, account=account, _from=_from, to=to)
print(api_response)
except GateApiException as ex:
@@ -1592,12 +1612,12 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**currency_pair** | **str**| Retrieve results with specified currency pair | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **limit** | **int**| Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 | [optional] [default to 100]
**page** | **int**| Page number | [optional] [default to 1]
**order_id** | **str**| Filter trades with specified order ID. `currency_pair` is also required if this field is present | [optional]
- **account** | **str**| Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only | [optional]
- **_from** | **int**| Start timestamp of the query | [optional]
- **to** | **int**| Time range ending, default to current time | [optional]
+ **account** | **str**| Specify query account | [optional]
+ **_from** | **int**| Start timestamp for the query | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
### Return type
@@ -1615,7 +1635,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
@@ -1669,7 +1689,7 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
@@ -1678,7 +1698,7 @@ No authorization required
Countdown cancel orders
-When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled.
+Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled.
### Example
@@ -1738,14 +1758,153 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Set countdown successfully | - |
+**200** | Countdown set successfully | - |
+
+[[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)
+
+# **amend_batch_orders**
+> list[BatchOrder] amend_batch_orders(batch_amend_item, x_gate_exptime=x_gate_exptime)
+
+Batch modification of orders
+
+Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return content order of batch modification orders is consistent with the order list order.
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.SpotApi(api_client)
+batch_amend_item = [gate_api.BatchAmendItem()] # list[BatchAmendItem] |
+x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional)
+
+try:
+ # Batch modification of orders
+ api_response = api_instance.amend_batch_orders(batch_amend_item, x_gate_exptime=x_gate_exptime)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling SpotApi->amend_batch_orders: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **batch_amend_item** | [**list[BatchAmendItem]**](BatchAmendItem.md)| |
+ **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional]
+
+### Return type
+
+[**list[BatchOrder]**](BatchOrder.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Order modification executed successfully | - |
+
+[[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)
+
+# **get_spot_insurance_history**
+> list[SpotInsuranceHistory] get_spot_insurance_history(business, currency, _from, to, page=page, limit=limit)
+
+Query spot insurance fund historical data
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.SpotApi(api_client)
+business = 'margin' # str | Leverage business, margin - position by position; unified - unified account
+currency = 'BTC' # str | Currency
+_from = 1547706332 # int | Start timestamp in seconds
+to = 1547706332 # int | End timestamp in seconds
+page = 1 # int | Page number (optional) (default to 1)
+limit = 30 # int | The maximum number of items returned in the list, the default value is 30 (optional) (default to 30)
+
+try:
+ # Query spot insurance fund historical data
+ api_response = api_instance.get_spot_insurance_history(business, currency, _from, to, page=page, limit=limit)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling SpotApi->get_spot_insurance_history: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **business** | **str**| Leverage business, margin - position by position; unified - unified account |
+ **currency** | **str**| Currency |
+ **_from** | **int**| Start timestamp in seconds |
+ **to** | **int**| End timestamp in seconds |
+ **page** | **int**| Page number | [optional] [default to 1]
+ **limit** | **int**| The maximum number of items returned in the list, the default value is 30 | [optional] [default to 30]
+
+### Return type
+
+[**list[SpotInsuranceHistory]**](SpotInsuranceHistory.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
[[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)
# **list_spot_price_triggered_orders**
> list[SpotPriceTriggeredOrder] list_spot_price_triggered_orders(status, market=market, account=account, limit=limit, offset=offset)
-Retrieve running auto order list
+Query running auto order list
### Example
@@ -1771,14 +1930,14 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
-status = 'status_example' # str | Only list the orders with this status
-market = 'BTC_USDT' # str | Currency pair (optional)
-account = 'account_example' # str | Trading account type. Portfolio margin account must set to `cross_margin` (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+status = 'status_example' # str | Query order list based on status
+market = 'BTC_USDT' # str | Trading market (optional)
+account = 'account_example' # str | Trading account type. Unified account must be set to `unified` (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
try:
- # Retrieve running auto order list
+ # Query running auto order list
api_response = api_instance.list_spot_price_triggered_orders(status, market=market, account=account, limit=limit, offset=offset)
print(api_response)
except GateApiException as ex:
@@ -1791,10 +1950,10 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **status** | **str**| Only list the orders with this status |
- **market** | **str**| Currency pair | [optional]
- **account** | **str**| Trading account type. Portfolio margin account must set to `cross_margin` | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **status** | **str**| Query order list based on status |
+ **market** | **str**| Trading market | [optional]
+ **account** | **str**| Trading account type. Unified account must be set to `unified` | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
### Return type
@@ -1813,14 +1972,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **create_spot_price_triggered_order**
> TriggerOrderResponse create_spot_price_triggered_order(spot_price_triggered_order)
-Create a price-triggered order
+Create price-triggered order
### Example
@@ -1849,7 +2008,7 @@ api_instance = gate_api.SpotApi(api_client)
spot_price_triggered_order = gate_api.SpotPriceTriggeredOrder() # SpotPriceTriggeredOrder |
try:
- # Create a price-triggered order
+ # Create price-triggered order
api_response = api_instance.create_spot_price_triggered_order(spot_price_triggered_order)
print(api_response)
except GateApiException as ex:
@@ -1880,14 +2039,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**201** | Order created | - |
+**201** | Order created successfully | - |
[[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)
# **cancel_spot_price_triggered_order_list**
> list[SpotPriceTriggeredOrder] cancel_spot_price_triggered_order_list(market=market, account=account)
-Cancel all open orders
+Cancel all auto orders
### Example
@@ -1913,11 +2072,11 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
-market = 'BTC_USDT' # str | Currency pair (optional)
-account = 'account_example' # str | Trading account type. Portfolio margin account must set to `cross_margin` (optional)
+market = 'BTC_USDT' # str | Trading market (optional)
+account = 'account_example' # str | Trading account type. Unified account must be set to `unified` (optional)
try:
- # Cancel all open orders
+ # Cancel all auto orders
api_response = api_instance.cancel_spot_price_triggered_order_list(market=market, account=account)
print(api_response)
except GateApiException as ex:
@@ -1930,8 +2089,8 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **market** | **str**| Currency pair | [optional]
- **account** | **str**| Trading account type. Portfolio margin account must set to `cross_margin` | [optional]
+ **market** | **str**| Trading market | [optional]
+ **account** | **str**| Trading account type. Unified account must be set to `unified` | [optional]
### Return type
@@ -1949,14 +2108,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Batch cancellation request accepted. Query order status by listing orders | - |
+**200** | Batch cancellation request accepted and processed, success determined by order list | - |
[[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)
# **get_spot_price_triggered_order**
> SpotPriceTriggeredOrder get_spot_price_triggered_order(order_id)
-Get a price-triggered order
+Query single auto order details
### Example
@@ -1982,10 +2141,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
-order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID
+order_id = 'order_id_example' # str | ID returned when order is successfully created
try:
- # Get a price-triggered order
+ # Query single auto order details
api_response = api_instance.get_spot_price_triggered_order(order_id)
print(api_response)
except GateApiException as ex:
@@ -1998,7 +2157,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **order_id** | **str**| Retrieve the data of the order with the specified ID |
+ **order_id** | **str**| ID returned when order is successfully created |
### Return type
@@ -2016,14 +2175,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Auto order detail | - |
+**200** | Auto order details | - |
[[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)
# **cancel_spot_price_triggered_order**
> SpotPriceTriggeredOrder cancel_spot_price_triggered_order(order_id)
-cancel a price-triggered order
+Cancel single auto order
### Example
@@ -2049,10 +2208,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SpotApi(api_client)
-order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID
+order_id = 'order_id_example' # str | ID returned when order is successfully created
try:
- # cancel a price-triggered order
+ # Cancel single auto order
api_response = api_instance.cancel_spot_price_triggered_order(order_id)
print(api_response)
except GateApiException as ex:
@@ -2065,7 +2224,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **order_id** | **str**| Retrieve the data of the order with the specified ID |
+ **order_id** | **str**| ID returned when order is successfully created |
### Return type
@@ -2083,7 +2242,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Auto order detail | - |
+**200** | Auto order details | - |
[[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)
diff --git a/docs/SpotCurrencyChain.md b/docs/SpotCurrencyChain.md
new file mode 100644
index 0000000..d461e15
--- /dev/null
+++ b/docs/SpotCurrencyChain.md
@@ -0,0 +1,14 @@
+# SpotCurrencyChain
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | Blockchain name | [optional]
+**addr** | **str** | token address | [optional]
+**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled | [optional]
+**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed | [optional]
+**deposit_disabled** | **bool** | Whether currency's deposit is disabled | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SpotFee.md b/docs/SpotFee.md
index 904f753..e007cf0 100644
--- a/docs/SpotFee.md
+++ b/docs/SpotFee.md
@@ -6,12 +6,13 @@ Name | Type | Description | Notes
**user_id** | **int** | User ID | [optional]
**taker_fee** | **str** | taker fee rate | [optional]
**maker_fee** | **str** | maker fee rate | [optional]
-**gt_discount** | **bool** | If GT deduction is enabled | [optional]
+**gt_discount** | **bool** | Whether GT deduction discount is enabled | [optional]
**gt_taker_fee** | **str** | Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional]
-**gt_maker_fee** | **str** | Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional]
+**gt_maker_fee** | **str** | Maker fee rate with GT deduction. Returns 0 if GT deduction is disabled | [optional]
**loan_fee** | **str** | Loan fee rate of margin lending | [optional]
-**point_type** | **str** | Point type. 0 - Initial version. 1 - new version since 202009 | [optional]
+**point_type** | **str** | Point card type: 0 - Original version, 1 - New version since 202009 | [optional]
**currency_pair** | **str** | Currency pair | [optional]
+**debit_fee** | **int** | Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/SpotInsuranceHistory.md b/docs/SpotInsuranceHistory.md
new file mode 100644
index 0000000..3d1f006
--- /dev/null
+++ b/docs/SpotInsuranceHistory.md
@@ -0,0 +1,12 @@
+# SpotInsuranceHistory
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional]
+**balance** | **str** | Balance | [optional]
+**time** | **int** | Creation time, timestamp, milliseconds | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SpotPricePutOrder.md b/docs/SpotPricePutOrder.md
index c3c209a..899f6d7 100644
--- a/docs/SpotPricePutOrder.md
+++ b/docs/SpotPricePutOrder.md
@@ -3,12 +3,15 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**type** | **str** | Order type, default to `limit` | [optional] [default to 'limit']
+**type** | **str** | Order type,default to `limit` - limit : Limit Order - market : Market Order | [optional] [default to 'limit']
**side** | **str** | Order side - buy: buy side - sell: sell side |
**price** | **str** | Order price |
-**amount** | **str** | Order amount |
-**account** | **str** | Trading account type. Portfolio margin account must set to `cross_margin` - normal: spot trading - margin: margin trading - cross_margin: cross_margin trading | [default to 'normal']
+**amount** | **str** | Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` |
+**account** | **str** | Trading account type. Unified account must be set to `unified` - normal: spot trading - margin: margin trading - unified: unified account | [default to 'normal']
**time_in_force** | **str** | time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only | [optional] [default to 'gtc']
+**auto_borrow** | **bool** | Whether to borrow coins automatically | [optional] [default to False]
+**auto_repay** | **bool** | Whether to repay the loan automatically | [optional] [default to False]
+**text** | **str** | The source of the order, including: - web: Web - api: API call - app: Mobile app | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/SpotPriceTrigger.md b/docs/SpotPriceTrigger.md
index 7ee5505..0208586 100644
--- a/docs/SpotPriceTrigger.md
+++ b/docs/SpotPriceTrigger.md
@@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**price** | **str** | Trigger price |
-**rule** | **str** | Price trigger condition - >=: triggered when market price larger than or equal to `price` field - <=: triggered when market price less than or equal to `price` field |
-**expiration** | **int** | How long (in seconds) to wait for the condition to be triggered before cancelling the order. |
+**rule** | **str** | Price trigger condition - `>=`: triggered when market price is greater than or equal to `price` - `<=`: triggered when market price is less than or equal to `price` |
+**expiration** | **int** | Maximum wait time for trigger condition (in seconds). Order will be cancelled if timeout |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/SpotPriceTriggeredOrder.md b/docs/SpotPriceTriggeredOrder.md
index 4291cb2..5c524ae 100644
--- a/docs/SpotPriceTriggeredOrder.md
+++ b/docs/SpotPriceTriggeredOrder.md
@@ -1,6 +1,6 @@
# SpotPriceTriggeredOrder
-Spot order detail
+Spot price order details
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
@@ -8,12 +8,12 @@ Name | Type | Description | Notes
**put** | [**SpotPricePutOrder**](SpotPricePutOrder.md) | |
**id** | **int** | Auto order ID | [optional] [readonly]
**user** | **int** | User ID | [optional] [readonly]
-**market** | **str** | Currency pair |
-**ctime** | **int** | Creation time | [optional] [readonly]
-**ftime** | **int** | Finished time | [optional] [readonly]
-**fired_order_id** | **int** | ID of the newly created order on condition triggered | [optional] [readonly]
-**status** | **str** | Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired | [optional] [readonly]
-**reason** | **str** | Additional remarks on how the order was finished | [optional] [readonly]
+**market** | **str** | Market |
+**ctime** | **int** | Created time | [optional] [readonly]
+**ftime** | **int** | End time | [optional] [readonly]
+**fired_order_id** | **int** | ID of the order created after trigger | [optional] [readonly]
+**status** | **str** | Status - open: Running - cancelled: Manually cancelled - finish: Successfully completed - failed: Failed to execute - expired: Expired | [optional] [readonly]
+**reason** | **str** | Additional description of how the order was completed | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/StpGroup.md b/docs/StpGroup.md
index 3ae5da0..8a02186 100644
--- a/docs/StpGroup.md
+++ b/docs/StpGroup.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
**id** | **int** | STP Group ID | [optional]
**name** | **str** | STP Group name |
**creator_id** | **int** | Creator ID | [optional]
-**create_time** | **int** | Creation time | [optional]
+**create_time** | **int** | Created time | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/StpGroupUser.md b/docs/StpGroupUser.md
index a5a103e..2e05e1a 100644
--- a/docs/StpGroupUser.md
+++ b/docs/StpGroupUser.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**user_id** | **int** | User ID | [optional]
**stp_id** | **int** | STP Group ID | [optional]
-**create_time** | **int** | Creation time | [optional]
+**create_time** | **int** | Created time | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/StructuredBuy.md b/docs/StructuredBuy.md
new file mode 100644
index 0000000..2c5428f
--- /dev/null
+++ b/docs/StructuredBuy.md
@@ -0,0 +1,12 @@
+# StructuredBuy
+
+Dual Investment Buy
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**pid** | **str** | Product ID | [optional]
+**amount** | **str** | Buy Quantity | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/StructuredGetProjectList.md b/docs/StructuredGetProjectList.md
new file mode 100644
index 0000000..a98f1a4
--- /dev/null
+++ b/docs/StructuredGetProjectList.md
@@ -0,0 +1,22 @@
+# StructuredGetProjectList
+
+Structured Investment
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | Product ID | [optional]
+**type** | **str** | Product Type: `SharkFin2.0`-Shark Fin 2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball | [optional]
+**name_en** | **str** | Product Name | [optional]
+**investment_coin** | **str** | Investment Token | [optional]
+**investment_period** | **str** | Investment Period | [optional]
+**min_annual_rate** | **str** | Minimum Annual Rate | [optional]
+**mid_annual_rate** | **str** | Intermediate Annual Rate | [optional]
+**max_annual_rate** | **str** | Maximum Annual Rate | [optional]
+**watch_market** | **str** | Underlying Market | [optional]
+**start_time** | **int** | Start Time | [optional]
+**end_time** | **int** | End time | [optional]
+**status** | **str** | Status: `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/StructuredOrderList.md b/docs/StructuredOrderList.md
new file mode 100644
index 0000000..3f52c75
--- /dev/null
+++ b/docs/StructuredOrderList.md
@@ -0,0 +1,17 @@
+# StructuredOrderList
+
+Structured order
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | Order ID | [optional]
+**pid** | **str** | Product ID | [optional]
+**lock_coin** | **str** | Locked coin | [optional]
+**amount** | **str** | Locked amount | [optional]
+**status** | **str** | Status: SUCCESS - SUCCESS FAILED - FAILED DONE - DONE | [optional]
+**income** | **str** | Income | [optional]
+**create_time** | **int** | Created time | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SubAccount.md b/docs/SubAccount.md
index 70dbc36..4778a33 100644
--- a/docs/SubAccount.md
+++ b/docs/SubAccount.md
@@ -3,13 +3,13 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**remark** | **str** | custom text | [optional]
-**login_name** | **str** | Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters |
+**remark** | **str** | Remark | [optional]
+**login_name** | **str** | Sub-account login name: Only letters, numbers and underscores are supported, cannot contain other invalid characters |
**password** | **str** | The sub-account's password. (Default: the same as main account's password) | [optional]
**email** | **str** | The sub-account's email address. (Default: the same as main account's email address) | [optional]
-**state** | **int** | State: 1-normal, 2-locked\" | [optional] [readonly]
-**type** | **int** | \"Sub-account type: 1 - sub-account, 3 - cross margin account | [optional] [readonly]
-**user_id** | **int** | The user id of the sub-account | [optional] [readonly]
+**state** | **int** | Sub-account status: 1-normal, 2-locked | [optional] [readonly]
+**type** | **int** | Sub-account type: 1-Regular sub-account, 3-Cross margin sub-account | [optional] [readonly]
+**user_id** | **int** | Sub-account user ID | [optional] [readonly]
**create_time** | **int** | Created time | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/SubAccountApi.md b/docs/SubAccountApi.md
index 1cc856b..dfae02b 100644
--- a/docs/SubAccountApi.md
+++ b/docs/SubAccountApi.md
@@ -6,14 +6,15 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**list_sub_accounts**](SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts
[**create_sub_accounts**](SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account
-[**get_sub_account**](SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account
-[**list_sub_account_keys**](SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API Key of the sub-account
-[**create_sub_account_keys**](SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create API Key of the sub-account
-[**get_sub_account_key**](SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get the API Key of the sub-account
-[**update_sub_account_keys**](SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update API key of the sub-account
-[**delete_sub_account_keys**](SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account
-[**lock_sub_account**](SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account
-[**unlock_sub_account**](SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account
+[**get_sub_account**](SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get sub-account
+[**list_sub_account_keys**](SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API key pairs of the sub-account
+[**create_sub_account_keys**](SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create new sub-account API key pair
+[**get_sub_account_key**](SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get specific API key pair of the sub-account
+[**update_sub_account_keys**](SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update sub-account API key pair
+[**delete_sub_account_keys**](SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete sub-account API key pair
+[**lock_sub_account**](SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock sub-account
+[**unlock_sub_account**](SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock sub-account
+[**list_unified_mode**](SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode
# **list_sub_accounts**
@@ -45,7 +46,7 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SubAccountApi(api_client)
-type = '0' # str | `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. (optional)
+type = '0' # str | Enter `0` to list all types of sub-accounts (currently supporting cross-margin sub-accounts and regular sub-accounts). Enter `1` to query regular sub-accounts only. If no parameter is passed, only regular sub-accounts will be queried by default. (optional)
try:
# List sub-accounts
@@ -61,7 +62,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **type** | **str**| `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. | [optional]
+ **type** | **str**| Enter `0` to list all types of sub-accounts (currently supporting cross-margin sub-accounts and regular sub-accounts). Enter `1` to query regular sub-accounts only. If no parameter is passed, only regular sub-accounts will be queried by default. | [optional]
### Return type
@@ -79,7 +80,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
@@ -146,14 +147,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**201** | Created Successfully | - |
+**201** | Created successfully | - |
[[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)
# **get_sub_account**
> SubAccount get_sub_account(user_id)
-Get the sub-account
+Get sub-account
### Example
@@ -179,10 +180,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SubAccountApi(api_client)
-user_id = 56 # int | Sub-account user id
+user_id = 56 # int | Sub-account user ID
try:
- # Get the sub-account
+ # Get sub-account
api_response = api_instance.get_sub_account(user_id)
print(api_response)
except GateApiException as ex:
@@ -195,7 +196,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **int**| Sub-account user id |
+ **user_id** | **int**| Sub-account user ID |
### Return type
@@ -213,14 +214,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successful | - |
+**200** | Successfully retrieved | - |
[[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)
# **list_sub_account_keys**
> list[SubAccountKey] list_sub_account_keys(user_id)
-List all API Key of the sub-account
+List all API key pairs of the sub-account
### Example
@@ -246,10 +247,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SubAccountApi(api_client)
-user_id = 56 # int | Sub-account user id
+user_id = 56 # int | Sub-account user ID
try:
- # List all API Key of the sub-account
+ # List all API key pairs of the sub-account
api_response = api_instance.list_sub_account_keys(user_id)
print(api_response)
except GateApiException as ex:
@@ -262,7 +263,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **int**| Sub-account user id |
+ **user_id** | **int**| Sub-account user ID |
### Return type
@@ -280,14 +281,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **create_sub_account_keys**
-> list[SubAccountKey] create_sub_account_keys(user_id, sub_account_key)
+> SubAccountKey create_sub_account_keys(user_id, sub_account_key)
-Create API Key of the sub-account
+Create new sub-account API key pair
### Example
@@ -313,11 +314,11 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SubAccountApi(api_client)
-user_id = 56 # int | Sub-account user id
+user_id = 56 # int | Sub-account user ID
sub_account_key = gate_api.SubAccountKey() # SubAccountKey |
try:
- # Create API Key of the sub-account
+ # Create new sub-account API key pair
api_response = api_instance.create_sub_account_keys(user_id, sub_account_key)
print(api_response)
except GateApiException as ex:
@@ -330,12 +331,12 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **int**| Sub-account user id |
+ **user_id** | **int**| Sub-account user ID |
**sub_account_key** | [**SubAccountKey**](SubAccountKey.md)| |
### Return type
-[**list[SubAccountKey]**](SubAccountKey.md)
+[**SubAccountKey**](SubAccountKey.md)
### Authorization
@@ -349,14 +350,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Created Successfully | - |
+**200** | Created successfully | - |
[[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)
# **get_sub_account_key**
> SubAccountKey get_sub_account_key(user_id, key)
-Get the API Key of the sub-account
+Get specific API key pair of the sub-account
### Example
@@ -382,11 +383,11 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SubAccountApi(api_client)
-user_id = 56 # int | Sub-account user id
-key = 'key_example' # str | The API Key of the sub-account
+user_id = 56 # int | Sub-account user ID
+key = 'key_example' # str | Sub-account API key
try:
- # Get the API Key of the sub-account
+ # Get specific API key pair of the sub-account
api_response = api_instance.get_sub_account_key(user_id, key)
print(api_response)
except GateApiException as ex:
@@ -399,8 +400,8 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **int**| Sub-account user id |
- **key** | **str**| The API Key of the sub-account |
+ **user_id** | **int**| Sub-account user ID |
+ **key** | **str**| Sub-account API key |
### Return type
@@ -418,14 +419,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successful | - |
+**200** | Successfully retrieved | - |
[[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)
# **update_sub_account_keys**
> update_sub_account_keys(user_id, key, sub_account_key)
-Update API key of the sub-account
+Update sub-account API key pair
### Example
@@ -451,12 +452,12 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SubAccountApi(api_client)
-user_id = 56 # int | Sub-account user id
-key = 'key_example' # str | The API Key of the sub-account
+user_id = 56 # int | Sub-account user ID
+key = 'key_example' # str | Sub-account API key
sub_account_key = gate_api.SubAccountKey() # SubAccountKey |
try:
- # Update API key of the sub-account
+ # Update sub-account API key pair
api_instance.update_sub_account_keys(user_id, key, sub_account_key)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -468,8 +469,8 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **int**| Sub-account user id |
- **key** | **str**| The API Key of the sub-account |
+ **user_id** | **int**| Sub-account user ID |
+ **key** | **str**| Sub-account API key |
**sub_account_key** | [**SubAccountKey**](SubAccountKey.md)| |
### Return type
@@ -488,14 +489,14 @@ void (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | Updated | - |
+**204** | Updated successfully | - |
[[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)
# **delete_sub_account_keys**
> delete_sub_account_keys(user_id, key)
-Delete API key of the sub-account
+Delete sub-account API key pair
### Example
@@ -521,11 +522,11 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SubAccountApi(api_client)
-user_id = 56 # int | Sub-account user id
-key = 'key_example' # str | The API Key of the sub-account
+user_id = 56 # int | Sub-account user ID
+key = 'key_example' # str | Sub-account API key
try:
- # Delete API key of the sub-account
+ # Delete sub-account API key pair
api_instance.delete_sub_account_keys(user_id, key)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -537,8 +538,8 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **int**| Sub-account user id |
- **key** | **str**| The API Key of the sub-account |
+ **user_id** | **int**| Sub-account user ID |
+ **key** | **str**| Sub-account API key |
### Return type
@@ -556,14 +557,14 @@ void (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | Delete successfully | - |
+**204** | Deleted successfully | - |
[[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)
# **lock_sub_account**
> lock_sub_account(user_id)
-Lock the sub-account
+Lock sub-account
### Example
@@ -589,10 +590,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SubAccountApi(api_client)
-user_id = 56 # int | The user id of the sub-account
+user_id = 56 # int | Sub-account user ID
try:
- # Lock the sub-account
+ # Lock sub-account
api_instance.lock_sub_account(user_id)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -604,7 +605,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **int**| The user id of the sub-account |
+ **user_id** | **int**| Sub-account user ID |
### Return type
@@ -622,14 +623,14 @@ void (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | Lock successfully | - |
+**204** | Locked successfully | - |
[[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)
# **unlock_sub_account**
> unlock_sub_account(user_id)
-Unlock the sub-account
+Unlock sub-account
### Example
@@ -655,10 +656,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.SubAccountApi(api_client)
-user_id = 56 # int | The user id of the sub-account
+user_id = 56 # int | Sub-account user ID
try:
- # Unlock the sub-account
+ # Unlock sub-account
api_instance.unlock_sub_account(user_id)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -670,7 +671,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **int**| The user id of the sub-account |
+ **user_id** | **int**| Sub-account user ID |
### Return type
@@ -688,7 +689,72 @@ void (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | Unlock successfully | - |
+**204** | Unlocked successfully | - |
+
+[[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)
+
+# **list_unified_mode**
+> list[SubUserMode] list_unified_mode()
+
+Get sub-account mode
+
+Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.SubAccountApi(api_client)
+
+try:
+ # Get sub-account mode
+ api_response = api_instance.list_unified_mode()
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling SubAccountApi->list_unified_mode: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**list[SubUserMode]**](SubUserMode.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
[[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)
diff --git a/docs/SubAccountKey.md b/docs/SubAccountKey.md
index 1b89168..54fbdc5 100644
--- a/docs/SubAccountKey.md
+++ b/docs/SubAccountKey.md
@@ -3,15 +3,16 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**user_id** | **str** | User ID | [optional] [readonly]
+**user_id** | **int** | User ID | [optional] [readonly]
**mode** | **int** | Mode: 1 - classic 2 - portfolio account | [optional]
-**name** | **str** | API key name | [optional]
-**perms** | [**list[ApiV4KeyPerm]**](ApiV4KeyPerm.md) | | [optional]
-**ip_whitelist** | **list[str]** | ip white list (list will be removed if no value is passed) | [optional]
+**name** | **str** | API Key Name | [optional]
+**perms** | [**list[SubAccountKeyPerms]**](SubAccountKeyPerms.md) | | [optional]
+**ip_whitelist** | **list[str]** | IP whitelist (list will be cleared if no value is passed) | [optional]
**key** | **str** | API Key | [optional] [readonly]
-**state** | **int** | State 1 - normal 2 - locked 3 - frozen | [optional] [readonly]
-**created_at** | **str** | Creation time | [optional] [readonly]
-**updated_at** | **str** | Last update time | [optional] [readonly]
+**state** | **int** | Status: 1-Normal 2-Frozen 3-Locked | [optional] [readonly]
+**created_at** | **int** | Created time | [optional] [readonly]
+**updated_at** | **int** | Last Update Time | [optional] [readonly]
+**last_access** | **int** | Last Access Time | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/SubAccountKeyPerms.md b/docs/SubAccountKeyPerms.md
new file mode 100644
index 0000000..1b978be
--- /dev/null
+++ b/docs/SubAccountKeyPerms.md
@@ -0,0 +1,11 @@
+# SubAccountKeyPerms
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | Permission function name (no value will be cleared) - wallet: wallet - spot: spot/margin - futures: perpetual contract - delivery: delivery contract - earn: earn - custody: custody - options: options - account: account information - loan: lending - margin: margin - unified: unified account - copy: copy trading | [optional]
+**read_only** | **bool** | Read Only | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SubAccountToSubAccount.md b/docs/SubAccountToSubAccount.md
index e29fb2b..ad18faf 100644
--- a/docs/SubAccountToSubAccount.md
+++ b/docs/SubAccountToSubAccount.md
@@ -4,11 +4,11 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Transfer currency name |
-**sub_account_type** | **str** | Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) | [optional]
+**sub_account_type** | **str** | Transfer from account (deprecated, use `sub_account_from_type` and `sub_account_to_type` instead) | [optional]
**sub_account_from** | **str** | Transfer from the user id of the sub-account |
-**sub_account_from_type** | **str** | Transfer from the account. `spot` - spot account, `futures` - perpetual contract account, `cross_margin` - cross margin account |
+**sub_account_from_type** | **str** | Source sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account |
**sub_account_to** | **str** | Transfer to the user id of the sub-account |
-**sub_account_to_type** | **str** | Transfer to the account. `spot` - spot account, `futures` - perpetual contract account, `cross_margin` - cross margin account |
+**sub_account_to_type** | **str** | Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account |
**amount** | **str** | Transfer amount |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/SubAccountTransfer.md b/docs/SubAccountTransfer.md
index cb7da46..c591078 100644
--- a/docs/SubAccountTransfer.md
+++ b/docs/SubAccountTransfer.md
@@ -3,15 +3,12 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**currency** | **str** | Transfer currency name |
**sub_account** | **str** | Sub account user ID |
-**direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account |
+**sub_account_type** | **str** | Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account, options - options account | [optional] [default to 'spot']
+**currency** | **str** | Transfer currency name |
**amount** | **str** | Transfer amount |
-**uid** | **str** | Main account user ID | [optional] [readonly]
-**client_order_id** | **str** | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional]
-**timest** | **str** | Transfer timestamp | [optional] [readonly]
-**source** | **str** | Where the operation is initiated from | [optional] [readonly]
-**sub_account_type** | **str** | Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `cross_margin` - cross margin account, `delivery` - delivery account | [optional] [default to 'spot']
+**direction** | **str** | Transfer direction: to - transfer into sub-account, from - transfer out from sub-account |
+**client_order_id** | **str** | Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/SubAccountTransferRecordItem.md b/docs/SubAccountTransferRecordItem.md
new file mode 100644
index 0000000..ebfe07e
--- /dev/null
+++ b/docs/SubAccountTransferRecordItem.md
@@ -0,0 +1,19 @@
+# SubAccountTransferRecordItem
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**timest** | **str** | Transfer timestamp | [optional] [readonly]
+**uid** | **str** | Main account user ID | [optional] [readonly]
+**sub_account** | **str** | Sub account user ID |
+**sub_account_type** | **str** | Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account, options - options account | [optional] [default to 'spot']
+**currency** | **str** | Transfer currency name |
+**amount** | **str** | Transfer amount |
+**direction** | **str** | Transfer direction: to - transfer into sub-account, from - transfer out from sub-account |
+**source** | **str** | Source of the transfer operation | [optional] [readonly]
+**client_order_id** | **str** | Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters | [optional]
+**status** | **str** | Sub-account transfer record status, currently only 'success' | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SubCrossMarginAccount.md b/docs/SubCrossMarginAccount.md
index de0d009..b3ab224 100644
--- a/docs/SubCrossMarginAccount.md
+++ b/docs/SubCrossMarginAccount.md
@@ -3,16 +3,16 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**user_id** | **int** | User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account | [optional]
-**locked** | **bool** | Whether account is locked | [optional]
-**balances** | [**dict(str, CrossMarginBalance1)**](CrossMarginBalance1.md) | | [optional]
+**user_id** | **int** | Cross margin account user ID. 0 means this sub-account has not yet opened a cross margin account | [optional]
+**locked** | **bool** | Whether the account is locked | [optional]
+**balances** | [**dict(str, CrossMarginBalance)**](CrossMarginBalance.md) | | [optional]
**total** | **str** | Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` | [optional]
**borrowed** | **str** | Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` | [optional]
-**borrowed_net** | **str** | Total borrowed value in USDT * borrowed factor | [optional]
+**borrowed_net** | **str** | Total borrowed value in USDT * leverage factor | [optional]
**net** | **str** | Total net assets in USDT | [optional]
**leverage** | **str** | Position leverage | [optional]
-**interest** | **str** | Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` | [optional]
-**risk** | **str** | Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` | [optional]
+**interest** | **str** | Total unpaid interest in USDT, i.e., the sum of all currencies' `interest*price*discount` | [optional]
+**risk** | **str** | Risk rate. When it falls below 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` | [optional]
**total_initial_margin** | **str** | Total initial margin | [optional]
**total_margin_balance** | **str** | Total margin balance | [optional]
**total_maintenance_margin** | **str** | Total maintenance margin | [optional]
diff --git a/docs/SubUserMode.md b/docs/SubUserMode.md
new file mode 100644
index 0000000..a1d0c6d
--- /dev/null
+++ b/docs/SubUserMode.md
@@ -0,0 +1,12 @@
+# SubUserMode
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**user_id** | **int** | User ID | [optional]
+**is_unified** | **bool** | Whether it is a unified account | [optional]
+**mode** | **str** | Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SwapCoin.md b/docs/SwapCoin.md
new file mode 100644
index 0000000..3dc278b
--- /dev/null
+++ b/docs/SwapCoin.md
@@ -0,0 +1,14 @@
+# SwapCoin
+
+Blockchain Mining
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**coin** | **str** | Currency |
+**side** | **str** | 0 - Stake 1 - Redeem |
+**amount** | **str** | Size |
+**pid** | **int** | DeFi-type Mining Protocol Identifier | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SwapCoinStruct.md b/docs/SwapCoinStruct.md
new file mode 100644
index 0000000..15735e1
--- /dev/null
+++ b/docs/SwapCoinStruct.md
@@ -0,0 +1,24 @@
+# SwapCoinStruct
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | Order ID | [optional]
+**pid** | **int** | Product ID | [optional]
+**uid** | **int** | User ID | [optional]
+**coin** | **str** | Currency | [optional]
+**type** | **int** | Type 0-Staking 1-Redemption | [optional]
+**subtype** | **str** | SubType | [optional]
+**amount** | **str** | Amount | [optional]
+**exchange_rate** | **str** | Exchange ratio | [optional]
+**exchange_amount** | **str** | Redemption Amount | [optional]
+**update_stamp** | **int** | UpdateTimestamp | [optional]
+**create_stamp** | **int** | Transaction timestamp | [optional]
+**status** | **int** | status 1-success | [optional]
+**protocol_type** | **int** | DEFI Protocol Type | [optional]
+**client_order_id** | **str** | Reference ID | [optional]
+**source** | **str** | Order Origin | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/Ticker.md b/docs/Ticker.md
index ff08faa..8f0a410 100644
--- a/docs/Ticker.md
+++ b/docs/Ticker.md
@@ -6,17 +6,19 @@ Name | Type | Description | Notes
**currency_pair** | **str** | Currency pair | [optional]
**last** | **str** | Last trading price | [optional]
**lowest_ask** | **str** | Recent lowest ask | [optional]
+**lowest_size** | **str** | Latest seller's lowest price quantity; not available for batch queries; available for single queries, empty if no data | [optional]
**highest_bid** | **str** | Recent highest bid | [optional]
-**change_percentage** | **str** | Change percentage in the last 24h | [optional]
-**change_utc0** | **str** | utc0 timezone, the percentage change in the last 24 hours | [optional]
-**change_utc8** | **str** | utc8 timezone, the percentage change in the last 24 hours | [optional]
-**base_volume** | **str** | Base currency trade volume in the last 24h | [optional]
-**quote_volume** | **str** | Quote currency trade volume in the last 24h | [optional]
-**high_24h** | **str** | Highest price in 24h | [optional]
-**low_24h** | **str** | Lowest price in 24h | [optional]
+**highest_size** | **str** | Latest buyer's highest price quantity; not available for batch queries; available for single queries, empty if no data | [optional]
+**change_percentage** | **str** | 24h price change percentage (negative for decrease, e.g., -7.45) | [optional]
+**change_utc0** | **str** | UTC+0 timezone, 24h price change percentage, negative for decline (e.g., -7.45) | [optional]
+**change_utc8** | **str** | UTC+8 timezone, 24h price change percentage, negative for decline (e.g., -7.45) | [optional]
+**base_volume** | **str** | Base currency trading volume in the last 24h | [optional]
+**quote_volume** | **str** | Quote currency trading volume in the last 24h | [optional]
+**high_24h** | **str** | 24h High | [optional]
+**low_24h** | **str** | 24h Low | [optional]
**etf_net_value** | **str** | ETF net value | [optional]
-**etf_pre_net_value** | **str** | ETF previous net value at re-balancing time | [optional]
-**etf_pre_timestamp** | **int** | ETF previous re-balancing time | [optional]
+**etf_pre_net_value** | **str** | ETF net value at previous rebalancing point | [optional]
+**etf_pre_timestamp** | **int** | ETF previous rebalancing time | [optional]
**etf_leverage** | **str** | ETF current leverage | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/TotalBalance.md b/docs/TotalBalance.md
index 91b929e..bead2e3 100644
--- a/docs/TotalBalance.md
+++ b/docs/TotalBalance.md
@@ -1,11 +1,11 @@
# TotalBalance
-User's balance in all accounts
+User's total balance information
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total** | [**AccountBalance**](AccountBalance.md) | | [optional]
-**details** | [**dict(str, AccountBalance)**](AccountBalance.md) | Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account | [optional]
+**details** | [**dict(str, AccountBalance)**](AccountBalance.md) | Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: perpetual contract account - delivery: delivery contract account - warrant: warrant account - cbbc: CBBC account | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/Trade.md b/docs/Trade.md
index c92282e..9fbf77f 100644
--- a/docs/Trade.md
+++ b/docs/Trade.md
@@ -3,20 +3,22 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**id** | **str** | Trade ID | [optional]
-**create_time** | **str** | Trading time | [optional]
+**id** | **str** | Fill ID | [optional]
+**create_time** | **str** | Fill Time | [optional]
**create_time_ms** | **str** | Trading time, with millisecond precision | [optional]
**currency_pair** | **str** | Currency pair | [optional]
-**side** | **str** | Order side | [optional]
-**role** | **str** | Trade role. No value in public endpoints | [optional]
+**side** | **str** | Buy or sell order | [optional]
+**role** | **str** | Trade role, not returned in public endpoints | [optional]
**amount** | **str** | Trade amount | [optional]
**price** | **str** | Order price | [optional]
-**order_id** | **str** | Related order ID. No value in public endpoints | [optional]
-**fee** | **str** | Fee deducted. No value in public endpoints | [optional]
-**fee_currency** | **str** | Fee currency unit. No value in public endpoints | [optional]
-**point_fee** | **str** | Points used to deduct fee. No value in public endpoints | [optional]
-**gt_fee** | **str** | GT used to deduct fee. No value in public endpoints | [optional]
+**order_id** | **str** | Related order ID, not returned in public endpoints | [optional]
+**fee** | **str** | Fee deducted, not returned in public endpoints | [optional]
+**fee_currency** | **str** | Fee currency unit, not returned in public endpoints | [optional]
+**point_fee** | **str** | Points used to deduct fee, not returned in public endpoints | [optional]
+**gt_fee** | **str** | GT used to deduct fee, not returned in public endpoints | [optional]
**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional]
+**sequence_id** | **str** | Consecutive trade ID within a single market. Used to track and identify trades in the specific market | [optional]
+**text** | **str** | User-defined information, not returned in public endpoints | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/TradeFee.md b/docs/TradeFee.md
index ba857bf..4914a3f 100644
--- a/docs/TradeFee.md
+++ b/docs/TradeFee.md
@@ -6,15 +6,16 @@ Name | Type | Description | Notes
**user_id** | **int** | User ID | [optional]
**taker_fee** | **str** | taker fee rate | [optional]
**maker_fee** | **str** | maker fee rate | [optional]
-**gt_discount** | **bool** | If GT deduction is enabled | [optional]
+**gt_discount** | **bool** | Whether GT deduction discount is enabled | [optional]
**gt_taker_fee** | **str** | Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional]
-**gt_maker_fee** | **str** | Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional]
+**gt_maker_fee** | **str** | Maker fee rate with GT deduction. Returns 0 if GT deduction is disabled | [optional]
**loan_fee** | **str** | Loan fee rate of margin lending | [optional]
-**point_type** | **str** | Point type. 0 - Initial version. 1 - new version since 202009 | [optional]
-**futures_taker_fee** | **str** | Futures trading taker fee | [optional]
-**futures_maker_fee** | **str** | Future trading maker fee | [optional]
-**delivery_taker_fee** | **str** | 交割合约 taker 费率 | [optional]
-**delivery_maker_fee** | **str** | 交割合约 maker 费率 | [optional]
+**point_type** | **str** | Point card type: 0 - Original version, 1 - New version since 202009 | [optional]
+**futures_taker_fee** | **str** | Perpetual contract taker fee rate | [optional]
+**futures_maker_fee** | **str** | Perpetual contract maker fee rate | [optional]
+**delivery_taker_fee** | **str** | Delivery contract taker fee rate | [optional]
+**delivery_maker_fee** | **str** | Delivery contract maker fee rate | [optional]
+**debit_fee** | **int** | Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/TransactionID.md b/docs/TransactionID.md
index 040c3c3..92a681e 100644
--- a/docs/TransactionID.md
+++ b/docs/TransactionID.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**tx_id** | **int** | Order id | [optional]
+**tx_id** | **int** | Order ID | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/Transfer.md b/docs/Transfer.md
index 5d76d32..bf9cac3 100644
--- a/docs/Transfer.md
+++ b/docs/Transfer.md
@@ -1,15 +1,15 @@
# Transfer
-Accounts available to transfer: - `spot`: spot account - `margin`: margin account - `futures`: perpetual futures account - `delivery`: delivery futures account - `cross_margin`: cross margin account - `options`: options account
+Accounts available to transfer: - `spot`: spot account - `margin`: margin account - `futures`: perpetual futures account - `delivery`: delivery futures account - `options`: options account
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**currency** | **str** | Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency |
+**currency** | **str** | Transfer currency name. For contract accounts, `currency` can be set to `POINT` (points) or supported settlement currencies (e.g., `BTC`, `USDT`) |
**_from** | **str** | Account to transfer from |
**to** | **str** | Account to transfer to |
**amount** | **str** | Transfer amount |
-**currency_pair** | **str** | Margin currency pair. Required if transfer from or to margin account | [optional]
-**settle** | **str** | Futures settle currency. Required if transferring from or to futures account | [optional]
+**currency_pair** | **str** | Margin trading pair. Required when transferring to or from margin account | [optional]
+**settle** | **str** | Contract settlement currency. Required when transferring to or from contract account | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/TransferOrderStatus.md b/docs/TransferOrderStatus.md
new file mode 100644
index 0000000..ff17da4
--- /dev/null
+++ b/docs/TransferOrderStatus.md
@@ -0,0 +1,11 @@
+# TransferOrderStatus
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**tx_id** | **str** | Order ID | [optional]
+**status** | **str** | Transfer status: PENDING - Processing, SUCCESS - Transfer successful, FAIL - Transfer failed, PARTIAL_SUCCESS - Partially successful (this status appears when transferring between sub-accounts) | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MarginBorrowable.md b/docs/TransferablesResult.md
similarity index 69%
rename from docs/MarginBorrowable.md
rename to docs/TransferablesResult.md
index 6cd64a5..87b8b07 100644
--- a/docs/MarginBorrowable.md
+++ b/docs/TransferablesResult.md
@@ -1,11 +1,11 @@
-# MarginBorrowable
+# TransferablesResult
+Batch query unified account maximum transferable results
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Currency detail | [optional]
-**currency_pair** | **str** | Currency pair | [optional]
-**amount** | **str** | Max borrowable amount | [optional]
+**amount** | **str** | Maximum transferable amount | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/TriggerTime.md b/docs/TriggerTime.md
index 702ff62..a1e5d05 100644
--- a/docs/TriggerTime.md
+++ b/docs/TriggerTime.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**trigger_time** | **int** | Timestamp of the end of the countdown, in milliseconds | [optional]
+**trigger_time** | **int** | Timestamp when countdown ends, in milliseconds | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UidPushOrder.md b/docs/UidPushOrder.md
new file mode 100644
index 0000000..25eb840
--- /dev/null
+++ b/docs/UidPushOrder.md
@@ -0,0 +1,18 @@
+# UidPushOrder
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | Order ID | [optional]
+**push_uid** | **int** | Initiator User ID | [optional]
+**receive_uid** | **int** | Recipient User ID | [optional]
+**currency** | **str** | Currency name | [optional]
+**amount** | **str** | Transfer amount | [optional]
+**create_time** | **int** | Created time | [optional]
+**status** | **str** | Withdrawal status: - CREATING: Creating - PENDING: Waiting for recipient (Please contact the recipient to accept the transfer on Gate official website) - CANCELLING: Cancelling - CANCELLED: Cancelled - REFUSING: Refusing - REFUSED: Refused - RECEIVING: Receiving - RECEIVED: Success | [optional]
+**message** | **str** | PENDING reason tips | [optional]
+**transaction_type** | **str** | Order Type | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UidPushWithdrawal.md b/docs/UidPushWithdrawal.md
new file mode 100644
index 0000000..2510006
--- /dev/null
+++ b/docs/UidPushWithdrawal.md
@@ -0,0 +1,12 @@
+# UidPushWithdrawal
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**receive_uid** | **int** | Recipient UID |
+**currency** | **str** | Currency name |
+**amount** | **str** | Transfer amount |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UidPushWithdrawalResp.md b/docs/UidPushWithdrawalResp.md
new file mode 100644
index 0000000..5363c0f
--- /dev/null
+++ b/docs/UidPushWithdrawalResp.md
@@ -0,0 +1,10 @@
+# UidPushWithdrawalResp
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | Order ID | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UniCurrency.md b/docs/UniCurrency.md
index 6810b7e..02ea971 100644
--- a/docs/UniCurrency.md
+++ b/docs/UniCurrency.md
@@ -5,7 +5,7 @@ Currency detail
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Currency name | [optional] [readonly]
-**min_lend_amount** | **str** | The minimum lending amount, in the unit of the currency. | [optional] [readonly]
+**min_lend_amount** | **str** | The minimum lending amount, in the unit of the currency | [optional] [readonly]
**max_lend_amount** | **str** | The total maximum lending amount, in USDT | [optional] [readonly]
**max_rate** | **str** | Maximum rate (Hourly) | [optional] [readonly]
**min_rate** | **str** | Minimum rate (Hourly) | [optional] [readonly]
diff --git a/docs/UniCurrencyInterest.md b/docs/UniCurrencyInterest.md
new file mode 100644
index 0000000..96c01fc
--- /dev/null
+++ b/docs/UniCurrencyInterest.md
@@ -0,0 +1,11 @@
+# UniCurrencyInterest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency | [optional] [readonly]
+**interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment | [optional] [readonly]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UniInterestRecord.md b/docs/UniInterestRecord.md
index 6fbda9b..9486ec0 100644
--- a/docs/UniInterestRecord.md
+++ b/docs/UniInterestRecord.md
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
**currency** | **str** | Currency | [optional] [readonly]
**actual_rate** | **str** | Actual Rate | [optional] [readonly]
**interest** | **str** | Interest | [optional] [readonly]
+**interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment | [optional] [readonly]
**create_time** | **int** | Created time | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UniLend.md b/docs/UniLend.md
index 988d01b..7080ac5 100644
--- a/docs/UniLend.md
+++ b/docs/UniLend.md
@@ -6,12 +6,14 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Currency | [optional] [readonly]
**current_amount** | **str** | Current amount | [optional] [readonly]
-**amount** | **str** | Total amount | [optional] [readonly]
-**lent_amount** | **str** | Lent amount | [optional] [readonly]
-**frozen_amount** | **str** | Frozen amount | [optional] [readonly]
+**amount** | **str** | Total Lending Amount | [optional] [readonly]
+**lent_amount** | **str** | Lent Amount | [optional] [readonly]
+**frozen_amount** | **str** | Pending Redemption Amount | [optional] [readonly]
**min_rate** | **str** | Minimum interest rate | [optional] [readonly]
-**create_time** | **int** | Created time of the lending order | [optional] [readonly]
-**update_time** | **int** | Upated time of the lending order | [optional] [readonly]
+**interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment | [optional] [readonly]
+**reinvest_left_amount** | **str** | Non-reinvested Amount | [optional] [readonly]
+**create_time** | **int** | Lending Order Creation Time | [optional] [readonly]
+**update_time** | **int** | Lending Order Last Update Time | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UniLendInterest.md b/docs/UniLendInterest.md
index 18a0815..899acfb 100644
--- a/docs/UniLendInterest.md
+++ b/docs/UniLendInterest.md
@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Currency | [optional] [readonly]
-**interest** | **str** | Interest | [optional] [readonly]
+**interest** | **str** | Interest income | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UniLendRecord.md b/docs/UniLendRecord.md
index 294f6d8..39c187a 100644
--- a/docs/UniLendRecord.md
+++ b/docs/UniLendRecord.md
@@ -1,15 +1,15 @@
# UniLendRecord
-Interest Record
+Lending Record
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Currency name | [optional] [readonly]
-**amount** | **str** | current amount | [optional] [readonly]
-**last_wallet_amount** | **str** | Last wallet amount | [optional] [readonly]
-**last_lent_amount** | **str** | Last lent amount | [optional] [readonly]
-**last_frozen_amount** | **str** | Last frozen amount | [optional] [readonly]
-**type** | **str** | Record type: lend - lend, redeem - redeem | [optional] [readonly]
+**amount** | **str** | Current Amount | [optional] [readonly]
+**last_wallet_amount** | **str** | Previous Available Amount | [optional] [readonly]
+**last_lent_amount** | **str** | Previous Lent Amount | [optional] [readonly]
+**last_frozen_amount** | **str** | Previous Frozen Amount | [optional] [readonly]
+**type** | **str** | Record Type: lend - Lend, redeem - Redeem | [optional] [readonly]
**create_time** | **int** | Created time | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UniLoan.md b/docs/UniLoan.md
index f378f97..6293d5f 100644
--- a/docs/UniLoan.md
+++ b/docs/UniLoan.md
@@ -1,14 +1,15 @@
# UniLoan
-Loan
+Borrowing
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Currency | [optional] [readonly]
**currency_pair** | **str** | Currency pair | [optional] [readonly]
-**amount** | **str** | amount | [optional] [readonly]
+**amount** | **str** | Amount to Repay | [optional] [readonly]
+**type** | **str** | Loan type: platform borrowing - platform, margin borrowing - margin | [optional] [readonly]
**create_time** | **int** | Created time | [optional] [readonly]
-**update_time** | **int** | Updated time | [optional] [readonly]
+**update_time** | **int** | Last Update Time | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UniLoanInterestRecord.md b/docs/UniLoanInterestRecord.md
index 9768063..e93539b 100644
--- a/docs/UniLoanInterestRecord.md
+++ b/docs/UniLoanInterestRecord.md
@@ -1,14 +1,15 @@
# UniLoanInterestRecord
-Interest record
+Interest Deduction Record
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Currency name | [optional] [readonly]
**currency_pair** | **str** | Currency pair | [optional] [readonly]
-**actual_rate** | **str** | Actual rate | [optional] [readonly]
+**actual_rate** | **str** | Actual Rate | [optional] [readonly]
**interest** | **str** | Interest | [optional] [readonly]
**status** | **int** | Status: 0 - fail, 1 - success | [optional] [readonly]
+**type** | **str** | Type: platform - Platform borrowing, margin - Margin borrowing | [optional] [readonly]
**create_time** | **int** | Created time | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UniLoanRecord.md b/docs/UniLoanRecord.md
index 93fd89e..b34be2c 100644
--- a/docs/UniLoanRecord.md
+++ b/docs/UniLoanRecord.md
@@ -1,13 +1,13 @@
# UniLoanRecord
-Loan records
+Borrowing Records
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**type** | **str** | type: borrow - borrow, repay - repay | [optional] [readonly]
+**type** | **str** | Type: `borrow` - borrow, `repay` - repay | [optional] [readonly]
**currency_pair** | **str** | Currency pair | [optional] [readonly]
**currency** | **str** | Currency | [optional] [readonly]
-**amount** | **str** | The amount of lending or repaying | [optional] [readonly]
+**amount** | **str** | Borrow or repayment amount | [optional] [readonly]
**create_time** | **int** | Created time | [optional] [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UnifiedAccount.md b/docs/UnifiedAccount.md
new file mode 100644
index 0000000..4d2d24b
--- /dev/null
+++ b/docs/UnifiedAccount.md
@@ -0,0 +1,29 @@
+# UnifiedAccount
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**user_id** | **int** | User ID | [optional]
+**refresh_time** | **int** | Last refresh time | [optional]
+**locked** | **bool** | Whether the account is locked, valid in cross-currency margin/combined margin mode, false in other modes such as single-currency margin mode | [optional]
+**balances** | [**dict(str, UnifiedBalance)**](UnifiedBalance.md) | | [optional]
+**total** | **str** | Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be removed, replaced by unified_account_total) | [optional]
+**borrowed** | **str** | Total borrowed amount converted to USD, i.e. the sum of `borrowed * price` of all currencies (excluding point cards), valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional]
+**total_initial_margin** | **str** | Total initial margin, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional]
+**total_margin_balance** | **str** | Total margin balance, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional]
+**total_maintenance_margin** | **str** | Total maintenance margin is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode | [optional]
+**total_initial_margin_rate** | **str** | Total initial margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional]
+**total_maintenance_margin_rate** | **str** | Total maintenance margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional]
+**total_available_margin** | **str** | Available margin amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional]
+**unified_account_total** | **str** | Total unified account assets, valid in single currency margin/cross-currency margin/combined margin mode | [optional]
+**unified_account_total_liab** | **str** | Total unified account borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional]
+**unified_account_total_equity** | **str** | Total unified account equity, valid in single currency margin/cross-currency margin/combined margin mode | [optional]
+**leverage** | **str** | Actual leverage ratio, valid in cross-currency margin/combined margin mode | [optional] [readonly]
+**spot_order_loss** | **str** | Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional]
+**spot_hedge** | **bool** | Spot hedging status: true - enabled, false - disabled | [optional]
+**use_funding** | **bool** | Whether to use Earn funds as margin | [optional]
+**is_all_collateral** | **bool** | Whether all currencies are used as margin: true - all currencies as margin, false - no | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedApi.md b/docs/UnifiedApi.md
new file mode 100644
index 0000000..5c23e08
--- /dev/null
+++ b/docs/UnifiedApi.md
@@ -0,0 +1,1487 @@
+# gate_api.UnifiedApi
+
+All URIs are relative to *https://api.gateio.ws/api/v4*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**list_unified_accounts**](UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information
+[**get_unified_borrowable**](UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query maximum borrowable amount for unified account
+[**get_unified_transferable**](UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query maximum transferable amount for unified account
+[**get_unified_transferables**](UnifiedApi.md#get_unified_transferables) | **GET** /unified/transferables | Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change
+[**get_unified_borrowable_list**](UnifiedApi.md#get_unified_borrowable_list) | **GET** /unified/batch_borrowable | Batch query unified account maximum borrowable amount
+[**list_unified_loans**](UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | Query loans
+[**create_unified_loan**](UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay
+[**list_unified_loan_records**](UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Query loan records
+[**list_unified_loan_interest_records**](UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | Query interest deduction records
+[**get_unified_risk_units**](UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details
+[**get_unified_mode**](UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account
+[**set_unified_mode**](UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set unified account mode
+[**get_unified_estimate_rate**](UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Query unified account estimated interest rate
+[**list_currency_discount_tiers**](UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | Query unified account tiered
+[**list_loan_margin_tiers**](UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | Query unified account tiered loan margin
+[**calculate_portfolio_margin**](UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator
+[**get_user_leverage_currency_config**](UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | Maximum and minimum currency leverage that can be set
+[**get_user_leverage_currency_setting**](UnifiedApi.md#get_user_leverage_currency_setting) | **GET** /unified/leverage/user_currency_setting | Get user currency leverage
+[**set_user_leverage_currency_setting**](UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set loan currency leverage
+[**list_unified_currencies**](UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account
+[**get_history_loan_rate**](UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | Get historical lending rates
+[**set_unified_collateral**](UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | Set collateral currency
+
+
+# **list_unified_accounts**
+> UnifiedAccount list_unified_accounts(currency=currency, sub_uid=sub_uid)
+
+Get unified account information
+
+The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. For specific formulas, please refer to [Margin Formula](#margin-formula)
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+currency = 'BTC' # str | Query by specified currency name (optional)
+sub_uid = '10001' # str | Sub account user ID (optional)
+
+try:
+ # Get unified account information
+ api_response = api_instance.list_unified_accounts(currency=currency, sub_uid=sub_uid)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->list_unified_accounts: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currency** | **str**| Query by specified currency name | [optional]
+ **sub_uid** | **str**| Sub account user ID | [optional]
+
+### Return type
+
+[**UnifiedAccount**](UnifiedAccount.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | List retrieved successfully | - |
+
+[[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)
+
+# **get_unified_borrowable**
+> UnifiedBorrowable get_unified_borrowable(currency)
+
+Query maximum borrowable amount for unified account
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+currency = 'BTC' # str | Query by specified currency name
+
+try:
+ # Query maximum borrowable amount for unified account
+ api_response = api_instance.get_unified_borrowable(currency)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->get_unified_borrowable: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currency** | **str**| Query by specified currency name |
+
+### Return type
+
+[**UnifiedBorrowable**](UnifiedBorrowable.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **get_unified_transferable**
+> UnifiedTransferable get_unified_transferable(currency)
+
+Query maximum transferable amount for unified account
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+currency = 'BTC' # str | Query by specified currency name
+
+try:
+ # Query maximum transferable amount for unified account
+ api_response = api_instance.get_unified_transferable(currency)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->get_unified_transferable: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currency** | **str**| Query by specified currency name |
+
+### Return type
+
+[**UnifiedTransferable**](UnifiedTransferable.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **get_unified_transferables**
+> list[TransferablesResult] get_unified_transferables(currencies)
+
+Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+currencies = 'BTC,ETH' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time
+
+try:
+ # Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change
+ api_response = api_instance.get_unified_transferables(currencies)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->get_unified_transferables: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currencies** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time |
+
+### Return type
+
+[**list[TransferablesResult]**](TransferablesResult.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **get_unified_borrowable_list**
+> list[UnifiedBorrowable1] get_unified_borrowable_list(currencies)
+
+Batch query unified account maximum borrowable amount
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify currency names for querying in an array, separated by commas, maximum 10 currencies
+
+try:
+ # Batch query unified account maximum borrowable amount
+ api_response = api_instance.get_unified_borrowable_list(currencies)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->get_unified_borrowable_list: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currencies** | [**list[str]**](str.md)| Specify currency names for querying in an array, separated by commas, maximum 10 currencies |
+
+### Return type
+
+[**list[UnifiedBorrowable1]**](UnifiedBorrowable1.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **list_unified_loans**
+> list[UniLoan] list_unified_loans(currency=currency, page=page, limit=limit, type=type)
+
+Query loans
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+currency = 'BTC' # str | Query by specified currency name (optional)
+page = 1 # int | Page number (optional) (default to 1)
+limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100)
+type = 'platform' # str | Loan type: platform borrowing - platform, margin borrowing - margin (optional)
+
+try:
+ # Query loans
+ api_response = api_instance.list_unified_loans(currency=currency, page=page, limit=limit, type=type)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->list_unified_loans: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currency** | **str**| Query by specified currency name | [optional]
+ **page** | **int**| Page number | [optional] [default to 1]
+ **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100]
+ **type** | **str**| Loan type: platform borrowing - platform, margin borrowing - margin | [optional]
+
+### Return type
+
+[**list[UniLoan]**](UniLoan.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **create_unified_loan**
+> UnifiedLoanResult create_unified_loan(unified_loan)
+
+Borrow or repay
+
+When borrowing, ensure the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and user. Loan interest will be automatically deducted from the account at regular intervals. Users are responsible for managing repayment of borrowed amounts. For repayment, use `repaid_all=true` to repay all available amounts
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+unified_loan = gate_api.UnifiedLoan() # UnifiedLoan |
+
+try:
+ # Borrow or repay
+ api_response = api_instance.create_unified_loan(unified_loan)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->create_unified_loan: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **unified_loan** | [**UnifiedLoan**](UnifiedLoan.md)| |
+
+### Return type
+
+[**UnifiedLoanResult**](UnifiedLoanResult.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Operation successful | - |
+
+[[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)
+
+# **list_unified_loan_records**
+> list[UnifiedLoanRecord] list_unified_loan_records(type=type, currency=currency, page=page, limit=limit)
+
+Query loan records
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+type = 'type_example' # str | Loan record type: borrow - borrowing, repay - repayment (optional)
+currency = 'BTC' # str | Query by specified currency name (optional)
+page = 1 # int | Page number (optional) (default to 1)
+limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100)
+
+try:
+ # Query loan records
+ api_response = api_instance.list_unified_loan_records(type=type, currency=currency, page=page, limit=limit)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->list_unified_loan_records: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **type** | **str**| Loan record type: borrow - borrowing, repay - repayment | [optional]
+ **currency** | **str**| Query by specified currency name | [optional]
+ **page** | **int**| Page number | [optional] [default to 1]
+ **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100]
+
+### Return type
+
+[**list[UnifiedLoanRecord]**](UnifiedLoanRecord.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **list_unified_loan_interest_records**
+> list[UniLoanInterestRecord] list_unified_loan_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type)
+
+Query interest deduction records
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+currency = 'BTC' # str | Query by specified currency name (optional)
+page = 1 # int | Page number (optional) (default to 1)
+limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100)
+_from = 1627706330 # int | Start timestamp for the query (optional)
+to = 1635329650 # int | End timestamp for the query, defaults to current time if not specified (optional)
+type = 'platform' # str | Loan type: platform borrowing - platform, margin borrowing - margin. Defaults to margin if not specified (optional)
+
+try:
+ # Query interest deduction records
+ api_response = api_instance.list_unified_loan_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->list_unified_loan_interest_records: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currency** | **str**| Query by specified currency name | [optional]
+ **page** | **int**| Page number | [optional] [default to 1]
+ **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100]
+ **_from** | **int**| Start timestamp for the query | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+ **type** | **str**| Loan type: platform borrowing - platform, margin borrowing - margin. Defaults to margin if not specified | [optional]
+
+### Return type
+
+[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **get_unified_risk_units**
+> UnifiedRiskUnits get_unified_risk_units()
+
+Get user risk unit details
+
+Get user risk unit details, only valid in portfolio margin mode
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+
+try:
+ # Get user risk unit details
+ api_response = api_instance.get_unified_risk_units()
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->get_unified_risk_units: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**UnifiedRiskUnits**](UnifiedRiskUnits.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **get_unified_mode**
+> UnifiedModeSet get_unified_mode()
+
+Query mode of the unified account
+
+Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+
+try:
+ # Query mode of the unified account
+ api_response = api_instance.get_unified_mode()
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->get_unified_mode: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**UnifiedModeSet**](UnifiedModeSet.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **set_unified_mode**
+> set_unified_mode(unified_mode_set)
+
+Set unified account mode
+
+Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ```
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+unified_mode_set = gate_api.UnifiedModeSet() # UnifiedModeSet |
+
+try:
+ # Set unified account mode
+ api_instance.set_unified_mode(unified_mode_set)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->set_unified_mode: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **unified_mode_set** | [**UnifiedModeSet**](UnifiedModeSet.md)| |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**204** | Set successfully | - |
+
+[[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)
+
+# **get_unified_estimate_rate**
+> dict(str, str) get_unified_estimate_rate(currencies)
+
+Query unified account estimated interest rate
+
+Interest rates fluctuate hourly based on lending depth, so exact rates cannot be provided. When a currency is not supported, the interest rate returned will be an empty string
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify currency names for querying in an array, separated by commas, maximum 10 currencies
+
+try:
+ # Query unified account estimated interest rate
+ api_response = api_instance.get_unified_estimate_rate(currencies)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->get_unified_estimate_rate: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currencies** | [**list[str]**](str.md)| Specify currency names for querying in an array, separated by commas, maximum 10 currencies |
+
+### Return type
+
+**dict(str, str)**
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **list_currency_discount_tiers**
+> list[UnifiedDiscount] list_currency_discount_tiers()
+
+Query unified account tiered
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+
+try:
+ # Query unified account tiered
+ api_response = api_instance.list_currency_discount_tiers()
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->list_currency_discount_tiers: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**list[UnifiedDiscount]**](UnifiedDiscount.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **list_loan_margin_tiers**
+> list[UnifiedMarginTiers] list_loan_margin_tiers()
+
+Query unified account tiered loan margin
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+
+try:
+ # Query unified account tiered loan margin
+ api_response = api_instance.list_loan_margin_tiers()
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->list_loan_margin_tiers: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**list[UnifiedMarginTiers]**](UnifiedMarginTiers.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **calculate_portfolio_margin**
+> UnifiedPortfolioOutput calculate_portfolio_margin(unified_portfolio_input)
+
+Portfolio margin calculator
+
+Portfolio Margin Calculator When inputting simulated position portfolios, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included.
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+unified_portfolio_input = gate_api.UnifiedPortfolioInput() # UnifiedPortfolioInput |
+
+try:
+ # Portfolio margin calculator
+ api_response = api_instance.calculate_portfolio_margin(unified_portfolio_input)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->calculate_portfolio_margin: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **unified_portfolio_input** | [**UnifiedPortfolioInput**](UnifiedPortfolioInput.md)| |
+
+### Return type
+
+[**UnifiedPortfolioOutput**](UnifiedPortfolioOutput.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **get_user_leverage_currency_config**
+> UnifiedLeverageConfig get_user_leverage_currency_config(currency)
+
+Maximum and minimum currency leverage that can be set
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+currency = 'BTC' # str | Currency
+
+try:
+ # Maximum and minimum currency leverage that can be set
+ api_response = api_instance.get_user_leverage_currency_config(currency)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->get_user_leverage_currency_config: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currency** | **str**| Currency |
+
+### Return type
+
+[**UnifiedLeverageConfig**](UnifiedLeverageConfig.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **get_user_leverage_currency_setting**
+> list[UnifiedLeverageSetting] get_user_leverage_currency_setting(currency=currency)
+
+Get user currency leverage
+
+Get user currency leverage. If currency is not specified, query all currencies
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+currency = 'BTC' # str | Currency (optional)
+
+try:
+ # Get user currency leverage
+ api_response = api_instance.get_user_leverage_currency_setting(currency=currency)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->get_user_leverage_currency_setting: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currency** | **str**| Currency | [optional]
+
+### Return type
+
+[**list[UnifiedLeverageSetting]**](UnifiedLeverageSetting.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **set_user_leverage_currency_setting**
+> set_user_leverage_currency_setting(unified_leverage_setting)
+
+Set loan currency leverage
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+unified_leverage_setting = gate_api.UnifiedLeverageSetting() # UnifiedLeverageSetting |
+
+try:
+ # Set loan currency leverage
+ api_instance.set_user_leverage_currency_setting(unified_leverage_setting)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->set_user_leverage_currency_setting: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **unified_leverage_setting** | [**UnifiedLeverageSetting**](UnifiedLeverageSetting.md)| |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**204** | Set successfully | - |
+
+[[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)
+
+# **list_unified_currencies**
+> list[UnifiedCurrency] list_unified_currencies(currency=currency)
+
+List of loan currencies supported by unified account
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+currency = 'BTC' # str | Currency (optional)
+
+try:
+ # List of loan currencies supported by unified account
+ api_response = api_instance.list_unified_currencies(currency=currency)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->list_unified_currencies: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currency** | **str**| Currency | [optional]
+
+### Return type
+
+[**list[UnifiedCurrency]**](UnifiedCurrency.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | List retrieved successfully | - |
+
+[[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)
+
+# **get_history_loan_rate**
+> UnifiedHistoryLoanRate get_history_loan_rate(currency, tier=tier, page=page, limit=limit)
+
+Get historical lending rates
+
+### Example
+
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+currency = 'USDT' # str | Currency
+tier = '1' # str | VIP level for the floating rate to be queried (optional)
+page = 1 # int | Page number (optional) (default to 1)
+limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100)
+
+try:
+ # Get historical lending rates
+ api_response = api_instance.get_history_loan_rate(currency, tier=tier, page=page, limit=limit)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->get_history_loan_rate: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currency** | **str**| Currency |
+ **tier** | **str**| VIP level for the floating rate to be queried | [optional]
+ **page** | **int**| Page number | [optional] [default to 1]
+ **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100]
+
+### Return type
+
+[**UnifiedHistoryLoanRate**](UnifiedHistoryLoanRate.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Query successful | - |
+
+[[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)
+
+# **set_unified_collateral**
+> UnifiedCollateralRes set_unified_collateral(unified_collateral_req)
+
+Set collateral currency
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.UnifiedApi(api_client)
+unified_collateral_req = gate_api.UnifiedCollateralReq() # UnifiedCollateralReq |
+
+try:
+ # Set collateral currency
+ api_response = api_instance.set_unified_collateral(unified_collateral_req)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling UnifiedApi->set_unified_collateral: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **unified_collateral_req** | [**UnifiedCollateralReq**](UnifiedCollateralReq.md)| |
+
+### Return type
+
+[**UnifiedCollateralRes**](UnifiedCollateralRes.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Updated successfully | - |
+
+[[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)
+
diff --git a/docs/UnifiedBalance.md b/docs/UnifiedBalance.md
new file mode 100644
index 0000000..748cf98
--- /dev/null
+++ b/docs/UnifiedBalance.md
@@ -0,0 +1,29 @@
+# UnifiedBalance
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**available** | **str** | Available balance, valid in single currency margin/cross-currency margin/combined margin mode, calculation varies by mode | [optional]
+**freeze** | **str** | Locked balance, valid in single currency margin/cross-currency margin/combined margin mode | [optional]
+**borrowed** | **str** | Borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional]
+**negative_liab** | **str** | Negative balance borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional]
+**futures_pos_liab** | **str** | Contract opening position borrowing currency (abandoned, to be offline field) | [optional]
+**equity** | **str** | Equity, valid in single currency margin/cross currency margin/combined margin mode | [optional]
+**total_freeze** | **str** | Total frozen (deprecated, to be removed) | [optional]
+**total_liab** | **str** | Total borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional]
+**spot_in_use** | **str** | The amount of spot hedging is valid in the combined margin mode, and is 0 in other margin modes such as single currency and cross-currency margin modes | [optional]
+**funding** | **str** | Uniloan financial management amount, effective when turned on as a unified account margin switch | [optional]
+**funding_version** | **str** | Funding version | [optional]
+**cross_balance** | **str** | Full margin balance is valid in single currency margin mode, and is 0 in other modes such as cross currency margin/combined margin mode | [optional]
+**iso_balance** | **str** | Isolated margin balance is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional]
+**im** | **str** | Full-position initial margin is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional]
+**mm** | **str** | Cross margin maintenance margin, valid in single-currency margin mode, 0 in other modes such as cross-currency margin/combined margin mode | [optional]
+**imr** | **str** | Full-position initial margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional]
+**mmr** | **str** | Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional]
+**margin_balance** | **str** | Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode | [optional]
+**available_margin** | **str** | Cross margin available balance, valid in single currency margin mode, 0 in other modes such as cross-currency margin/combined margin mode | [optional]
+**enabled_collateral** | **bool** | Currency enabled as margin: true - Enabled, false - Disabled | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PortfolioBorrowable.md b/docs/UnifiedBorrowable.md
similarity index 94%
rename from docs/PortfolioBorrowable.md
rename to docs/UnifiedBorrowable.md
index f72fbd1..edd2c95 100644
--- a/docs/PortfolioBorrowable.md
+++ b/docs/UnifiedBorrowable.md
@@ -1,4 +1,4 @@
-# PortfolioBorrowable
+# UnifiedBorrowable
## Properties
Name | Type | Description | Notes
diff --git a/docs/CrossMarginBorrowable.md b/docs/UnifiedBorrowable1.md
similarity index 70%
rename from docs/CrossMarginBorrowable.md
rename to docs/UnifiedBorrowable1.md
index cf7bc24..81b38b3 100644
--- a/docs/CrossMarginBorrowable.md
+++ b/docs/UnifiedBorrowable1.md
@@ -1,10 +1,11 @@
-# CrossMarginBorrowable
+# UnifiedBorrowable1
+Batch query unified account maximum borrowable results
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Currency detail | [optional]
-**amount** | **str** | Max borrowable amount | [optional]
+**amount** | **str** | Maximum borrowable amount | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UnifiedCollateralReq.md b/docs/UnifiedCollateralReq.md
new file mode 100644
index 0000000..fc1976a
--- /dev/null
+++ b/docs/UnifiedCollateralReq.md
@@ -0,0 +1,12 @@
+# UnifiedCollateralReq
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**collateral_type** | **int** | User-set collateral mode: 0(all)-All currencies as collateral, 1(custom)-Custom currencies as collateral. When collateral_type is 0(all), enable_list and disable_list parameters are invalid | [optional]
+**enable_list** | **list[str]** | Currency list, where collateral_type=1(custom) indicates the addition logic | [optional]
+**disable_list** | **list[str]** | Disable list, indicating the disable logic | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedCollateralRes.md b/docs/UnifiedCollateralRes.md
new file mode 100644
index 0000000..7432c38
--- /dev/null
+++ b/docs/UnifiedCollateralRes.md
@@ -0,0 +1,11 @@
+# UnifiedCollateralRes
+
+Unified account collateral mode settings response
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**is_success** | **bool** | Whether the setting was successful | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedCurrency.md b/docs/UnifiedCurrency.md
new file mode 100644
index 0000000..db33f77
--- /dev/null
+++ b/docs/UnifiedCurrency.md
@@ -0,0 +1,15 @@
+# UnifiedCurrency
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | Currency name | [optional]
+**prec** | **str** | Currency precision | [optional]
+**min_borrow_amount** | **str** | Minimum borrowable limit, in currency units | [optional]
+**user_max_borrow_amount** | **str** | User's maximum borrowable limit, in USDT | [optional]
+**total_max_borrow_amount** | **str** | Platform's maximum borrowable limit, in USDT | [optional]
+**loan_status** | **str** | Lending status - `disable` : Lending prohibited - `enable` : Lending supported | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedDiscount.md b/docs/UnifiedDiscount.md
new file mode 100644
index 0000000..a242849
--- /dev/null
+++ b/docs/UnifiedDiscount.md
@@ -0,0 +1,12 @@
+# UnifiedDiscount
+
+Unified account tiered discount
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency name | [optional]
+**discount_tiers** | [**list[UnifiedDiscountTiers]**](UnifiedDiscountTiers.md) | Tiered discount | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedDiscountTiers.md b/docs/UnifiedDiscountTiers.md
new file mode 100644
index 0000000..ba78cc7
--- /dev/null
+++ b/docs/UnifiedDiscountTiers.md
@@ -0,0 +1,14 @@
+# UnifiedDiscountTiers
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**tier** | **str** | Tier | [optional]
+**discount** | **str** | Discount | [optional]
+**lower_limit** | **str** | Lower limit | [optional]
+**upper_limit** | **str** | Upper limit, + indicates positive infinity | [optional]
+**leverage** | **str** | Position leverage | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedHistoryLoanRate.md b/docs/UnifiedHistoryLoanRate.md
new file mode 100644
index 0000000..4414cf5
--- /dev/null
+++ b/docs/UnifiedHistoryLoanRate.md
@@ -0,0 +1,13 @@
+# UnifiedHistoryLoanRate
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency name | [optional]
+**tier** | **str** | VIP level for the floating rate to be retrieved | [optional]
+**tier_up_rate** | **str** | Floating rate corresponding to VIP level | [optional]
+**rates** | [**list[UnifiedHistoryLoanRateRates]**](UnifiedHistoryLoanRateRates.md) | Historical interest rate information, one data point per hour, array size determined by page and limit parameters from the API request, sorted by time from recent to distant | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedHistoryLoanRateRates.md b/docs/UnifiedHistoryLoanRateRates.md
new file mode 100644
index 0000000..2cc9c85
--- /dev/null
+++ b/docs/UnifiedHistoryLoanRateRates.md
@@ -0,0 +1,11 @@
+# UnifiedHistoryLoanRateRates
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**time** | **int** | Hourly timestamp corresponding to this interest rate, in milliseconds | [optional]
+**rate** | **str** | Historical interest rate for this hour | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedLeverageConfig.md b/docs/UnifiedLeverageConfig.md
new file mode 100644
index 0000000..4f70f0d
--- /dev/null
+++ b/docs/UnifiedLeverageConfig.md
@@ -0,0 +1,16 @@
+# UnifiedLeverageConfig
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**current_leverage** | **str** | Current leverage ratio | [optional]
+**min_leverage** | **str** | Minimum adjustable leverage ratio | [optional]
+**max_leverage** | **str** | Maximum adjustable leverage ratio | [optional]
+**debit** | **str** | Current liabilities | [optional]
+**available_margin** | **str** | Available Margin | [optional]
+**borrowable** | **str** | Maximum borrowable amount at current leverage | [optional]
+**except_leverage_borrowable** | **str** | Maximum borrowable from margin and maximum borrowable from Earn, whichever is smaller | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedLeverageSetting.md b/docs/UnifiedLeverageSetting.md
new file mode 100644
index 0000000..63a8b10
--- /dev/null
+++ b/docs/UnifiedLeverageSetting.md
@@ -0,0 +1,12 @@
+# UnifiedLeverageSetting
+
+Leverage multiplier for borrowing currency
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency name |
+**leverage** | **str** | Multiplier |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PortfolioLoan.md b/docs/UnifiedLoan.md
similarity index 53%
rename from docs/PortfolioLoan.md
rename to docs/UnifiedLoan.md
index ee75044..0f950f3 100644
--- a/docs/PortfolioLoan.md
+++ b/docs/UnifiedLoan.md
@@ -1,13 +1,13 @@
-# PortfolioLoan
+# UnifiedLoan
Borrow or repay
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Currency |
-**type** | **str** | type: borrow - borrow, repay - repay |
-**amount** | **str** | The amount of lending or repaying |
-**repaid_all** | **bool** | Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. | [optional]
+**type** | **str** | Type: `borrow` - borrow, `repay` - repay |
+**amount** | **str** | Borrow or repayment amount |
+**repaid_all** | **bool** | Full repayment, only used for repayment operations. When set to `true`, overrides `amount` and directly repays the full amount | [optional]
**text** | **str** | User defined custom ID | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UnifiedLoanRecord.md b/docs/UnifiedLoanRecord.md
new file mode 100644
index 0000000..29d2159
--- /dev/null
+++ b/docs/UnifiedLoanRecord.md
@@ -0,0 +1,18 @@
+# UnifiedLoanRecord
+
+Borrowing Records
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | ID | [optional] [readonly]
+**type** | **str** | Type: `borrow` - borrow, `repay` - repay | [optional] [readonly]
+**repayment_type** | **str** | Repayment type: none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after order cancellation, different_currencies_repayment - Cross-currency repayment | [optional] [readonly]
+**borrow_type** | **str** | Borrowing type, returned when querying loan records: manual_borrow - Manual borrowing, auto_borrow - Automatic borrowing | [optional]
+**currency_pair** | **str** | Currency pair | [optional] [readonly]
+**currency** | **str** | Currency | [optional] [readonly]
+**amount** | **str** | Borrow or repayment amount | [optional] [readonly]
+**create_time** | **int** | Created time | [optional] [readonly]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedLoanResult.md b/docs/UnifiedLoanResult.md
new file mode 100644
index 0000000..8db1d72
--- /dev/null
+++ b/docs/UnifiedLoanResult.md
@@ -0,0 +1,11 @@
+# UnifiedLoanResult
+
+Unified account borrowing and repayment response result
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**tran_id** | **int** | Transaction ID | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedMarginTiers.md b/docs/UnifiedMarginTiers.md
new file mode 100644
index 0000000..2f2cad9
--- /dev/null
+++ b/docs/UnifiedMarginTiers.md
@@ -0,0 +1,12 @@
+# UnifiedMarginTiers
+
+Unified account borrowing margin tiers
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currency** | **str** | Currency name | [optional]
+**margin_tiers** | [**list[MarginTiers]**](MarginTiers.md) | Tiered margin | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedModeSet.md b/docs/UnifiedModeSet.md
new file mode 100644
index 0000000..bdfbaa0
--- /dev/null
+++ b/docs/UnifiedModeSet.md
@@ -0,0 +1,11 @@
+# UnifiedModeSet
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**mode** | **str** | Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode |
+**settings** | [**UnifiedSettings**](UnifiedSettings.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedPortfolioInput.md b/docs/UnifiedPortfolioInput.md
new file mode 100644
index 0000000..465188f
--- /dev/null
+++ b/docs/UnifiedPortfolioInput.md
@@ -0,0 +1,17 @@
+# UnifiedPortfolioInput
+
+Portfolio margin calculator input
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**spot_balances** | [**list[MockSpotBalance]**](MockSpotBalance.md) | Spot | [optional]
+**spot_orders** | [**list[MockSpotOrder]**](MockSpotOrder.md) | Spot orders | [optional]
+**futures_positions** | [**list[MockFuturesPosition]**](MockFuturesPosition.md) | Futures positions | [optional]
+**futures_orders** | [**list[MockFuturesOrder]**](MockFuturesOrder.md) | Futures order | [optional]
+**options_positions** | [**list[MockOptionsPosition]**](MockOptionsPosition.md) | Options positions | [optional]
+**options_orders** | [**list[MockOptionsOrder]**](MockOptionsOrder.md) | Option orders | [optional]
+**spot_hedge** | **bool** | Whether to enable spot hedging | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedPortfolioOutput.md b/docs/UnifiedPortfolioOutput.md
new file mode 100644
index 0000000..08d671a
--- /dev/null
+++ b/docs/UnifiedPortfolioOutput.md
@@ -0,0 +1,14 @@
+# UnifiedPortfolioOutput
+
+Portfolio margin calculator output
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**maintain_margin_total** | **str** | Total maintenance margin, including only portfolio margin calculation results for positions in risk units, excluding borrowing margin. If borrowing exists, conventional borrowing margin requirements will still apply | [optional]
+**initial_margin_total** | **str** | Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders | [optional]
+**calculate_time** | **int** | Calculation time | [optional]
+**risk_unit** | [**list[MockRiskUnit]**](MockRiskUnit.md) | Risk unit | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedRiskUnits.md b/docs/UnifiedRiskUnits.md
new file mode 100644
index 0000000..ef263da
--- /dev/null
+++ b/docs/UnifiedRiskUnits.md
@@ -0,0 +1,12 @@
+# UnifiedRiskUnits
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**user_id** | **int** | User ID | [optional]
+**spot_hedge** | **bool** | Spot hedging status: true - enabled, false - disabled | [optional]
+**risk_units** | [**list[RiskUnits]**](RiskUnits.md) | Risk unit | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UnifiedSettings.md b/docs/UnifiedSettings.md
new file mode 100644
index 0000000..96fe971
--- /dev/null
+++ b/docs/UnifiedSettings.md
@@ -0,0 +1,13 @@
+# UnifiedSettings
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**usdt_futures** | **bool** | USDT futures switch. In cross-currency margin mode, can only be enabled and cannot be disabled | [optional]
+**spot_hedge** | **bool** | Spot hedging switch | [optional]
+**use_funding** | **bool** | Earn switch, when mode is cross-currency margin mode, whether to use Earn funds as margin | [optional]
+**options** | **bool** | Options switch. In cross-currency margin mode, can only be enabled and cannot be disabled | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CrossMarginTransferable.md b/docs/UnifiedTransferable.md
similarity index 79%
rename from docs/CrossMarginTransferable.md
rename to docs/UnifiedTransferable.md
index 4e2b0d6..1d07c53 100644
--- a/docs/CrossMarginTransferable.md
+++ b/docs/UnifiedTransferable.md
@@ -1,10 +1,10 @@
-# CrossMarginTransferable
+# UnifiedTransferable
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | Currency detail | [optional]
-**amount** | **str** | Max transferable amount | [optional]
+**amount** | **str** | Maximum transferable amount | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UserLtvInfo.md b/docs/UserLtvInfo.md
index 50ad6cd..1483aff 100644
--- a/docs/UserLtvInfo.md
+++ b/docs/UserLtvInfo.md
@@ -1,16 +1,16 @@
# UserLtvInfo
-用户币种统计数据
+User's currency statistics data
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**collateral_currency** | **str** | 质押币种 | [optional]
-**borrow_currency** | **str** | 借款币种 | [optional]
-**init_ltv** | **str** | 初始质押率 | [optional]
-**alert_ltv** | **str** | 预警质押率 | [optional]
-**liquidate_ltv** | **str** | 平仓质押率 | [optional]
-**min_borrow_amount** | **str** | 借款币种的最小可借数量 | [optional]
-**left_borrowable_amount** | **str** | 借款币种的剩余可借数量 | [optional]
+**collateral_currency** | **str** | Collateral currency | [optional]
+**borrow_currency** | **str** | Borrowed currency | [optional]
+**init_ltv** | **str** | Initial collateralization rate | [optional]
+**alert_ltv** | **str** | Warning collateralization rate | [optional]
+**liquidate_ltv** | **str** | Liquidation collateralization rate | [optional]
+**min_borrow_amount** | **str** | Minimum borrowable amount for the loan currency | [optional]
+**left_borrowable_amount** | **str** | Remaining borrowable amount for the loan currency | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/UserSub.md b/docs/UserSub.md
new file mode 100644
index 0000000..c5432f0
--- /dev/null
+++ b/docs/UserSub.md
@@ -0,0 +1,13 @@
+# UserSub
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**uid** | **int** | User ID | [optional]
+**belong** | **str** | User's system affiliation (partner/referral). Empty means not belonging to any system | [optional]
+**type** | **int** | Type (0-Not in system 1-Direct subordinate agent 2-Indirect subordinate agent 3-Direct direct customer 4-Indirect direct customer 5-Regular user) | [optional]
+**ref_uid** | **int** | Inviter user ID | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UserSubRelation.md b/docs/UserSubRelation.md
new file mode 100644
index 0000000..912227c
--- /dev/null
+++ b/docs/UserSubRelation.md
@@ -0,0 +1,10 @@
+# UserSubRelation
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**list** | [**list[UserSub]**](UserSub.md) | Subordinate relationship list | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UserTotalAmount.md b/docs/UserTotalAmount.md
index 3fe1bfa..87460d1 100644
--- a/docs/UserTotalAmount.md
+++ b/docs/UserTotalAmount.md
@@ -1,11 +1,11 @@
# UserTotalAmount
-用户总借贷與质押金额
+User's total borrowing and collateral amount
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**borrow_amount** | **str** | 借贷总额,以 USDT 计算 | [optional]
-**collateral_amount** | **str** | 质押总额,以 USDT 计算 | [optional]
+**borrow_amount** | **str** | Total borrowing amount in USDT | [optional]
+**collateral_amount** | **str** | Total collateral amount in USDT | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/WalletApi.md b/docs/WalletApi.md
index 260d75d..e137cb6 100644
--- a/docs/WalletApi.md
+++ b/docs/WalletApi.md
@@ -4,28 +4,33 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**list_currency_chains**](WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | List chains supported for specified currency
+[**list_currency_chains**](WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | Query chains supported for specified currency
[**get_deposit_address**](WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address
-[**list_withdrawals**](WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records
-[**list_deposits**](WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records
+[**list_withdrawals**](WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Get withdrawal records
+[**list_deposits**](WalletApi.md#list_deposits) | **GET** /wallet/deposits | Get deposit records
[**transfer**](WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts
-[**list_sub_account_transfers**](WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts
+[**list_sub_account_transfers**](WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Get transfer records between main and sub accounts
[**transfer_with_sub_account**](WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts
-[**sub_account_to_sub_account**](WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account
-[**list_withdraw_status**](WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Retrieve withdrawal status
-[**list_sub_account_balances**](WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances
-[**list_sub_account_margin_balances**](WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts' margin balances
-[**list_sub_account_futures_balances**](WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub accounts' futures account balances
-[**list_sub_account_cross_margin_balances**](WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query subaccount's cross_margin account info
-[**list_saved_address**](WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query saved address
-[**get_trade_fee**](WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Retrieve personal trading fee
-[**get_total_balance**](WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Retrieve user's total balances
+[**sub_account_to_sub_account**](WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Transfer between sub-accounts
+[**get_transfer_order_status**](WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query
+[**list_withdraw_status**](WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Query withdrawal status
+[**list_sub_account_balances**](WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Query sub-account balance information
+[**list_sub_account_margin_balances**](WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub-account isolated margin account balance information
+[**list_sub_account_futures_balances**](WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub-account perpetual futures account balance information
+[**list_sub_account_cross_margin_balances**](WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query sub-account cross margin account balance information
+[**list_saved_address**](WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query withdrawal address whitelist
+[**get_trade_fee**](WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Query personal trading fees
+[**get_total_balance**](WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Query personal account totals
+[**list_small_balance**](WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | Get list of convertible small balance currencies
+[**convert_small_balance**](WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance currency
+[**list_small_balance_history**](WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | Get convertible small balance currency history
+[**list_push_orders**](WalletApi.md#list_push_orders) | **GET** /wallet/push | Get UID transfer history
# **list_currency_chains**
> list[CurrencyChain] list_currency_chains(currency)
-List chains supported for specified currency
+Query chains supported for specified currency
### Example
@@ -45,7 +50,7 @@ api_instance = gate_api.WalletApi(api_client)
currency = 'GT' # str | Currency name
try:
- # List chains supported for specified currency
+ # Query chains supported for specified currency
api_response = api_instance.list_currency_chains(currency)
print(api_response)
except GateApiException as ex:
@@ -76,7 +81,7 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
@@ -148,11 +153,11 @@ Name | Type | Description | Notes
[[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)
# **list_withdrawals**
-> list[LedgerRecord] list_withdrawals(currency=currency, _from=_from, to=to, limit=limit, offset=offset)
+> list[WithdrawalRecord] list_withdrawals(currency=currency, withdraw_id=withdraw_id, asset_class=asset_class, withdraw_order_id=withdraw_order_id, _from=_from, to=to, limit=limit, offset=offset)
-Retrieve withdrawal records
+Get withdrawal records
-Record time range cannot exceed 30 days
+Record query time range cannot exceed 30 days
### Example
@@ -178,15 +183,18 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.WalletApi(api_client)
-currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional)
-_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional)
-to = 1602123600 # int | Time range ending, default to current time (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+currency = 'BTC' # str | Specify the currency. If not specified, returns all currencies (optional)
+withdraw_id = 'withdraw_id_example' # str | Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled (optional)
+asset_class = 'asset_class_example' # str | Currency type of withdrawal record, empty by default. Supports querying withdrawal records in main zone and innovation zone on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone (optional)
+withdraw_order_id = 'withdraw_order_id_example' # str | User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried (optional)
+_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional)
+to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
try:
- # Retrieve withdrawal records
- api_response = api_instance.list_withdrawals(currency=currency, _from=_from, to=to, limit=limit, offset=offset)
+ # Get withdrawal records
+ api_response = api_instance.list_withdrawals(currency=currency, withdraw_id=withdraw_id, asset_class=asset_class, withdraw_order_id=withdraw_order_id, _from=_from, to=to, limit=limit, offset=offset)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -198,15 +206,18 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional]
- **_from** | **int**| Time range beginning, default to 7 days before current time | [optional]
- **to** | **int**| Time range ending, default to current time | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **currency** | **str**| Specify the currency. If not specified, returns all currencies | [optional]
+ **withdraw_id** | **str**| Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled | [optional]
+ **asset_class** | **str**| Currency type of withdrawal record, empty by default. Supports querying withdrawal records in main zone and innovation zone on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone | [optional]
+ **withdraw_order_id** | **str**| User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried | [optional]
+ **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
### Return type
-[**list[LedgerRecord]**](LedgerRecord.md)
+[**list[WithdrawalRecord]**](WithdrawalRecord.md)
### Authorization
@@ -220,16 +231,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_deposits**
-> list[LedgerRecord] list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset)
+> list[DepositRecord] list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset)
-Retrieve deposit records
+Get deposit records
-Record time range cannot exceed 30 days
+Record query time range cannot exceed 30 days
### Example
@@ -255,14 +266,14 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.WalletApi(api_client)
-currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional)
-_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional)
-to = 1602123600 # int | Time range ending, default to current time (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+currency = 'BTC' # str | Specify the currency. If not specified, returns all currencies (optional)
+_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional)
+to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional)
+limit = 100 # int | Maximum number of entries returned in the list, limited to 500 transactions (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
try:
- # Retrieve deposit records
+ # Get deposit records
api_response = api_instance.list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset)
print(api_response)
except GateApiException as ex:
@@ -275,15 +286,15 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional]
- **_from** | **int**| Time range beginning, default to 7 days before current time | [optional]
- **to** | **int**| Time range ending, default to current time | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **currency** | **str**| Specify the currency. If not specified, returns all currencies | [optional]
+ **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+ **limit** | **int**| Maximum number of entries returned in the list, limited to 500 transactions | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
### Return type
-[**list[LedgerRecord]**](LedgerRecord.md)
+[**list[DepositRecord]**](DepositRecord.md)
### Authorization
@@ -297,7 +308,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
@@ -306,7 +317,7 @@ Name | Type | Description | Notes
Transfer between trading accounts
-Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - cross margin 5. spot - options
+Balance transfers between personal trading accounts. Currently supports the following transfer operations: 1. Spot account - Margin account 2. Spot account - Perpetual futures account 3. Spot account - Delivery futures account 4. Spot account - Options account
### Example
@@ -366,16 +377,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Balance transferred | - |
+**200** | Transfer operation successful | - |
[[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)
# **list_sub_account_transfers**
-> list[SubAccountTransfer] list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset)
+> list[SubAccountTransferRecordItem] list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset)
-Retrieve transfer records between main and sub accounts
+Get transfer records between main and sub accounts
-Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved
+Record query time range cannot exceed 30 days > Note: Only records after 2020-04-10 can be retrieved
### Example
@@ -401,14 +412,14 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.WalletApi(api_client)
-sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional)
-_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional)
-to = 1602123600 # int | Time range ending, default to current time (optional)
-limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100)
+sub_uid = '10003' # str | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts (optional)
+_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional)
+to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional)
+limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100)
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
try:
- # Retrieve transfer records between main and sub accounts
+ # Get transfer records between main and sub accounts
api_response = api_instance.list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset)
print(api_response)
except GateApiException as ex:
@@ -421,15 +432,15 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional]
- **_from** | **int**| Time range beginning, default to 7 days before current time | [optional]
- **to** | **int**| Time range ending, default to current time | [optional]
- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100]
+ **sub_uid** | **str**| Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional]
+ **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional]
+ **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional]
+ **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100]
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
### Return type
-[**list[SubAccountTransfer]**](SubAccountTransfer.md)
+[**list[SubAccountTransferRecordItem]**](SubAccountTransferRecordItem.md)
### Authorization
@@ -443,16 +454,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **transfer_with_sub_account**
-> transfer_with_sub_account(sub_account_transfer)
+> TransactionID transfer_with_sub_account(sub_account_transfer)
Transfer between main and sub accounts
-Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated.
+Supports transfers to/from sub-account's spot or futures accounts. Note that regardless of which sub-account is operated, only the main account's spot account is used
### Example
@@ -482,7 +493,8 @@ sub_account_transfer = gate_api.SubAccountTransfer() # SubAccountTransfer |
try:
# Transfer between main and sub accounts
- api_instance.transfer_with_sub_account(sub_account_transfer)
+ api_response = api_instance.transfer_with_sub_account(sub_account_transfer)
+ print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
@@ -497,7 +509,7 @@ Name | Type | Description | Notes
### Return type
-void (empty response body)
+[**TransactionID**](TransactionID.md)
### Authorization
@@ -506,21 +518,21 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: Not defined
+ - **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | Balance transferred | - |
+**200** | Transfer operation successful | - |
[[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)
# **sub_account_to_sub_account**
-> sub_account_to_sub_account(sub_account_to_sub_account)
+> TransactionID sub_account_to_sub_account(sub_account_to_sub_account)
-Sub-account transfers to sub-account
+Transfer between sub-accounts
-It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer.
+Supports balance transfers between two sub-accounts under the same main account. You can use either the main account's API Key or the source sub-account's API Key to perform the operation
### Example
@@ -549,8 +561,9 @@ api_instance = gate_api.WalletApi(api_client)
sub_account_to_sub_account = gate_api.SubAccountToSubAccount() # SubAccountToSubAccount |
try:
- # Sub-account transfers to sub-account
- api_instance.sub_account_to_sub_account(sub_account_to_sub_account)
+ # Transfer between sub-accounts
+ api_response = api_instance.sub_account_to_sub_account(sub_account_to_sub_account)
+ print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
@@ -565,7 +578,7 @@ Name | Type | Description | Notes
### Return type
-void (empty response body)
+[**TransactionID**](TransactionID.md)
### Authorization
@@ -574,19 +587,90 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Transfer operation successful | - |
+
+[[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)
+
+# **get_transfer_order_status**
+> TransferOrderStatus get_transfer_order_status(client_order_id=client_order_id, tx_id=tx_id)
+
+Transfer status query
+
+Supports querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.WalletApi(api_client)
+client_order_id = 'da3ce7a088c8b0372b741419c7829033' # str | Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters (optional)
+tx_id = '59636381286' # str | Transfer operation number, cannot be empty at the same time as client_order_id (optional)
+
+try:
+ # Transfer status query
+ api_response = api_instance.get_transfer_order_status(client_order_id=client_order_id, tx_id=tx_id)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling WalletApi->get_transfer_order_status: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **client_order_id** | **str**| Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters | [optional]
+ **tx_id** | **str**| Transfer operation number, cannot be empty at the same time as client_order_id | [optional]
+
+### Return type
+
+[**TransferOrderStatus**](TransferOrderStatus.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | Balance transferred | - |
+**200** | Transfer status retrieved successfully | - |
[[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)
# **list_withdraw_status**
> list[WithdrawStatus] list_withdraw_status(currency=currency)
-Retrieve withdrawal status
+Query withdrawal status
### Example
@@ -612,10 +696,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.WalletApi(api_client)
-currency = 'BTC' # str | Retrieve data of the specified currency (optional)
+currency = 'BTC' # str | Query by specified currency name (optional)
try:
- # Retrieve withdrawal status
+ # Query withdrawal status
api_response = api_instance.list_withdraw_status(currency=currency)
print(api_response)
except GateApiException as ex:
@@ -628,7 +712,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Retrieve data of the specified currency | [optional]
+ **currency** | **str**| Query by specified currency name | [optional]
### Return type
@@ -646,14 +730,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_sub_account_balances**
> list[SubAccountBalance] list_sub_account_balances(sub_uid=sub_uid)
-Retrieve sub account balances
+Query sub-account balance information
### Example
@@ -679,10 +763,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.WalletApi(api_client)
-sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional)
+sub_uid = '10003' # str | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts (optional)
try:
- # Retrieve sub account balances
+ # Query sub-account balance information
api_response = api_instance.list_sub_account_balances(sub_uid=sub_uid)
print(api_response)
except GateApiException as ex:
@@ -695,7 +779,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional]
+ **sub_uid** | **str**| Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional]
### Return type
@@ -713,14 +797,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_sub_account_margin_balances**
> list[SubAccountMarginBalance] list_sub_account_margin_balances(sub_uid=sub_uid)
-Query sub accounts' margin balances
+Query sub-account isolated margin account balance information
### Example
@@ -746,10 +830,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.WalletApi(api_client)
-sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional)
+sub_uid = '10003' # str | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts (optional)
try:
- # Query sub accounts' margin balances
+ # Query sub-account isolated margin account balance information
api_response = api_instance.list_sub_account_margin_balances(sub_uid=sub_uid)
print(api_response)
except GateApiException as ex:
@@ -762,7 +846,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional]
+ **sub_uid** | **str**| Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional]
### Return type
@@ -780,14 +864,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_sub_account_futures_balances**
> list[SubAccountFuturesBalance] list_sub_account_futures_balances(sub_uid=sub_uid, settle=settle)
-Query sub accounts' futures account balances
+Query sub-account perpetual futures account balance information
### Example
@@ -813,11 +897,11 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.WalletApi(api_client)
-sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional)
-settle = 'usdt' # str | Query only balances of specified settle currency (optional)
+sub_uid = '10003' # str | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts (optional)
+settle = 'usdt' # str | Query balance of specified settlement currency (optional)
try:
- # Query sub accounts' futures account balances
+ # Query sub-account perpetual futures account balance information
api_response = api_instance.list_sub_account_futures_balances(sub_uid=sub_uid, settle=settle)
print(api_response)
except GateApiException as ex:
@@ -830,8 +914,8 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional]
- **settle** | **str**| Query only balances of specified settle currency | [optional]
+ **sub_uid** | **str**| Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional]
+ **settle** | **str**| Query balance of specified settlement currency | [optional]
### Return type
@@ -849,14 +933,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_sub_account_cross_margin_balances**
> list[SubAccountCrossMarginBalance] list_sub_account_cross_margin_balances(sub_uid=sub_uid)
-Query subaccount's cross_margin account info
+Query sub-account cross margin account balance information
### Example
@@ -882,10 +966,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.WalletApi(api_client)
-sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional)
+sub_uid = '10003' # str | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts (optional)
try:
- # Query subaccount's cross_margin account info
+ # Query sub-account cross margin account balance information
api_response = api_instance.list_sub_account_cross_margin_balances(sub_uid=sub_uid)
print(api_response)
except GateApiException as ex:
@@ -898,7 +982,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional]
+ **sub_uid** | **str**| Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional]
### Return type
@@ -916,14 +1000,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **list_saved_address**
-> list[SavedAddress] list_saved_address(currency, chain=chain, limit=limit)
+> list[SavedAddress] list_saved_address(currency, chain=chain, limit=limit, page=page)
-Query saved address
+Query withdrawal address whitelist
### Example
@@ -951,11 +1035,12 @@ api_client = gate_api.ApiClient(configuration)
api_instance = gate_api.WalletApi(api_client)
currency = 'USDT' # str | Currency
chain = '' # str | Chain name (optional) (default to '')
-limit = '50' # str | Maximum number returned, 100 at most (optional) (default to '50')
+limit = '50' # str | Maximum number returned, up to 100 (optional) (default to '50')
+page = 1 # int | Page number (optional) (default to 1)
try:
- # Query saved address
- api_response = api_instance.list_saved_address(currency, chain=chain, limit=limit)
+ # Query withdrawal address whitelist
+ api_response = api_instance.list_saved_address(currency, chain=chain, limit=limit, page=page)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
@@ -969,7 +1054,8 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**currency** | **str**| Currency |
**chain** | **str**| Chain name | [optional] [default to '']
- **limit** | **str**| Maximum number returned, 100 at most | [optional] [default to '50']
+ **limit** | **str**| Maximum number returned, up to 100 | [optional] [default to '50']
+ **page** | **int**| Page number | [optional] [default to 1]
### Return type
@@ -987,14 +1073,14 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | List retrieved | - |
+**200** | List retrieved successfully | - |
[[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)
# **get_trade_fee**
> TradeFee get_trade_fee(currency_pair=currency_pair, settle=settle)
-Retrieve personal trading fee
+Query personal trading fees
### Example
@@ -1020,11 +1106,11 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.WalletApi(api_client)
-currency_pair = 'BTC_USDT' # str | Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs (optional)
-settle = 'BTC' # str | Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. (optional)
+currency_pair = 'BTC_USDT' # str | Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs. (optional)
+settle = 'BTC' # str | Specify the settlement currency of the contract to get more accurate fee settings. This field is optional. Generally, the fee settings for all settlement currencies are the same. (optional)
try:
- # Retrieve personal trading fee
+ # Query personal trading fees
api_response = api_instance.get_trade_fee(currency_pair=currency_pair, settle=settle)
print(api_response)
except GateApiException as ex:
@@ -1037,8 +1123,8 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency_pair** | **str**| Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs | [optional]
- **settle** | **str**| Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. | [optional]
+ **currency_pair** | **str**| Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs. | [optional]
+ **settle** | **str**| Specify the settlement currency of the contract to get more accurate fee settings. This field is optional. Generally, the fee settings for all settlement currencies are the same. | [optional]
### Return type
@@ -1056,16 +1142,16 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Successfully retrieved | - |
+**200** | Query successful | - |
[[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)
# **get_total_balance**
> TotalBalance get_total_balance(currency=currency)
-Retrieve user's total balances
+Query personal account totals
-This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` to query margin account balance - `GET /futures/{settle}/accounts` to query futures account balance
+This query endpoint returns the total *estimated value* of all currencies in each account converted to the input currency. Exchange rates and related account balance information may be cached for up to 1 minute. It is not recommended to use this interface data for real-time calculations. For real-time calculations, query the corresponding balance interface based on account type, such as: - `GET /spot/accounts` to query spot account - `GET /margin/accounts` to query margin account - `GET /futures/{settle}/accounts` to query futures account
### Example
@@ -1091,10 +1177,10 @@ configuration = gate_api.Configuration(
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.WalletApi(api_client)
-currency = 'USDT' # str | Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. (optional) (default to 'USDT')
+currency = 'USDT' # str | Target currency type for statistical conversion. Accepts BTC, CNY, USD, and USDT. USDT is the default value (optional) (default to 'USDT')
try:
- # Retrieve user's total balances
+ # Query personal account totals
api_response = api_instance.get_total_balance(currency=currency)
print(api_response)
except GateApiException as ex:
@@ -1107,7 +1193,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **currency** | **str**| Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. | [optional] [default to 'USDT']
+ **currency** | **str**| Target currency type for statistical conversion. Accepts BTC, CNY, USD, and USDT. USDT is the default value | [optional] [default to 'USDT']
### Return type
@@ -1125,7 +1211,284 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | Request is valid and is successfully responded | - |
+**200** | Request is valid and successfully returned | - |
+
+[[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)
+
+# **list_small_balance**
+> list[SmallBalance] list_small_balance()
+
+Get list of convertible small balance currencies
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.WalletApi(api_client)
+
+try:
+ # Get list of convertible small balance currencies
+ api_response = api_instance.list_small_balance()
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling WalletApi->list_small_balance: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**list[SmallBalance]**](SmallBalance.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+
+[[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)
+
+# **convert_small_balance**
+> convert_small_balance(convert_small_balance)
+
+Convert small balance currency
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.WalletApi(api_client)
+convert_small_balance = gate_api.ConvertSmallBalance() # ConvertSmallBalance |
+
+try:
+ # Convert small balance currency
+ api_instance.convert_small_balance(convert_small_balance)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling WalletApi->convert_small_balance: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **convert_small_balance** | [**ConvertSmallBalance**](ConvertSmallBalance.md)| |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+
+[[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)
+
+# **list_small_balance_history**
+> list[SmallBalanceHistory] list_small_balance_history(currency=currency, page=page, limit=limit)
+
+Get convertible small balance currency history
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.WalletApi(api_client)
+currency = 'currency_example' # str | Currency to convert (optional)
+page = 1 # int | Page number (optional) (default to 1)
+limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100)
+
+try:
+ # Get convertible small balance currency history
+ api_response = api_instance.list_small_balance_history(currency=currency, page=page, limit=limit)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling WalletApi->list_small_balance_history: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **currency** | **str**| Currency to convert | [optional]
+ **page** | **int**| Page number | [optional] [default to 1]
+ **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100]
+
+### Return type
+
+[**list[SmallBalanceHistory]**](SmallBalanceHistory.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+
+[[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)
+
+# **list_push_orders**
+> list[UidPushOrder] list_push_orders(id=id, _from=_from, to=to, limit=limit, offset=offset, transaction_type=transaction_type)
+
+Get UID transfer history
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.WalletApi(api_client)
+id = 56 # int | Order ID (optional)
+_from = 56 # int | Start time for querying records. If not specified, defaults to 7 days before the current time. Unix timestamp in seconds (optional)
+to = 56 # int | End time for querying records. If not specified, defaults to the current time. Unix timestamp in seconds (optional)
+limit = 100 # int | Maximum number of items returned in the list, default value is 100 (optional) (default to 100)
+offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
+transaction_type = 'withdraw' # str | Order type returned in the list: `withdraw`, `deposit`. Default is `withdraw`. (optional) (default to 'withdraw')
+
+try:
+ # Get UID transfer history
+ api_response = api_instance.list_push_orders(id=id, _from=_from, to=to, limit=limit, offset=offset, transaction_type=transaction_type)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling WalletApi->list_push_orders: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **id** | **int**| Order ID | [optional]
+ **_from** | **int**| Start time for querying records. If not specified, defaults to 7 days before the current time. Unix timestamp in seconds | [optional]
+ **to** | **int**| End time for querying records. If not specified, defaults to the current time. Unix timestamp in seconds | [optional]
+ **limit** | **int**| Maximum number of items returned in the list, default value is 100 | [optional] [default to 100]
+ **offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
+ **transaction_type** | **str**| Order type returned in the list: `withdraw`, `deposit`. Default is `withdraw`. | [optional] [default to 'withdraw']
+
+### Return type
+
+[**list[UidPushOrder]**](UidPushOrder.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
[[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)
diff --git a/docs/WithdrawStatus.md b/docs/WithdrawStatus.md
index a7f1755..38ade7b 100644
--- a/docs/WithdrawStatus.md
+++ b/docs/WithdrawStatus.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
**currency** | **str** | Currency | [optional]
**name** | **str** | Currency name | [optional]
**name_cn** | **str** | Currency Chinese name | [optional]
-**deposit** | **str** | Deposits fee | [optional]
+**deposit** | **str** | Deposit fee | [optional]
**withdraw_percent** | **str** | Withdrawal fee rate percentage | [optional]
**withdraw_fix** | **str** | Fixed withdrawal fee | [optional]
**withdraw_day_limit** | **str** | Daily allowed withdrawal amount | [optional]
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
**withdraw_day_limit_remain** | **str** | Daily withdrawal amount left | [optional]
**withdraw_eachtime_limit** | **str** | Maximum amount for each withdrawal | [optional]
**withdraw_fix_on_chains** | **dict(str, str)** | Fixed withdrawal fee on multiple chains | [optional]
+**withdraw_percent_on_chains** | **dict(str, str)** | Percentage withdrawal fee on multiple chains | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/WithdrawalApi.md b/docs/WithdrawalApi.md
index eedfba4..1c49178 100644
--- a/docs/WithdrawalApi.md
+++ b/docs/WithdrawalApi.md
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
[**withdraw**](WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw
+[**withdraw_push_order**](WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer
[**cancel_withdrawal**](WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID
@@ -13,6 +14,8 @@ Method | HTTP request | Description
Withdraw
+If the recipient's on-chain address is also Gate, no transaction fee will be charged
+
### Example
* Api Key Authentication (apiv4):
@@ -71,7 +74,76 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**202** | Withdraw request is accepted. Refer to withdrawal records for status | - |
+**200** | Withdrawal request accepted. Check withdrawal record status for processing result | - |
+
+[[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)
+
+# **withdraw_push_order**
+> UidPushWithdrawalResp withdraw_push_order(uid_push_withdrawal)
+
+UID transfer
+
+Transfers between main spot accounts. Both parties cannot be sub-accounts
+
+### Example
+
+* Api Key Authentication (apiv4):
+```python
+from __future__ import print_function
+import gate_api
+from gate_api.exceptions import ApiException, GateApiException
+# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
+# See configuration.py for a list of all supported configuration parameters.
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure APIv4 key authorization
+configuration = gate_api.Configuration(
+ host = "https://api.gateio.ws/api/v4",
+ key = "YOU_API_KEY",
+ secret = "YOUR_API_SECRET"
+)
+
+api_client = gate_api.ApiClient(configuration)
+# Create an instance of the API class
+api_instance = gate_api.WithdrawalApi(api_client)
+uid_push_withdrawal = gate_api.UidPushWithdrawal() # UidPushWithdrawal |
+
+try:
+ # UID transfer
+ api_response = api_instance.withdraw_push_order(uid_push_withdrawal)
+ print(api_response)
+except GateApiException as ex:
+ print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
+except ApiException as e:
+ print("Exception when calling WithdrawalApi->withdraw_push_order: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **uid_push_withdrawal** | [**UidPushWithdrawal**](UidPushWithdrawal.md)| |
+
+### Return type
+
+[**UidPushWithdrawalResp**](UidPushWithdrawalResp.md)
+
+### Authorization
+
+[apiv4](../README.md#apiv4)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Request accepted. Check withdrawal record status for processing result | - |
[[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)
@@ -138,7 +210,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**202** | Cancellation accepted. Refer to record status for the cancellation result | - |
+**202** | Cancellation request accepted. Check record status for cancellation result | - |
[[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)
diff --git a/docs/WithdrawalRecord.md b/docs/WithdrawalRecord.md
new file mode 100644
index 0000000..9cb30af
--- /dev/null
+++ b/docs/WithdrawalRecord.md
@@ -0,0 +1,23 @@
+# WithdrawalRecord
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Record ID | [optional] [readonly]
+**txid** | **str** | Hash record of the withdrawal | [optional] [readonly]
+**block_number** | **str** | Block Number | [optional] [readonly]
+**withdraw_order_id** | **str** | Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional]
+**timestamp** | **str** | Operation time | [optional] [readonly]
+**amount** | **str** | Token amount |
+**fee** | **str** | fee | [optional] [readonly]
+**currency** | **str** | Currency name |
+**address** | **str** | Withdrawal address | [optional]
+**fail_reason** | **str** | Reason for withdrawal failure. Has a value when status = CANCEL, empty for all other statuses | [optional]
+**timestamp2** | **str** | Withdrawal final time, i.e.: withdrawal cancellation time or withdrawal success time When status = CANCEL, corresponds to cancellation time When status = DONE and block_number > 0, it is the withdrawal success time | [optional]
+**memo** | **str** | Additional remarks with regards to the withdrawal | [optional]
+**status** | **str** | Transaction status - DONE: Completed (block_number > 0 is considered to be truly completed) - CANCEL: Canceled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: Recharge code operation - EXTPEND: Sent awaiting confirmation - FAIL: Failure on the chain awaiting confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: pending manual review - REVIEW: Under review | [optional] [readonly]
+**chain** | **str** | Name of the chain used in withdrawals |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/gate_api/__init__.py b/gate_api/__init__.py
index 4532ae8..060b069 100644
--- a/gate_api/__init__.py
+++ b/gate_api/__init__.py
@@ -3,30 +3,32 @@
# flake8: noqa
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
-__version__ = "4.56.0"
+__version__ = "7.1.8"
# import apis into sdk package
from gate_api.api.earn_uni_api import EarnUniApi
from gate_api.api.margin_uni_api import MarginUniApi
-from gate_api.api.portfolio_api import PortfolioApi
from gate_api.api.sub_account_api import SubAccountApi
+from gate_api.api.unified_api import UnifiedApi
from gate_api.api.account_api import AccountApi
from gate_api.api.collateral_loan_api import CollateralLoanApi
from gate_api.api.delivery_api import DeliveryApi
+from gate_api.api.earn_api import EarnApi
from gate_api.api.flash_swap_api import FlashSwapApi
from gate_api.api.futures_api import FuturesApi
from gate_api.api.margin_api import MarginApi
+from gate_api.api.multi_collateral_loan_api import MultiCollateralLoanApi
from gate_api.api.options_api import OptionsApi
from gate_api.api.rebate_api import RebateApi
from gate_api.api.spot_api import SpotApi
@@ -41,91 +43,133 @@
from gate_api.exceptions import ApiValueError
from gate_api.exceptions import ApiKeyError
from gate_api.exceptions import ApiException
-
# import models into sdk package
from gate_api.models.account_balance import AccountBalance
from gate_api.models.account_detail import AccountDetail
from gate_api.models.account_detail_key import AccountDetailKey
+from gate_api.models.account_rate_limit import AccountRateLimit
from gate_api.models.agency_commission import AgencyCommission
from gate_api.models.agency_commission_history import AgencyCommissionHistory
from gate_api.models.agency_transaction import AgencyTransaction
from gate_api.models.agency_transaction_history import AgencyTransactionHistory
-from gate_api.models.api_v4_key_perm import ApiV4KeyPerm
from gate_api.models.auto_repay_setting import AutoRepaySetting
+from gate_api.models.batch_amend_item import BatchAmendItem
+from gate_api.models.batch_amend_order_req import BatchAmendOrderReq
from gate_api.models.batch_futures_order import BatchFuturesOrder
from gate_api.models.batch_order import BatchOrder
+from gate_api.models.borrow_currency_info import BorrowCurrencyInfo
+from gate_api.models.broker_commission import BrokerCommission
+from gate_api.models.broker_commission1 import BrokerCommission1
+from gate_api.models.broker_commission_sub_broker_info import BrokerCommissionSubBrokerInfo
+from gate_api.models.broker_transaction import BrokerTransaction
+from gate_api.models.broker_transaction1 import BrokerTransaction1
from gate_api.models.cancel_batch_order import CancelBatchOrder
from gate_api.models.cancel_order_result import CancelOrderResult
+from gate_api.models.collateral_adjust import CollateralAdjust
+from gate_api.models.collateral_adjust_res import CollateralAdjustRes
from gate_api.models.collateral_align import CollateralAlign
+from gate_api.models.collateral_currency import CollateralCurrency
+from gate_api.models.collateral_currency_info import CollateralCurrencyInfo
+from gate_api.models.collateral_currency_res import CollateralCurrencyRes
+from gate_api.models.collateral_current_rate import CollateralCurrentRate
+from gate_api.models.collateral_fix_rate import CollateralFixRate
from gate_api.models.collateral_loan_currency import CollateralLoanCurrency
+from gate_api.models.collateral_ltv import CollateralLtv
from gate_api.models.collateral_order import CollateralOrder
from gate_api.models.collateral_record import CollateralRecord
from gate_api.models.contract import Contract
from gate_api.models.contract_stat import ContractStat
+from gate_api.models.convert_small_balance import ConvertSmallBalance
from gate_api.models.countdown_cancel_all_futures_task import CountdownCancelAllFuturesTask
+from gate_api.models.countdown_cancel_all_options_task import CountdownCancelAllOptionsTask
from gate_api.models.countdown_cancel_all_spot_task import CountdownCancelAllSpotTask
from gate_api.models.create_collateral_order import CreateCollateralOrder
+from gate_api.models.create_multi_collateral_order import CreateMultiCollateralOrder
from gate_api.models.create_uni_lend import CreateUniLend
from gate_api.models.create_uni_loan import CreateUniLoan
-from gate_api.models.cross_margin_account import CrossMarginAccount
-from gate_api.models.cross_margin_account_book import CrossMarginAccountBook
from gate_api.models.cross_margin_balance import CrossMarginBalance
-from gate_api.models.cross_margin_balance1 import CrossMarginBalance1
-from gate_api.models.cross_margin_currency import CrossMarginCurrency
from gate_api.models.cross_margin_loan import CrossMarginLoan
-from gate_api.models.cross_margin_repay_request import CrossMarginRepayRequest
from gate_api.models.cross_margin_repayment import CrossMarginRepayment
-from gate_api.models.cross_margin_transferable import CrossMarginTransferable
from gate_api.models.currency import Currency
from gate_api.models.currency_chain import CurrencyChain
from gate_api.models.currency_pair import CurrencyPair
+from gate_api.models.currency_quota import CurrencyQuota
+from gate_api.models.debit_fee import DebitFee
from gate_api.models.delivery_candlestick import DeliveryCandlestick
from gate_api.models.delivery_contract import DeliveryContract
from gate_api.models.delivery_settlement import DeliverySettlement
+from gate_api.models.delivery_ticker import DeliveryTicker
from gate_api.models.deposit_address import DepositAddress
-from gate_api.models.flash_swap_currency import FlashSwapCurrency
+from gate_api.models.deposit_record import DepositRecord
+from gate_api.models.dual_get_orders import DualGetOrders
+from gate_api.models.dual_get_plans import DualGetPlans
+from gate_api.models.eth2_rate_list import Eth2RateList
+from gate_api.models.eth2_swap import Eth2Swap
+from gate_api.models.find_coin import FindCoin
from gate_api.models.flash_swap_currency_pair import FlashSwapCurrencyPair
from gate_api.models.flash_swap_order import FlashSwapOrder
from gate_api.models.flash_swap_order_preview import FlashSwapOrderPreview
from gate_api.models.flash_swap_order_request import FlashSwapOrderRequest
from gate_api.models.flash_swap_preview_request import FlashSwapPreviewRequest
from gate_api.models.funding_account import FundingAccount
-from gate_api.models.funding_book_item import FundingBookItem
from gate_api.models.funding_rate_record import FundingRateRecord
+from gate_api.models.future_cancel_order_result import FutureCancelOrderResult
from gate_api.models.futures_account import FuturesAccount
from gate_api.models.futures_account_book import FuturesAccountBook
from gate_api.models.futures_account_history import FuturesAccountHistory
from gate_api.models.futures_auto_deleverage import FuturesAutoDeleverage
+from gate_api.models.futures_batch_amend_order_request import FuturesBatchAmendOrderRequest
from gate_api.models.futures_candlestick import FuturesCandlestick
from gate_api.models.futures_fee import FuturesFee
from gate_api.models.futures_index_constituents import FuturesIndexConstituents
from gate_api.models.futures_initial_order import FuturesInitialOrder
+from gate_api.models.futures_limit_risk_tiers import FuturesLimitRiskTiers
from gate_api.models.futures_liq_order import FuturesLiqOrder
from gate_api.models.futures_liquidate import FuturesLiquidate
from gate_api.models.futures_order import FuturesOrder
from gate_api.models.futures_order_amendment import FuturesOrderAmendment
from gate_api.models.futures_order_book import FuturesOrderBook
from gate_api.models.futures_order_book_item import FuturesOrderBookItem
+from gate_api.models.futures_position_cross_mode import FuturesPositionCrossMode
from gate_api.models.futures_premium_index import FuturesPremiumIndex
from gate_api.models.futures_price_trigger import FuturesPriceTrigger
from gate_api.models.futures_price_triggered_order import FuturesPriceTriggeredOrder
+from gate_api.models.futures_risk_limit_tier import FuturesRiskLimitTier
from gate_api.models.futures_ticker import FuturesTicker
from gate_api.models.futures_trade import FuturesTrade
from gate_api.models.index_constituent import IndexConstituent
+from gate_api.models.inline_object import InlineObject
+from gate_api.models.inline_response200 import InlineResponse200
+from gate_api.models.inline_response2001 import InlineResponse2001
from gate_api.models.insurance_record import InsuranceRecord
from gate_api.models.ledger_record import LedgerRecord
from gate_api.models.liquidate_order import LiquidateOrder
-from gate_api.models.loan import Loan
-from gate_api.models.loan_patch import LoanPatch
-from gate_api.models.loan_record import LoanRecord
from gate_api.models.margin_account import MarginAccount
from gate_api.models.margin_account_book import MarginAccountBook
from gate_api.models.margin_account_currency import MarginAccountCurrency
-from gate_api.models.margin_borrowable import MarginBorrowable
-from gate_api.models.margin_currency_pair import MarginCurrencyPair
+from gate_api.models.margin_leverage_tier import MarginLeverageTier
+from gate_api.models.margin_market_leverage import MarginMarketLeverage
+from gate_api.models.margin_tiers import MarginTiers
from gate_api.models.margin_transferable import MarginTransferable
from gate_api.models.max_uni_borrowable import MaxUniBorrowable
+from gate_api.models.mock_futures_order import MockFuturesOrder
+from gate_api.models.mock_futures_position import MockFuturesPosition
+from gate_api.models.mock_margin_result import MockMarginResult
+from gate_api.models.mock_options_order import MockOptionsOrder
+from gate_api.models.mock_options_position import MockOptionsPosition
+from gate_api.models.mock_risk_unit import MockRiskUnit
+from gate_api.models.mock_spot_balance import MockSpotBalance
+from gate_api.models.mock_spot_order import MockSpotOrder
from gate_api.models.multi_chain_address_item import MultiChainAddressItem
+from gate_api.models.multi_collateral_currency import MultiCollateralCurrency
+from gate_api.models.multi_collateral_item import MultiCollateralItem
+from gate_api.models.multi_collateral_order import MultiCollateralOrder
+from gate_api.models.multi_collateral_record import MultiCollateralRecord
+from gate_api.models.multi_collateral_record_currency import MultiCollateralRecordCurrency
+from gate_api.models.multi_loan_item import MultiLoanItem
+from gate_api.models.multi_loan_repay_item import MultiLoanRepayItem
+from gate_api.models.multi_repay_record import MultiRepayRecord
+from gate_api.models.multi_repay_resp import MultiRepayResp
from gate_api.models.my_futures_trade import MyFuturesTrade
from gate_api.models.my_futures_trade_time_range import MyFuturesTradeTimeRange
from gate_api.models.open_orders import OpenOrders
@@ -133,6 +177,8 @@
from gate_api.models.options_account_book import OptionsAccountBook
from gate_api.models.options_candlestick import OptionsCandlestick
from gate_api.models.options_contract import OptionsContract
+from gate_api.models.options_mmp import OptionsMMP
+from gate_api.models.options_mmp_reset import OptionsMMPReset
from gate_api.models.options_my_settlements import OptionsMySettlements
from gate_api.models.options_my_trade import OptionsMyTrade
from gate_api.models.options_order import OptionsOrder
@@ -145,42 +191,60 @@
from gate_api.models.options_underlying_ticker import OptionsUnderlyingTicker
from gate_api.models.order import Order
from gate_api.models.order_book import OrderBook
+from gate_api.models.order_cancel import OrderCancel
from gate_api.models.order_patch import OrderPatch
from gate_api.models.order_resp import OrderResp
+from gate_api.models.partner_commission_history import PartnerCommissionHistory
+from gate_api.models.partner_sub import PartnerSub
+from gate_api.models.partner_sub_list import PartnerSubList
+from gate_api.models.partner_transaction_history import PartnerTransactionHistory
from gate_api.models.patch_uni_lend import PatchUniLend
-from gate_api.models.portfolio_account import PortfolioAccount
-from gate_api.models.portfolio_borrowable import PortfolioBorrowable
-from gate_api.models.portfolio_loan import PortfolioLoan
-from gate_api.models.portfolio_loan_record import PortfolioLoanRecord
-from gate_api.models.portfolio_margin_balance import PortfolioMarginBalance
-from gate_api.models.portfolio_mode import PortfolioMode
-from gate_api.models.portfolio_transferable import PortfolioTransferable
+from gate_api.models.place_dual_investment_order import PlaceDualInvestmentOrder
from gate_api.models.position import Position
from gate_api.models.position_close import PositionClose
from gate_api.models.position_close_order import PositionCloseOrder
+from gate_api.models.profit_loss_range import ProfitLossRange
+from gate_api.models.rebate_user_info import RebateUserInfo
+from gate_api.models.repay_currency_res import RepayCurrencyRes
from gate_api.models.repay_loan import RepayLoan
+from gate_api.models.repay_multi_loan import RepayMultiLoan
from gate_api.models.repay_record import RepayRecord
-from gate_api.models.repay_request import RepayRequest
+from gate_api.models.repay_record_currency import RepayRecordCurrency
+from gate_api.models.repay_record_left_interest import RepayRecordLeftInterest
+from gate_api.models.repay_record_repaid_currency import RepayRecordRepaidCurrency
+from gate_api.models.repay_record_total_interest import RepayRecordTotalInterest
from gate_api.models.repay_resp import RepayResp
-from gate_api.models.repayment import Repayment
+from gate_api.models.risk_units import RiskUnits
from gate_api.models.saved_address import SavedAddress
+from gate_api.models.small_balance import SmallBalance
+from gate_api.models.small_balance_history import SmallBalanceHistory
from gate_api.models.spot_account import SpotAccount
from gate_api.models.spot_account_book import SpotAccountBook
+from gate_api.models.spot_currency_chain import SpotCurrencyChain
from gate_api.models.spot_fee import SpotFee
+from gate_api.models.spot_insurance_history import SpotInsuranceHistory
from gate_api.models.spot_price_put_order import SpotPricePutOrder
from gate_api.models.spot_price_trigger import SpotPriceTrigger
from gate_api.models.spot_price_triggered_order import SpotPriceTriggeredOrder
from gate_api.models.stp_group import StpGroup
from gate_api.models.stp_group_user import StpGroupUser
+from gate_api.models.structured_buy import StructuredBuy
+from gate_api.models.structured_get_project_list import StructuredGetProjectList
+from gate_api.models.structured_order_list import StructuredOrderList
from gate_api.models.sub_account import SubAccount
from gate_api.models.sub_account_balance import SubAccountBalance
from gate_api.models.sub_account_cross_margin_balance import SubAccountCrossMarginBalance
from gate_api.models.sub_account_futures_balance import SubAccountFuturesBalance
from gate_api.models.sub_account_key import SubAccountKey
+from gate_api.models.sub_account_key_perms import SubAccountKeyPerms
from gate_api.models.sub_account_margin_balance import SubAccountMarginBalance
from gate_api.models.sub_account_to_sub_account import SubAccountToSubAccount
from gate_api.models.sub_account_transfer import SubAccountTransfer
+from gate_api.models.sub_account_transfer_record_item import SubAccountTransferRecordItem
from gate_api.models.sub_cross_margin_account import SubCrossMarginAccount
+from gate_api.models.sub_user_mode import SubUserMode
+from gate_api.models.swap_coin import SwapCoin
+from gate_api.models.swap_coin_struct import SwapCoinStruct
from gate_api.models.system_time import SystemTime
from gate_api.models.ticker import Ticker
from gate_api.models.total_balance import TotalBalance
@@ -188,9 +252,15 @@
from gate_api.models.trade_fee import TradeFee
from gate_api.models.transaction_id import TransactionID
from gate_api.models.transfer import Transfer
+from gate_api.models.transfer_order_status import TransferOrderStatus
+from gate_api.models.transferables_result import TransferablesResult
from gate_api.models.trigger_order_response import TriggerOrderResponse
from gate_api.models.trigger_time import TriggerTime
+from gate_api.models.uid_push_order import UidPushOrder
+from gate_api.models.uid_push_withdrawal import UidPushWithdrawal
+from gate_api.models.uid_push_withdrawal_resp import UidPushWithdrawalResp
from gate_api.models.uni_currency import UniCurrency
+from gate_api.models.uni_currency_interest import UniCurrencyInterest
from gate_api.models.uni_currency_pair import UniCurrencyPair
from gate_api.models.uni_interest_record import UniInterestRecord
from gate_api.models.uni_lend import UniLend
@@ -199,6 +269,33 @@
from gate_api.models.uni_loan import UniLoan
from gate_api.models.uni_loan_interest_record import UniLoanInterestRecord
from gate_api.models.uni_loan_record import UniLoanRecord
+from gate_api.models.unified_account import UnifiedAccount
+from gate_api.models.unified_balance import UnifiedBalance
+from gate_api.models.unified_borrowable import UnifiedBorrowable
+from gate_api.models.unified_borrowable1 import UnifiedBorrowable1
+from gate_api.models.unified_collateral_req import UnifiedCollateralReq
+from gate_api.models.unified_collateral_res import UnifiedCollateralRes
+from gate_api.models.unified_currency import UnifiedCurrency
+from gate_api.models.unified_discount import UnifiedDiscount
+from gate_api.models.unified_discount_tiers import UnifiedDiscountTiers
+from gate_api.models.unified_history_loan_rate import UnifiedHistoryLoanRate
+from gate_api.models.unified_history_loan_rate_rates import UnifiedHistoryLoanRateRates
+from gate_api.models.unified_leverage_config import UnifiedLeverageConfig
+from gate_api.models.unified_leverage_setting import UnifiedLeverageSetting
+from gate_api.models.unified_loan import UnifiedLoan
+from gate_api.models.unified_loan_record import UnifiedLoanRecord
+from gate_api.models.unified_loan_result import UnifiedLoanResult
+from gate_api.models.unified_margin_tiers import UnifiedMarginTiers
+from gate_api.models.unified_mode_set import UnifiedModeSet
+from gate_api.models.unified_portfolio_input import UnifiedPortfolioInput
+from gate_api.models.unified_portfolio_output import UnifiedPortfolioOutput
+from gate_api.models.unified_risk_units import UnifiedRiskUnits
+from gate_api.models.unified_settings import UnifiedSettings
+from gate_api.models.unified_transferable import UnifiedTransferable
from gate_api.models.user_ltv_info import UserLtvInfo
+from gate_api.models.user_sub import UserSub
+from gate_api.models.user_sub_relation import UserSubRelation
from gate_api.models.user_total_amount import UserTotalAmount
from gate_api.models.withdraw_status import WithdrawStatus
+from gate_api.models.withdrawal_record import WithdrawalRecord
+
diff --git a/gate_api/api/__init__.py b/gate_api/api/__init__.py
index 72f2ec5..6cd727a 100644
--- a/gate_api/api/__init__.py
+++ b/gate_api/api/__init__.py
@@ -5,14 +5,16 @@
# import apis into api package
from gate_api.api.earn_uni_api import EarnUniApi
from gate_api.api.margin_uni_api import MarginUniApi
-from gate_api.api.portfolio_api import PortfolioApi
from gate_api.api.sub_account_api import SubAccountApi
+from gate_api.api.unified_api import UnifiedApi
from gate_api.api.account_api import AccountApi
from gate_api.api.collateral_loan_api import CollateralLoanApi
from gate_api.api.delivery_api import DeliveryApi
+from gate_api.api.earn_api import EarnApi
from gate_api.api.flash_swap_api import FlashSwapApi
from gate_api.api.futures_api import FuturesApi
from gate_api.api.margin_api import MarginApi
+from gate_api.api.multi_collateral_loan_api import MultiCollateralLoanApi
from gate_api.api.options_api import OptionsApi
from gate_api.api.rebate_api import RebateApi
from gate_api.api.spot_api import SpotApi
diff --git a/gate_api/api/account_api.py b/gate_api/api/account_api.py
index 14366ce..5f381d6 100644
--- a/gate_api/api/account_api.py
+++ b/gate_api/api/account_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class AccountApi(object):
@@ -34,7 +37,7 @@ def __init__(self, api_client=None):
self.api_client = api_client
def get_account_detail(self, **kwargs): # noqa: E501
- """Get account detail # noqa: E501
+ """Retrieve user account information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -57,7 +60,7 @@ def get_account_detail(self, **kwargs): # noqa: E501
return self.get_account_detail_with_http_info(**kwargs) # noqa: E501
def get_account_detail_with_http_info(self, **kwargs): # noqa: E501
- """Get account detail # noqa: E501
+ """Retrieve user account information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -81,12 +84,23 @@ def get_account_detail_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_account_detail" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_account_detail" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -103,14 +117,14 @@ def get_account_detail_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/account/detail',
- 'GET',
+ '/account/detail', 'GET',
path_params,
query_params,
header_params,
@@ -123,20 +137,122 @@ def get_account_detail_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def get_account_rate_limit(self, **kwargs): # noqa: E501
+ """Get user transaction rate limit information # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_account_rate_limit(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.AccountRateLimit]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_account_rate_limit_with_http_info(**kwargs) # noqa: E501
+
+ def get_account_rate_limit_with_http_info(self, **kwargs): # noqa: E501
+ """Get user transaction rate limit information # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_account_rate_limit_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.AccountRateLimit], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_account_rate_limit" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/account/rate_limit', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[AccountRateLimit]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def list_stp_groups(self, **kwargs): # noqa: E501
- """List STP Groups # noqa: E501
+ """Query STP user groups created by the user # noqa: E501
- Retrieve the list of STP groups created by the main account user only # noqa: E501
+ Only query STP user groups created by the current main account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_stp_groups(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str name: Perform a fuzzy search based on the name
+ :param str name: Fuzzy search by name
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -152,16 +268,16 @@ def list_stp_groups(self, **kwargs): # noqa: E501
return self.list_stp_groups_with_http_info(**kwargs) # noqa: E501
def list_stp_groups_with_http_info(self, **kwargs): # noqa: E501
- """List STP Groups # noqa: E501
+ """Query STP user groups created by the user # noqa: E501
- Retrieve the list of STP groups created by the main account user only # noqa: E501
+ Only query STP user groups created by the current main account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_stp_groups_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str name: Perform a fuzzy search based on the name
+ :param str name: Fuzzy search by name
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -178,12 +294,24 @@ def list_stp_groups_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['name']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'name'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_stp_groups" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_stp_groups" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -202,14 +330,14 @@ def list_stp_groups_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/account/stp_groups',
- 'GET',
+ '/account/stp_groups', 'GET',
path_params,
query_params,
header_params,
@@ -222,11 +350,10 @@ def list_stp_groups_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_stp_group(self, stp_group, **kwargs): # noqa: E501
- """Create STP Group # noqa: E501
+ """Create STP user group # noqa: E501
Only the main account is allowed to create a new STP user group # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -251,7 +378,7 @@ def create_stp_group(self, stp_group, **kwargs): # noqa: E501
return self.create_stp_group_with_http_info(stp_group, **kwargs) # noqa: E501
def create_stp_group_with_http_info(self, stp_group, **kwargs): # noqa: E501
- """Create STP Group # noqa: E501
+ """Create STP user group # noqa: E501
Only the main account is allowed to create a new STP user group # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -277,21 +404,30 @@ def create_stp_group_with_http_info(self, stp_group, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['stp_group']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'stp_group'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_stp_group" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_stp_group" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'stp_group' is set
- if self.api_client.client_side_validation and (
- 'stp_group' not in local_var_params or local_var_params['stp_group'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `stp_group` when calling `create_stp_group`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('stp_group' not in local_var_params or # noqa: E501
+ local_var_params['stp_group'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `stp_group` when calling `create_stp_group`") # noqa: E501
collection_formats = {}
@@ -308,19 +444,18 @@ def create_stp_group_with_http_info(self, stp_group, **kwargs): # noqa: E501
if 'stp_group' in local_var_params:
body_params = local_var_params['stp_group']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/account/stp_groups',
- 'POST',
+ '/account/stp_groups', 'POST',
path_params,
query_params,
header_params,
@@ -333,13 +468,12 @@ def create_stp_group_with_http_info(self, stp_group, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_stp_groups_users(self, stp_id, **kwargs): # noqa: E501
- """List users of the STP group # noqa: E501
+ """Query users in the STP user group # noqa: E501
- Only the main account that created this STP group is allowed to list the user ID of the STP group # noqa: E501
+ Only the main account that created this STP group can query the account ID list in the current STP group # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_stp_groups_users(stp_id, async_req=True)
@@ -362,9 +496,9 @@ def list_stp_groups_users(self, stp_id, **kwargs): # noqa: E501
return self.list_stp_groups_users_with_http_info(stp_id, **kwargs) # noqa: E501
def list_stp_groups_users_with_http_info(self, stp_id, **kwargs): # noqa: E501
- """List users of the STP group # noqa: E501
+ """Query users in the STP user group # noqa: E501
- Only the main account that created this STP group is allowed to list the user ID of the STP group # noqa: E501
+ Only the main account that created this STP group can query the account ID list in the current STP group # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_stp_groups_users_with_http_info(stp_id, async_req=True)
@@ -388,21 +522,30 @@ def list_stp_groups_users_with_http_info(self, stp_id, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['stp_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'stp_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_stp_groups_users" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_stp_groups_users" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'stp_id' is set
- if self.api_client.client_side_validation and (
- 'stp_id' not in local_var_params or local_var_params['stp_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `stp_id` when calling `list_stp_groups_users`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('stp_id' not in local_var_params or # noqa: E501
+ local_var_params['stp_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `stp_id` when calling `list_stp_groups_users`") # noqa: E501
collection_formats = {}
@@ -419,14 +562,14 @@ def list_stp_groups_users_with_http_info(self, stp_id, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/account/stp_groups/{stp_id}/users',
- 'GET',
+ '/account/stp_groups/{stp_id}/users', 'GET',
path_params,
query_params,
header_params,
@@ -439,13 +582,12 @@ def list_stp_groups_users_with_http_info(self, stp_id, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def add_stp_group_users(self, stp_id, request_body, **kwargs): # noqa: E501
- """Add users to the STP group # noqa: E501
+ """Add users to the STP user group # noqa: E501
- - Only the master account that created the STP user group is allowed to add users to the STP user group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted # noqa: E501
+ - Only the main account that created this STP group can add users to the STP user group - Only accounts under the current main account are allowed, cross-main account is not permitted # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_stp_group_users(stp_id, request_body, async_req=True)
@@ -469,9 +611,9 @@ def add_stp_group_users(self, stp_id, request_body, **kwargs): # noqa: E501
return self.add_stp_group_users_with_http_info(stp_id, request_body, **kwargs) # noqa: E501
def add_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs): # noqa: E501
- """Add users to the STP group # noqa: E501
+ """Add users to the STP user group # noqa: E501
- - Only the master account that created the STP user group is allowed to add users to the STP user group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted # noqa: E501
+ - Only the main account that created this STP group can add users to the STP user group - Only accounts under the current main account are allowed, cross-main account is not permitted # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_stp_group_users_with_http_info(stp_id, request_body, async_req=True)
@@ -496,28 +638,35 @@ def add_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs): #
local_var_params = locals()
- all_params = ['stp_id', 'request_body']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'stp_id',
+ 'request_body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method add_stp_group_users" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method add_stp_group_users" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'stp_id' is set
- if self.api_client.client_side_validation and (
- 'stp_id' not in local_var_params or local_var_params['stp_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `stp_id` when calling `add_stp_group_users`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('stp_id' not in local_var_params or # noqa: E501
+ local_var_params['stp_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `stp_id` when calling `add_stp_group_users`") # noqa: E501
# verify the required parameter 'request_body' is set
- if self.api_client.client_side_validation and (
- 'request_body' not in local_var_params or local_var_params['request_body'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `request_body` when calling `add_stp_group_users`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('request_body' not in local_var_params or # noqa: E501
+ local_var_params['request_body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `request_body` when calling `add_stp_group_users`") # noqa: E501
collection_formats = {}
@@ -536,19 +685,18 @@ def add_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs): #
if 'request_body' in local_var_params:
body_params = local_var_params['request_body']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/account/stp_groups/{stp_id}/users',
- 'POST',
+ '/account/stp_groups/{stp_id}/users', 'POST',
path_params,
query_params,
header_params,
@@ -561,21 +709,20 @@ def add_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs): #
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def delete_stp_group_users(self, stp_id, request_body, **kwargs): # noqa: E501
- """STP用户组中删除用户 # noqa: E501
+ def delete_stp_group_users(self, stp_id, user_id, **kwargs): # noqa: E501
+ """Delete users from the STP user group # noqa: E501
- - 只允许创建此STP组的主账号删除STP用户组用户 - 只允许删除当前主账户下的账户,不允许跨主账户 # noqa: E501
+ - Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_stp_group_users(stp_id, request_body, async_req=True)
+ >>> thread = api.delete_stp_group_users(stp_id, user_id, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
:param int stp_id: STP Group ID (required)
- :param list[int] request_body: User ID (required)
+ :param int user_id: STP user IDs, multiple IDs can be separated by commas (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -588,20 +735,20 @@ def delete_stp_group_users(self, stp_id, request_body, **kwargs): # noqa: E501
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.delete_stp_group_users_with_http_info(stp_id, request_body, **kwargs) # noqa: E501
+ return self.delete_stp_group_users_with_http_info(stp_id, user_id, **kwargs) # noqa: E501
- def delete_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs): # noqa: E501
- """STP用户组中删除用户 # noqa: E501
+ def delete_stp_group_users_with_http_info(self, stp_id, user_id, **kwargs): # noqa: E501
+ """Delete users from the STP user group # noqa: E501
- - 只允许创建此STP组的主账号删除STP用户组用户 - 只允许删除当前主账户下的账户,不允许跨主账户 # noqa: E501
+ - Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_stp_group_users_with_http_info(stp_id, request_body, async_req=True)
+ >>> thread = api.delete_stp_group_users_with_http_info(stp_id, user_id, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
:param int stp_id: STP Group ID (required)
- :param list[int] request_body: User ID (required)
+ :param int user_id: STP user IDs, multiple IDs can be separated by commas (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -618,28 +765,35 @@ def delete_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs):
local_var_params = locals()
- all_params = ['stp_id', 'request_body']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'stp_id',
+ 'user_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method delete_stp_group_users" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_stp_group_users" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'stp_id' is set
- if self.api_client.client_side_validation and (
- 'stp_id' not in local_var_params or local_var_params['stp_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `stp_id` when calling `delete_stp_group_users`"
- ) # noqa: E501
- # verify the required parameter 'request_body' is set
- if self.api_client.client_side_validation and (
- 'request_body' not in local_var_params or local_var_params['request_body'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `request_body` when calling `delete_stp_group_users`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('stp_id' not in local_var_params or # noqa: E501
+ local_var_params['stp_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `stp_id` when calling `delete_stp_group_users`") # noqa: E501
+ # verify the required parameter 'user_id' is set
+ if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501
+ local_var_params['user_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `user_id` when calling `delete_stp_group_users`") # noqa: E501
collection_formats = {}
@@ -648,6 +802,8 @@ def delete_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs):
path_params['stp_id'] = local_var_params['stp_id'] # noqa: E501
query_params = []
+ if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501
+ query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501
header_params = {}
@@ -655,33 +811,244 @@ def delete_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs):
local_var_files = {}
body_params = None
- if 'request_body' in local_var_params:
- body_params = local_var_params['request_body']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/account/stp_groups/{stp_id}/users', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[StpGroupUser]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_debit_fee(self, **kwargs): # noqa: E501
+ """Query GT fee deduction configuration # noqa: E501
+
+ Query the GT fee deduction configuration for the current account # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_debit_fee(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.DebitFee
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_debit_fee_with_http_info(**kwargs) # noqa: E501
+
+ def get_debit_fee_with_http_info(self, **kwargs): # noqa: E501
+ """Query GT fee deduction configuration # noqa: E501
+
+ Query the GT fee deduction configuration for the current account # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_debit_fee_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.DebitFee, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_debit_fee" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/account/debit_fee', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='DebitFee', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def set_debit_fee(self, debit_fee, **kwargs): # noqa: E501
+ """Configure GT fee deduction # noqa: E501
+
+ Enable or disable GT fee deduction for the current account # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.set_debit_fee(debit_fee, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param DebitFee debit_fee: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: None
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.set_debit_fee_with_http_info(debit_fee, **kwargs) # noqa: E501
+
+ def set_debit_fee_with_http_info(self, debit_fee, **kwargs): # noqa: E501
+ """Configure GT fee deduction # noqa: E501
+
+ Enable or disable GT fee deduction for the current account # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.set_debit_fee_with_http_info(debit_fee, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param DebitFee debit_fee: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: None
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'debit_fee'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method set_debit_fee" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'debit_fee' is set
+ if self.api_client.client_side_validation and ('debit_fee' not in local_var_params or # noqa: E501
+ local_var_params['debit_fee'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `debit_fee` when calling `set_debit_fee`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'debit_fee' in local_var_params:
+ body_params = local_var_params['debit_fee']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/account/stp_groups/{stp_id}/users',
- 'DELETE',
+ '/account/debit_fee', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[StpGroupUser]', # noqa: E501
+ response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
diff --git a/gate_api/api/collateral_loan_api.py b/gate_api/api/collateral_loan_api.py
index f5d9533..a96b375 100644
--- a/gate_api/api/collateral_loan_api.py
+++ b/gate_api/api/collateral_loan_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class CollateralLoanApi(object):
@@ -34,7 +37,7 @@ def __init__(self, api_client=None):
self.api_client = api_client
def list_collateral_loan_orders(self, **kwargs): # noqa: E501
- """查询抵押借币订单列表 # noqa: E501
+ """Query collateral loan order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -43,9 +46,9 @@ def list_collateral_loan_orders(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
- :param str collateral_currency: 质押币种
- :param str borrow_currency: 借款币种
+ :param int limit: Maximum number of records returned in a single list
+ :param str collateral_currency: Collateral currency
+ :param str borrow_currency: Borrowed currency
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -61,7 +64,7 @@ def list_collateral_loan_orders(self, **kwargs): # noqa: E501
return self.list_collateral_loan_orders_with_http_info(**kwargs) # noqa: E501
def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501
- """查询抵押借币订单列表 # noqa: E501
+ """Query collateral loan order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -70,9 +73,9 @@ def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
- :param str collateral_currency: 质押币种
- :param str borrow_currency: 借款币种
+ :param int limit: Maximum number of records returned in a single list
+ :param str collateral_currency: Collateral currency
+ :param str borrow_currency: Borrowed currency
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -89,35 +92,36 @@ def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['page', 'limit', 'collateral_currency', 'borrow_currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'page',
+ 'limit',
+ 'collateral_currency',
+ 'borrow_currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_collateral_loan_orders" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_collateral_loan_orders" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_collateral_loan_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_collateral_loan_orders`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_collateral_loan_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_collateral_loan_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_collateral_loan_orders`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_collateral_loan_orders`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -127,9 +131,7 @@ def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501
query_params.append(('page', local_var_params['page'])) # noqa: E501
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if (
- 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None
- ): # noqa: E501
+ if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501
query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501
if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501
query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501
@@ -141,14 +143,14 @@ def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/loan/collateral/orders',
- 'GET',
+ '/loan/collateral/orders', 'GET',
path_params,
query_params,
header_params,
@@ -161,11 +163,10 @@ def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_collateral_loan(self, create_collateral_order, **kwargs): # noqa: E501
- """抵押借币借贷下单 # noqa: E501
+ """Place collateral loan order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -189,7 +190,7 @@ def create_collateral_loan(self, create_collateral_order, **kwargs): # noqa: E5
return self.create_collateral_loan_with_http_info(create_collateral_order, **kwargs) # noqa: E501
def create_collateral_loan_with_http_info(self, create_collateral_order, **kwargs): # noqa: E501
- """抵押借币借贷下单 # noqa: E501
+ """Place collateral loan order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -214,22 +215,30 @@ def create_collateral_loan_with_http_info(self, create_collateral_order, **kwarg
local_var_params = locals()
- all_params = ['create_collateral_order']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'create_collateral_order'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_collateral_loan" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_collateral_loan" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'create_collateral_order' is set
- if self.api_client.client_side_validation and (
- 'create_collateral_order' not in local_var_params
- or local_var_params['create_collateral_order'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `create_collateral_order` when calling `create_collateral_loan`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('create_collateral_order' not in local_var_params or # noqa: E501
+ local_var_params['create_collateral_order'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `create_collateral_order` when calling `create_collateral_loan`") # noqa: E501
collection_formats = {}
@@ -246,19 +255,18 @@ def create_collateral_loan_with_http_info(self, create_collateral_order, **kwarg
if 'create_collateral_order' in local_var_params:
body_params = local_var_params['create_collateral_order']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/loan/collateral/orders',
- 'POST',
+ '/loan/collateral/orders', 'POST',
path_params,
query_params,
header_params,
@@ -271,11 +279,10 @@ def create_collateral_loan_with_http_info(self, create_collateral_order, **kwarg
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_collateral_loan_order_detail(self, order_id, **kwargs): # noqa: E501
- """Get a single order # noqa: E501
+ """Query single order details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -283,7 +290,7 @@ def get_collateral_loan_order_detail(self, order_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int order_id: Order ID returned on successful order creation (required)
+ :param int order_id: Order ID returned when order is successfully created (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -299,7 +306,7 @@ def get_collateral_loan_order_detail(self, order_id, **kwargs): # noqa: E501
return self.get_collateral_loan_order_detail_with_http_info(order_id, **kwargs) # noqa: E501
def get_collateral_loan_order_detail_with_http_info(self, order_id, **kwargs): # noqa: E501
- """Get a single order # noqa: E501
+ """Query single order details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -307,7 +314,7 @@ def get_collateral_loan_order_detail_with_http_info(self, order_id, **kwargs):
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int order_id: Order ID returned on successful order creation (required)
+ :param int order_id: Order ID returned when order is successfully created (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -324,23 +331,30 @@ def get_collateral_loan_order_detail_with_http_info(self, order_id, **kwargs):
local_var_params = locals()
- all_params = ['order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method get_collateral_loan_order_detail" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method get_collateral_loan_order_detail" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `get_collateral_loan_order_detail`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `get_collateral_loan_order_detail`") # noqa: E501
collection_formats = {}
@@ -357,14 +371,14 @@ def get_collateral_loan_order_detail_with_http_info(self, order_id, **kwargs):
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/loan/collateral/orders/{order_id}',
- 'GET',
+ '/loan/collateral/orders/{order_id}', 'GET',
path_params,
query_params,
header_params,
@@ -377,11 +391,10 @@ def get_collateral_loan_order_detail_with_http_info(self, order_id, **kwargs):
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def repay_collateral_loan(self, repay_loan, **kwargs): # noqa: E501
- """抵押借币还款 # noqa: E501
+ """Collateral loan repayment # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -405,7 +418,7 @@ def repay_collateral_loan(self, repay_loan, **kwargs): # noqa: E501
return self.repay_collateral_loan_with_http_info(repay_loan, **kwargs) # noqa: E501
def repay_collateral_loan_with_http_info(self, repay_loan, **kwargs): # noqa: E501
- """抵押借币还款 # noqa: E501
+ """Collateral loan repayment # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -430,21 +443,30 @@ def repay_collateral_loan_with_http_info(self, repay_loan, **kwargs): # noqa: E
local_var_params = locals()
- all_params = ['repay_loan']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'repay_loan'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method repay_collateral_loan" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method repay_collateral_loan" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'repay_loan' is set
- if self.api_client.client_side_validation and (
- 'repay_loan' not in local_var_params or local_var_params['repay_loan'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `repay_loan` when calling `repay_collateral_loan`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('repay_loan' not in local_var_params or # noqa: E501
+ local_var_params['repay_loan'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `repay_loan` when calling `repay_collateral_loan`") # noqa: E501
collection_formats = {}
@@ -461,19 +483,18 @@ def repay_collateral_loan_with_http_info(self, repay_loan, **kwargs): # noqa: E
if 'repay_loan' in local_var_params:
body_params = local_var_params['repay_loan']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/loan/collateral/repay',
- 'POST',
+ '/loan/collateral/repay', 'POST',
path_params,
query_params,
header_params,
@@ -486,11 +507,10 @@ def repay_collateral_loan_with_http_info(self, repay_loan, **kwargs): # noqa: E
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_repay_records(self, source, **kwargs): # noqa: E501
- """查询抵押借币还款记录 # noqa: E501
+ """Query collateral loan repayment records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -498,13 +518,13 @@ def list_repay_records(self, source, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str source: 操作类型 ; repay - 普通还款, liquidate - 平仓 (required)
- :param str borrow_currency: 借款币种
- :param str collateral_currency: 质押币种
+ :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation (required)
+ :param str borrow_currency: Borrowed currency
+ :param str collateral_currency: Collateral currency
:param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -520,7 +540,7 @@ def list_repay_records(self, source, **kwargs): # noqa: E501
return self.list_repay_records_with_http_info(source, **kwargs) # noqa: E501
def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501
- """查询抵押借币还款记录 # noqa: E501
+ """Query collateral loan repayment records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -528,13 +548,13 @@ def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str source: 操作类型 ; repay - 普通还款, liquidate - 平仓 (required)
- :param str borrow_currency: 借款币种
- :param str collateral_currency: 质押币种
+ :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation (required)
+ :param str borrow_currency: Borrowed currency
+ :param str collateral_currency: Collateral currency
:param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -551,40 +571,43 @@ def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['source', 'borrow_currency', 'collateral_currency', 'page', 'limit', '_from', 'to']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'source',
+ 'borrow_currency',
+ 'collateral_currency',
+ 'page',
+ 'limit',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_repay_records" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_repay_records" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'source' is set
- if self.api_client.client_side_validation and (
- 'source' not in local_var_params or local_var_params['source'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `source` when calling `list_repay_records`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_repay_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_repay_records`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_repay_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('source' not in local_var_params or # noqa: E501
+ local_var_params['source'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `source` when calling `list_repay_records`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_repay_records`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_repay_records`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_repay_records`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -594,9 +617,7 @@ def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501
query_params.append(('source', local_var_params['source'])) # noqa: E501
if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501
query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501
- if (
- 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None
- ): # noqa: E501
+ if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501
query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501
if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
query_params.append(('page', local_var_params['page'])) # noqa: E501
@@ -614,14 +635,14 @@ def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/loan/collateral/repay_records',
- 'GET',
+ '/loan/collateral/repay_records', 'GET',
path_params,
query_params,
header_params,
@@ -634,11 +655,10 @@ def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_collateral_records(self, **kwargs): # noqa: E501
- """查询质押物调整记录 # noqa: E501
+ """Query collateral adjustment records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -647,11 +667,11 @@ def list_collateral_records(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
- :param str borrow_currency: 借款币种
- :param str collateral_currency: 质押币种
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param str borrow_currency: Borrowed currency
+ :param str collateral_currency: Collateral currency
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -667,7 +687,7 @@ def list_collateral_records(self, **kwargs): # noqa: E501
return self.list_collateral_records_with_http_info(**kwargs) # noqa: E501
def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501
- """查询质押物调整记录 # noqa: E501
+ """Query collateral adjustment records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -676,11 +696,11 @@ def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
- :param str borrow_currency: 借款币种
- :param str collateral_currency: 质押币种
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param str borrow_currency: Borrowed currency
+ :param str collateral_currency: Collateral currency
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -697,33 +717,38 @@ def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['page', 'limit', '_from', 'to', 'borrow_currency', 'collateral_currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'page',
+ 'limit',
+ '_from',
+ 'to',
+ 'borrow_currency',
+ 'collateral_currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_collateral_records" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_collateral_records" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_collateral_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_collateral_records`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_collateral_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_collateral_records`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_collateral_records`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_collateral_records`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -739,9 +764,7 @@ def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501
query_params.append(('to', local_var_params['to'])) # noqa: E501
if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501
query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501
- if (
- 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None
- ): # noqa: E501
+ if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501
query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501
header_params = {}
@@ -751,14 +774,14 @@ def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/loan/collateral/collaterals',
- 'GET',
+ '/loan/collateral/collaterals', 'GET',
path_params,
query_params,
header_params,
@@ -771,11 +794,10 @@ def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def operate_collateral(self, collateral_align, **kwargs): # noqa: E501
- """增加或赎回质押物 # noqa: E501
+ """Increase or redeem collateral # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -799,7 +821,7 @@ def operate_collateral(self, collateral_align, **kwargs): # noqa: E501
return self.operate_collateral_with_http_info(collateral_align, **kwargs) # noqa: E501
def operate_collateral_with_http_info(self, collateral_align, **kwargs): # noqa: E501
- """增加或赎回质押物 # noqa: E501
+ """Increase or redeem collateral # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -824,21 +846,30 @@ def operate_collateral_with_http_info(self, collateral_align, **kwargs): # noqa
local_var_params = locals()
- all_params = ['collateral_align']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'collateral_align'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method operate_collateral" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method operate_collateral" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'collateral_align' is set
- if self.api_client.client_side_validation and (
- 'collateral_align' not in local_var_params or local_var_params['collateral_align'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `collateral_align` when calling `operate_collateral`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('collateral_align' not in local_var_params or # noqa: E501
+ local_var_params['collateral_align'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `collateral_align` when calling `operate_collateral`") # noqa: E501
collection_formats = {}
@@ -856,15 +887,13 @@ def operate_collateral_with_http_info(self, collateral_align, **kwargs): # noqa
body_params = local_var_params['collateral_align']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/loan/collateral/collaterals',
- 'POST',
+ '/loan/collateral/collaterals', 'POST',
path_params,
query_params,
header_params,
@@ -877,11 +906,10 @@ def operate_collateral_with_http_info(self, collateral_align, **kwargs): # noqa
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_user_total_amount(self, **kwargs): # noqa: E501
- """查询用户总借贷与质押数量 # noqa: E501
+ """Query user's total borrowing and collateral amount # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -904,7 +932,7 @@ def get_user_total_amount(self, **kwargs): # noqa: E501
return self.get_user_total_amount_with_http_info(**kwargs) # noqa: E501
def get_user_total_amount_with_http_info(self, **kwargs): # noqa: E501
- """查询用户总借贷与质押数量 # noqa: E501
+ """Query user's total borrowing and collateral amount # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -928,12 +956,23 @@ def get_user_total_amount_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_user_total_amount" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_user_total_amount" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -950,14 +989,14 @@ def get_user_total_amount_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/loan/collateral/total_amount',
- 'GET',
+ '/loan/collateral/total_amount', 'GET',
path_params,
query_params,
header_params,
@@ -970,11 +1009,10 @@ def get_user_total_amount_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_user_ltv_info(self, collateral_currency, borrow_currency, **kwargs): # noqa: E501
- """查询用户质押率和可借剩余币种 # noqa: E501
+ """Query user's collateralization ratio and remaining borrowable currencies # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -982,8 +1020,8 @@ def get_user_ltv_info(self, collateral_currency, borrow_currency, **kwargs): #
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str collateral_currency: 质押币种 (required)
- :param str borrow_currency: 借款币种 (required)
+ :param str collateral_currency: Collateral currency (required)
+ :param str borrow_currency: Borrowed currency (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -999,7 +1037,7 @@ def get_user_ltv_info(self, collateral_currency, borrow_currency, **kwargs): #
return self.get_user_ltv_info_with_http_info(collateral_currency, borrow_currency, **kwargs) # noqa: E501
def get_user_ltv_info_with_http_info(self, collateral_currency, borrow_currency, **kwargs): # noqa: E501
- """查询用户质押率和可借剩余币种 # noqa: E501
+ """Query user's collateralization ratio and remaining borrowable currencies # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1007,8 +1045,8 @@ def get_user_ltv_info_with_http_info(self, collateral_currency, borrow_currency,
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str collateral_currency: 质押币种 (required)
- :param str borrow_currency: 借款币种 (required)
+ :param str collateral_currency: Collateral currency (required)
+ :param str borrow_currency: Borrowed currency (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1025,38 +1063,42 @@ def get_user_ltv_info_with_http_info(self, collateral_currency, borrow_currency,
local_var_params = locals()
- all_params = ['collateral_currency', 'borrow_currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'collateral_currency',
+ 'borrow_currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_user_ltv_info" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_user_ltv_info" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'collateral_currency' is set
- if self.api_client.client_side_validation and (
- 'collateral_currency' not in local_var_params
- or local_var_params['collateral_currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `collateral_currency` when calling `get_user_ltv_info`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('collateral_currency' not in local_var_params or # noqa: E501
+ local_var_params['collateral_currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `collateral_currency` when calling `get_user_ltv_info`") # noqa: E501
# verify the required parameter 'borrow_currency' is set
- if self.api_client.client_side_validation and (
- 'borrow_currency' not in local_var_params or local_var_params['borrow_currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `borrow_currency` when calling `get_user_ltv_info`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('borrow_currency' not in local_var_params or # noqa: E501
+ local_var_params['borrow_currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `borrow_currency` when calling `get_user_ltv_info`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
- if (
- 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None
- ): # noqa: E501
+ if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501
query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501
if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501
query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501
@@ -1068,14 +1110,14 @@ def get_user_ltv_info_with_http_info(self, collateral_currency, borrow_currency,
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/loan/collateral/ltv',
- 'GET',
+ '/loan/collateral/ltv', 'GET',
path_params,
query_params,
header_params,
@@ -1088,11 +1130,10 @@ def get_user_ltv_info_with_http_info(self, collateral_currency, borrow_currency,
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_collateral_currencies(self, **kwargs): # noqa: E501
- """查询支持的借款币种和抵押币种 # noqa: E501
+ """Query supported borrowing and collateral currencies # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1100,7 +1141,7 @@ def list_collateral_currencies(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str loan_currency: 借款币种参数,当loan_currency没传时会返回支持的所有借款币种,当传loan_currency时会查询该借款币种支持的抵押币种数组
+ :param str loan_currency: Parameter loan_currency. If omitted, returns all supported borrowing currencies; if provided, returns the array of collateral currencies supported for that borrowing currency
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1116,7 +1157,7 @@ def list_collateral_currencies(self, **kwargs): # noqa: E501
return self.list_collateral_currencies_with_http_info(**kwargs) # noqa: E501
def list_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501
- """查询支持的借款币种和抵押币种 # noqa: E501
+ """Query supported borrowing and collateral currencies # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1124,7 +1165,7 @@ def list_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str loan_currency: 借款币种参数,当loan_currency没传时会返回支持的所有借款币种,当传loan_currency时会查询该借款币种支持的抵押币种数组
+ :param str loan_currency: Parameter loan_currency. If omitted, returns all supported borrowing currencies; if provided, returns the array of collateral currencies supported for that borrowing currency
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1141,13 +1182,23 @@ def list_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['loan_currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'loan_currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_collateral_currencies" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_collateral_currencies" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
@@ -1167,14 +1218,14 @@ def list_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/loan/collateral/currencies',
- 'GET',
+ '/loan/collateral/currencies', 'GET',
path_params,
query_params,
header_params,
@@ -1187,5 +1238,4 @@ def list_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
diff --git a/gate_api/api/delivery_api.py b/gate_api/api/delivery_api.py
index 60682ff..4979aa5 100644
--- a/gate_api/api/delivery_api.py
+++ b/gate_api/api/delivery_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class DeliveryApi(object):
@@ -34,7 +37,7 @@ def __init__(self, api_client=None):
self.api_client = api_client
def list_delivery_contracts(self, settle, **kwargs): # noqa: E501
- """List all futures contracts # noqa: E501
+ """Query all futures contracts # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -58,7 +61,7 @@ def list_delivery_contracts(self, settle, **kwargs): # noqa: E501
return self.list_delivery_contracts_with_http_info(settle, **kwargs) # noqa: E501
def list_delivery_contracts_with_http_info(self, settle, **kwargs): # noqa: E501
- """List all futures contracts # noqa: E501
+ """Query all futures contracts # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -83,21 +86,30 @@ def list_delivery_contracts_with_http_info(self, settle, **kwargs): # noqa: E50
local_var_params = locals()
- all_params = ['settle']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_delivery_contracts" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_contracts" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_delivery_contracts`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_contracts`") # noqa: E501
collection_formats = {}
@@ -114,14 +126,14 @@ def list_delivery_contracts_with_http_info(self, settle, **kwargs): # noqa: E50
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/contracts',
- 'GET',
+ '/delivery/{settle}/contracts', 'GET',
path_params,
query_params,
header_params,
@@ -134,11 +146,10 @@ def list_delivery_contracts_with_http_info(self, settle, **kwargs): # noqa: E50
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_delivery_contract(self, settle, contract, **kwargs): # noqa: E501
- """Get a single contract # noqa: E501
+ """Query single contract information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -163,7 +174,7 @@ def get_delivery_contract(self, settle, contract, **kwargs): # noqa: E501
return self.get_delivery_contract_with_http_info(settle, contract, **kwargs) # noqa: E501
def get_delivery_contract_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Get a single contract # noqa: E501
+ """Query single contract information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -189,28 +200,35 @@ def get_delivery_contract_with_http_info(self, settle, contract, **kwargs): # n
local_var_params = locals()
- all_params = ['settle', 'contract']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_delivery_contract" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_delivery_contract" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `get_delivery_contract`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `get_delivery_contract`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `get_delivery_contract`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `get_delivery_contract`") # noqa: E501
collection_formats = {}
@@ -229,14 +247,14 @@ def get_delivery_contract_with_http_info(self, settle, contract, **kwargs): # n
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/contracts/{contract}',
- 'GET',
+ '/delivery/{settle}/contracts/{contract}', 'GET',
path_params,
query_params,
header_params,
@@ -249,11 +267,10 @@ def get_delivery_contract_with_http_info(self, settle, contract, **kwargs): # n
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_delivery_order_book(self, settle, contract, **kwargs): # noqa: E501
- """Futures order book # noqa: E501
+ """Query futures market depth information # noqa: E501
Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -264,9 +281,9 @@ def list_delivery_order_book(self, settle, contract, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str interval: Order depth. 0 means no aggregation is applied. default to 0
- :param int limit: Maximum number of order depth data in asks or bids
- :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update
+ :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified
+ :param int limit: Number of depth levels
+ :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time depth changes
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -282,7 +299,7 @@ def list_delivery_order_book(self, settle, contract, **kwargs): # noqa: E501
return self.list_delivery_order_book_with_http_info(settle, contract, **kwargs) # noqa: E501
def list_delivery_order_book_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Futures order book # noqa: E501
+ """Query futures market depth information # noqa: E501
Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -293,9 +310,9 @@ def list_delivery_order_book_with_http_info(self, settle, contract, **kwargs):
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str interval: Order depth. 0 means no aggregation is applied. default to 0
- :param int limit: Maximum number of order depth data in asks or bids
- :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update
+ :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified
+ :param int limit: Number of depth levels
+ :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time depth changes
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -312,41 +329,43 @@ def list_delivery_order_book_with_http_info(self, settle, contract, **kwargs):
local_var_params = locals()
- all_params = ['settle', 'contract', 'interval', 'limit', 'with_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'interval',
+ 'limit',
+ 'with_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_delivery_order_book" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_order_book" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_delivery_order_book`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_order_book`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `list_delivery_order_book`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 50
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_order_book`, must be a value less than or equal to `50`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_order_book`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `list_delivery_order_book`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 50: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_order_book`, must be a value less than or equal to `50`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_order_book`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -370,14 +389,14 @@ def list_delivery_order_book_with_http_info(self, settle, contract, **kwargs):
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/order_book',
- 'GET',
+ '/delivery/{settle}/order_book', 'GET',
path_params,
query_params,
header_params,
@@ -390,11 +409,10 @@ def list_delivery_order_book_with_http_info(self, settle, contract, **kwargs):
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_delivery_trades(self, settle, contract, **kwargs): # noqa: E501
- """Futures trading history # noqa: E501
+ """Futures market transaction records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -404,10 +422,10 @@ def list_delivery_trades(self, settle, contract, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param int limit: Maximum number of records to be returned in a single list
- :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range
- :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned.
- :param int to: Specify end time in Unix seconds, default to current time
+ :param int limit: Maximum number of records returned in a single list
+ :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list.This field is no longer supported. For new requests, please use the fromand tofields to specify the time rang
+ :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned.
+ :param int to: Specify end time in Unix seconds, default to current time.
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -423,7 +441,7 @@ def list_delivery_trades(self, settle, contract, **kwargs): # noqa: E501
return self.list_delivery_trades_with_http_info(settle, contract, **kwargs) # noqa: E501
def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Futures trading history # noqa: E501
+ """Futures market transaction records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -433,10 +451,10 @@ def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # no
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param int limit: Maximum number of records to be returned in a single list
- :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range
- :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned.
- :param int to: Specify end time in Unix seconds, default to current time
+ :param int limit: Maximum number of records returned in a single list
+ :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list.This field is no longer supported. For new requests, please use the fromand tofields to specify the time rang
+ :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned.
+ :param int to: Specify end time in Unix seconds, default to current time.
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -453,41 +471,44 @@ def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # no
local_var_params = locals()
- all_params = ['settle', 'contract', 'limit', 'last_id', '_from', 'to']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'limit',
+ 'last_id',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_delivery_trades" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_trades" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_delivery_trades`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_trades`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `list_delivery_trades`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_trades`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_trades`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `list_delivery_trades`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_trades`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_trades`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -513,14 +534,14 @@ def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # no
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/trades',
- 'GET',
+ '/delivery/{settle}/trades', 'GET',
path_params,
query_params,
header_params,
@@ -533,11 +554,10 @@ def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # no
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_delivery_candlesticks(self, settle, contract, **kwargs): # noqa: E501
- """Get futures candlesticks # noqa: E501
+ """Futures market K-line chart # noqa: E501
Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -548,10 +568,10 @@ def list_delivery_candlesticks(self, settle, contract, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param int _from: 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间
- :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time
- :param int limit: 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝
- :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0
+ :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified
+ :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision
+ :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected.
+ :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial time
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -567,7 +587,7 @@ def list_delivery_candlesticks(self, settle, contract, **kwargs): # noqa: E501
return self.list_delivery_candlesticks_with_http_info(settle, contract, **kwargs) # noqa: E501
def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Get futures candlesticks # noqa: E501
+ """Futures market K-line chart # noqa: E501
Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -578,10 +598,10 @@ def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs):
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param int _from: 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间
- :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time
- :param int limit: 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝
- :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0
+ :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified
+ :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision
+ :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected.
+ :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial time
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -598,37 +618,42 @@ def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs):
local_var_params = locals()
- all_params = ['settle', 'contract', '_from', 'to', 'limit', 'interval']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ '_from',
+ 'to',
+ 'limit',
+ 'interval'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_delivery_candlesticks" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_candlesticks" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_delivery_candlesticks`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_candlesticks`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `list_delivery_candlesticks`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 2000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_candlesticks`, must be a value less than or equal to `2000`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `list_delivery_candlesticks`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 2000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_candlesticks`, must be a value less than or equal to `2000`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -654,14 +679,14 @@ def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs):
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/candlesticks',
- 'GET',
+ '/delivery/{settle}/candlesticks', 'GET',
path_params,
query_params,
header_params,
@@ -674,11 +699,10 @@ def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs):
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_delivery_tickers(self, settle, **kwargs): # noqa: E501
- """List futures tickers # noqa: E501
+ """Get all futures trading statistics # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -695,7 +719,7 @@ def list_delivery_tickers(self, settle, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: list[gate_api.FuturesTicker]
+ :rtype: list[gate_api.DeliveryTicker]
:return: If the method is called asynchronously,
returns the request thread.
"""
@@ -703,7 +727,7 @@ def list_delivery_tickers(self, settle, **kwargs): # noqa: E501
return self.list_delivery_tickers_with_http_info(settle, **kwargs) # noqa: E501
def list_delivery_tickers_with_http_info(self, settle, **kwargs): # noqa: E501
- """List futures tickers # noqa: E501
+ """Get all futures trading statistics # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -722,28 +746,38 @@ def list_delivery_tickers_with_http_info(self, settle, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(list[gate_api.FuturesTicker], status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.DeliveryTicker], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['settle', 'contract']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_delivery_tickers" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_tickers" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_delivery_tickers`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_tickers`") # noqa: E501
collection_formats = {}
@@ -762,31 +796,30 @@ def list_delivery_tickers_with_http_info(self, settle, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/tickers',
- 'GET',
+ '/delivery/{settle}/tickers', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[FuturesTicker]', # noqa: E501
+ response_type='list[DeliveryTicker]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_delivery_insurance_ledger(self, settle, **kwargs): # noqa: E501
- """Futures insurance balance history # noqa: E501
+ """Futures market insurance fund history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -795,7 +828,7 @@ def list_delivery_insurance_ledger(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -811,7 +844,7 @@ def list_delivery_insurance_ledger(self, settle, **kwargs): # noqa: E501
return self.list_delivery_insurance_ledger_with_http_info(settle, **kwargs) # noqa: E501
def list_delivery_insurance_ledger_with_http_info(self, settle, **kwargs): # noqa: E501
- """Futures insurance balance history # noqa: E501
+ """Futures market insurance fund history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -820,7 +853,7 @@ def list_delivery_insurance_ledger_with_http_info(self, settle, **kwargs): # no
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -837,36 +870,36 @@ def list_delivery_insurance_ledger_with_http_info(self, settle, **kwargs): # no
local_var_params = locals()
- all_params = ['settle', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_delivery_insurance_ledger" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_insurance_ledger" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_delivery_insurance_ledger`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_insurance_ledger`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_insurance_ledger`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_insurance_ledger`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_insurance_ledger`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_insurance_ledger`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -884,14 +917,14 @@ def list_delivery_insurance_ledger_with_http_info(self, settle, **kwargs): # no
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/insurance',
- 'GET',
+ '/delivery/{settle}/insurance', 'GET',
path_params,
query_params,
header_params,
@@ -904,11 +937,10 @@ def list_delivery_insurance_ledger_with_http_info(self, settle, **kwargs): # no
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_delivery_accounts(self, settle, **kwargs): # noqa: E501
- """Query futures account # noqa: E501
+ """Get futures account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -932,7 +964,7 @@ def list_delivery_accounts(self, settle, **kwargs): # noqa: E501
return self.list_delivery_accounts_with_http_info(settle, **kwargs) # noqa: E501
def list_delivery_accounts_with_http_info(self, settle, **kwargs): # noqa: E501
- """Query futures account # noqa: E501
+ """Get futures account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -957,21 +989,30 @@ def list_delivery_accounts_with_http_info(self, settle, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['settle']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_delivery_accounts" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_accounts" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_delivery_accounts`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_accounts`") # noqa: E501
collection_formats = {}
@@ -988,14 +1029,14 @@ def list_delivery_accounts_with_http_info(self, settle, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/accounts',
- 'GET',
+ '/delivery/{settle}/accounts', 'GET',
path_params,
query_params,
header_params,
@@ -1008,11 +1049,10 @@ def list_delivery_accounts_with_http_info(self, settle, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_delivery_account_book(self, settle, **kwargs): # noqa: E501
- """Query account book # noqa: E501
+ """Query futures account change history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1021,10 +1061,10 @@ def list_delivery_account_book(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param int limit: Maximum number of records to be returned in a single list
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str type: Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1040,7 +1080,7 @@ def list_delivery_account_book(self, settle, **kwargs): # noqa: E501
return self.list_delivery_account_book_with_http_info(settle, **kwargs) # noqa: E501
def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa: E501
- """Query account book # noqa: E501
+ """Query futures account change history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1049,10 +1089,10 @@ def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa:
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param int limit: Maximum number of records to be returned in a single list
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str type: Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1069,36 +1109,39 @@ def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['settle', 'limit', '_from', 'to', 'type']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'limit',
+ '_from',
+ 'to',
+ 'type'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_delivery_account_book" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_account_book" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_delivery_account_book`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_account_book`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_account_book`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_account_book`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_account_book`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_account_book`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1122,14 +1165,14 @@ def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa:
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/account_book',
- 'GET',
+ '/delivery/{settle}/account_book', 'GET',
path_params,
query_params,
header_params,
@@ -1142,11 +1185,10 @@ def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa:
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_delivery_positions(self, settle, **kwargs): # noqa: E501
- """List all positions of a user # noqa: E501
+ """Get user position list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1170,7 +1212,7 @@ def list_delivery_positions(self, settle, **kwargs): # noqa: E501
return self.list_delivery_positions_with_http_info(settle, **kwargs) # noqa: E501
def list_delivery_positions_with_http_info(self, settle, **kwargs): # noqa: E501
- """List all positions of a user # noqa: E501
+ """Get user position list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1195,21 +1237,30 @@ def list_delivery_positions_with_http_info(self, settle, **kwargs): # noqa: E50
local_var_params = locals()
- all_params = ['settle']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_delivery_positions" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_positions" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_delivery_positions`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_positions`") # noqa: E501
collection_formats = {}
@@ -1226,14 +1277,14 @@ def list_delivery_positions_with_http_info(self, settle, **kwargs): # noqa: E50
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/positions',
- 'GET',
+ '/delivery/{settle}/positions', 'GET',
path_params,
query_params,
header_params,
@@ -1246,11 +1297,10 @@ def list_delivery_positions_with_http_info(self, settle, **kwargs): # noqa: E50
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_delivery_position(self, settle, contract, **kwargs): # noqa: E501
- """Get single position # noqa: E501
+ """Get single position information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1275,7 +1325,7 @@ def get_delivery_position(self, settle, contract, **kwargs): # noqa: E501
return self.get_delivery_position_with_http_info(settle, contract, **kwargs) # noqa: E501
def get_delivery_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Get single position # noqa: E501
+ """Get single position information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1301,28 +1351,35 @@ def get_delivery_position_with_http_info(self, settle, contract, **kwargs): # n
local_var_params = locals()
- all_params = ['settle', 'contract']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_delivery_position" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_delivery_position" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `get_delivery_position`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `get_delivery_position`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `get_delivery_position`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `get_delivery_position`") # noqa: E501
collection_formats = {}
@@ -1341,14 +1398,14 @@ def get_delivery_position_with_http_info(self, settle, contract, **kwargs): # n
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/positions/{contract}',
- 'GET',
+ '/delivery/{settle}/positions/{contract}', 'GET',
path_params,
query_params,
header_params,
@@ -1361,8 +1418,7 @@ def get_delivery_position_with_http_info(self, settle, contract, **kwargs): # n
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def update_delivery_position_margin(self, settle, contract, change, **kwargs): # noqa: E501
"""Update position margin # noqa: E501
@@ -1375,7 +1431,7 @@ def update_delivery_position_margin(self, settle, contract, change, **kwargs):
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required)
+ :param str change: Margin change amount, positive number increases, negative number decreases (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1401,7 +1457,7 @@ def update_delivery_position_margin_with_http_info(self, settle, contract, chang
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required)
+ :param str change: Margin change amount, positive number increases, negative number decreases (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1418,37 +1474,40 @@ def update_delivery_position_margin_with_http_info(self, settle, contract, chang
local_var_params = locals()
- all_params = ['settle', 'contract', 'change']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'change'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method update_delivery_position_margin" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method update_delivery_position_margin" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `update_delivery_position_margin`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `update_delivery_position_margin`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `update_delivery_position_margin`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `update_delivery_position_margin`") # noqa: E501
# verify the required parameter 'change' is set
- if self.api_client.client_side_validation and (
- 'change' not in local_var_params or local_var_params['change'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `change` when calling `update_delivery_position_margin`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('change' not in local_var_params or # noqa: E501
+ local_var_params['change'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `change` when calling `update_delivery_position_margin`") # noqa: E501
collection_formats = {}
@@ -1469,14 +1528,14 @@ def update_delivery_position_margin_with_http_info(self, settle, contract, chang
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/positions/{contract}/margin',
- 'POST',
+ '/delivery/{settle}/positions/{contract}/margin', 'POST',
path_params,
query_params,
header_params,
@@ -1489,8 +1548,7 @@ def update_delivery_position_margin_with_http_info(self, settle, contract, chang
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def update_delivery_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501
"""Update position leverage # noqa: E501
@@ -1546,37 +1604,40 @@ def update_delivery_position_leverage_with_http_info(self, settle, contract, lev
local_var_params = locals()
- all_params = ['settle', 'contract', 'leverage']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'leverage'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method update_delivery_position_leverage" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method update_delivery_position_leverage" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `update_delivery_position_leverage`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `update_delivery_position_leverage`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `update_delivery_position_leverage`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `update_delivery_position_leverage`") # noqa: E501
# verify the required parameter 'leverage' is set
- if self.api_client.client_side_validation and (
- 'leverage' not in local_var_params or local_var_params['leverage'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `leverage` when calling `update_delivery_position_leverage`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('leverage' not in local_var_params or # noqa: E501
+ local_var_params['leverage'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `leverage` when calling `update_delivery_position_leverage`") # noqa: E501
collection_formats = {}
@@ -1597,14 +1658,14 @@ def update_delivery_position_leverage_with_http_info(self, settle, contract, lev
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/positions/{contract}/leverage',
- 'POST',
+ '/delivery/{settle}/positions/{contract}/leverage', 'POST',
path_params,
query_params,
header_params,
@@ -1617,8 +1678,7 @@ def update_delivery_position_leverage_with_http_info(self, settle, contract, lev
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def update_delivery_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501
"""Update position risk limit # noqa: E501
@@ -1644,9 +1704,7 @@ def update_delivery_position_risk_limit(self, settle, contract, risk_limit, **kw
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.update_delivery_position_risk_limit_with_http_info(
- settle, contract, risk_limit, **kwargs
- ) # noqa: E501
+ return self.update_delivery_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501
def update_delivery_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501
"""Update position risk limit # noqa: E501
@@ -1676,37 +1734,40 @@ def update_delivery_position_risk_limit_with_http_info(self, settle, contract, r
local_var_params = locals()
- all_params = ['settle', 'contract', 'risk_limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'risk_limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method update_delivery_position_risk_limit" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method update_delivery_position_risk_limit" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `update_delivery_position_risk_limit`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `update_delivery_position_risk_limit`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `update_delivery_position_risk_limit`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `update_delivery_position_risk_limit`") # noqa: E501
# verify the required parameter 'risk_limit' is set
- if self.api_client.client_side_validation and (
- 'risk_limit' not in local_var_params or local_var_params['risk_limit'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `risk_limit` when calling `update_delivery_position_risk_limit`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('risk_limit' not in local_var_params or # noqa: E501
+ local_var_params['risk_limit'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `risk_limit` when calling `update_delivery_position_risk_limit`") # noqa: E501
collection_formats = {}
@@ -1727,14 +1788,14 @@ def update_delivery_position_risk_limit_with_http_info(self, settle, contract, r
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/positions/{contract}/risk_limit',
- 'POST',
+ '/delivery/{settle}/positions/{contract}/risk_limit', 'POST',
path_params,
query_params,
header_params,
@@ -1747,13 +1808,12 @@ def update_delivery_position_risk_limit_with_http_info(self, settle, contract, r
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_delivery_orders(self, settle, status, **kwargs): # noqa: E501
- """List futures orders # noqa: E501
+ """Query futures order list # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_delivery_orders(settle, status, async_req=True)
@@ -1761,12 +1821,12 @@ def list_delivery_orders(self, settle, status, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str status: Only list the orders with this status (required)
+ :param str status: Query order list based on status (required)
:param str contract: Futures contract
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param str last_id: Specify list staring point using the `id` of last record in previous list-query results
- :param int count_total: Whether to return total number matched. Default to 0(no return)
+ :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used
+ :param int count_total: Whether to return total number matched, defaults to 0 (no return)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1782,9 +1842,9 @@ def list_delivery_orders(self, settle, status, **kwargs): # noqa: E501
return self.list_delivery_orders_with_http_info(settle, status, **kwargs) # noqa: E501
def list_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501
- """List futures orders # noqa: E501
+ """Query futures order list # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_delivery_orders_with_http_info(settle, status, async_req=True)
@@ -1792,12 +1852,12 @@ def list_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str status: Only list the orders with this status (required)
+ :param str status: Query order list based on status (required)
:param str contract: Futures contract
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param str last_id: Specify list staring point using the `id` of last record in previous list-query results
- :param int count_total: Whether to return total number matched. Default to 0(no return)
+ :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used
+ :param int count_total: Whether to return total number matched, defaults to 0 (no return)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1814,47 +1874,47 @@ def list_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa
local_var_params = locals()
- all_params = ['settle', 'status', 'contract', 'limit', 'offset', 'last_id', 'count_total']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'status',
+ 'contract',
+ 'limit',
+ 'offset',
+ 'last_id',
+ 'count_total'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_delivery_orders" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_delivery_orders`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_orders`") # noqa: E501
# verify the required parameter 'status' is set
- if self.api_client.client_side_validation and (
- 'status' not in local_var_params or local_var_params['status'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `status` when calling `list_delivery_orders`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_orders`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_delivery_orders`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501
+ local_var_params['status'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `status` when calling `list_delivery_orders`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_orders`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_delivery_orders`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1882,14 +1942,14 @@ def list_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/orders',
- 'GET',
+ '/delivery/{settle}/orders', 'GET',
path_params,
query_params,
header_params,
@@ -1902,13 +1962,12 @@ def list_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_delivery_order(self, settle, futures_order, **kwargs): # noqa: E501
- """Create a futures order # noqa: E501
+ """Place futures order # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_delivery_order(settle, futures_order, async_req=True)
@@ -1932,9 +1991,9 @@ def create_delivery_order(self, settle, futures_order, **kwargs): # noqa: E501
return self.create_delivery_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501
def create_delivery_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501
- """Create a futures order # noqa: E501
+ """Place futures order # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_delivery_order_with_http_info(settle, futures_order, async_req=True)
@@ -1959,28 +2018,35 @@ def create_delivery_order_with_http_info(self, settle, futures_order, **kwargs):
local_var_params = locals()
- all_params = ['settle', 'futures_order']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'futures_order'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_delivery_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_delivery_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `create_delivery_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `create_delivery_order`") # noqa: E501
# verify the required parameter 'futures_order' is set
- if self.api_client.client_side_validation and (
- 'futures_order' not in local_var_params or local_var_params['futures_order'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `futures_order` when calling `create_delivery_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('futures_order' not in local_var_params or # noqa: E501
+ local_var_params['futures_order'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `futures_order` when calling `create_delivery_order`") # noqa: E501
collection_formats = {}
@@ -1999,19 +2065,18 @@ def create_delivery_order_with_http_info(self, settle, futures_order, **kwargs):
if 'futures_order' in local_var_params:
body_params = local_var_params['futures_order']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/orders',
- 'POST',
+ '/delivery/{settle}/orders', 'POST',
path_params,
query_params,
header_params,
@@ -2024,13 +2089,12 @@ def create_delivery_order_with_http_info(self, settle, futures_order, **kwargs):
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def cancel_delivery_orders(self, settle, contract, **kwargs): # noqa: E501
- """Cancel all `open` orders matched # noqa: E501
+ """Cancel all orders with 'open' status # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.cancel_delivery_orders(settle, contract, async_req=True)
@@ -2039,7 +2103,7 @@ def cancel_delivery_orders(self, settle, contract, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str side: All bids or asks. Both included if not specified
+ :param str side: Specify all bids or all asks, both included if not specified
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2055,9 +2119,9 @@ def cancel_delivery_orders(self, settle, contract, **kwargs): # noqa: E501
return self.cancel_delivery_orders_with_http_info(settle, contract, **kwargs) # noqa: E501
def cancel_delivery_orders_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Cancel all `open` orders matched # noqa: E501
+ """Cancel all orders with 'open' status # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.cancel_delivery_orders_with_http_info(settle, contract, async_req=True)
@@ -2066,7 +2130,7 @@ def cancel_delivery_orders_with_http_info(self, settle, contract, **kwargs): #
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str side: All bids or asks. Both included if not specified
+ :param str side: Specify all bids or all asks, both included if not specified
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2083,28 +2147,36 @@ def cancel_delivery_orders_with_http_info(self, settle, contract, **kwargs): #
local_var_params = locals()
- all_params = ['settle', 'contract', 'side']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'side'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method cancel_delivery_orders" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_delivery_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `cancel_delivery_orders`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `cancel_delivery_orders`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `cancel_delivery_orders`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `cancel_delivery_orders`") # noqa: E501
collection_formats = {}
@@ -2125,14 +2197,14 @@ def cancel_delivery_orders_with_http_info(self, settle, contract, **kwargs): #
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/orders',
- 'DELETE',
+ '/delivery/{settle}/orders', 'DELETE',
path_params,
query_params,
header_params,
@@ -2145,13 +2217,12 @@ def cancel_delivery_orders_with_http_info(self, settle, contract, **kwargs): #
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_delivery_order(self, settle, order_id, **kwargs): # noqa: E501
- """Get a single order # noqa: E501
+ """Query single order details # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_delivery_order(settle, order_id, async_req=True)
@@ -2159,7 +2230,7 @@ def get_delivery_order(self, settle, order_id, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2175,9 +2246,9 @@ def get_delivery_order(self, settle, order_id, **kwargs): # noqa: E501
return self.get_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501
def get_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501
- """Get a single order # noqa: E501
+ """Query single order details # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_delivery_order_with_http_info(settle, order_id, async_req=True)
@@ -2185,7 +2256,7 @@ def get_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2202,28 +2273,35 @@ def get_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa
local_var_params = locals()
- all_params = ['settle', 'order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_delivery_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_delivery_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `get_delivery_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `get_delivery_order`") # noqa: E501
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `get_delivery_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `get_delivery_order`") # noqa: E501
collection_formats = {}
@@ -2242,14 +2320,14 @@ def get_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/orders/{order_id}',
- 'GET',
+ '/delivery/{settle}/orders/{order_id}', 'GET',
path_params,
query_params,
header_params,
@@ -2262,11 +2340,10 @@ def get_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def cancel_delivery_order(self, settle, order_id, **kwargs): # noqa: E501
- """Cancel a single order # noqa: E501
+ """Cancel single order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2275,7 +2352,7 @@ def cancel_delivery_order(self, settle, order_id, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2291,7 +2368,7 @@ def cancel_delivery_order(self, settle, order_id, **kwargs): # noqa: E501
return self.cancel_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501
def cancel_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501
- """Cancel a single order # noqa: E501
+ """Cancel single order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2300,7 +2377,7 @@ def cancel_delivery_order_with_http_info(self, settle, order_id, **kwargs): # n
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2317,28 +2394,35 @@ def cancel_delivery_order_with_http_info(self, settle, order_id, **kwargs): # n
local_var_params = locals()
- all_params = ['settle', 'order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method cancel_delivery_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_delivery_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `cancel_delivery_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `cancel_delivery_order`") # noqa: E501
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `cancel_delivery_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_delivery_order`") # noqa: E501
collection_formats = {}
@@ -2357,14 +2441,14 @@ def cancel_delivery_order_with_http_info(self, settle, order_id, **kwargs): # n
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/orders/{order_id}',
- 'DELETE',
+ '/delivery/{settle}/orders/{order_id}', 'DELETE',
path_params,
query_params,
header_params,
@@ -2377,11 +2461,10 @@ def cancel_delivery_order_with_http_info(self, settle, order_id, **kwargs): # n
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_my_delivery_trades(self, settle, **kwargs): # noqa: E501
- """List personal trading history # noqa: E501
+ """Query personal trading records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2392,10 +2475,10 @@ def get_my_delivery_trades(self, settle, **kwargs): # noqa: E501
:param str settle: Settle currency (required)
:param str contract: Futures contract
:param int order: Futures order ID, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param str last_id: Specify list staring point using the `id` of last record in previous list-query results
- :param int count_total: Whether to return total number matched. Default to 0(no return)
+ :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used
+ :param int count_total: Whether to return total number matched, defaults to 0 (no return)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2411,7 +2494,7 @@ def get_my_delivery_trades(self, settle, **kwargs): # noqa: E501
return self.get_my_delivery_trades_with_http_info(settle, **kwargs) # noqa: E501
def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501
- """List personal trading history # noqa: E501
+ """Query personal trading records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2422,10 +2505,10 @@ def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501
:param str settle: Settle currency (required)
:param str contract: Futures contract
:param int order: Futures order ID, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param str last_id: Specify list staring point using the `id` of last record in previous list-query results
- :param int count_total: Whether to return total number matched. Default to 0(no return)
+ :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used
+ :param int count_total: Whether to return total number matched, defaults to 0 (no return)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2442,40 +2525,43 @@ def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['settle', 'contract', 'order', 'limit', 'offset', 'last_id', 'count_total']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'order',
+ 'limit',
+ 'offset',
+ 'last_id',
+ 'count_total'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_my_delivery_trades" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_my_delivery_trades" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `get_my_delivery_trades`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `get_my_delivery_trades`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `get_my_delivery_trades`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `get_my_delivery_trades`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `get_my_delivery_trades`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_delivery_trades`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_delivery_trades`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `get_my_delivery_trades`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -2503,14 +2589,14 @@ def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/my_trades',
- 'GET',
+ '/delivery/{settle}/my_trades', 'GET',
path_params,
query_params,
header_params,
@@ -2523,11 +2609,10 @@ def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_delivery_position_close(self, settle, **kwargs): # noqa: E501
- """List position close history # noqa: E501
+ """Query position close history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2537,7 +2622,7 @@ def list_delivery_position_close(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2553,7 +2638,7 @@ def list_delivery_position_close(self, settle, **kwargs): # noqa: E501
return self.list_delivery_position_close_with_http_info(settle, **kwargs) # noqa: E501
def list_delivery_position_close_with_http_info(self, settle, **kwargs): # noqa: E501
- """List position close history # noqa: E501
+ """Query position close history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2563,7 +2648,7 @@ def list_delivery_position_close_with_http_info(self, settle, **kwargs): # noqa
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2580,36 +2665,37 @@ def list_delivery_position_close_with_http_info(self, settle, **kwargs): # noqa
local_var_params = locals()
- all_params = ['settle', 'contract', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_delivery_position_close" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_position_close" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_delivery_position_close`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_position_close`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_position_close`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_position_close`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_position_close`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_position_close`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -2629,14 +2715,14 @@ def list_delivery_position_close_with_http_info(self, settle, **kwargs): # noqa
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/position_close',
- 'GET',
+ '/delivery/{settle}/position_close', 'GET',
path_params,
query_params,
header_params,
@@ -2649,11 +2735,10 @@ def list_delivery_position_close_with_http_info(self, settle, **kwargs): # noqa
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_delivery_liquidates(self, settle, **kwargs): # noqa: E501
- """List liquidation history # noqa: E501
+ """Query liquidation history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2663,8 +2748,8 @@ def list_delivery_liquidates(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract
- :param int limit: Maximum number of records to be returned in a single list
- :param int at: Specify a liquidation timestamp
+ :param int limit: Maximum number of records returned in a single list
+ :param int at: Specify liquidation timestamp
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2680,7 +2765,7 @@ def list_delivery_liquidates(self, settle, **kwargs): # noqa: E501
return self.list_delivery_liquidates_with_http_info(settle, **kwargs) # noqa: E501
def list_delivery_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501
- """List liquidation history # noqa: E501
+ """Query liquidation history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2690,8 +2775,8 @@ def list_delivery_liquidates_with_http_info(self, settle, **kwargs): # noqa: E5
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract
- :param int limit: Maximum number of records to be returned in a single list
- :param int at: Specify a liquidation timestamp
+ :param int limit: Maximum number of records returned in a single list
+ :param int at: Specify liquidation timestamp
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2708,34 +2793,38 @@ def list_delivery_liquidates_with_http_info(self, settle, **kwargs): # noqa: E5
local_var_params = locals()
- all_params = ['settle', 'contract', 'limit', 'at']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'limit',
+ 'at'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_delivery_liquidates" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_liquidates" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_delivery_liquidates`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_liquidates`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_liquidates`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_liquidates`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_liquidates`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_liquidates`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -2757,14 +2846,14 @@ def list_delivery_liquidates_with_http_info(self, settle, **kwargs): # noqa: E5
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/liquidates',
- 'GET',
+ '/delivery/{settle}/liquidates', 'GET',
path_params,
query_params,
header_params,
@@ -2777,11 +2866,10 @@ def list_delivery_liquidates_with_http_info(self, settle, **kwargs): # noqa: E5
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_delivery_settlements(self, settle, **kwargs): # noqa: E501
- """List settlement history # noqa: E501
+ """Query settlement records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2791,8 +2879,8 @@ def list_delivery_settlements(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract
- :param int limit: Maximum number of records to be returned in a single list
- :param int at: Specify a settlement timestamp
+ :param int limit: Maximum number of records returned in a single list
+ :param int at: Specify settlement timestamp
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2808,7 +2896,7 @@ def list_delivery_settlements(self, settle, **kwargs): # noqa: E501
return self.list_delivery_settlements_with_http_info(settle, **kwargs) # noqa: E501
def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E501
- """List settlement history # noqa: E501
+ """Query settlement records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2818,8 +2906,8 @@ def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract
- :param int limit: Maximum number of records to be returned in a single list
- :param int at: Specify a settlement timestamp
+ :param int limit: Maximum number of records returned in a single list
+ :param int at: Specify settlement timestamp
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2836,34 +2924,38 @@ def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E
local_var_params = locals()
- all_params = ['settle', 'contract', 'limit', 'at']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'limit',
+ 'at'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_delivery_settlements" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_settlements" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_delivery_settlements`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_settlements`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_delivery_settlements`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_settlements`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_settlements`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_settlements`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -2885,14 +2977,14 @@ def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/settlements',
- 'GET',
+ '/delivery/{settle}/settlements', 'GET',
path_params,
query_params,
header_params,
@@ -2905,11 +2997,145 @@ def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def list_delivery_risk_limit_tiers(self, settle, **kwargs): # noqa: E501
+ """Query risk limit tiers # noqa: E501
+
+ When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_delivery_risk_limit_tiers(settle, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param str contract: Futures contract
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.FuturesLimitRiskTiers]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_delivery_risk_limit_tiers_with_http_info(settle, **kwargs) # noqa: E501
+
+ def list_delivery_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noqa: E501
+ """Query risk limit tiers # noqa: E501
+
+ When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_delivery_risk_limit_tiers_with_http_info(settle, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param str contract: Futures contract
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.FuturesLimitRiskTiers], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'settle',
+ 'contract',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_delivery_risk_limit_tiers" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'settle' is set
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_risk_limit_tiers`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_risk_limit_tiers`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_risk_limit_tiers`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_delivery_risk_limit_tiers`, must be a value greater than or equal to `0`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+ if 'settle' in local_var_params:
+ path_params['settle'] = local_var_params['settle'] # noqa: E501
+
+ query_params = []
+ if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501
+ query_params.append(('contract', local_var_params['contract'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/delivery/{settle}/risk_limit_tiers', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[FuturesLimitRiskTiers]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def list_price_triggered_delivery_orders(self, settle, status, **kwargs): # noqa: E501
- """List all auto orders # noqa: E501
+ """Query auto order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2918,9 +3144,9 @@ def list_price_triggered_delivery_orders(self, settle, status, **kwargs): # noq
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str status: Only list the orders with this status (required)
+ :param str status: Query order list based on status (required)
:param str contract: Futures contract, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -2937,7 +3163,7 @@ def list_price_triggered_delivery_orders(self, settle, status, **kwargs): # noq
return self.list_price_triggered_delivery_orders_with_http_info(settle, status, **kwargs) # noqa: E501
def list_price_triggered_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501
- """List all auto orders # noqa: E501
+ """Query auto order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2946,9 +3172,9 @@ def list_price_triggered_delivery_orders_with_http_info(self, settle, status, **
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str status: Only list the orders with this status (required)
+ :param str status: Query order list based on status (required)
:param str contract: Futures contract, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _return_http_data_only: response data without head status code
and headers
@@ -2966,49 +3192,45 @@ def list_price_triggered_delivery_orders_with_http_info(self, settle, status, **
local_var_params = locals()
- all_params = ['settle', 'status', 'contract', 'limit', 'offset']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'status',
+ 'contract',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_price_triggered_delivery_orders" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_price_triggered_delivery_orders" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_price_triggered_delivery_orders`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_price_triggered_delivery_orders`") # noqa: E501
# verify the required parameter 'status' is set
- if self.api_client.client_side_validation and (
- 'status' not in local_var_params or local_var_params['status'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `status` when calling `list_price_triggered_delivery_orders`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_price_triggered_delivery_orders`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_price_triggered_delivery_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_price_triggered_delivery_orders`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501
+ local_var_params['status'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `status` when calling `list_price_triggered_delivery_orders`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_price_triggered_delivery_orders`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_price_triggered_delivery_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_price_triggered_delivery_orders`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -3032,14 +3254,14 @@ def list_price_triggered_delivery_orders_with_http_info(self, settle, status, **
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/price_orders',
- 'GET',
+ '/delivery/{settle}/price_orders', 'GET',
path_params,
query_params,
header_params,
@@ -3052,11 +3274,10 @@ def list_price_triggered_delivery_orders_with_http_info(self, settle, status, **
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_price_triggered_delivery_order(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501
- """Create a price-triggered order # noqa: E501
+ """Create price-triggered order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3078,14 +3299,10 @@ def create_price_triggered_delivery_order(self, settle, futures_price_triggered_
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.create_price_triggered_delivery_order_with_http_info(
- settle, futures_price_triggered_order, **kwargs
- ) # noqa: E501
+ return self.create_price_triggered_delivery_order_with_http_info(settle, futures_price_triggered_order, **kwargs) # noqa: E501
- def create_price_triggered_delivery_order_with_http_info(
- self, settle, futures_price_triggered_order, **kwargs
- ): # noqa: E501
- """Create a price-triggered order # noqa: E501
+ def create_price_triggered_delivery_order_with_http_info(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501
+ """Create price-triggered order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3111,31 +3328,35 @@ def create_price_triggered_delivery_order_with_http_info(
local_var_params = locals()
- all_params = ['settle', 'futures_price_triggered_order']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'futures_price_triggered_order'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method create_price_triggered_delivery_order" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method create_price_triggered_delivery_order" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `create_price_triggered_delivery_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `create_price_triggered_delivery_order`") # noqa: E501
# verify the required parameter 'futures_price_triggered_order' is set
- if self.api_client.client_side_validation and (
- 'futures_price_triggered_order' not in local_var_params
- or local_var_params['futures_price_triggered_order'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `futures_price_triggered_order` when calling `create_price_triggered_delivery_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('futures_price_triggered_order' not in local_var_params or # noqa: E501
+ local_var_params['futures_price_triggered_order'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `futures_price_triggered_order` when calling `create_price_triggered_delivery_order`") # noqa: E501
collection_formats = {}
@@ -3154,19 +3375,18 @@ def create_price_triggered_delivery_order_with_http_info(
if 'futures_price_triggered_order' in local_var_params:
body_params = local_var_params['futures_price_triggered_order']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/price_orders',
- 'POST',
+ '/delivery/{settle}/price_orders', 'POST',
path_params,
query_params,
header_params,
@@ -3179,11 +3399,10 @@ def create_price_triggered_delivery_order_with_http_info(
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def cancel_price_triggered_delivery_order_list(self, settle, contract, **kwargs): # noqa: E501
- """Cancel all open orders # noqa: E501
+ """Cancel all auto orders # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3208,7 +3427,7 @@ def cancel_price_triggered_delivery_order_list(self, settle, contract, **kwargs)
return self.cancel_price_triggered_delivery_order_list_with_http_info(settle, contract, **kwargs) # noqa: E501
def cancel_price_triggered_delivery_order_list_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Cancel all open orders # noqa: E501
+ """Cancel all auto orders # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3234,8 +3453,18 @@ def cancel_price_triggered_delivery_order_list_with_http_info(self, settle, cont
local_var_params = locals()
- all_params = ['settle', 'contract']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
@@ -3246,19 +3475,13 @@ def cancel_price_triggered_delivery_order_list_with_http_info(self, settle, cont
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `cancel_price_triggered_delivery_order_list`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `cancel_price_triggered_delivery_order_list`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `cancel_price_triggered_delivery_order_list`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `cancel_price_triggered_delivery_order_list`") # noqa: E501
collection_formats = {}
@@ -3277,14 +3500,14 @@ def cancel_price_triggered_delivery_order_list_with_http_info(self, settle, cont
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/price_orders',
- 'DELETE',
+ '/delivery/{settle}/price_orders', 'DELETE',
path_params,
query_params,
header_params,
@@ -3297,11 +3520,10 @@ def cancel_price_triggered_delivery_order_list_with_http_info(self, settle, cont
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noqa: E501
- """Get a price-triggered order # noqa: E501
+ """Query single auto order details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3310,7 +3532,7 @@ def get_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noq
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -3326,7 +3548,7 @@ def get_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noq
return self.get_price_triggered_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501
def get_price_triggered_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501
- """Get a price-triggered order # noqa: E501
+ """Query single auto order details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3335,7 +3557,7 @@ def get_price_triggered_delivery_order_with_http_info(self, settle, order_id, **
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -3352,30 +3574,35 @@ def get_price_triggered_delivery_order_with_http_info(self, settle, order_id, **
local_var_params = locals()
- all_params = ['settle', 'order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method get_price_triggered_delivery_order" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method get_price_triggered_delivery_order" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `get_price_triggered_delivery_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `get_price_triggered_delivery_order`") # noqa: E501
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `get_price_triggered_delivery_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `get_price_triggered_delivery_order`") # noqa: E501
collection_formats = {}
@@ -3394,14 +3621,14 @@ def get_price_triggered_delivery_order_with_http_info(self, settle, order_id, **
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/price_orders/{order_id}',
- 'GET',
+ '/delivery/{settle}/price_orders/{order_id}', 'GET',
path_params,
query_params,
header_params,
@@ -3414,11 +3641,10 @@ def get_price_triggered_delivery_order_with_http_info(self, settle, order_id, **
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def cancel_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noqa: E501
- """cancel a price-triggered order # noqa: E501
+ """Cancel single auto order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3427,7 +3653,7 @@ def cancel_price_triggered_delivery_order(self, settle, order_id, **kwargs): #
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -3443,7 +3669,7 @@ def cancel_price_triggered_delivery_order(self, settle, order_id, **kwargs): #
return self.cancel_price_triggered_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501
def cancel_price_triggered_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501
- """cancel a price-triggered order # noqa: E501
+ """Cancel single auto order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3452,7 +3678,7 @@ def cancel_price_triggered_delivery_order_with_http_info(self, settle, order_id,
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -3469,30 +3695,35 @@ def cancel_price_triggered_delivery_order_with_http_info(self, settle, order_id,
local_var_params = locals()
- all_params = ['settle', 'order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method cancel_price_triggered_delivery_order" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_price_triggered_delivery_order" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `cancel_price_triggered_delivery_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `cancel_price_triggered_delivery_order`") # noqa: E501
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `cancel_price_triggered_delivery_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_price_triggered_delivery_order`") # noqa: E501
collection_formats = {}
@@ -3511,14 +3742,14 @@ def cancel_price_triggered_delivery_order_with_http_info(self, settle, order_id,
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/delivery/{settle}/price_orders/{order_id}',
- 'DELETE',
+ '/delivery/{settle}/price_orders/{order_id}', 'DELETE',
path_params,
query_params,
header_params,
@@ -3531,5 +3762,4 @@ def cancel_price_triggered_delivery_order_with_http_info(self, settle, order_id,
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
diff --git a/gate_api/api/portfolio_api.py b/gate_api/api/earn_api.py
similarity index 54%
rename from gate_api/api/portfolio_api.py
rename to gate_api/api/earn_api.py
index 41c6643..2076555 100644
--- a/gate_api/api/portfolio_api.py
+++ b/gate_api/api/earn_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,10 +18,13 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
-class PortfolioApi(object):
+class EarnApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
@@ -33,17 +36,16 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def list_portfolio_accounts(self, **kwargs): # noqa: E501
- """Get portfolio account information # noqa: E501
+ def swap_eth2(self, eth2_swap, **kwargs): # noqa: E501
+ """ETH2 swap # noqa: E501
- The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_portfolio_accounts(async_req=True)
+ >>> thread = api.swap_eth2(eth2_swap, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param Eth2Swap eth2_swap: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -51,24 +53,23 @@ def list_portfolio_accounts(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: gate_api.PortfolioAccount
+ :rtype: None
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.list_portfolio_accounts_with_http_info(**kwargs) # noqa: E501
+ return self.swap_eth2_with_http_info(eth2_swap, **kwargs) # noqa: E501
- def list_portfolio_accounts_with_http_info(self, **kwargs): # noqa: E501
- """Get portfolio account information # noqa: E501
+ def swap_eth2_with_http_info(self, eth2_swap, **kwargs): # noqa: E501
+ """ETH2 swap # noqa: E501
- The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_portfolio_accounts_with_http_info(async_req=True)
+ >>> thread = api.swap_eth2_with_http_info(eth2_swap, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param Eth2Swap eth2_swap: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -78,29 +79,43 @@ def list_portfolio_accounts_with_http_info(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(gate_api.PortfolioAccount, status_code(int), headers(HTTPHeaderDict))
+ :rtype: None
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'eth2_swap'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_portfolio_accounts" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method swap_eth2" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
+ # verify the required parameter 'eth2_swap' is set
+ if self.api_client.client_side_validation and ('eth2_swap' not in local_var_params or # noqa: E501
+ local_var_params['eth2_swap'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `eth2_swap` when calling `swap_eth2`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
header_params = {}
@@ -108,37 +123,38 @@ def list_portfolio_accounts_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ if 'eth2_swap' in local_var_params:
+ body_params = local_var_params['eth2_swap']
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/portfolio/accounts',
- 'GET',
+ '/earn/staking/eth2/swap', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='PortfolioAccount', # noqa: E501
+ response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def list_account_portfolio_mode(self, **kwargs): # noqa: E501
- """Retrieve the account's portfolio mode # noqa: E501
+ def rate_list_eth2(self, **kwargs): # noqa: E501
+ """ETH2 historical return rate query # noqa: E501
- cross_margin - 现货全仓保证金 # noqa: E501
+ Query ETH earnings rate records for the last 31 days # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_account_portfolio_mode(async_req=True)
+ >>> thread = api.rate_list_eth2(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
@@ -149,20 +165,20 @@ def list_account_portfolio_mode(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: dict(str, bool)
+ :rtype: list[gate_api.Eth2RateList]
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.list_account_portfolio_mode_with_http_info(**kwargs) # noqa: E501
+ return self.rate_list_eth2_with_http_info(**kwargs) # noqa: E501
- def list_account_portfolio_mode_with_http_info(self, **kwargs): # noqa: E501
- """Retrieve the account's portfolio mode # noqa: E501
+ def rate_list_eth2_with_http_info(self, **kwargs): # noqa: E501
+ """ETH2 historical return rate query # noqa: E501
- cross_margin - 现货全仓保证金 # noqa: E501
+ Query ETH earnings rate records for the last 31 days # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_account_portfolio_mode_with_http_info(async_req=True)
+ >>> thread = api.rate_list_eth2_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
@@ -175,20 +191,29 @@ def list_account_portfolio_mode_with_http_info(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(dict(str, bool), status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.Eth2RateList], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_account_portfolio_mode" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method rate_list_eth2" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
@@ -206,39 +231,38 @@ def list_account_portfolio_mode_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/portfolio/account_mode',
- 'GET',
+ '/earn/staking/eth2/rate_records', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='dict(str, bool)', # noqa: E501
+ response_type='list[Eth2RateList]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def set_account_portfolio_mode(self, portfolio_mode, **kwargs): # noqa: E501
- """Configure the account's portfolio mode. # noqa: E501
+ def list_dual_investment_plans(self, **kwargs): # noqa: E501
+ """Dual Investment product list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.set_account_portfolio_mode(portfolio_mode, async_req=True)
+ >>> thread = api.list_dual_investment_plans(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param PortfolioMode portfolio_mode: (required)
+ :param int plan_id: Financial project ID
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -246,23 +270,23 @@ def set_account_portfolio_mode(self, portfolio_mode, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: dict(str, bool)
+ :rtype: list[gate_api.DualGetPlans]
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.set_account_portfolio_mode_with_http_info(portfolio_mode, **kwargs) # noqa: E501
+ return self.list_dual_investment_plans_with_http_info(**kwargs) # noqa: E501
- def set_account_portfolio_mode_with_http_info(self, portfolio_mode, **kwargs): # noqa: E501
- """Configure the account's portfolio mode. # noqa: E501
+ def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501
+ """Dual Investment product list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.set_account_portfolio_mode_with_http_info(portfolio_mode, async_req=True)
+ >>> thread = api.list_dual_investment_plans_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param PortfolioMode portfolio_mode: (required)
+ :param int plan_id: Financial project ID
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -272,36 +296,41 @@ def set_account_portfolio_mode_with_http_info(self, portfolio_mode, **kwargs):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(dict(str, bool), status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.DualGetPlans], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['portfolio_mode']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'plan_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method set_account_portfolio_mode" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_dual_investment_plans" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
- # verify the required parameter 'portfolio_mode' is set
- if self.api_client.client_side_validation and (
- 'portfolio_mode' not in local_var_params or local_var_params['portfolio_mode'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `portfolio_mode` when calling `set_account_portfolio_mode`"
- ) # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
+ if 'plan_id' in local_var_params and local_var_params['plan_id'] is not None: # noqa: E501
+ query_params.append(('plan_id', local_var_params['plan_id'])) # noqa: E501
header_params = {}
@@ -309,47 +338,42 @@ def set_account_portfolio_mode_with_http_info(self, portfolio_mode, **kwargs):
local_var_files = {}
body_params = None
- if 'portfolio_mode' in local_var_params:
- body_params = local_var_params['portfolio_mode']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
+ auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/portfolio/account_mode',
- 'POST',
+ '/earn/dual/investment_plan', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='dict(str, bool)', # noqa: E501
+ response_type='list[DualGetPlans]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def get_portfolio_borrowable(self, currency, **kwargs): # noqa: E501
- """Retrieve the maximum borrowable amount for the account. # noqa: E501
+ def list_dual_orders(self, **kwargs): # noqa: E501
+ """Dual Investment order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_portfolio_borrowable(currency, async_req=True)
+ >>> thread = api.list_dual_orders(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
+ :param int _from: Start settlement time
+ :param int to: End settlement time
+ :param int page: Page number
+ :param int limit: Maximum number of records returned in a single list
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -357,23 +381,26 @@ def get_portfolio_borrowable(self, currency, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: gate_api.PortfolioBorrowable
+ :rtype: list[gate_api.DualGetOrders]
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.get_portfolio_borrowable_with_http_info(currency, **kwargs) # noqa: E501
+ return self.list_dual_orders_with_http_info(**kwargs) # noqa: E501
- def get_portfolio_borrowable_with_http_info(self, currency, **kwargs): # noqa: E501
- """Retrieve the maximum borrowable amount for the account. # noqa: E501
+ def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501
+ """Dual Investment order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_portfolio_borrowable_with_http_info(currency, async_req=True)
+ >>> thread = api.list_dual_orders_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
+ :param int _from: Start settlement time
+ :param int to: End settlement time
+ :param int page: Page number
+ :param int limit: Maximum number of records returned in a single list
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -383,36 +410,56 @@ def get_portfolio_borrowable_with_http_info(self, currency, **kwargs): # noqa:
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(gate_api.PortfolioBorrowable, status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.DualGetOrders], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ '_from',
+ 'to',
+ 'page',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_portfolio_borrowable" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_dual_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- # verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `get_portfolio_borrowable`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_dual_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_dual_orders`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_dual_orders`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
header_params = {}
@@ -421,39 +468,38 @@ def get_portfolio_borrowable_with_http_info(self, currency, **kwargs): # noqa:
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/portfolio/borrowable',
- 'GET',
+ '/earn/dual/orders', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='PortfolioBorrowable', # noqa: E501
+ response_type='list[DualGetOrders]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def get_portfolio_transferable(self, currency, **kwargs): # noqa: E501
- """Retrieve the maximum amount that can be transferred out from the account # noqa: E501
+ def place_dual_order(self, place_dual_investment_order, **kwargs): # noqa: E501
+ """Place Dual Investment order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_portfolio_transferable(currency, async_req=True)
+ >>> thread = api.place_dual_order(place_dual_investment_order, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
+ :param PlaceDualInvestmentOrder place_dual_investment_order: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -461,23 +507,23 @@ def get_portfolio_transferable(self, currency, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: gate_api.PortfolioTransferable
+ :rtype: None
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.get_portfolio_transferable_with_http_info(currency, **kwargs) # noqa: E501
+ return self.place_dual_order_with_http_info(place_dual_investment_order, **kwargs) # noqa: E501
- def get_portfolio_transferable_with_http_info(self, currency, **kwargs): # noqa: E501
- """Retrieve the maximum amount that can be transferred out from the account # noqa: E501
+ def place_dual_order_with_http_info(self, place_dual_investment_order, **kwargs): # noqa: E501
+ """Place Dual Investment order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_portfolio_transferable_with_http_info(currency, async_req=True)
+ >>> thread = api.place_dual_order_with_http_info(place_dual_investment_order, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
+ :param PlaceDualInvestmentOrder place_dual_investment_order: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -487,38 +533,43 @@ def get_portfolio_transferable_with_http_info(self, currency, **kwargs): # noqa
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(gate_api.PortfolioTransferable, status_code(int), headers(HTTPHeaderDict))
+ :rtype: None
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'place_dual_investment_order'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method get_portfolio_transferable" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method place_dual_order" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
- # verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `get_portfolio_transferable`"
- ) # noqa: E501
+ # verify the required parameter 'place_dual_investment_order' is set
+ if self.api_client.client_side_validation and ('place_dual_investment_order' not in local_var_params or # noqa: E501
+ local_var_params['place_dual_investment_order'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `place_dual_investment_order` when calling `place_dual_order`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
header_params = {}
@@ -526,42 +577,177 @@ def get_portfolio_transferable_with_http_info(self, currency, **kwargs): # noqa
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ if 'place_dual_investment_order' in local_var_params:
+ body_params = local_var_params['place_dual_investment_order']
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/portfolio/transferable',
- 'GET',
+ '/earn/dual/orders', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='PortfolioTransferable', # noqa: E501
+ response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def list_structured_products(self, status, **kwargs): # noqa: E501
+ """Structured Product List # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_structured_products(status, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str status: Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed (required)
+ :param str type: Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball
+ :param int page: Page number
+ :param int limit: Maximum number of records returned in a single list
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.StructuredGetProjectList]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_structured_products_with_http_info(status, **kwargs) # noqa: E501
+
+ def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E501
+ """Structured Product List # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_structured_products_with_http_info(status, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str status: Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed (required)
+ :param str type: Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball
+ :param int page: Page number
+ :param int limit: Maximum number of records returned in a single list
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.StructuredGetProjectList], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'status',
+ 'type',
+ 'page',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
- def list_portfolio_uni_loan_interest_records(self, **kwargs): # noqa: E501
- """List loans # noqa: E501
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_structured_products" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'status' is set
+ if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501
+ local_var_params['status'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `status` when calling `list_structured_products`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_structured_products`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_structured_products`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_structured_products`, must be a value greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501
+ query_params.append(('type', local_var_params['type'])) # noqa: E501
+ if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501
+ query_params.append(('status', local_var_params['status'])) # noqa: E501
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/earn/structured/products', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[StructuredGetProjectList]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_structured_orders(self, **kwargs): # noqa: E501
+ """Structured Product Order List # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_portfolio_uni_loan_interest_records(async_req=True)
+ >>> thread = api.list_structured_orders(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param int limit: Maximum number of records returned in a single list
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -569,25 +755,26 @@ def list_portfolio_uni_loan_interest_records(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: list[gate_api.UniLoan]
+ :rtype: list[gate_api.StructuredOrderList]
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.list_portfolio_uni_loan_interest_records_with_http_info(**kwargs) # noqa: E501
+ return self.list_structured_orders_with_http_info(**kwargs) # noqa: E501
- def list_portfolio_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501
- """List loans # noqa: E501
+ def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501
+ """Structured Product Order List # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_portfolio_uni_loan_interest_records_with_http_info(async_req=True)
+ >>> thread = api.list_structured_orders_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param int limit: Maximum number of records returned in a single list
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -597,49 +784,52 @@ def list_portfolio_uni_loan_interest_records_with_http_info(self, **kwargs): #
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(list[gate_api.UniLoan], status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.StructuredOrderList], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['currency', 'page', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ '_from',
+ 'to',
+ 'page',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_portfolio_uni_loan_interest_records" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_structured_orders" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_portfolio_uni_loan_interest_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_portfolio_uni_loan_interest_records`, must be a value less than or equal to `100`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_portfolio_uni_loan_interest_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_structured_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_structured_orders`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_structured_orders`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
query_params.append(('page', local_var_params['page'])) # noqa: E501
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
@@ -652,40 +842,38 @@ def list_portfolio_uni_loan_interest_records_with_http_info(self, **kwargs): #
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/portfolio/loans',
- 'GET',
+ '/earn/structured/orders', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[UniLoan]', # noqa: E501
+ response_type='list[StructuredOrderList]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def create_portfolio_loan(self, portfolio_loan, **kwargs): # noqa: E501
- """Borrow or repay # noqa: E501
+ def place_structured_order(self, structured_buy, **kwargs): # noqa: E501
+ """Place Structured Product Order # noqa: E501
- When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the entire borrowed amount is available by setting the parameter `repaid_all=true` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_portfolio_loan(portfolio_loan, async_req=True)
+ >>> thread = api.place_structured_order(structured_buy, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param PortfolioLoan portfolio_loan: (required)
+ :param StructuredBuy structured_buy: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -698,19 +886,18 @@ def create_portfolio_loan(self, portfolio_loan, **kwargs): # noqa: E501
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.create_portfolio_loan_with_http_info(portfolio_loan, **kwargs) # noqa: E501
+ return self.place_structured_order_with_http_info(structured_buy, **kwargs) # noqa: E501
- def create_portfolio_loan_with_http_info(self, portfolio_loan, **kwargs): # noqa: E501
- """Borrow or repay # noqa: E501
+ def place_structured_order_with_http_info(self, structured_buy, **kwargs): # noqa: E501
+ """Place Structured Product Order # noqa: E501
- When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the entire borrowed amount is available by setting the parameter `repaid_all=true` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_portfolio_loan_with_http_info(portfolio_loan, async_req=True)
+ >>> thread = api.place_structured_order_with_http_info(structured_buy, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param PortfolioLoan portfolio_loan: (required)
+ :param StructuredBuy structured_buy: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -727,21 +914,30 @@ def create_portfolio_loan_with_http_info(self, portfolio_loan, **kwargs): # noq
local_var_params = locals()
- all_params = ['portfolio_loan']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'structured_buy'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_portfolio_loan" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method place_structured_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- # verify the required parameter 'portfolio_loan' is set
- if self.api_client.client_side_validation and (
- 'portfolio_loan' not in local_var_params or local_var_params['portfolio_loan'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `portfolio_loan` when calling `create_portfolio_loan`"
- ) # noqa: E501
+ # verify the required parameter 'structured_buy' is set
+ if self.api_client.client_side_validation and ('structured_buy' not in local_var_params or # noqa: E501
+ local_var_params['structured_buy'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `structured_buy` when calling `place_structured_order`") # noqa: E501
collection_formats = {}
@@ -755,19 +951,17 @@ def create_portfolio_loan_with_http_info(self, portfolio_loan, **kwargs): # noq
local_var_files = {}
body_params = None
- if 'portfolio_loan' in local_var_params:
- body_params = local_var_params['portfolio_loan']
+ if 'structured_buy' in local_var_params:
+ body_params = local_var_params['structured_buy']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/portfolio/loans',
- 'POST',
+ '/earn/structured/orders', 'POST',
path_params,
query_params,
header_params,
@@ -780,22 +974,18 @@ def create_portfolio_loan_with_http_info(self, portfolio_loan, **kwargs): # noq
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def list_portfolio_loan_records(self, **kwargs): # noqa: E501
- """Get load records # noqa: E501
+ def find_coin(self, find_coin, **kwargs): # noqa: E501
+ """Staking coins # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_portfolio_loan_records(async_req=True)
+ >>> thread = api.find_coin(find_coin, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str type: The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds
- :param str currency: Retrieve data of the specified currency
- :param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param FindCoin find_coin: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -803,26 +993,23 @@ def list_portfolio_loan_records(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: list[gate_api.PortfolioLoanRecord]
+ :rtype: object
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.list_portfolio_loan_records_with_http_info(**kwargs) # noqa: E501
+ return self.find_coin_with_http_info(find_coin, **kwargs) # noqa: E501
- def list_portfolio_loan_records_with_http_info(self, **kwargs): # noqa: E501
- """Get load records # noqa: E501
+ def find_coin_with_http_info(self, find_coin, **kwargs): # noqa: E501
+ """Staking coins # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_portfolio_loan_records_with_http_info(async_req=True)
+ >>> thread = api.find_coin_with_http_info(find_coin, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str type: The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds
- :param str currency: Retrieve data of the specified currency
- :param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param FindCoin find_coin: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -832,55 +1019,43 @@ def list_portfolio_loan_records_with_http_info(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(list[gate_api.PortfolioLoanRecord], status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['type', 'currency', 'page', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'find_coin'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_portfolio_loan_records" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method find_coin" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
+ # verify the required parameter 'find_coin' is set
+ if self.api_client.client_side_validation and ('find_coin' not in local_var_params or # noqa: E501
+ local_var_params['find_coin'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `find_coin` when calling `find_coin`") # noqa: E501
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_portfolio_loan_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_portfolio_loan_records`, must be a value less than or equal to `100`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_portfolio_loan_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
- if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501
- query_params.append(('type', local_var_params['type'])) # noqa: E501
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
- if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
- query_params.append(('page', local_var_params['page'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
header_params = {}
@@ -888,42 +1063,45 @@ def list_portfolio_loan_records_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
+ if 'find_coin' in local_var_params:
+ body_params = local_var_params['find_coin']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/portfolio/loan_records',
- 'GET',
+ '/earn/staking/coins', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[PortfolioLoanRecord]', # noqa: E501
+ response_type='object', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def list_portfolio_loan_interest_records(self, **kwargs): # noqa: E501
- """List interest records # noqa: E501
+ def swap_staking_coin(self, swap_coin, **kwargs): # noqa: E501
+ """On-chain token swap for earned coins # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_portfolio_loan_interest_records(async_req=True)
+ >>> thread = api.swap_staking_coin(swap_coin, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
- :param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param SwapCoin swap_coin: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -931,25 +1109,23 @@ def list_portfolio_loan_interest_records(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: list[gate_api.UniLoanInterestRecord]
+ :rtype: gate_api.SwapCoinStruct
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.list_portfolio_loan_interest_records_with_http_info(**kwargs) # noqa: E501
+ return self.swap_staking_coin_with_http_info(swap_coin, **kwargs) # noqa: E501
- def list_portfolio_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501
- """List interest records # noqa: E501
+ def swap_staking_coin_with_http_info(self, swap_coin, **kwargs): # noqa: E501
+ """On-chain token swap for earned coins # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_portfolio_loan_interest_records_with_http_info(async_req=True)
+ >>> thread = api.swap_staking_coin_with_http_info(swap_coin, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
- :param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param SwapCoin swap_coin: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -959,53 +1135,43 @@ def list_portfolio_loan_interest_records_with_http_info(self, **kwargs): # noqa
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(list[gate_api.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(gate_api.SwapCoinStruct, status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['currency', 'page', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'swap_coin'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_portfolio_loan_interest_records" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method swap_staking_coin" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
+ # verify the required parameter 'swap_coin' is set
+ if self.api_client.client_side_validation and ('swap_coin' not in local_var_params or # noqa: E501
+ local_var_params['swap_coin'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `swap_coin` when calling `swap_staking_coin`") # noqa: E501
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_portfolio_loan_interest_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_portfolio_loan_interest_records`, must be a value less than or equal to `100`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_portfolio_loan_interest_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
- if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
- query_params.append(('page', local_var_params['page'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
header_params = {}
@@ -1013,26 +1179,31 @@ def list_portfolio_loan_interest_records_with_http_info(self, **kwargs): # noqa
local_var_files = {}
body_params = None
+ if 'swap_coin' in local_var_params:
+ body_params = local_var_params['swap_coin']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/portfolio/interest_records',
- 'GET',
+ '/earn/staking/swap', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[UniLoanInterestRecord]', # noqa: E501
+ response_type='SwapCoinStruct', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py
index 453f67b..4d37fd4 100644
--- a/gate_api/api/earn_uni_api.py
+++ b/gate_api/api/earn_uni_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class EarnUniApi(object):
@@ -34,7 +37,7 @@ def __init__(self, api_client=None):
self.api_client = api_client
def list_uni_currencies(self, **kwargs): # noqa: E501
- """List currencies for lending # noqa: E501
+ """Query lending currency list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -57,7 +60,7 @@ def list_uni_currencies(self, **kwargs): # noqa: E501
return self.list_uni_currencies_with_http_info(**kwargs) # noqa: E501
def list_uni_currencies_with_http_info(self, **kwargs): # noqa: E501
- """List currencies for lending # noqa: E501
+ """Query lending currency list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -81,12 +84,23 @@ def list_uni_currencies_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_uni_currencies" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_uni_currencies" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -103,14 +117,14 @@ def list_uni_currencies_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/earn/uni/currencies',
- 'GET',
+ '/earn/uni/currencies', 'GET',
path_params,
query_params,
header_params,
@@ -123,11 +137,10 @@ def list_uni_currencies_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_uni_currency(self, currency, **kwargs): # noqa: E501
- """Get currency detail for lending # noqa: E501
+ """Query single lending currency details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -151,7 +164,7 @@ def get_uni_currency(self, currency, **kwargs): # noqa: E501
return self.get_uni_currency_with_http_info(currency, **kwargs) # noqa: E501
def get_uni_currency_with_http_info(self, currency, **kwargs): # noqa: E501
- """Get currency detail for lending # noqa: E501
+ """Query single lending currency details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -176,21 +189,30 @@ def get_uni_currency_with_http_info(self, currency, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_uni_currency" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_uni_currency" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `get_uni_currency`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_currency`") # noqa: E501
collection_formats = {}
@@ -207,14 +229,14 @@ def get_uni_currency_with_http_info(self, currency, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/earn/uni/currencies/{currency}',
- 'GET',
+ '/earn/uni/currencies/{currency}', 'GET',
path_params,
query_params,
header_params,
@@ -227,11 +249,10 @@ def get_uni_currency_with_http_info(self, currency, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_user_uni_lends(self, **kwargs): # noqa: E501
- """List user's lending orders # noqa: E501
+ """Query user's lending order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -239,9 +260,9 @@ def list_user_uni_lends(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -257,7 +278,7 @@ def list_user_uni_lends(self, **kwargs): # noqa: E501
return self.list_user_uni_lends_with_http_info(**kwargs) # noqa: E501
def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501
- """List user's lending orders # noqa: E501
+ """Query user's lending order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -265,9 +286,9 @@ def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -284,33 +305,35 @@ def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency', 'page', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency',
+ 'page',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_user_uni_lends" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_user_uni_lends" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_user_uni_lends`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_user_uni_lends`, must be a value less than or equal to `100`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_user_uni_lends`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_user_uni_lends`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_user_uni_lends`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_user_uni_lends`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -330,14 +353,14 @@ def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/earn/uni/lends',
- 'GET',
+ '/earn/uni/lends', 'GET',
path_params,
query_params,
header_params,
@@ -350,13 +373,12 @@ def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_uni_lend(self, create_uni_lend, **kwargs): # noqa: E501
- """Lend or redeem # noqa: E501
+ """Create lending or redemption # noqa: E501
- `Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited. # noqa: E501
+ Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_uni_lend(create_uni_lend, async_req=True)
@@ -379,9 +401,9 @@ def create_uni_lend(self, create_uni_lend, **kwargs): # noqa: E501
return self.create_uni_lend_with_http_info(create_uni_lend, **kwargs) # noqa: E501
def create_uni_lend_with_http_info(self, create_uni_lend, **kwargs): # noqa: E501
- """Lend or redeem # noqa: E501
+ """Create lending or redemption # noqa: E501
- `Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited. # noqa: E501
+ Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_uni_lend_with_http_info(create_uni_lend, async_req=True)
@@ -405,21 +427,30 @@ def create_uni_lend_with_http_info(self, create_uni_lend, **kwargs): # noqa: E5
local_var_params = locals()
- all_params = ['create_uni_lend']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'create_uni_lend'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_uni_lend" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_uni_lend" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'create_uni_lend' is set
- if self.api_client.client_side_validation and (
- 'create_uni_lend' not in local_var_params or local_var_params['create_uni_lend'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `create_uni_lend` when calling `create_uni_lend`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('create_uni_lend' not in local_var_params or # noqa: E501
+ local_var_params['create_uni_lend'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `create_uni_lend` when calling `create_uni_lend`") # noqa: E501
collection_formats = {}
@@ -437,15 +468,13 @@ def create_uni_lend_with_http_info(self, create_uni_lend, **kwargs): # noqa: E5
body_params = local_var_params['create_uni_lend']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/earn/uni/lends',
- 'POST',
+ '/earn/uni/lends', 'POST',
path_params,
query_params,
header_params,
@@ -458,13 +487,12 @@ def create_uni_lend_with_http_info(self, create_uni_lend, **kwargs): # noqa: E5
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def change_uni_lend(self, patch_uni_lend, **kwargs): # noqa: E501
- """Amend lending order # noqa: E501
+ """Amend user lending information # noqa: E501
- Currently only supports amending the minimum interest rate (hour) # noqa: E501
+ Currently only supports amending minimum interest rate (hourly) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.change_uni_lend(patch_uni_lend, async_req=True)
@@ -487,9 +515,9 @@ def change_uni_lend(self, patch_uni_lend, **kwargs): # noqa: E501
return self.change_uni_lend_with_http_info(patch_uni_lend, **kwargs) # noqa: E501
def change_uni_lend_with_http_info(self, patch_uni_lend, **kwargs): # noqa: E501
- """Amend lending order # noqa: E501
+ """Amend user lending information # noqa: E501
- Currently only supports amending the minimum interest rate (hour) # noqa: E501
+ Currently only supports amending minimum interest rate (hourly) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.change_uni_lend_with_http_info(patch_uni_lend, async_req=True)
@@ -513,21 +541,30 @@ def change_uni_lend_with_http_info(self, patch_uni_lend, **kwargs): # noqa: E50
local_var_params = locals()
- all_params = ['patch_uni_lend']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'patch_uni_lend'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method change_uni_lend" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method change_uni_lend" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'patch_uni_lend' is set
- if self.api_client.client_side_validation and (
- 'patch_uni_lend' not in local_var_params or local_var_params['patch_uni_lend'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `patch_uni_lend` when calling `change_uni_lend`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('patch_uni_lend' not in local_var_params or # noqa: E501
+ local_var_params['patch_uni_lend'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `patch_uni_lend` when calling `change_uni_lend`") # noqa: E501
collection_formats = {}
@@ -545,15 +582,13 @@ def change_uni_lend_with_http_info(self, patch_uni_lend, **kwargs): # noqa: E50
body_params = local_var_params['patch_uni_lend']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/earn/uni/lends',
- 'PATCH',
+ '/earn/uni/lends', 'PATCH',
path_params,
query_params,
header_params,
@@ -566,11 +601,10 @@ def change_uni_lend_with_http_info(self, patch_uni_lend, **kwargs): # noqa: E50
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_uni_lend_records(self, **kwargs): # noqa: E501
- """List records of lending # noqa: E501
+ """Query lending transaction records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -578,12 +612,12 @@ def list_uni_lend_records(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str type: type: lend - lend, redeem - redeem
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str type: Operation type: lend - Lend, redeem - Redeem
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -599,7 +633,7 @@ def list_uni_lend_records(self, **kwargs): # noqa: E501
return self.list_uni_lend_records_with_http_info(**kwargs) # noqa: E501
def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501
- """List records of lending # noqa: E501
+ """Query lending transaction records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -607,12 +641,12 @@ def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str type: type: lend - lend, redeem - redeem
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str type: Operation type: lend - Lend, redeem - Redeem
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -629,33 +663,38 @@ def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency', 'page', 'limit', '_from', 'to', 'type']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency',
+ 'page',
+ 'limit',
+ '_from',
+ 'to',
+ 'type'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_uni_lend_records" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_uni_lend_records" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_uni_lend_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_uni_lend_records`, must be a value less than or equal to `100`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_uni_lend_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_lend_records`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_lend_records`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_lend_records`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -681,14 +720,14 @@ def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/earn/uni/lend_records',
- 'GET',
+ '/earn/uni/lend_records', 'GET',
path_params,
query_params,
header_params,
@@ -701,11 +740,10 @@ def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_uni_interest(self, currency, **kwargs): # noqa: E501
- """Get the user's total interest income of specified currency # noqa: E501
+ """Query user's total interest income for specified currency # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -729,7 +767,7 @@ def get_uni_interest(self, currency, **kwargs): # noqa: E501
return self.get_uni_interest_with_http_info(currency, **kwargs) # noqa: E501
def get_uni_interest_with_http_info(self, currency, **kwargs): # noqa: E501
- """Get the user's total interest income of specified currency # noqa: E501
+ """Query user's total interest income for specified currency # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -754,21 +792,30 @@ def get_uni_interest_with_http_info(self, currency, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_uni_interest" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_uni_interest" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `get_uni_interest`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_interest`") # noqa: E501
collection_formats = {}
@@ -785,14 +832,14 @@ def get_uni_interest_with_http_info(self, currency, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/earn/uni/interests/{currency}',
- 'GET',
+ '/earn/uni/interests/{currency}', 'GET',
path_params,
query_params,
header_params,
@@ -805,11 +852,10 @@ def get_uni_interest_with_http_info(self, currency, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_uni_interest_records(self, **kwargs): # noqa: E501
- """List interest records # noqa: E501
+ """Query user dividend records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -817,9 +863,11 @@ def list_uni_interest_records(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -835,7 +883,7 @@ def list_uni_interest_records(self, **kwargs): # noqa: E501
return self.list_uni_interest_records_with_http_info(**kwargs) # noqa: E501
def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501
- """List interest records # noqa: E501
+ """Query user dividend records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -843,9 +891,11 @@ def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -862,33 +912,37 @@ def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency', 'page', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency',
+ 'page',
+ 'limit',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_uni_interest_records" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_uni_interest_records" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_uni_interest_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_uni_interest_records`, must be a value less than or equal to `100`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_uni_interest_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_interest_records`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_interest_records`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_interest_records`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -900,6 +954,10 @@ def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501
query_params.append(('page', local_var_params['page'])) # noqa: E501
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
header_params = {}
@@ -908,14 +966,14 @@ def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/earn/uni/interest_records',
- 'GET',
+ '/earn/uni/interest_records', 'GET',
path_params,
query_params,
header_params,
@@ -928,5 +986,353 @@ def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def get_uni_interest_status(self, currency, **kwargs): # noqa: E501
+ """Query currency interest compounding status # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_uni_interest_status(currency, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Currency (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.UniCurrencyInterest
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_uni_interest_status_with_http_info(currency, **kwargs) # noqa: E501
+
+ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E501
+ """Query currency interest compounding status # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_uni_interest_status_with_http_info(currency, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Currency (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.UniCurrencyInterest, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_uni_interest_status" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'currency' is set
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_interest_status`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'currency' in local_var_params:
+ path_params['currency'] = local_var_params['currency'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/earn/uni/interest_status/{currency}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UniCurrencyInterest', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501
+ """UniLoan currency annualized trend chart # noqa: E501
+
+ Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_uni_chart(_from, to, asset, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int _from: Start timestamp in seconds, maximum span 30 days (required)
+ :param int to: End timestamp in seconds, maximum span 30 days (required)
+ :param str asset: Currency name (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.InlineResponse200]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_uni_chart_with_http_info(_from, to, asset, **kwargs) # noqa: E501
+
+ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501
+ """UniLoan currency annualized trend chart # noqa: E501
+
+ Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int _from: Start timestamp in seconds, maximum span 30 days (required)
+ :param int to: End timestamp in seconds, maximum span 30 days (required)
+ :param str asset: Currency name (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.InlineResponse200], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ '_from',
+ 'to',
+ 'asset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_uni_chart" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter '_from' is set
+ if self.api_client.client_side_validation and ('_from' not in local_var_params or # noqa: E501
+ local_var_params['_from'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `_from` when calling `list_uni_chart`") # noqa: E501
+ # verify the required parameter 'to' is set
+ if self.api_client.client_side_validation and ('to' not in local_var_params or # noqa: E501
+ local_var_params['to'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `to` when calling `list_uni_chart`") # noqa: E501
+ # verify the required parameter 'asset' is set
+ if self.api_client.client_side_validation and ('asset' not in local_var_params or # noqa: E501
+ local_var_params['asset'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `asset` when calling `list_uni_chart`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
+ if 'asset' in local_var_params and local_var_params['asset'] is not None: # noqa: E501
+ query_params.append(('asset', local_var_params['asset'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/earn/uni/chart', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[InlineResponse200]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_uni_rate(self, **kwargs): # noqa: E501
+ """Currency estimated annualized interest rate # noqa: E501
+
+ Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_uni_rate(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.InlineResponse2001]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_uni_rate_with_http_info(**kwargs) # noqa: E501
+
+ def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501
+ """Currency estimated annualized interest rate # noqa: E501
+
+ Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_uni_rate_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.InlineResponse2001], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_uni_rate" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/earn/uni/rate', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[InlineResponse2001]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/gate_api/api/flash_swap_api.py b/gate_api/api/flash_swap_api.py
index 46faa50..ffbba85 100644
--- a/gate_api/api/flash_swap_api.py
+++ b/gate_api/api/flash_swap_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class FlashSwapApi(object):
@@ -33,101 +36,6 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def list_flash_swap_currencies(self, **kwargs): # noqa: E501
- """List All Supported Currencies In Flash Swap (deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_flash_swap_currencies(async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: list[gate_api.FlashSwapCurrency]
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.list_flash_swap_currencies_with_http_info(**kwargs) # noqa: E501
-
- def list_flash_swap_currencies_with_http_info(self, **kwargs): # noqa: E501
- """List All Supported Currencies In Flash Swap (deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_flash_swap_currencies_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(list[gate_api.FlashSwapCurrency], status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_flash_swap_currencies" % k
- )
- local_var_params[k] = v
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/flash_swap/currencies',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[FlashSwapCurrency]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
def list_flash_swap_currency_pair(self, **kwargs): # noqa: E501
"""List All Supported Currency Pairs In Flash Swap # noqa: E501
@@ -138,7 +46,9 @@ def list_flash_swap_currency_pair(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
+ :param int page: Page number
+ :param int limit: Maximum number of items returned. Default: 1000, minimum: 1, maximum: 1000
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -163,7 +73,9 @@ def list_flash_swap_currency_pair_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
+ :param int page: Page number
+ :param int limit: Maximum number of items returned. Default: 1000, minimum: 1, maximum: 1000
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -180,17 +92,35 @@ def list_flash_swap_currency_pair_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency',
+ 'page',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_flash_swap_currency_pair" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_flash_swap_currency_pair" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_flash_swap_currency_pair`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_flash_swap_currency_pair`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_flash_swap_currency_pair`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -198,6 +128,10 @@ def list_flash_swap_currency_pair_with_http_info(self, **kwargs): # noqa: E501
query_params = []
if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
header_params = {}
@@ -206,14 +140,14 @@ def list_flash_swap_currency_pair_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/flash_swap/currency_pairs',
- 'GET',
+ '/flash_swap/currency_pairs', 'GET',
path_params,
query_params,
header_params,
@@ -226,11 +160,10 @@ def list_flash_swap_currency_pair_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_flash_swap_orders(self, **kwargs): # noqa: E501
- """List all flash swap orders # noqa: E501
+ """Query flash swap order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -238,11 +171,11 @@ def list_flash_swap_orders(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int status: Flash swap order status `1` - success `2` - failure
- :param str sell_currency: Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies`
- :param str buy_currency: Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies`
- :param bool reverse: If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first)
- :param int limit: Maximum number of records to be returned in a single list
+ :param int status: Flash swap order status `1` - success `2` - failed
+ :param str sell_currency: Asset name to sell - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies
+ :param str buy_currency: Asset name to buy - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies
+ :param bool reverse: Sort by ID in ascending or descending order, default `true` - `true`: ID descending order (most recent data first) - `false`: ID ascending order (oldest data first)
+ :param int limit: Maximum number of records returned in a single list
:param int page: Page number
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -259,7 +192,7 @@ def list_flash_swap_orders(self, **kwargs): # noqa: E501
return self.list_flash_swap_orders_with_http_info(**kwargs) # noqa: E501
def list_flash_swap_orders_with_http_info(self, **kwargs): # noqa: E501
- """List all flash swap orders # noqa: E501
+ """Query flash swap order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -267,11 +200,11 @@ def list_flash_swap_orders_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int status: Flash swap order status `1` - success `2` - failure
- :param str sell_currency: Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies`
- :param str buy_currency: Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies`
- :param bool reverse: If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first)
- :param int limit: Maximum number of records to be returned in a single list
+ :param int status: Flash swap order status `1` - success `2` - failed
+ :param str sell_currency: Asset name to sell - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies
+ :param str buy_currency: Asset name to buy - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies
+ :param bool reverse: Sort by ID in ascending or descending order, default `true` - `true`: ID descending order (most recent data first) - `false`: ID ascending order (oldest data first)
+ :param int limit: Maximum number of records returned in a single list
:param int page: Page number
:param _return_http_data_only: response data without head status code
and headers
@@ -289,33 +222,38 @@ def list_flash_swap_orders_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['status', 'sell_currency', 'buy_currency', 'reverse', 'limit', 'page']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'status',
+ 'sell_currency',
+ 'buy_currency',
+ 'reverse',
+ 'limit',
+ 'page'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_flash_swap_orders" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_flash_swap_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_flash_swap_orders`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_flash_swap_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_flash_swap_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_flash_swap_orders`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_flash_swap_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_flash_swap_orders`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -341,14 +279,14 @@ def list_flash_swap_orders_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/flash_swap/orders',
- 'GET',
+ '/flash_swap/orders', 'GET',
path_params,
query_params,
header_params,
@@ -361,8 +299,7 @@ def list_flash_swap_orders_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_flash_swap_order(self, flash_swap_order_request, **kwargs): # noqa: E501
"""Create a flash swap order # noqa: E501
@@ -416,22 +353,30 @@ def create_flash_swap_order_with_http_info(self, flash_swap_order_request, **kwa
local_var_params = locals()
- all_params = ['flash_swap_order_request']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'flash_swap_order_request'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_flash_swap_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_flash_swap_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'flash_swap_order_request' is set
- if self.api_client.client_side_validation and (
- 'flash_swap_order_request' not in local_var_params
- or local_var_params['flash_swap_order_request'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `flash_swap_order_request` when calling `create_flash_swap_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('flash_swap_order_request' not in local_var_params or # noqa: E501
+ local_var_params['flash_swap_order_request'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `flash_swap_order_request` when calling `create_flash_swap_order`") # noqa: E501
collection_formats = {}
@@ -448,19 +393,18 @@ def create_flash_swap_order_with_http_info(self, flash_swap_order_request, **kwa
if 'flash_swap_order_request' in local_var_params:
body_params = local_var_params['flash_swap_order_request']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/flash_swap/orders',
- 'POST',
+ '/flash_swap/orders', 'POST',
path_params,
query_params,
header_params,
@@ -473,11 +417,10 @@ def create_flash_swap_order_with_http_info(self, flash_swap_order_request, **kwa
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_flash_swap_order(self, order_id, **kwargs): # noqa: E501
- """Get a single flash swap order's detail # noqa: E501
+ """Query single flash swap order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -501,7 +444,7 @@ def get_flash_swap_order(self, order_id, **kwargs): # noqa: E501
return self.get_flash_swap_order_with_http_info(order_id, **kwargs) # noqa: E501
def get_flash_swap_order_with_http_info(self, order_id, **kwargs): # noqa: E501
- """Get a single flash swap order's detail # noqa: E501
+ """Query single flash swap order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -526,21 +469,30 @@ def get_flash_swap_order_with_http_info(self, order_id, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_flash_swap_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_flash_swap_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `get_flash_swap_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `get_flash_swap_order`") # noqa: E501
collection_formats = {}
@@ -557,14 +509,14 @@ def get_flash_swap_order_with_http_info(self, order_id, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/flash_swap/orders/{order_id}',
- 'GET',
+ '/flash_swap/orders/{order_id}', 'GET',
path_params,
query_params,
header_params,
@@ -577,11 +529,10 @@ def get_flash_swap_order_with_http_info(self, order_id, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def preview_flash_swap_order(self, flash_swap_preview_request, **kwargs): # noqa: E501
- """Initiate a flash swap order preview # noqa: E501
+ """Flash swap order preview # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -605,7 +556,7 @@ def preview_flash_swap_order(self, flash_swap_preview_request, **kwargs): # noq
return self.preview_flash_swap_order_with_http_info(flash_swap_preview_request, **kwargs) # noqa: E501
def preview_flash_swap_order_with_http_info(self, flash_swap_preview_request, **kwargs): # noqa: E501
- """Initiate a flash swap order preview # noqa: E501
+ """Flash swap order preview # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -630,22 +581,30 @@ def preview_flash_swap_order_with_http_info(self, flash_swap_preview_request, **
local_var_params = locals()
- all_params = ['flash_swap_preview_request']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'flash_swap_preview_request'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method preview_flash_swap_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method preview_flash_swap_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'flash_swap_preview_request' is set
- if self.api_client.client_side_validation and (
- 'flash_swap_preview_request' not in local_var_params
- or local_var_params['flash_swap_preview_request'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `flash_swap_preview_request` when calling `preview_flash_swap_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('flash_swap_preview_request' not in local_var_params or # noqa: E501
+ local_var_params['flash_swap_preview_request'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `flash_swap_preview_request` when calling `preview_flash_swap_order`") # noqa: E501
collection_formats = {}
@@ -662,19 +621,18 @@ def preview_flash_swap_order_with_http_info(self, flash_swap_preview_request, **
if 'flash_swap_preview_request' in local_var_params:
body_params = local_var_params['flash_swap_preview_request']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/flash_swap/orders/preview',
- 'POST',
+ '/flash_swap/orders/preview', 'POST',
path_params,
query_params,
header_params,
@@ -687,5 +645,4 @@ def preview_flash_swap_order_with_http_info(self, flash_swap_preview_request, **
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
diff --git a/gate_api/api/futures_api.py b/gate_api/api/futures_api.py
index d9618ae..5d20be4 100644
--- a/gate_api/api/futures_api.py
+++ b/gate_api/api/futures_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class FuturesApi(object):
@@ -34,7 +37,7 @@ def __init__(self, api_client=None):
self.api_client = api_client
def list_futures_contracts(self, settle, **kwargs): # noqa: E501
- """List all futures contracts # noqa: E501
+ """Query all futures contracts # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -43,6 +46,8 @@ def list_futures_contracts(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -58,7 +63,7 @@ def list_futures_contracts(self, settle, **kwargs): # noqa: E501
return self.list_futures_contracts_with_http_info(settle, **kwargs) # noqa: E501
def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501
- """List all futures contracts # noqa: E501
+ """Query all futures contracts # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -67,6 +72,8 @@ def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -83,22 +90,39 @@ def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['settle']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_futures_contracts" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_futures_contracts" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_futures_contracts`"
- ) # noqa: E501
-
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_contracts`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_contracts`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_contracts`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_contracts`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -106,6 +130,10 @@ def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501
path_params['settle'] = local_var_params['settle'] # noqa: E501
query_params = []
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
header_params = {}
@@ -114,14 +142,14 @@ def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/contracts',
- 'GET',
+ '/futures/{settle}/contracts', 'GET',
path_params,
query_params,
header_params,
@@ -134,11 +162,10 @@ def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_futures_contract(self, settle, contract, **kwargs): # noqa: E501
- """Get a single contract # noqa: E501
+ """Query single contract information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -163,7 +190,7 @@ def get_futures_contract(self, settle, contract, **kwargs): # noqa: E501
return self.get_futures_contract_with_http_info(settle, contract, **kwargs) # noqa: E501
def get_futures_contract_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Get a single contract # noqa: E501
+ """Query single contract information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -189,28 +216,35 @@ def get_futures_contract_with_http_info(self, settle, contract, **kwargs): # no
local_var_params = locals()
- all_params = ['settle', 'contract']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_futures_contract" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_futures_contract" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `get_futures_contract`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `get_futures_contract`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `get_futures_contract`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `get_futures_contract`") # noqa: E501
collection_formats = {}
@@ -229,14 +263,14 @@ def get_futures_contract_with_http_info(self, settle, contract, **kwargs): # no
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/contracts/{contract}',
- 'GET',
+ '/futures/{settle}/contracts/{contract}', 'GET',
path_params,
query_params,
header_params,
@@ -249,11 +283,10 @@ def get_futures_contract_with_http_info(self, settle, contract, **kwargs): # no
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_futures_order_book(self, settle, contract, **kwargs): # noqa: E501
- """Futures order book # noqa: E501
+ """Query futures market depth information # noqa: E501
Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -264,9 +297,9 @@ def list_futures_order_book(self, settle, contract, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str interval: Order depth. 0 means no aggregation is applied. default to 0
- :param int limit: Maximum number of order depth data in asks or bids
- :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update
+ :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified
+ :param int limit: Number of depth levels
+ :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time depth changes
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -282,7 +315,7 @@ def list_futures_order_book(self, settle, contract, **kwargs): # noqa: E501
return self.list_futures_order_book_with_http_info(settle, contract, **kwargs) # noqa: E501
def list_futures_order_book_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Futures order book # noqa: E501
+ """Query futures market depth information # noqa: E501
Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -293,9 +326,9 @@ def list_futures_order_book_with_http_info(self, settle, contract, **kwargs): #
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str interval: Order depth. 0 means no aggregation is applied. default to 0
- :param int limit: Maximum number of order depth data in asks or bids
- :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update
+ :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified
+ :param int limit: Number of depth levels
+ :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time depth changes
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -312,41 +345,43 @@ def list_futures_order_book_with_http_info(self, settle, contract, **kwargs): #
local_var_params = locals()
- all_params = ['settle', 'contract', 'interval', 'limit', 'with_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'interval',
+ 'limit',
+ 'with_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_futures_order_book" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_futures_order_book" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_futures_order_book`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_order_book`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `list_futures_order_book`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 50
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_order_book`, must be a value less than or equal to `50`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_order_book`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_order_book`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 50: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_order_book`, must be a value less than or equal to `50`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_order_book`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -370,14 +405,14 @@ def list_futures_order_book_with_http_info(self, settle, contract, **kwargs): #
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/order_book',
- 'GET',
+ '/futures/{settle}/order_book', 'GET',
path_params,
query_params,
header_params,
@@ -390,11 +425,10 @@ def list_futures_order_book_with_http_info(self, settle, contract, **kwargs): #
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_futures_trades(self, settle, contract, **kwargs): # noqa: E501
- """Futures trading history # noqa: E501
+ """Futures market transaction records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -404,11 +438,11 @@ def list_futures_trades(self, settle, contract, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range
- :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned.
- :param int to: Specify end time in Unix seconds, default to current time
+ :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned.
+ :param int to: Specify end time in Unix seconds, default to current time.
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -424,7 +458,7 @@ def list_futures_trades(self, settle, contract, **kwargs): # noqa: E501
return self.list_futures_trades_with_http_info(settle, contract, **kwargs) # noqa: E501
def list_futures_trades_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Futures trading history # noqa: E501
+ """Futures market transaction records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -434,11 +468,11 @@ def list_futures_trades_with_http_info(self, settle, contract, **kwargs): # noq
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range
- :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned.
- :param int to: Specify end time in Unix seconds, default to current time
+ :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned.
+ :param int to: Specify end time in Unix seconds, default to current time.
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -455,47 +489,47 @@ def list_futures_trades_with_http_info(self, settle, contract, **kwargs): # noq
local_var_params = locals()
- all_params = ['settle', 'contract', 'limit', 'offset', 'last_id', '_from', 'to']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'limit',
+ 'offset',
+ 'last_id',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_futures_trades" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_futures_trades" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_futures_trades`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_trades`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `list_futures_trades`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_trades`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_trades`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_futures_trades`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_trades`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_trades`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_trades`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_trades`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -523,14 +557,14 @@ def list_futures_trades_with_http_info(self, settle, contract, **kwargs): # noq
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/trades',
- 'GET',
+ '/futures/{settle}/trades', 'GET',
path_params,
query_params,
header_params,
@@ -543,11 +577,10 @@ def list_futures_trades_with_http_info(self, settle, contract, **kwargs): # noq
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_futures_candlesticks(self, settle, contract, **kwargs): # noqa: E501
- """Get futures candlesticks # noqa: E501
+ """Futures market K-line chart # noqa: E501
Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -558,10 +591,11 @@ def list_futures_candlesticks(self, settle, contract, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param int _from: 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间
- :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time
- :param int limit: 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝
- :param str interval: 数据点的时间间隔,注意 1w 代表一个自然周,7d 的时间是和 Unix 初始时间对齐, 30d 代表一个自然月
+ :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified
+ :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision
+ :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected.
+ :param str interval: Interval time between data points. Note that `1w` means natural week(Mon-Sun), while `7d` means every 7d since unix 0. 30d represents a natural month, not 30 days
+ :param str timezone: Time zone: all/utc0/utc8, default utc0
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -577,7 +611,7 @@ def list_futures_candlesticks(self, settle, contract, **kwargs): # noqa: E501
return self.list_futures_candlesticks_with_http_info(settle, contract, **kwargs) # noqa: E501
def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Get futures candlesticks # noqa: E501
+ """Futures market K-line chart # noqa: E501
Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -588,10 +622,11 @@ def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs):
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param int _from: 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间
- :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time
- :param int limit: 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝
- :param str interval: 数据点的时间间隔,注意 1w 代表一个自然周,7d 的时间是和 Unix 初始时间对齐, 30d 代表一个自然月
+ :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified
+ :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision
+ :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected.
+ :param str interval: Interval time between data points. Note that `1w` means natural week(Mon-Sun), while `7d` means every 7d since unix 0. 30d represents a natural month, not 30 days
+ :param str timezone: Time zone: all/utc0/utc8, default utc0
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -608,35 +643,43 @@ def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs):
local_var_params = locals()
- all_params = ['settle', 'contract', '_from', 'to', 'limit', 'interval']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ '_from',
+ 'to',
+ 'limit',
+ 'interval',
+ 'timezone'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_futures_candlesticks" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_futures_candlesticks" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_futures_candlesticks`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_candlesticks`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `list_futures_candlesticks`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 2000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_candlesticks`, must be a value less than or equal to `2000`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_candlesticks`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 2000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_candlesticks`, must be a value less than or equal to `2000`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -654,6 +697,8 @@ def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs):
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501
query_params.append(('interval', local_var_params['interval'])) # noqa: E501
+ if 'timezone' in local_var_params and local_var_params['timezone'] is not None: # noqa: E501
+ query_params.append(('timezone', local_var_params['timezone'])) # noqa: E501
header_params = {}
@@ -662,14 +707,14 @@ def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs):
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/candlesticks',
- 'GET',
+ '/futures/{settle}/candlesticks', 'GET',
path_params,
query_params,
header_params,
@@ -682,11 +727,10 @@ def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs):
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_futures_premium_index(self, settle, contract, **kwargs): # noqa: E501
- """Premium Index K-Line # noqa: E501
+ """Premium Index K-line chart # noqa: E501
Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -697,10 +741,10 @@ def list_futures_premium_index(self, settle, contract, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param int _from: 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间
- :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time
- :param int limit: 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝
- :param str interval: Interval time between data points
+ :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified
+ :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision
+ :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected.
+ :param str interval: Time interval between data points
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -716,7 +760,7 @@ def list_futures_premium_index(self, settle, contract, **kwargs): # noqa: E501
return self.list_futures_premium_index_with_http_info(settle, contract, **kwargs) # noqa: E501
def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Premium Index K-Line # noqa: E501
+ """Premium Index K-line chart # noqa: E501
Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -727,10 +771,10 @@ def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs):
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param int _from: 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间
- :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time
- :param int limit: 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝
- :param str interval: Interval time between data points
+ :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified
+ :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision
+ :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected.
+ :param str interval: Time interval between data points
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -747,37 +791,42 @@ def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs):
local_var_params = locals()
- all_params = ['settle', 'contract', '_from', 'to', 'limit', 'interval']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ '_from',
+ 'to',
+ 'limit',
+ 'interval'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_futures_premium_index" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_futures_premium_index" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_futures_premium_index`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_premium_index`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `list_futures_premium_index`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 2000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_premium_index`, must be a value less than or equal to `2000`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_premium_index`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 2000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_premium_index`, must be a value less than or equal to `2000`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -803,14 +852,14 @@ def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs):
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/premium_index',
- 'GET',
+ '/futures/{settle}/premium_index', 'GET',
path_params,
query_params,
header_params,
@@ -823,11 +872,10 @@ def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs):
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_futures_tickers(self, settle, **kwargs): # noqa: E501
- """List futures tickers # noqa: E501
+ """Get all futures trading statistics # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -852,7 +900,7 @@ def list_futures_tickers(self, settle, **kwargs): # noqa: E501
return self.list_futures_tickers_with_http_info(settle, **kwargs) # noqa: E501
def list_futures_tickers_with_http_info(self, settle, **kwargs): # noqa: E501
- """List futures tickers # noqa: E501
+ """Get all futures trading statistics # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -878,21 +926,31 @@ def list_futures_tickers_with_http_info(self, settle, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['settle', 'contract']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_futures_tickers" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_futures_tickers" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_futures_tickers`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_tickers`") # noqa: E501
collection_formats = {}
@@ -911,14 +969,14 @@ def list_futures_tickers_with_http_info(self, settle, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/tickers',
- 'GET',
+ '/futures/{settle}/tickers', 'GET',
path_params,
query_params,
header_params,
@@ -931,11 +989,10 @@ def list_futures_tickers_with_http_info(self, settle, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_futures_funding_rate_history(self, settle, contract, **kwargs): # noqa: E501
- """Funding rate history # noqa: E501
+ """Futures market historical funding rate # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -945,7 +1002,9 @@ def list_futures_funding_rate_history(self, settle, contract, **kwargs): # noqa
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -961,7 +1020,7 @@ def list_futures_funding_rate_history(self, settle, contract, **kwargs): # noqa
return self.list_futures_funding_rate_history_with_http_info(settle, contract, **kwargs) # noqa: E501
def list_futures_funding_rate_history_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Funding rate history # noqa: E501
+ """Futures market historical funding rate # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -971,7 +1030,9 @@ def list_futures_funding_rate_history_with_http_info(self, settle, contract, **k
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -988,43 +1049,43 @@ def list_futures_funding_rate_history_with_http_info(self, settle, contract, **k
local_var_params = locals()
- all_params = ['settle', 'contract', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'limit',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_futures_funding_rate_history" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_futures_funding_rate_history" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_futures_funding_rate_history`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_funding_rate_history`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `list_futures_funding_rate_history`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_funding_rate_history`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_funding_rate_history`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_funding_rate_history`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_funding_rate_history`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_funding_rate_history`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1036,6 +1097,10 @@ def list_futures_funding_rate_history_with_http_info(self, settle, contract, **k
query_params.append(('contract', local_var_params['contract'])) # noqa: E501
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
header_params = {}
@@ -1044,14 +1109,14 @@ def list_futures_funding_rate_history_with_http_info(self, settle, contract, **k
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/funding_rate',
- 'GET',
+ '/futures/{settle}/funding_rate', 'GET',
path_params,
query_params,
header_params,
@@ -1064,11 +1129,10 @@ def list_futures_funding_rate_history_with_http_info(self, settle, contract, **k
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_futures_insurance_ledger(self, settle, **kwargs): # noqa: E501
- """Futures insurance balance history # noqa: E501
+ """Futures market insurance fund history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1077,7 +1141,7 @@ def list_futures_insurance_ledger(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1093,7 +1157,7 @@ def list_futures_insurance_ledger(self, settle, **kwargs): # noqa: E501
return self.list_futures_insurance_ledger_with_http_info(settle, **kwargs) # noqa: E501
def list_futures_insurance_ledger_with_http_info(self, settle, **kwargs): # noqa: E501
- """Futures insurance balance history # noqa: E501
+ """Futures market insurance fund history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1102,7 +1166,7 @@ def list_futures_insurance_ledger_with_http_info(self, settle, **kwargs): # noq
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1119,36 +1183,36 @@ def list_futures_insurance_ledger_with_http_info(self, settle, **kwargs): # noq
local_var_params = locals()
- all_params = ['settle', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_futures_insurance_ledger" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_futures_insurance_ledger" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_futures_insurance_ledger`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_insurance_ledger`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_insurance_ledger`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_insurance_ledger`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_insurance_ledger`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_insurance_ledger`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1166,14 +1230,14 @@ def list_futures_insurance_ledger_with_http_info(self, settle, **kwargs): # noq
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/insurance',
- 'GET',
+ '/futures/{settle}/insurance', 'GET',
path_params,
query_params,
header_params,
@@ -1186,11 +1250,10 @@ def list_futures_insurance_ledger_with_http_info(self, settle, **kwargs): # noq
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_contract_stats(self, settle, contract, **kwargs): # noqa: E501
- """Futures stats # noqa: E501
+ """Futures statistics # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1218,7 +1281,7 @@ def list_contract_stats(self, settle, contract, **kwargs): # noqa: E501
return self.list_contract_stats_with_http_info(settle, contract, **kwargs) # noqa: E501
def list_contract_stats_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Futures stats # noqa: E501
+ """Futures statistics # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1247,41 +1310,43 @@ def list_contract_stats_with_http_info(self, settle, contract, **kwargs): # noq
local_var_params = locals()
- all_params = ['settle', 'contract', '_from', 'interval', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ '_from',
+ 'interval',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_contract_stats" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_contract_stats" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_contract_stats`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_contract_stats`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `list_contract_stats`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_contract_stats`, must be a value less than or equal to `100`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_contract_stats`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `list_contract_stats`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_contract_stats`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_contract_stats`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1305,14 +1370,14 @@ def list_contract_stats_with_http_info(self, settle, contract, **kwargs): # noq
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/contract_stats',
- 'GET',
+ '/futures/{settle}/contract_stats', 'GET',
path_params,
query_params,
header_params,
@@ -1325,11 +1390,10 @@ def list_contract_stats_with_http_info(self, settle, contract, **kwargs): # noq
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_index_constituents(self, settle, index, **kwargs): # noqa: E501
- """Get index constituents # noqa: E501
+ """Query index constituents # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1354,7 +1418,7 @@ def get_index_constituents(self, settle, index, **kwargs): # noqa: E501
return self.get_index_constituents_with_http_info(settle, index, **kwargs) # noqa: E501
def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noqa: E501
- """Get index constituents # noqa: E501
+ """Query index constituents # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1380,28 +1444,35 @@ def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noq
local_var_params = locals()
- all_params = ['settle', 'index']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'index'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_index_constituents" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_index_constituents" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `get_index_constituents`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `get_index_constituents`") # noqa: E501
# verify the required parameter 'index' is set
- if self.api_client.client_side_validation and (
- 'index' not in local_var_params or local_var_params['index'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `index` when calling `get_index_constituents`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('index' not in local_var_params or # noqa: E501
+ local_var_params['index'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `index` when calling `get_index_constituents`") # noqa: E501
collection_formats = {}
@@ -1420,14 +1491,14 @@ def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noq
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/index_constituents/{index}',
- 'GET',
+ '/futures/{settle}/index_constituents/{index}', 'GET',
path_params,
query_params,
header_params,
@@ -1440,13 +1511,12 @@ def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noq
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_liquidated_orders(self, settle, **kwargs): # noqa: E501
- """Retrieve liquidation history # noqa: E501
+ """Query liquidation order history # noqa: E501
- Interval between `from` and `to` cannot exceeds 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail. # noqa: E501
+ The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_liquidated_orders(settle, async_req=True)
@@ -1455,9 +1525,9 @@ def list_liquidated_orders(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param int limit: Maximum number of records to be returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param int limit: Maximum number of records returned in a single list
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1473,9 +1543,9 @@ def list_liquidated_orders(self, settle, **kwargs): # noqa: E501
return self.list_liquidated_orders_with_http_info(settle, **kwargs) # noqa: E501
def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501
- """Retrieve liquidation history # noqa: E501
+ """Query liquidation order history # noqa: E501
- Interval between `from` and `to` cannot exceeds 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail. # noqa: E501
+ The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_liquidated_orders_with_http_info(settle, async_req=True)
@@ -1484,9 +1554,9 @@ def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param int limit: Maximum number of records to be returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param int limit: Maximum number of records returned in a single list
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1503,34 +1573,39 @@ def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['settle', 'contract', '_from', 'to', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ '_from',
+ 'to',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_liquidated_orders" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_liquidated_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_liquidated_orders`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_liquidated_orders`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_liquidated_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_liquidated_orders`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidated_orders`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidated_orders`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1554,14 +1629,14 @@ def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/liq_orders',
- 'GET',
+ '/futures/{settle}/liq_orders', 'GET',
path_params,
query_params,
header_params,
@@ -1574,11 +1649,145 @@ def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def list_futures_risk_limit_tiers(self, settle, **kwargs): # noqa: E501
+ """Query risk limit tiers # noqa: E501
+
+ When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_futures_risk_limit_tiers(settle, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param str contract: Futures contract, return related data only if specified
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.FuturesLimitRiskTiers]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_futures_risk_limit_tiers_with_http_info(settle, **kwargs) # noqa: E501
+
+ def list_futures_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noqa: E501
+ """Query risk limit tiers # noqa: E501
+
+ When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_futures_risk_limit_tiers_with_http_info(settle, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param str contract: Futures contract, return related data only if specified
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.FuturesLimitRiskTiers], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'settle',
+ 'contract',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_futures_risk_limit_tiers" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'settle' is set
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_risk_limit_tiers`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_risk_limit_tiers`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_risk_limit_tiers`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_risk_limit_tiers`, must be a value greater than or equal to `0`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+ if 'settle' in local_var_params:
+ path_params['settle'] = local_var_params['settle'] # noqa: E501
+
+ query_params = []
+ if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501
+ query_params.append(('contract', local_var_params['contract'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/futures/{settle}/risk_limit_tiers', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[FuturesLimitRiskTiers]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def list_futures_accounts(self, settle, **kwargs): # noqa: E501
- """Query futures account # noqa: E501
+ """Get futures account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1602,7 +1811,7 @@ def list_futures_accounts(self, settle, **kwargs): # noqa: E501
return self.list_futures_accounts_with_http_info(settle, **kwargs) # noqa: E501
def list_futures_accounts_with_http_info(self, settle, **kwargs): # noqa: E501
- """Query futures account # noqa: E501
+ """Get futures account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1627,21 +1836,30 @@ def list_futures_accounts_with_http_info(self, settle, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['settle']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_futures_accounts" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_futures_accounts" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_futures_accounts`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_accounts`") # noqa: E501
collection_formats = {}
@@ -1658,14 +1876,14 @@ def list_futures_accounts_with_http_info(self, settle, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/accounts',
- 'GET',
+ '/futures/{settle}/accounts', 'GET',
path_params,
query_params,
header_params,
@@ -1678,12 +1896,12 @@ def list_futures_accounts_with_http_info(self, settle, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_futures_account_book(self, settle, **kwargs): # noqa: E501
- """Query account book # noqa: E501
+ """Query futures account change history # noqa: E501
+ If the contract field is passed, only records containing this field after 2023-10-30 can be filtered. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_futures_account_book(settle, async_req=True)
@@ -1691,10 +1909,12 @@ def list_futures_account_book(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param int limit: Maximum number of records to be returned in a single list
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate
+ :param str contract: Futures contract, return related data only if specified
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str type: Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1710,8 +1930,9 @@ def list_futures_account_book(self, settle, **kwargs): # noqa: E501
return self.list_futures_account_book_with_http_info(settle, **kwargs) # noqa: E501
def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E501
- """Query account book # noqa: E501
+ """Query futures account change history # noqa: E501
+ If the contract field is passed, only records containing this field after 2023-10-30 can be filtered. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_futures_account_book_with_http_info(settle, async_req=True)
@@ -1719,10 +1940,12 @@ def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param int limit: Maximum number of records to be returned in a single list
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate
+ :param str contract: Futures contract, return related data only if specified
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str type: Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1739,34 +1962,43 @@ def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E
local_var_params = locals()
- all_params = ['settle', 'limit', '_from', 'to', 'type']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'limit',
+ 'offset',
+ '_from',
+ 'to',
+ 'type'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_futures_account_book" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_futures_account_book" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_futures_account_book`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_account_book`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_account_book`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_account_book`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_account_book`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_account_book`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_account_book`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1774,8 +2006,12 @@ def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E
path_params['settle'] = local_var_params['settle'] # noqa: E501
query_params = []
+ if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501
+ query_params.append(('contract', local_var_params['contract'])) # noqa: E501
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
query_params.append(('from', local_var_params['_from'])) # noqa: E501
if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
@@ -1790,14 +2026,14 @@ def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/account_book',
- 'GET',
+ '/futures/{settle}/account_book', 'GET',
path_params,
query_params,
header_params,
@@ -1810,11 +2046,10 @@ def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_positions(self, settle, **kwargs): # noqa: E501
- """List all positions of a user # noqa: E501
+ """Get user position list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1823,7 +2058,9 @@ def list_positions(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param bool holding: 只返回真实持仓-true,全部返回-false
+ :param bool holding: Return only real positions - true, return all - false
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1839,7 +2076,7 @@ def list_positions(self, settle, **kwargs): # noqa: E501
return self.list_positions_with_http_info(settle, **kwargs) # noqa: E501
def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501
- """List all positions of a user # noqa: E501
+ """Get user position list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1848,7 +2085,9 @@ def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param bool holding: 只返回真实持仓-true,全部返回-false
+ :param bool holding: Return only real positions - true, return all - false
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1865,20 +2104,40 @@ def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['settle', 'holding']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'holding',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_positions" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_positions" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `settle` when calling `list_positions`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_positions`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_positions`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_positions`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1888,6 +2147,10 @@ def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501
query_params = []
if 'holding' in local_var_params and local_var_params['holding'] is not None: # noqa: E501
query_params.append(('holding', local_var_params['holding'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
header_params = {}
@@ -1896,14 +2159,14 @@ def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/positions',
- 'GET',
+ '/futures/{settle}/positions', 'GET',
path_params,
query_params,
header_params,
@@ -1916,11 +2179,10 @@ def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_position(self, settle, contract, **kwargs): # noqa: E501
- """Get single position # noqa: E501
+ """Get single position information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1945,7 +2207,7 @@ def get_position(self, settle, contract, **kwargs): # noqa: E501
return self.get_position_with_http_info(settle, contract, **kwargs) # noqa: E501
def get_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Get single position # noqa: E501
+ """Get single position information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1971,23 +2233,34 @@ def get_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['settle', 'contract']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_position" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_position" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `settle` when calling `get_position`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `contract` when calling `get_position`") # noqa: E501
collection_formats = {}
@@ -2007,14 +2280,14 @@ def get_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/positions/{contract}',
- 'GET',
+ '/futures/{settle}/positions/{contract}', 'GET',
path_params,
query_params,
header_params,
@@ -2027,8 +2300,7 @@ def get_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def update_position_margin(self, settle, contract, change, **kwargs): # noqa: E501
"""Update position margin # noqa: E501
@@ -2041,7 +2313,7 @@ def update_position_margin(self, settle, contract, change, **kwargs): # noqa: E
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required)
+ :param str change: Margin change amount, positive number increases, negative number decreases (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2067,7 +2339,7 @@ def update_position_margin_with_http_info(self, settle, contract, change, **kwar
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required)
+ :param str change: Margin change amount, positive number increases, negative number decreases (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2084,35 +2356,40 @@ def update_position_margin_with_http_info(self, settle, contract, change, **kwar
local_var_params = locals()
- all_params = ['settle', 'contract', 'change']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'change'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method update_position_margin" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_position_margin" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `update_position_margin`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `update_position_margin`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `update_position_margin`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `update_position_margin`") # noqa: E501
# verify the required parameter 'change' is set
- if self.api_client.client_side_validation and (
- 'change' not in local_var_params or local_var_params['change'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `change` when calling `update_position_margin`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('change' not in local_var_params or # noqa: E501
+ local_var_params['change'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `change` when calling `update_position_margin`") # noqa: E501
collection_formats = {}
@@ -2133,14 +2410,14 @@ def update_position_margin_with_http_info(self, settle, contract, change, **kwar
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/positions/{contract}/margin',
- 'POST',
+ '/futures/{settle}/positions/{contract}/margin', 'POST',
path_params,
query_params,
header_params,
@@ -2153,8 +2430,7 @@ def update_position_margin_with_http_info(self, settle, contract, change, **kwar
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def update_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501
"""Update position leverage # noqa: E501
@@ -2168,7 +2444,8 @@ def update_position_leverage(self, settle, contract, leverage, **kwargs): # noq
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
:param str leverage: New position leverage (required)
- :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0)
+ :param str cross_leverage_limit: Cross margin leverage (valid only when `leverage` is 0)
+ :param int pid: Product ID
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2195,7 +2472,8 @@ def update_position_leverage_with_http_info(self, settle, contract, leverage, **
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
:param str leverage: New position leverage (required)
- :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0)
+ :param str cross_leverage_limit: Cross margin leverage (valid only when `leverage` is 0)
+ :param int pid: Product ID
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2212,35 +2490,42 @@ def update_position_leverage_with_http_info(self, settle, contract, leverage, **
local_var_params = locals()
- all_params = ['settle', 'contract', 'leverage', 'cross_leverage_limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'leverage',
+ 'cross_leverage_limit',
+ 'pid'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method update_position_leverage" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_position_leverage" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `update_position_leverage`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `update_position_leverage`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `update_position_leverage`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `update_position_leverage`") # noqa: E501
# verify the required parameter 'leverage' is set
- if self.api_client.client_side_validation and (
- 'leverage' not in local_var_params or local_var_params['leverage'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `leverage` when calling `update_position_leverage`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('leverage' not in local_var_params or # noqa: E501
+ local_var_params['leverage'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `leverage` when calling `update_position_leverage`") # noqa: E501
collection_formats = {}
@@ -2253,10 +2538,10 @@ def update_position_leverage_with_http_info(self, settle, contract, leverage, **
query_params = []
if 'leverage' in local_var_params and local_var_params['leverage'] is not None: # noqa: E501
query_params.append(('leverage', local_var_params['leverage'])) # noqa: E501
- if (
- 'cross_leverage_limit' in local_var_params and local_var_params['cross_leverage_limit'] is not None
- ): # noqa: E501
+ if 'cross_leverage_limit' in local_var_params and local_var_params['cross_leverage_limit'] is not None: # noqa: E501
query_params.append(('cross_leverage_limit', local_var_params['cross_leverage_limit'])) # noqa: E501
+ if 'pid' in local_var_params and local_var_params['pid'] is not None: # noqa: E501
+ query_params.append(('pid', local_var_params['pid'])) # noqa: E501
header_params = {}
@@ -2265,14 +2550,14 @@ def update_position_leverage_with_http_info(self, settle, contract, leverage, **
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/positions/{contract}/leverage',
- 'POST',
+ '/futures/{settle}/positions/{contract}/leverage', 'POST',
path_params,
query_params,
header_params,
@@ -2285,21 +2570,19 @@ def update_position_leverage_with_http_info(self, settle, contract, leverage, **
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def update_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501
- """Update position risk limit # noqa: E501
+ def update_position_cross_mode(self, settle, futures_position_cross_mode, **kwargs): # noqa: E501
+ """Switch Position Margin Mode # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_position_risk_limit(settle, contract, risk_limit, async_req=True)
+ >>> thread = api.update_position_cross_mode(settle, futures_position_cross_mode, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str contract: Futures contract (required)
- :param str risk_limit: New position risk limit (required)
+ :param FuturesPositionCrossMode futures_position_cross_mode: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2312,20 +2595,19 @@ def update_position_risk_limit(self, settle, contract, risk_limit, **kwargs): #
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.update_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501
+ return self.update_position_cross_mode_with_http_info(settle, futures_position_cross_mode, **kwargs) # noqa: E501
- def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501
- """Update position risk limit # noqa: E501
+ def update_position_cross_mode_with_http_info(self, settle, futures_position_cross_mode, **kwargs): # noqa: E501
+ """Switch Position Margin Mode # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_position_risk_limit_with_http_info(settle, contract, risk_limit, async_req=True)
+ >>> thread = api.update_position_cross_mode_with_http_info(settle, futures_position_cross_mode, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str contract: Futures contract (required)
- :param str risk_limit: New position risk limit (required)
+ :param FuturesPositionCrossMode futures_position_cross_mode: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2342,49 +2624,43 @@ def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit
local_var_params = locals()
- all_params = ['settle', 'contract', 'risk_limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'futures_position_cross_mode'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method update_position_risk_limit" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method update_position_cross_mode" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `update_position_risk_limit`"
- ) # noqa: E501
- # verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `update_position_risk_limit`"
- ) # noqa: E501
- # verify the required parameter 'risk_limit' is set
- if self.api_client.client_side_validation and (
- 'risk_limit' not in local_var_params or local_var_params['risk_limit'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `risk_limit` when calling `update_position_risk_limit`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `update_position_cross_mode`") # noqa: E501
+ # verify the required parameter 'futures_position_cross_mode' is set
+ if self.api_client.client_side_validation and ('futures_position_cross_mode' not in local_var_params or # noqa: E501
+ local_var_params['futures_position_cross_mode'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `futures_position_cross_mode` when calling `update_position_cross_mode`") # noqa: E501
collection_formats = {}
path_params = {}
if 'settle' in local_var_params:
path_params['settle'] = local_var_params['settle'] # noqa: E501
- if 'contract' in local_var_params:
- path_params['contract'] = local_var_params['contract'] # noqa: E501
query_params = []
- if 'risk_limit' in local_var_params and local_var_params['risk_limit'] is not None: # noqa: E501
- query_params.append(('risk_limit', local_var_params['risk_limit'])) # noqa: E501
header_params = {}
@@ -2392,15 +2668,21 @@ def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit
local_var_files = {}
body_params = None
+ if 'futures_position_cross_mode' in local_var_params:
+ body_params = local_var_params['futures_position_cross_mode']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/positions/{contract}/risk_limit',
- 'POST',
+ '/futures/{settle}/positions/cross_mode', 'POST',
path_params,
query_params,
header_params,
@@ -2413,21 +2695,19 @@ def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def set_dual_mode(self, settle, dual_mode, **kwargs): # noqa: E501
- """Enable or disable dual mode # noqa: E501
+ def update_dual_comp_position_cross_mode(self, settle, inline_object, **kwargs): # noqa: E501
+ """Switch Between Cross and Isolated Margin Modes Under Hedge Mode # noqa: E501
- Before setting dual mode, make sure all positions are closed and no orders are open # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.set_dual_mode(settle, dual_mode, async_req=True)
+ >>> thread = api.update_dual_comp_position_cross_mode(settle, inline_object, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param bool dual_mode: Whether to enable dual mode (required)
+ :param InlineObject inline_object: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2435,25 +2715,24 @@ def set_dual_mode(self, settle, dual_mode, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: gate_api.FuturesAccount
+ :rtype: list[gate_api.Position]
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.set_dual_mode_with_http_info(settle, dual_mode, **kwargs) # noqa: E501
+ return self.update_dual_comp_position_cross_mode_with_http_info(settle, inline_object, **kwargs) # noqa: E501
- def set_dual_mode_with_http_info(self, settle, dual_mode, **kwargs): # noqa: E501
- """Enable or disable dual mode # noqa: E501
+ def update_dual_comp_position_cross_mode_with_http_info(self, settle, inline_object, **kwargs): # noqa: E501
+ """Switch Between Cross and Isolated Margin Modes Under Hedge Mode # noqa: E501
- Before setting dual mode, make sure all positions are closed and no orders are open # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.set_dual_mode_with_http_info(settle, dual_mode, async_req=True)
+ >>> thread = api.update_dual_comp_position_cross_mode_with_http_info(settle, inline_object, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param bool dual_mode: Whether to enable dual mode (required)
+ :param InlineObject inline_object: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2463,31 +2742,42 @@ def set_dual_mode_with_http_info(self, settle, dual_mode, **kwargs): # noqa: E5
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(gate_api.FuturesAccount, status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['settle', 'dual_mode']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'inline_object'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method set_dual_mode" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_dual_comp_position_cross_mode" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `settle` when calling `set_dual_mode`") # noqa: E501
- # verify the required parameter 'dual_mode' is set
- if self.api_client.client_side_validation and (
- 'dual_mode' not in local_var_params or local_var_params['dual_mode'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `dual_mode` when calling `set_dual_mode`") # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `update_dual_comp_position_cross_mode`") # noqa: E501
+ # verify the required parameter 'inline_object' is set
+ if self.api_client.client_side_validation and ('inline_object' not in local_var_params or # noqa: E501
+ local_var_params['inline_object'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `inline_object` when calling `update_dual_comp_position_cross_mode`") # noqa: E501
collection_formats = {}
@@ -2496,8 +2786,6 @@ def set_dual_mode_with_http_info(self, settle, dual_mode, **kwargs): # noqa: E5
path_params['settle'] = local_var_params['settle'] # noqa: E501
query_params = []
- if 'dual_mode' in local_var_params and local_var_params['dual_mode'] is not None: # noqa: E501
- query_params.append(('dual_mode', local_var_params['dual_mode'])) # noqa: E501
header_params = {}
@@ -2505,41 +2793,47 @@ def set_dual_mode_with_http_info(self, settle, dual_mode, **kwargs): # noqa: E5
local_var_files = {}
body_params = None
+ if 'inline_object' in local_var_params:
+ body_params = local_var_params['inline_object']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/dual_mode',
- 'POST',
+ '/futures/{settle}/dual_comp/positions/cross_mode', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='FuturesAccount', # noqa: E501
+ response_type='list[Position]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def get_dual_mode_position(self, settle, contract, **kwargs): # noqa: E501
- """Retrieve position detail in dual mode # noqa: E501
+ def update_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501
+ """Update position risk limit # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_dual_mode_position(settle, contract, async_req=True)
+ >>> thread = api.update_position_risk_limit(settle, contract, risk_limit, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
+ :param str risk_limit: New risk limit value (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2547,24 +2841,25 @@ def get_dual_mode_position(self, settle, contract, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: list[gate_api.Position]
+ :rtype: gate_api.Position
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.get_dual_mode_position_with_http_info(settle, contract, **kwargs) # noqa: E501
+ return self.update_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501
- def get_dual_mode_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Retrieve position detail in dual mode # noqa: E501
+ def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501
+ """Update position risk limit # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_dual_mode_position_with_http_info(settle, contract, async_req=True)
+ >>> thread = api.update_position_risk_limit_with_http_info(settle, contract, risk_limit, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
+ :param str risk_limit: New risk limit value (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2574,35 +2869,47 @@ def get_dual_mode_position_with_http_info(self, settle, contract, **kwargs): #
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(gate_api.Position, status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['settle', 'contract']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'risk_limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_dual_mode_position" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_position_risk_limit" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `get_dual_mode_position`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `update_position_risk_limit`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `get_dual_mode_position`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `update_position_risk_limit`") # noqa: E501
+ # verify the required parameter 'risk_limit' is set
+ if self.api_client.client_side_validation and ('risk_limit' not in local_var_params or # noqa: E501
+ local_var_params['risk_limit'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `risk_limit` when calling `update_position_risk_limit`") # noqa: E501
collection_formats = {}
@@ -2613,6 +2920,8 @@ def get_dual_mode_position_with_http_info(self, settle, contract, **kwargs): #
path_params['contract'] = local_var_params['contract'] # noqa: E501
query_params = []
+ if 'risk_limit' in local_var_params and local_var_params['risk_limit'] is not None: # noqa: E501
+ query_params.append(('risk_limit', local_var_params['risk_limit'])) # noqa: E501
header_params = {}
@@ -2621,29 +2930,272 @@ def get_dual_mode_position_with_http_info(self, settle, contract, **kwargs): #
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/dual_comp/positions/{contract}',
- 'GET',
+ '/futures/{settle}/positions/{contract}/risk_limit', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[Position]', # noqa: E501
+ response_type='Position', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def set_dual_mode(self, settle, dual_mode, **kwargs): # noqa: E501
+ """Set position mode # noqa: E501
+
+ The prerequisite for changing mode is that all positions have no holdings and no pending orders # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.set_dual_mode(settle, dual_mode, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param bool dual_mode: Whether to enable dual mode (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.FuturesAccount
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.set_dual_mode_with_http_info(settle, dual_mode, **kwargs) # noqa: E501
+
+ def set_dual_mode_with_http_info(self, settle, dual_mode, **kwargs): # noqa: E501
+ """Set position mode # noqa: E501
+
+ The prerequisite for changing mode is that all positions have no holdings and no pending orders # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.set_dual_mode_with_http_info(settle, dual_mode, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param bool dual_mode: Whether to enable dual mode (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.FuturesAccount, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'settle',
+ 'dual_mode'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method set_dual_mode" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'settle' is set
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `set_dual_mode`") # noqa: E501
+ # verify the required parameter 'dual_mode' is set
+ if self.api_client.client_side_validation and ('dual_mode' not in local_var_params or # noqa: E501
+ local_var_params['dual_mode'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `dual_mode` when calling `set_dual_mode`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'settle' in local_var_params:
+ path_params['settle'] = local_var_params['settle'] # noqa: E501
+
+ query_params = []
+ if 'dual_mode' in local_var_params and local_var_params['dual_mode'] is not None: # noqa: E501
+ query_params.append(('dual_mode', local_var_params['dual_mode'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/futures/{settle}/dual_mode', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='FuturesAccount', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_dual_mode_position(self, settle, contract, **kwargs): # noqa: E501
+ """Get position information in dual mode # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_dual_mode_position(settle, contract, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param str contract: Futures contract (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.Position]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_dual_mode_position_with_http_info(settle, contract, **kwargs) # noqa: E501
+
+ def get_dual_mode_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501
+ """Get position information in dual mode # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_dual_mode_position_with_http_info(settle, contract, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param str contract: Futures contract (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'settle',
+ 'contract'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_dual_mode_position" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'settle' is set
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `get_dual_mode_position`") # noqa: E501
+ # verify the required parameter 'contract' is set
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `get_dual_mode_position`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'settle' in local_var_params:
+ path_params['settle'] = local_var_params['settle'] # noqa: E501
+ if 'contract' in local_var_params:
+ path_params['contract'] = local_var_params['contract'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/futures/{settle}/dual_comp/positions/{contract}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[Position]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def update_dual_mode_position_margin(self, settle, contract, change, dual_side, **kwargs): # noqa: E501
"""Update position margin in dual mode # noqa: E501
@@ -2655,7 +3207,7 @@ def update_dual_mode_position_margin(self, settle, contract, change, dual_side,
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required)
+ :param str change: Margin change amount, positive number increases, negative number decreases (required)
:param str dual_side: Long or short position (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -2669,13 +3221,9 @@ def update_dual_mode_position_margin(self, settle, contract, change, dual_side,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.update_dual_mode_position_margin_with_http_info(
- settle, contract, change, dual_side, **kwargs
- ) # noqa: E501
+ return self.update_dual_mode_position_margin_with_http_info(settle, contract, change, dual_side, **kwargs) # noqa: E501
- def update_dual_mode_position_margin_with_http_info(
- self, settle, contract, change, dual_side, **kwargs
- ): # noqa: E501
+ def update_dual_mode_position_margin_with_http_info(self, settle, contract, change, dual_side, **kwargs): # noqa: E501
"""Update position margin in dual mode # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -2686,7 +3234,7 @@ def update_dual_mode_position_margin_with_http_info(
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required)
+ :param str change: Margin change amount, positive number increases, negative number decreases (required)
:param str dual_side: Long or short position (required)
:param _return_http_data_only: response data without head status code
and headers
@@ -2704,44 +3252,45 @@ def update_dual_mode_position_margin_with_http_info(
local_var_params = locals()
- all_params = ['settle', 'contract', 'change', 'dual_side']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'change',
+ 'dual_side'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method update_dual_mode_position_margin" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method update_dual_mode_position_margin" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `update_dual_mode_position_margin`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `update_dual_mode_position_margin`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `update_dual_mode_position_margin`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `update_dual_mode_position_margin`") # noqa: E501
# verify the required parameter 'change' is set
- if self.api_client.client_side_validation and (
- 'change' not in local_var_params or local_var_params['change'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `change` when calling `update_dual_mode_position_margin`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('change' not in local_var_params or # noqa: E501
+ local_var_params['change'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `change` when calling `update_dual_mode_position_margin`") # noqa: E501
# verify the required parameter 'dual_side' is set
- if self.api_client.client_side_validation and (
- 'dual_side' not in local_var_params or local_var_params['dual_side'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `dual_side` when calling `update_dual_mode_position_margin`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('dual_side' not in local_var_params or # noqa: E501
+ local_var_params['dual_side'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `dual_side` when calling `update_dual_mode_position_margin`") # noqa: E501
collection_formats = {}
@@ -2764,14 +3313,14 @@ def update_dual_mode_position_margin_with_http_info(
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/dual_comp/positions/{contract}/margin',
- 'POST',
+ '/futures/{settle}/dual_comp/positions/{contract}/margin', 'POST',
path_params,
query_params,
header_params,
@@ -2784,8 +3333,7 @@ def update_dual_mode_position_margin_with_http_info(
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def update_dual_mode_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501
"""Update position leverage in dual mode # noqa: E501
@@ -2799,7 +3347,7 @@ def update_dual_mode_position_leverage(self, settle, contract, leverage, **kwarg
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
:param str leverage: New position leverage (required)
- :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0)
+ :param str cross_leverage_limit: Cross margin leverage (valid only when `leverage` is 0)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2812,9 +3360,7 @@ def update_dual_mode_position_leverage(self, settle, contract, leverage, **kwarg
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.update_dual_mode_position_leverage_with_http_info(
- settle, contract, leverage, **kwargs
- ) # noqa: E501
+ return self.update_dual_mode_position_leverage_with_http_info(settle, contract, leverage, **kwargs) # noqa: E501
def update_dual_mode_position_leverage_with_http_info(self, settle, contract, leverage, **kwargs): # noqa: E501
"""Update position leverage in dual mode # noqa: E501
@@ -2828,7 +3374,7 @@ def update_dual_mode_position_leverage_with_http_info(self, settle, contract, le
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
:param str leverage: New position leverage (required)
- :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0)
+ :param str cross_leverage_limit: Cross margin leverage (valid only when `leverage` is 0)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2845,37 +3391,41 @@ def update_dual_mode_position_leverage_with_http_info(self, settle, contract, le
local_var_params = locals()
- all_params = ['settle', 'contract', 'leverage', 'cross_leverage_limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'leverage',
+ 'cross_leverage_limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method update_dual_mode_position_leverage" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method update_dual_mode_position_leverage" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `update_dual_mode_position_leverage`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `update_dual_mode_position_leverage`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `update_dual_mode_position_leverage`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `update_dual_mode_position_leverage`") # noqa: E501
# verify the required parameter 'leverage' is set
- if self.api_client.client_side_validation and (
- 'leverage' not in local_var_params or local_var_params['leverage'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `leverage` when calling `update_dual_mode_position_leverage`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('leverage' not in local_var_params or # noqa: E501
+ local_var_params['leverage'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `leverage` when calling `update_dual_mode_position_leverage`") # noqa: E501
collection_formats = {}
@@ -2888,9 +3438,7 @@ def update_dual_mode_position_leverage_with_http_info(self, settle, contract, le
query_params = []
if 'leverage' in local_var_params and local_var_params['leverage'] is not None: # noqa: E501
query_params.append(('leverage', local_var_params['leverage'])) # noqa: E501
- if (
- 'cross_leverage_limit' in local_var_params and local_var_params['cross_leverage_limit'] is not None
- ): # noqa: E501
+ if 'cross_leverage_limit' in local_var_params and local_var_params['cross_leverage_limit'] is not None: # noqa: E501
query_params.append(('cross_leverage_limit', local_var_params['cross_leverage_limit'])) # noqa: E501
header_params = {}
@@ -2900,14 +3448,14 @@ def update_dual_mode_position_leverage_with_http_info(self, settle, contract, le
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/dual_comp/positions/{contract}/leverage',
- 'POST',
+ '/futures/{settle}/dual_comp/positions/{contract}/leverage', 'POST',
path_params,
query_params,
header_params,
@@ -2920,8 +3468,7 @@ def update_dual_mode_position_leverage_with_http_info(self, settle, contract, le
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def update_dual_mode_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501
"""Update position risk limit in dual mode # noqa: E501
@@ -2934,7 +3481,7 @@ def update_dual_mode_position_risk_limit(self, settle, contract, risk_limit, **k
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str risk_limit: New position risk limit (required)
+ :param str risk_limit: New risk limit value (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2947,9 +3494,7 @@ def update_dual_mode_position_risk_limit(self, settle, contract, risk_limit, **k
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.update_dual_mode_position_risk_limit_with_http_info(
- settle, contract, risk_limit, **kwargs
- ) # noqa: E501
+ return self.update_dual_mode_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501
def update_dual_mode_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501
"""Update position risk limit in dual mode # noqa: E501
@@ -2962,7 +3507,7 @@ def update_dual_mode_position_risk_limit_with_http_info(self, settle, contract,
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str risk_limit: New position risk limit (required)
+ :param str risk_limit: New risk limit value (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2979,37 +3524,40 @@ def update_dual_mode_position_risk_limit_with_http_info(self, settle, contract,
local_var_params = locals()
- all_params = ['settle', 'contract', 'risk_limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'risk_limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method update_dual_mode_position_risk_limit" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method update_dual_mode_position_risk_limit" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `update_dual_mode_position_risk_limit`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `update_dual_mode_position_risk_limit`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `update_dual_mode_position_risk_limit`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `update_dual_mode_position_risk_limit`") # noqa: E501
# verify the required parameter 'risk_limit' is set
- if self.api_client.client_side_validation and (
- 'risk_limit' not in local_var_params or local_var_params['risk_limit'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `risk_limit` when calling `update_dual_mode_position_risk_limit`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('risk_limit' not in local_var_params or # noqa: E501
+ local_var_params['risk_limit'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `risk_limit` when calling `update_dual_mode_position_risk_limit`") # noqa: E501
collection_formats = {}
@@ -3030,14 +3578,14 @@ def update_dual_mode_position_risk_limit_with_http_info(self, settle, contract,
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/dual_comp/positions/{contract}/risk_limit',
- 'POST',
+ '/futures/{settle}/dual_comp/positions/{contract}/risk_limit', 'POST',
path_params,
query_params,
header_params,
@@ -3050,13 +3598,12 @@ def update_dual_mode_position_risk_limit_with_http_info(self, settle, contract,
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_futures_orders(self, settle, status, **kwargs): # noqa: E501
- """List futures orders # noqa: E501
+ """Query futures order list # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_futures_orders(settle, status, async_req=True)
@@ -3064,11 +3611,11 @@ def list_futures_orders(self, settle, status, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str status: Only list the orders with this status (required)
+ :param str status: Query order list based on status (required)
:param str contract: Futures contract, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param str last_id: Specify list staring point using the `id` of last record in previous list-query results
+ :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -3084,9 +3631,9 @@ def list_futures_orders(self, settle, status, **kwargs): # noqa: E501
return self.list_futures_orders_with_http_info(settle, status, **kwargs) # noqa: E501
def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501
- """List futures orders # noqa: E501
+ """Query futures order list # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_futures_orders_with_http_info(settle, status, async_req=True)
@@ -3094,11 +3641,11 @@ def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa:
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str status: Only list the orders with this status (required)
+ :param str status: Query order list based on status (required)
:param str contract: Futures contract, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param str last_id: Specify list staring point using the `id` of last record in previous list-query results
+ :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -3115,47 +3662,46 @@ def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['settle', 'status', 'contract', 'limit', 'offset', 'last_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'status',
+ 'contract',
+ 'limit',
+ 'offset',
+ 'last_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_futures_orders" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_futures_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_futures_orders`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_orders`") # noqa: E501
# verify the required parameter 'status' is set
- if self.api_client.client_side_validation and (
- 'status' not in local_var_params or local_var_params['status'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `status` when calling `list_futures_orders`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_orders`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_futures_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_futures_orders`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501
+ local_var_params['status'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `status` when calling `list_futures_orders`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_orders`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_orders`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -3181,14 +3727,14 @@ def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa:
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/orders',
- 'GET',
+ '/futures/{settle}/orders', 'GET',
path_params,
query_params,
header_params,
@@ -3201,13 +3747,12 @@ def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa:
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_futures_order(self, settle, futures_order, **kwargs): # noqa: E501
- """Create a futures order # noqa: E501
+ """Place futures order # noqa: E501
- - 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 # noqa: E501
+ - 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 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` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_futures_order(settle, futures_order, async_req=True)
@@ -3216,6 +3761,7 @@ def create_futures_order(self, settle, futures_order, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param FuturesOrder futures_order: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -3231,9 +3777,9 @@ def create_futures_order(self, settle, futures_order, **kwargs): # noqa: E501
return self.create_futures_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501
def create_futures_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501
- """Create a futures order # noqa: E501
+ """Place futures order # noqa: E501
- - 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 # noqa: E501
+ - 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 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` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_futures_order_with_http_info(settle, futures_order, async_req=True)
@@ -3242,6 +3788,7 @@ def create_futures_order_with_http_info(self, settle, futures_order, **kwargs):
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param FuturesOrder futures_order: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -3258,28 +3805,36 @@ def create_futures_order_with_http_info(self, settle, futures_order, **kwargs):
local_var_params = locals()
- all_params = ['settle', 'futures_order']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'futures_order',
+ 'x_gate_exptime'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_futures_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_futures_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `create_futures_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `create_futures_order`") # noqa: E501
# verify the required parameter 'futures_order' is set
- if self.api_client.client_side_validation and (
- 'futures_order' not in local_var_params or local_var_params['futures_order'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `futures_order` when calling `create_futures_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('futures_order' not in local_var_params or # noqa: E501
+ local_var_params['futures_order'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `futures_order` when calling `create_futures_order`") # noqa: E501
collection_formats = {}
@@ -3290,6 +3845,8 @@ def create_futures_order_with_http_info(self, settle, futures_order, **kwargs):
query_params = []
header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
form_params = []
local_var_files = {}
@@ -3298,19 +3855,18 @@ def create_futures_order_with_http_info(self, settle, futures_order, **kwargs):
if 'futures_order' in local_var_params:
body_params = local_var_params['futures_order']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/orders',
- 'POST',
+ '/futures/{settle}/orders', 'POST',
path_params,
query_params,
header_params,
@@ -3323,13 +3879,12 @@ def create_futures_order_with_http_info(self, settle, futures_order, **kwargs):
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def cancel_futures_orders(self, settle, contract, **kwargs): # noqa: E501
- """Cancel all `open` orders matched # noqa: E501
+ """Cancel all orders with 'open' status # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.cancel_futures_orders(settle, contract, async_req=True)
@@ -3338,7 +3893,10 @@ def cancel_futures_orders(self, settle, contract, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str side: All bids or asks. Both included if not specified
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
+ :param str side: Specify all buy orders or all sell orders, both are included if not specified. Set to bid to cancel all buy orders, set to ask to cancel all sell orders
+ :param bool exclude_reduce_only: Whether to exclude reduce-only orders
+ :param str text: Remark for order cancellation
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -3354,9 +3912,9 @@ def cancel_futures_orders(self, settle, contract, **kwargs): # noqa: E501
return self.cancel_futures_orders_with_http_info(settle, contract, **kwargs) # noqa: E501
def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Cancel all `open` orders matched # noqa: E501
+ """Cancel all orders with 'open' status # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.cancel_futures_orders_with_http_info(settle, contract, async_req=True)
@@ -3365,7 +3923,10 @@ def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # n
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract (required)
- :param str side: All bids or asks. Both included if not specified
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
+ :param str side: Specify all buy orders or all sell orders, both are included if not specified. Set to bid to cancel all buy orders, set to ask to cancel all sell orders
+ :param bool exclude_reduce_only: Whether to exclude reduce-only orders
+ :param str text: Remark for order cancellation
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -3382,28 +3943,39 @@ def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # n
local_var_params = locals()
- all_params = ['settle', 'contract', 'side']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'x_gate_exptime',
+ 'side',
+ 'exclude_reduce_only',
+ 'text'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method cancel_futures_orders" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_futures_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `cancel_futures_orders`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `cancel_futures_orders`") # noqa: E501
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `cancel_futures_orders`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `cancel_futures_orders`") # noqa: E501
collection_formats = {}
@@ -3416,22 +3988,28 @@ def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # n
query_params.append(('contract', local_var_params['contract'])) # noqa: E501
if 'side' in local_var_params and local_var_params['side'] is not None: # noqa: E501
query_params.append(('side', local_var_params['side'])) # noqa: E501
+ if 'exclude_reduce_only' in local_var_params and local_var_params['exclude_reduce_only'] is not None: # noqa: E501
+ query_params.append(('exclude_reduce_only', local_var_params['exclude_reduce_only'])) # noqa: E501
+ if 'text' in local_var_params and local_var_params['text'] is not None: # noqa: E501
+ query_params.append(('text', local_var_params['text'])) # noqa: E501
header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/orders',
- 'DELETE',
+ '/futures/{settle}/orders', 'DELETE',
path_params,
query_params,
header_params,
@@ -3444,11 +4022,10 @@ def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # n
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_orders_with_time_range(self, settle, **kwargs): # noqa: E501
- """List Futures Orders By Time Range # noqa: E501
+ """Query futures order list by time range # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3458,9 +4035,9 @@ def get_orders_with_time_range(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param int limit: Maximum number of records to be returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -3477,7 +4054,7 @@ def get_orders_with_time_range(self, settle, **kwargs): # noqa: E501
return self.get_orders_with_time_range_with_http_info(settle, **kwargs) # noqa: E501
def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa: E501
- """List Futures Orders By Time Range # noqa: E501
+ """Query futures order list by time range # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3487,9 +4064,9 @@ def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa:
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param int limit: Maximum number of records to be returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _return_http_data_only: response data without head status code
and headers
@@ -3507,42 +4084,42 @@ def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['settle', 'contract', '_from', 'to', 'limit', 'offset']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ '_from',
+ 'to',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method get_orders_with_time_range" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method get_orders_with_time_range" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `get_orders_with_time_range`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `get_orders_with_time_range`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `get_orders_with_time_range`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `get_orders_with_time_range`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `get_orders_with_time_range`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `get_orders_with_time_range`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `get_orders_with_time_range`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `get_orders_with_time_range`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -3568,14 +4145,14 @@ def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa:
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/orders_timerange',
- 'GET',
+ '/futures/{settle}/orders_timerange', 'GET',
path_params,
query_params,
header_params,
@@ -3588,11 +4165,10 @@ def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa:
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_batch_futures_order(self, settle, futures_order, **kwargs): # noqa: E501
- """Create a batch of futures orders # noqa: E501
+ """Place batch futures orders # noqa: E501
- Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3603,6 +4179,7 @@ def create_batch_futures_order(self, settle, futures_order, **kwargs): # noqa:
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param list[FuturesOrder] futures_order: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -3618,7 +4195,7 @@ def create_batch_futures_order(self, settle, futures_order, **kwargs): # noqa:
return self.create_batch_futures_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501
def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501
- """Create a batch of futures orders # noqa: E501
+ """Place batch futures orders # noqa: E501
- Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3629,6 +4206,7 @@ def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwa
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param list[FuturesOrder] futures_order: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -3645,30 +4223,36 @@ def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwa
local_var_params = locals()
- all_params = ['settle', 'futures_order']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'futures_order',
+ 'x_gate_exptime'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method create_batch_futures_order" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method create_batch_futures_order" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `create_batch_futures_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `create_batch_futures_order`") # noqa: E501
# verify the required parameter 'futures_order' is set
- if self.api_client.client_side_validation and (
- 'futures_order' not in local_var_params or local_var_params['futures_order'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `futures_order` when calling `create_batch_futures_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('futures_order' not in local_var_params or # noqa: E501
+ local_var_params['futures_order'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `futures_order` when calling `create_batch_futures_order`") # noqa: E501
collection_formats = {}
@@ -3679,6 +4263,8 @@ def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwa
query_params = []
header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
form_params = []
local_var_files = {}
@@ -3687,19 +4273,18 @@ def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwa
if 'futures_order' in local_var_params:
body_params = local_var_params['futures_order']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/batch_orders',
- 'POST',
+ '/futures/{settle}/batch_orders', 'POST',
path_params,
query_params,
header_params,
@@ -3712,13 +4297,12 @@ def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwa
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_futures_order(self, settle, order_id, **kwargs): # noqa: E501
- """Get a single order # noqa: E501
+ """Query single order details # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_futures_order(settle, order_id, async_req=True)
@@ -3726,7 +4310,7 @@ def get_futures_order(self, settle, order_id, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required)
+ :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -3742,9 +4326,9 @@ def get_futures_order(self, settle, order_id, **kwargs): # noqa: E501
return self.get_futures_order_with_http_info(settle, order_id, **kwargs) # noqa: E501
def get_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501
- """Get a single order # noqa: E501
+ """Query single order details # noqa: E501
- Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501
+ - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_futures_order_with_http_info(settle, order_id, async_req=True)
@@ -3752,7 +4336,7 @@ def get_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa:
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required)
+ :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -3769,28 +4353,35 @@ def get_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['settle', 'order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_futures_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_futures_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `get_futures_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `get_futures_order`") # noqa: E501
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `get_futures_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `get_futures_order`") # noqa: E501
collection_formats = {}
@@ -3809,14 +4400,14 @@ def get_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa:
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/orders/{order_id}',
- 'GET',
+ '/futures/{settle}/orders/{order_id}', 'GET',
path_params,
query_params,
header_params,
@@ -3829,11 +4420,10 @@ def get_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa:
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def amend_futures_order(self, settle, order_id, futures_order_amendment, **kwargs): # noqa: E501
- """Amend an order # noqa: E501
+ """Amend single order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3842,8 +4432,9 @@ def amend_futures_order(self, settle, order_id, futures_order_amendment, **kwarg
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required)
+ :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required)
:param FuturesOrderAmendment futures_order_amendment: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -3856,12 +4447,10 @@ def amend_futures_order(self, settle, order_id, futures_order_amendment, **kwarg
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.amend_futures_order_with_http_info(
- settle, order_id, futures_order_amendment, **kwargs
- ) # noqa: E501
+ return self.amend_futures_order_with_http_info(settle, order_id, futures_order_amendment, **kwargs) # noqa: E501
def amend_futures_order_with_http_info(self, settle, order_id, futures_order_amendment, **kwargs): # noqa: E501
- """Amend an order # noqa: E501
+ """Amend single order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3870,8 +4459,9 @@ def amend_futures_order_with_http_info(self, settle, order_id, futures_order_ame
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required)
+ :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required)
:param FuturesOrderAmendment futures_order_amendment: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -3888,36 +4478,41 @@ def amend_futures_order_with_http_info(self, settle, order_id, futures_order_ame
local_var_params = locals()
- all_params = ['settle', 'order_id', 'futures_order_amendment']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'order_id',
+ 'futures_order_amendment',
+ 'x_gate_exptime'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method amend_futures_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method amend_futures_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `amend_futures_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `amend_futures_order`") # noqa: E501
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `amend_futures_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `amend_futures_order`") # noqa: E501
# verify the required parameter 'futures_order_amendment' is set
- if self.api_client.client_side_validation and (
- 'futures_order_amendment' not in local_var_params
- or local_var_params['futures_order_amendment'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `futures_order_amendment` when calling `amend_futures_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('futures_order_amendment' not in local_var_params or # noqa: E501
+ local_var_params['futures_order_amendment'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `futures_order_amendment` when calling `amend_futures_order`") # noqa: E501
collection_formats = {}
@@ -3930,6 +4525,8 @@ def amend_futures_order_with_http_info(self, settle, order_id, futures_order_ame
query_params = []
header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
form_params = []
local_var_files = {}
@@ -3938,19 +4535,18 @@ def amend_futures_order_with_http_info(self, settle, order_id, futures_order_ame
if 'futures_order_amendment' in local_var_params:
body_params = local_var_params['futures_order_amendment']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/orders/{order_id}',
- 'PUT',
+ '/futures/{settle}/orders/{order_id}', 'PUT',
path_params,
query_params,
header_params,
@@ -3963,11 +4559,10 @@ def amend_futures_order_with_http_info(self, settle, order_id, futures_order_ame
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def cancel_futures_order(self, settle, order_id, **kwargs): # noqa: E501
- """Cancel a single order # noqa: E501
+ """Cancel single order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3976,7 +4571,8 @@ def cancel_futures_order(self, settle, order_id, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required)
+ :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -3992,7 +4588,7 @@ def cancel_futures_order(self, settle, order_id, **kwargs): # noqa: E501
return self.cancel_futures_order_with_http_info(settle, order_id, **kwargs) # noqa: E501
def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501
- """Cancel a single order # noqa: E501
+ """Cancel single order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -4001,7 +4597,8 @@ def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # no
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required)
+ :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -4018,28 +4615,36 @@ def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # no
local_var_params = locals()
- all_params = ['settle', 'order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'order_id',
+ 'x_gate_exptime'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method cancel_futures_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_futures_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `cancel_futures_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `cancel_futures_order`") # noqa: E501
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `cancel_futures_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_futures_order`") # noqa: E501
collection_formats = {}
@@ -4052,20 +4657,22 @@ def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # no
query_params = []
header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/orders/{order_id}',
- 'DELETE',
+ '/futures/{settle}/orders/{order_id}', 'DELETE',
path_params,
query_params,
header_params,
@@ -4078,12 +4685,12 @@ def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # no
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_my_trades(self, settle, **kwargs): # noqa: E501
- """List personal trading history # noqa: E501
+ """Query personal trading records # noqa: E501
+ By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_my_trades(settle, async_req=True)
@@ -4093,7 +4700,7 @@ def get_my_trades(self, settle, **kwargs): # noqa: E501
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
:param int order: Futures order ID, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'.
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -4111,8 +4718,9 @@ def get_my_trades(self, settle, **kwargs): # noqa: E501
return self.get_my_trades_with_http_info(settle, **kwargs) # noqa: E501
def get_my_trades_with_http_info(self, settle, **kwargs): # noqa: E501
- """List personal trading history # noqa: E501
+ """Query personal trading records # noqa: E501
+ By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_my_trades_with_http_info(settle, async_req=True)
@@ -4122,7 +4730,7 @@ def get_my_trades_with_http_info(self, settle, **kwargs): # noqa: E501
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
:param int order: Futures order ID, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'.
:param _return_http_data_only: response data without head status code
@@ -4141,38 +4749,42 @@ def get_my_trades_with_http_info(self, settle, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['settle', 'contract', 'order', 'limit', 'offset', 'last_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'order',
+ 'limit',
+ 'offset',
+ 'last_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_my_trades" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_my_trades" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `settle` when calling `get_my_trades`") # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `get_my_trades`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `get_my_trades`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `get_my_trades`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_trades`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_trades`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `get_my_trades`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -4198,14 +4810,14 @@ def get_my_trades_with_http_info(self, settle, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/my_trades',
- 'GET',
+ '/futures/{settle}/my_trades', 'GET',
path_params,
query_params,
header_params,
@@ -4218,11 +4830,10 @@ def get_my_trades_with_http_info(self, settle, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_my_trades_with_time_range(self, settle, **kwargs): # noqa: E501
- """List personal trading history by time range # noqa: E501
+ """Query personal trading records by time range # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -4232,11 +4843,11 @@ def get_my_trades_with_time_range(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param int limit: Maximum number of records to be returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param str role: 查询角色,Maker 或 Taker
+ :param str role: Query role, maker or taker
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -4252,7 +4863,7 @@ def get_my_trades_with_time_range(self, settle, **kwargs): # noqa: E501
return self.get_my_trades_with_time_range_with_http_info(settle, **kwargs) # noqa: E501
def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noqa: E501
- """List personal trading history by time range # noqa: E501
+ """Query personal trading records by time range # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -4262,11 +4873,11 @@ def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noq
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param int limit: Maximum number of records to be returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param str role: 查询角色,Maker 或 Taker
+ :param str role: Query role, maker or taker
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -4283,42 +4894,43 @@ def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noq
local_var_params = locals()
- all_params = ['settle', 'contract', '_from', 'to', 'limit', 'offset', 'role']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ '_from',
+ 'to',
+ 'limit',
+ 'offset',
+ 'role'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method get_my_trades_with_time_range" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method get_my_trades_with_time_range" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `get_my_trades_with_time_range`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `get_my_trades_with_time_range`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `get_my_trades_with_time_range`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `get_my_trades_with_time_range`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `get_my_trades_with_time_range`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_trades_with_time_range`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_trades_with_time_range`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `get_my_trades_with_time_range`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -4346,14 +4958,14 @@ def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noq
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/my_trades_timerange',
- 'GET',
+ '/futures/{settle}/my_trades_timerange', 'GET',
path_params,
query_params,
header_params,
@@ -4366,11 +4978,10 @@ def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noq
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_position_close(self, settle, **kwargs): # noqa: E501
- """List position close history # noqa: E501
+ """Query position close history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -4380,12 +4991,12 @@ def list_position_close(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str side: 方向筛选,做多(long)或做空(short)
- :param str pnl: 盈亏判断,盈利(profit)或亏损(loss)
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str side: Query side. long or shot
+ :param str pnl: Query profit or loss
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -4401,7 +5012,7 @@ def list_position_close(self, settle, **kwargs): # noqa: E501
return self.list_position_close_with_http_info(settle, **kwargs) # noqa: E501
def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501
- """List position close history # noqa: E501
+ """Query position close history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -4411,12 +5022,12 @@ def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str side: 方向筛选,做多(long)或做空(short)
- :param str pnl: 盈亏判断,盈利(profit)或亏损(loss)
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str side: Query side. long or shot
+ :param str pnl: Query profit or loss
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -4433,40 +5044,44 @@ def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['settle', 'contract', 'limit', 'offset', '_from', 'to', 'side', 'pnl']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'limit',
+ 'offset',
+ '_from',
+ 'to',
+ 'side',
+ 'pnl'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_position_close" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_position_close" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_position_close`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_position_close`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_position_close`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_position_close`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_position_close`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_position_close`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_position_close`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_position_close`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -4496,14 +5111,14 @@ def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/position_close',
- 'GET',
+ '/futures/{settle}/position_close', 'GET',
path_params,
query_params,
header_params,
@@ -4516,11 +5131,10 @@ def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_liquidates(self, settle, **kwargs): # noqa: E501
- """List liquidation history # noqa: E501
+ """Query liquidation history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -4530,8 +5144,11 @@ def list_liquidates(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
- :param int at: Specify a liquidation timestamp
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param int at: Specify liquidation timestamp
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -4547,7 +5164,7 @@ def list_liquidates(self, settle, **kwargs): # noqa: E501
return self.list_liquidates_with_http_info(settle, **kwargs) # noqa: E501
def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501
- """List liquidation history # noqa: E501
+ """Query liquidation history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -4557,8 +5174,11 @@ def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
- :param int at: Specify a liquidation timestamp
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param int at: Specify liquidation timestamp
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -4575,32 +5195,43 @@ def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['settle', 'contract', 'limit', 'at']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'limit',
+ 'offset',
+ '_from',
+ 'to',
+ 'at'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_liquidates" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_liquidates" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `settle` when calling `list_liquidates`") # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_liquidates`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_liquidates`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidates`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidates`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_liquidates`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -4612,6 +5243,12 @@ def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501
query_params.append(('contract', local_var_params['contract'])) # noqa: E501
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501
query_params.append(('at', local_var_params['at'])) # noqa: E501
@@ -4622,14 +5259,14 @@ def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/liquidates',
- 'GET',
+ '/futures/{settle}/liquidates', 'GET',
path_params,
query_params,
header_params,
@@ -4642,11 +5279,10 @@ def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_auto_deleverages(self, settle, **kwargs): # noqa: E501
- """List Auto-Deleveraging History # noqa: E501
+ """Query ADL auto-deleveraging order information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -4656,8 +5292,11 @@ def list_auto_deleverages(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
- :param int at: Specify an auto-deleveraging timestamp
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param int at: Specify auto-deleveraging timestamp
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -4673,7 +5312,7 @@ def list_auto_deleverages(self, settle, **kwargs): # noqa: E501
return self.list_auto_deleverages_with_http_info(settle, **kwargs) # noqa: E501
def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501
- """List Auto-Deleveraging History # noqa: E501
+ """Query ADL auto-deleveraging order information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -4683,8 +5322,11 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
:param str contract: Futures contract, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
- :param int at: Specify an auto-deleveraging timestamp
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param int at: Specify auto-deleveraging timestamp
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -4701,34 +5343,43 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['settle', 'contract', 'limit', 'at']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract',
+ 'limit',
+ 'offset',
+ '_from',
+ 'to',
+ 'at'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_auto_deleverages" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_auto_deleverages" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_auto_deleverages`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_auto_deleverages`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_auto_deleverages`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_auto_deleverages`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_auto_deleverages`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_auto_deleverages`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_auto_deleverages`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -4740,6 +5391,12 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501
query_params.append(('contract', local_var_params['contract'])) # noqa: E501
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501
query_params.append(('at', local_var_params['at'])) # noqa: E501
@@ -4750,14 +5407,14 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/auto_deleverages',
- 'GET',
+ '/futures/{settle}/auto_deleverages', 'GET',
path_params,
query_params,
header_params,
@@ -4770,13 +5427,12 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def countdown_cancel_all_futures(self, settle, countdown_cancel_all_futures_task, **kwargs): # noqa: E501
"""Countdown cancel orders # noqa: E501
- When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501
+ Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.countdown_cancel_all_futures(settle, countdown_cancel_all_futures_task, async_req=True)
@@ -4797,16 +5453,12 @@ def countdown_cancel_all_futures(self, settle, countdown_cancel_all_futures_task
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.countdown_cancel_all_futures_with_http_info(
- settle, countdown_cancel_all_futures_task, **kwargs
- ) # noqa: E501
+ return self.countdown_cancel_all_futures_with_http_info(settle, countdown_cancel_all_futures_task, **kwargs) # noqa: E501
- def countdown_cancel_all_futures_with_http_info(
- self, settle, countdown_cancel_all_futures_task, **kwargs
- ): # noqa: E501
+ def countdown_cancel_all_futures_with_http_info(self, settle, countdown_cancel_all_futures_task, **kwargs): # noqa: E501
"""Countdown cancel orders # noqa: E501
- When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501
+ Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.countdown_cancel_all_futures_with_http_info(settle, countdown_cancel_all_futures_task, async_req=True)
@@ -4831,31 +5483,35 @@ def countdown_cancel_all_futures_with_http_info(
local_var_params = locals()
- all_params = ['settle', 'countdown_cancel_all_futures_task']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'countdown_cancel_all_futures_task'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method countdown_cancel_all_futures" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method countdown_cancel_all_futures" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `countdown_cancel_all_futures`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `countdown_cancel_all_futures`") # noqa: E501
# verify the required parameter 'countdown_cancel_all_futures_task' is set
- if self.api_client.client_side_validation and (
- 'countdown_cancel_all_futures_task' not in local_var_params
- or local_var_params['countdown_cancel_all_futures_task'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `countdown_cancel_all_futures_task` when calling `countdown_cancel_all_futures`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('countdown_cancel_all_futures_task' not in local_var_params or # noqa: E501
+ local_var_params['countdown_cancel_all_futures_task'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `countdown_cancel_all_futures_task` when calling `countdown_cancel_all_futures`") # noqa: E501
collection_formats = {}
@@ -4874,19 +5530,18 @@ def countdown_cancel_all_futures_with_http_info(
if 'countdown_cancel_all_futures_task' in local_var_params:
body_params = local_var_params['countdown_cancel_all_futures_task']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/countdown_cancel_all',
- 'POST',
+ '/futures/{settle}/countdown_cancel_all', 'POST',
path_params,
query_params,
header_params,
@@ -4899,11 +5554,10 @@ def countdown_cancel_all_futures_with_http_info(
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_futures_fee(self, settle, **kwargs): # noqa: E501
- """Query user trading fee rates # noqa: E501
+ """Query futures market trading fee rates # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -4928,7 +5582,7 @@ def get_futures_fee(self, settle, **kwargs): # noqa: E501
return self.get_futures_fee_with_http_info(settle, **kwargs) # noqa: E501
def get_futures_fee_with_http_info(self, settle, **kwargs): # noqa: E501
- """Query user trading fee rates # noqa: E501
+ """Query futures market trading fee rates # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -4954,18 +5608,30 @@ def get_futures_fee_with_http_info(self, settle, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['settle', 'contract']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_futures_fee" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_futures_fee" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `settle` when calling `get_futures_fee`") # noqa: E501
collection_formats = {}
@@ -4985,14 +5651,14 @@ def get_futures_fee_with_http_info(self, settle, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/fee',
- 'GET',
+ '/futures/{settle}/fee', 'GET',
path_params,
query_params,
header_params,
@@ -5005,11 +5671,397 @@ def get_futures_fee_with_http_info(self, settle, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def cancel_batch_future_orders(self, settle, request_body, **kwargs): # noqa: E501
+ """Cancel batch orders by specified ID list # noqa: E501
+
+ Multiple different order IDs can be specified, maximum 20 records per request # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.cancel_batch_future_orders(settle, request_body, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param list[str] request_body: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.FutureCancelOrderResult]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.cancel_batch_future_orders_with_http_info(settle, request_body, **kwargs) # noqa: E501
+
+ def cancel_batch_future_orders_with_http_info(self, settle, request_body, **kwargs): # noqa: E501
+ """Cancel batch orders by specified ID list # noqa: E501
+
+ Multiple different order IDs can be specified, maximum 20 records per request # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.cancel_batch_future_orders_with_http_info(settle, request_body, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param list[str] request_body: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.FutureCancelOrderResult], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'settle',
+ 'request_body',
+ 'x_gate_exptime'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_batch_future_orders" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'settle' is set
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `cancel_batch_future_orders`") # noqa: E501
+ # verify the required parameter 'request_body' is set
+ if self.api_client.client_side_validation and ('request_body' not in local_var_params or # noqa: E501
+ local_var_params['request_body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `request_body` when calling `cancel_batch_future_orders`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'settle' in local_var_params:
+ path_params['settle'] = local_var_params['settle'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'request_body' in local_var_params:
+ body_params = local_var_params['request_body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/futures/{settle}/batch_cancel_orders', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[FutureCancelOrderResult]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def amend_batch_future_orders(self, settle, batch_amend_order_req, **kwargs): # noqa: E501
+ """Batch modify orders by specified IDs # noqa: E501
+
+ Multiple different order IDs can be specified, maximum 10 orders per request # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.amend_batch_future_orders(settle, batch_amend_order_req, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param list[BatchAmendOrderReq] batch_amend_order_req: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.BatchFuturesOrder]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.amend_batch_future_orders_with_http_info(settle, batch_amend_order_req, **kwargs) # noqa: E501
+
+ def amend_batch_future_orders_with_http_info(self, settle, batch_amend_order_req, **kwargs): # noqa: E501
+ """Batch modify orders by specified IDs # noqa: E501
+
+ Multiple different order IDs can be specified, maximum 10 orders per request # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.amend_batch_future_orders_with_http_info(settle, batch_amend_order_req, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param list[BatchAmendOrderReq] batch_amend_order_req: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.BatchFuturesOrder], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'settle',
+ 'batch_amend_order_req',
+ 'x_gate_exptime'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method amend_batch_future_orders" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'settle' is set
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `amend_batch_future_orders`") # noqa: E501
+ # verify the required parameter 'batch_amend_order_req' is set
+ if self.api_client.client_side_validation and ('batch_amend_order_req' not in local_var_params or # noqa: E501
+ local_var_params['batch_amend_order_req'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `batch_amend_order_req` when calling `amend_batch_future_orders`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'settle' in local_var_params:
+ path_params['settle'] = local_var_params['settle'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'batch_amend_order_req' in local_var_params:
+ body_params = local_var_params['batch_amend_order_req']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/futures/{settle}/batch_amend_orders', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[BatchFuturesOrder]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_futures_risk_limit_table(self, settle, table_id, **kwargs): # noqa: E501
+ """Query risk limit table by table_id # noqa: E501
+
+ Just pass table_id # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_futures_risk_limit_table(settle, table_id, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param str table_id: Risk limit table ID (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.FuturesRiskLimitTier]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_futures_risk_limit_table_with_http_info(settle, table_id, **kwargs) # noqa: E501
+
+ def get_futures_risk_limit_table_with_http_info(self, settle, table_id, **kwargs): # noqa: E501
+ """Query risk limit table by table_id # noqa: E501
+
+ Just pass table_id # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_futures_risk_limit_table_with_http_info(settle, table_id, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str settle: Settle currency (required)
+ :param str table_id: Risk limit table ID (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.FuturesRiskLimitTier], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'settle',
+ 'table_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_futures_risk_limit_table" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'settle' is set
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `get_futures_risk_limit_table`") # noqa: E501
+ # verify the required parameter 'table_id' is set
+ if self.api_client.client_side_validation and ('table_id' not in local_var_params or # noqa: E501
+ local_var_params['table_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `table_id` when calling `get_futures_risk_limit_table`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'settle' in local_var_params:
+ path_params['settle'] = local_var_params['settle'] # noqa: E501
+
+ query_params = []
+ if 'table_id' in local_var_params and local_var_params['table_id'] is not None: # noqa: E501
+ query_params.append(('table_id', local_var_params['table_id'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/futures/{settle}/risk_limit_table', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[FuturesRiskLimitTier]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def list_price_triggered_orders(self, settle, status, **kwargs): # noqa: E501
- """List all auto orders # noqa: E501
+ """Query auto order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -5018,9 +6070,9 @@ def list_price_triggered_orders(self, settle, status, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str status: Only list the orders with this status (required)
+ :param str status: Query order list based on status (required)
:param str contract: Futures contract, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -5037,7 +6089,7 @@ def list_price_triggered_orders(self, settle, status, **kwargs): # noqa: E501
return self.list_price_triggered_orders_with_http_info(settle, status, **kwargs) # noqa: E501
def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501
- """List all auto orders # noqa: E501
+ """Query auto order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -5046,9 +6098,9 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs):
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str status: Only list the orders with this status (required)
+ :param str status: Query order list based on status (required)
:param str contract: Futures contract, return related data only if specified
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _return_http_data_only: response data without head status code
and headers
@@ -5066,49 +6118,45 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs):
local_var_params = locals()
- all_params = ['settle', 'status', 'contract', 'limit', 'offset']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'status',
+ 'contract',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_price_triggered_orders" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_price_triggered_orders" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `list_price_triggered_orders`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `list_price_triggered_orders`") # noqa: E501
# verify the required parameter 'status' is set
- if self.api_client.client_side_validation and (
- 'status' not in local_var_params or local_var_params['status'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `status` when calling `list_price_triggered_orders`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_price_triggered_orders`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_price_triggered_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_price_triggered_orders`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501
+ local_var_params['status'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `status` when calling `list_price_triggered_orders`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_price_triggered_orders`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_price_triggered_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_price_triggered_orders`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -5132,14 +6180,14 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs):
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/price_orders',
- 'GET',
+ '/futures/{settle}/price_orders', 'GET',
path_params,
query_params,
header_params,
@@ -5152,11 +6200,10 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs):
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_price_triggered_order(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501
- """Create a price-triggered order # noqa: E501
+ """Create price-triggered order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -5178,14 +6225,10 @@ def create_price_triggered_order(self, settle, futures_price_triggered_order, **
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.create_price_triggered_order_with_http_info(
- settle, futures_price_triggered_order, **kwargs
- ) # noqa: E501
+ return self.create_price_triggered_order_with_http_info(settle, futures_price_triggered_order, **kwargs) # noqa: E501
- def create_price_triggered_order_with_http_info(
- self, settle, futures_price_triggered_order, **kwargs
- ): # noqa: E501
- """Create a price-triggered order # noqa: E501
+ def create_price_triggered_order_with_http_info(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501
+ """Create price-triggered order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -5211,31 +6254,35 @@ def create_price_triggered_order_with_http_info(
local_var_params = locals()
- all_params = ['settle', 'futures_price_triggered_order']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'futures_price_triggered_order'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method create_price_triggered_order" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method create_price_triggered_order" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `create_price_triggered_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `create_price_triggered_order`") # noqa: E501
# verify the required parameter 'futures_price_triggered_order' is set
- if self.api_client.client_side_validation and (
- 'futures_price_triggered_order' not in local_var_params
- or local_var_params['futures_price_triggered_order'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `futures_price_triggered_order` when calling `create_price_triggered_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('futures_price_triggered_order' not in local_var_params or # noqa: E501
+ local_var_params['futures_price_triggered_order'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `futures_price_triggered_order` when calling `create_price_triggered_order`") # noqa: E501
collection_formats = {}
@@ -5254,19 +6301,18 @@ def create_price_triggered_order_with_http_info(
if 'futures_price_triggered_order' in local_var_params:
body_params = local_var_params['futures_price_triggered_order']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/price_orders',
- 'POST',
+ '/futures/{settle}/price_orders', 'POST',
path_params,
query_params,
header_params,
@@ -5279,20 +6325,19 @@ def create_price_triggered_order_with_http_info(
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def cancel_price_triggered_order_list(self, settle, contract, **kwargs): # noqa: E501
- """Cancel all open orders # noqa: E501
+ def cancel_price_triggered_order_list(self, settle, **kwargs): # noqa: E501
+ """Cancel all auto orders # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.cancel_price_triggered_order_list(settle, contract, async_req=True)
+ >>> thread = api.cancel_price_triggered_order_list(settle, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str contract: Futures contract (required)
+ :param str contract: Futures contract, return related data only if specified
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -5305,19 +6350,19 @@ def cancel_price_triggered_order_list(self, settle, contract, **kwargs): # noqa
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.cancel_price_triggered_order_list_with_http_info(settle, contract, **kwargs) # noqa: E501
+ return self.cancel_price_triggered_order_list_with_http_info(settle, **kwargs) # noqa: E501
- def cancel_price_triggered_order_list_with_http_info(self, settle, contract, **kwargs): # noqa: E501
- """Cancel all open orders # noqa: E501
+ def cancel_price_triggered_order_list_with_http_info(self, settle, **kwargs): # noqa: E501
+ """Cancel all auto orders # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.cancel_price_triggered_order_list_with_http_info(settle, contract, async_req=True)
+ >>> thread = api.cancel_price_triggered_order_list_with_http_info(settle, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str contract: Futures contract (required)
+ :param str contract: Futures contract, return related data only if specified
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -5334,30 +6379,31 @@ def cancel_price_triggered_order_list_with_http_info(self, settle, contract, **k
local_var_params = locals()
- all_params = ['settle', 'contract']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'contract'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method cancel_price_triggered_order_list" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_price_triggered_order_list" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `cancel_price_triggered_order_list`"
- ) # noqa: E501
- # verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `cancel_price_triggered_order_list`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `cancel_price_triggered_order_list`") # noqa: E501
collection_formats = {}
@@ -5376,14 +6422,14 @@ def cancel_price_triggered_order_list_with_http_info(self, settle, contract, **k
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/price_orders',
- 'DELETE',
+ '/futures/{settle}/price_orders', 'DELETE',
path_params,
query_params,
header_params,
@@ -5396,11 +6442,10 @@ def cancel_price_triggered_order_list_with_http_info(self, settle, contract, **k
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501
- """Get a price-triggered order # noqa: E501
+ """Query single auto order details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -5409,7 +6454,7 @@ def get_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -5425,7 +6470,7 @@ def get_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501
return self.get_price_triggered_order_with_http_info(settle, order_id, **kwargs) # noqa: E501
def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501
- """Get a price-triggered order # noqa: E501
+ """Query single auto order details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -5434,7 +6479,7 @@ def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs):
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -5451,28 +6496,35 @@ def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs):
local_var_params = locals()
- all_params = ['settle', 'order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_price_triggered_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_price_triggered_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `get_price_triggered_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `get_price_triggered_order`") # noqa: E501
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `get_price_triggered_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `get_price_triggered_order`") # noqa: E501
collection_formats = {}
@@ -5491,14 +6543,14 @@ def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs):
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/price_orders/{order_id}',
- 'GET',
+ '/futures/{settle}/price_orders/{order_id}', 'GET',
path_params,
query_params,
header_params,
@@ -5511,11 +6563,10 @@ def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs):
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def cancel_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501
- """cancel a price-triggered order # noqa: E501
+ """Cancel single auto order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -5524,7 +6575,7 @@ def cancel_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E50
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -5540,7 +6591,7 @@ def cancel_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E50
return self.cancel_price_triggered_order_with_http_info(settle, order_id, **kwargs) # noqa: E501
def cancel_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501
- """cancel a price-triggered order # noqa: E501
+ """Cancel single auto order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -5549,7 +6600,7 @@ def cancel_price_triggered_order_with_http_info(self, settle, order_id, **kwargs
:param bool async_req: execute request asynchronously
:param str settle: Settle currency (required)
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -5566,30 +6617,35 @@ def cancel_price_triggered_order_with_http_info(self, settle, order_id, **kwargs
local_var_params = locals()
- all_params = ['settle', 'order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'settle',
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method cancel_price_triggered_order" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_price_triggered_order" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'settle' is set
- if self.api_client.client_side_validation and (
- 'settle' not in local_var_params or local_var_params['settle'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `settle` when calling `cancel_price_triggered_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501
+ local_var_params['settle'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `settle` when calling `cancel_price_triggered_order`") # noqa: E501
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `cancel_price_triggered_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_price_triggered_order`") # noqa: E501
collection_formats = {}
@@ -5608,14 +6664,14 @@ def cancel_price_triggered_order_with_http_info(self, settle, order_id, **kwargs
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/futures/{settle}/price_orders/{order_id}',
- 'DELETE',
+ '/futures/{settle}/price_orders/{order_id}', 'DELETE',
path_params,
query_params,
header_params,
@@ -5628,5 +6684,4 @@ def cancel_price_triggered_order_with_http_info(self, settle, order_id, **kwargs
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
diff --git a/gate_api/api/margin_api.py b/gate_api/api/margin_api.py
index 9751009..9464f10 100644
--- a/gate_api/api/margin_api.py
+++ b/gate_api/api/margin_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class MarginApi(object):
@@ -83,12 +86,24 @@ def list_margin_accounts_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency_pair']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_margin_accounts" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_margin_accounts" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -107,14 +122,14 @@ def list_margin_accounts_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/accounts',
- 'GET',
+ '/margin/accounts', 'GET',
path_params,
query_params,
header_params,
@@ -127,26 +142,25 @@ def list_margin_accounts_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_margin_account_book(self, **kwargs): # noqa: E501
- """List margin account balance change history # noqa: E501
+ """Query margin account balance change history # noqa: E501
- Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501
+ Currently only provides transfer history to and from margin accounts. Query time range cannot exceed 30 days # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_margin_account_book(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required.
- :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided
- :param str type: Only retrieve changes of the specified type. All types will be returned if not specified.
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
+ :param str currency: Query history for specified currency. If `currency` is specified, `currency_pair` must also be specified.
+ :param str currency_pair: Specify margin account currency pair. Used in combination with `currency`. Ignored if `currency` is not specified
+ :param str type: Query by specified account change type. If not specified, all change types will be included.
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
:param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -162,22 +176,22 @@ def list_margin_account_book(self, **kwargs): # noqa: E501
return self.list_margin_account_book_with_http_info(**kwargs) # noqa: E501
def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501
- """List margin account balance change history # noqa: E501
+ """Query margin account balance change history # noqa: E501
- Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501
+ Currently only provides transfer history to and from margin accounts. Query time range cannot exceed 30 days # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_margin_account_book_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required.
- :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided
- :param str type: Only retrieve changes of the specified type. All types will be returned if not specified.
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
+ :param str currency: Query history for specified currency. If `currency` is specified, `currency_pair` must also be specified.
+ :param str currency_pair: Specify margin account currency pair. Used in combination with `currency`. Ignored if `currency` is not specified
+ :param str type: Query by specified account change type. If not specified, all change types will be included.
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
:param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -194,33 +208,39 @@ def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency', 'currency_pair', 'type', '_from', 'to', 'page', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency',
+ 'currency_pair',
+ 'type',
+ '_from',
+ 'to',
+ 'page',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_margin_account_book" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_margin_account_book" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_margin_account_book`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value less than or equal to `500`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value less than or equal to `500`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -248,14 +268,14 @@ def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/account_book',
- 'GET',
+ '/margin/account_book', 'GET',
path_params,
query_params,
header_params,
@@ -268,8 +288,7 @@ def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_funding_accounts(self, **kwargs): # noqa: E501
"""Funding account list # noqa: E501
@@ -280,7 +299,7 @@ def list_funding_accounts(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -304,7 +323,7 @@ def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -321,12 +340,24 @@ def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_funding_accounts" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_funding_accounts" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -345,14 +376,14 @@ def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/funding_accounts',
- 'GET',
+ '/margin/funding_accounts', 'GET',
path_params,
query_params,
header_params,
@@ -365,11 +396,10 @@ def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_auto_repay_status(self, **kwargs): # noqa: E501
- """Retrieve user auto repayment setting # noqa: E501
+ """Query user auto repayment settings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -392,7 +422,7 @@ def get_auto_repay_status(self, **kwargs): # noqa: E501
return self.get_auto_repay_status_with_http_info(**kwargs) # noqa: E501
def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501
- """Retrieve user auto repayment setting # noqa: E501
+ """Query user auto repayment settings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -416,12 +446,23 @@ def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_auto_repay_status" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_auto_repay_status" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -438,14 +479,14 @@ def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/auto_repay',
- 'GET',
+ '/margin/auto_repay', 'GET',
path_params,
query_params,
header_params,
@@ -458,11 +499,10 @@ def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def set_auto_repay(self, status, **kwargs): # noqa: E501
- """Update user's auto repayment setting # noqa: E501
+ """Update user auto repayment settings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -470,7 +510,7 @@ def set_auto_repay(self, status, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required)
+ :param str status: Whether to enable auto repayment: `on` - enabled, `off` - disabled (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -486,7 +526,7 @@ def set_auto_repay(self, status, **kwargs): # noqa: E501
return self.set_auto_repay_with_http_info(status, **kwargs) # noqa: E501
def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501
- """Update user's auto repayment setting # noqa: E501
+ """Update user auto repayment settings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -494,7 +534,7 @@ def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required)
+ :param str status: Whether to enable auto repayment: `on` - enabled, `off` - disabled (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -511,18 +551,29 @@ def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['status']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'status'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method set_auto_repay" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method set_auto_repay" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'status' is set
- if self.api_client.client_side_validation and (
- 'status' not in local_var_params or local_var_params['status'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501
+ local_var_params['status'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `status` when calling `set_auto_repay`") # noqa: E501
collection_formats = {}
@@ -540,14 +591,14 @@ def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/auto_repay',
- 'POST',
+ '/margin/auto_repay', 'POST',
path_params,
query_params,
header_params,
@@ -560,11 +611,10 @@ def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_margin_transferable(self, currency, **kwargs): # noqa: E501
- """Get the max transferable amount for a specific margin currency # noqa: E501
+ """Get maximum transferable amount for isolated margin # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -572,7 +622,7 @@ def get_margin_transferable(self, currency, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
+ :param str currency: Query by specified currency name (required)
:param str currency_pair: Currency pair
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -589,7 +639,7 @@ def get_margin_transferable(self, currency, **kwargs): # noqa: E501
return self.get_margin_transferable_with_http_info(currency, **kwargs) # noqa: E501
def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E501
- """Get the max transferable amount for a specific margin currency # noqa: E501
+ """Get maximum transferable amount for isolated margin # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -597,7 +647,7 @@ def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
+ :param str currency: Query by specified currency name (required)
:param str currency_pair: Currency pair
:param _return_http_data_only: response data without head status code
and headers
@@ -615,21 +665,31 @@ def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E
local_var_params = locals()
- all_params = ['currency', 'currency_pair']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency',
+ 'currency_pair'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_margin_transferable" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_margin_transferable" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `get_margin_transferable`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `get_margin_transferable`") # noqa: E501
collection_formats = {}
@@ -648,14 +708,14 @@ def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/transferable',
- 'GET',
+ '/margin/transferable', 'GET',
path_params,
query_params,
header_params,
@@ -668,18 +728,18 @@ def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def list_margin_currency_pairs(self, **kwargs): # noqa: E501
- """List all supported currency pairs supported in margin trading(Deprecated) # noqa: E501
+ def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501
+ """Query user's own leverage lending tiers in current market # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_margin_currency_pairs(async_req=True)
+ >>> thread = api.get_user_margin_tier(currency_pair, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
+ :param str currency_pair: Currency pair (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -687,22 +747,23 @@ def list_margin_currency_pairs(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: list[gate_api.MarginCurrencyPair]
+ :rtype: list[gate_api.MarginLeverageTier]
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.list_margin_currency_pairs_with_http_info(**kwargs) # noqa: E501
+ return self.get_user_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501
- def list_margin_currency_pairs_with_http_info(self, **kwargs): # noqa: E501
- """List all supported currency pairs supported in margin trading(Deprecated) # noqa: E501
+ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501
+ """Query user's own leverage lending tiers in current market # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_margin_currency_pairs_with_http_info(async_req=True)
+ >>> thread = api.get_user_margin_tier_with_http_info(currency_pair, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
+ :param str currency_pair: Currency pair (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -712,29 +773,45 @@ def list_margin_currency_pairs_with_http_info(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(list[gate_api.MarginCurrencyPair], status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_margin_currency_pairs" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method get_user_margin_tier" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
+ # verify the required parameter 'currency_pair' is set
+ if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501
+ local_var_params['currency_pair'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_user_margin_tier`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
+ if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501
+ query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501
header_params = {}
@@ -743,39 +820,38 @@ def list_margin_currency_pairs_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/currency_pairs',
- 'GET',
+ '/margin/user/loan_margin_tiers', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[MarginCurrencyPair]', # noqa: E501
+ response_type='list[MarginLeverageTier]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def get_margin_currency_pair(self, currency_pair, **kwargs): # noqa: E501
- """Query one single margin currency pair(Deprecated) # noqa: E501
+ def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501
+ """Query current market leverage lending tiers # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_margin_currency_pair(currency_pair, async_req=True)
+ >>> thread = api.get_market_margin_tier(currency_pair, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pair: Margin currency pair (required)
+ :param str currency_pair: Currency pair (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -783,23 +859,23 @@ def get_margin_currency_pair(self, currency_pair, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: gate_api.MarginCurrencyPair
+ :rtype: list[gate_api.MarginLeverageTier]
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.get_margin_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501
+ return self.get_market_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501
- def get_margin_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501
- """Query one single margin currency pair(Deprecated) # noqa: E501
+ def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501
+ """Query current market leverage lending tiers # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_margin_currency_pair_with_http_info(currency_pair, async_req=True)
+ >>> thread = api.get_market_margin_tier_with_http_info(currency_pair, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pair: Margin currency pair (required)
+ :param str currency_pair: Currency pair (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -809,36 +885,45 @@ def get_margin_currency_pair_with_http_info(self, currency_pair, **kwargs): # n
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(gate_api.MarginCurrencyPair, status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['currency_pair']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_margin_currency_pair" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_market_margin_tier" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency_pair' is set
- if self.api_client.client_side_validation and (
- 'currency_pair' not in local_var_params or local_var_params['currency_pair'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency_pair` when calling `get_margin_currency_pair`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501
+ local_var_params['currency_pair'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_market_margin_tier`") # noqa: E501
collection_formats = {}
path_params = {}
- if 'currency_pair' in local_var_params:
- path_params['currency_pair'] = local_var_params['currency_pair'] # noqa: E501
query_params = []
+ if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501
+ query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501
header_params = {}
@@ -847,39 +932,38 @@ def get_margin_currency_pair_with_http_info(self, currency_pair, **kwargs): # n
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/margin/currency_pairs/{currency_pair}',
- 'GET',
+ '/margin/loan_margin_tiers', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='MarginCurrencyPair', # noqa: E501
+ response_type='list[MarginLeverageTier]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def list_funding_book(self, currency, **kwargs): # noqa: E501
- """Order book of lending loans(Deprecated) # noqa: E501
+ def set_user_market_leverage(self, margin_market_leverage, **kwargs): # noqa: E501
+ """Set user market leverage multiplier # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_funding_book(currency, async_req=True)
+ >>> thread = api.set_user_market_leverage(margin_market_leverage, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
+ :param MarginMarketLeverage margin_market_leverage: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -887,23 +971,23 @@ def list_funding_book(self, currency, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: list[gate_api.FundingBookItem]
+ :rtype: None
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.list_funding_book_with_http_info(currency, **kwargs) # noqa: E501
+ return self.set_user_market_leverage_with_http_info(margin_market_leverage, **kwargs) # noqa: E501
- def list_funding_book_with_http_info(self, currency, **kwargs): # noqa: E501
- """Order book of lending loans(Deprecated) # noqa: E501
+ def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwargs): # noqa: E501
+ """Set user market leverage multiplier # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_funding_book_with_http_info(currency, async_req=True)
+ >>> thread = api.set_user_market_leverage_with_http_info(margin_market_leverage, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
+ :param MarginMarketLeverage margin_market_leverage: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -913,36 +997,43 @@ def list_funding_book_with_http_info(self, currency, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(list[gate_api.FundingBookItem], status_code(int), headers(HTTPHeaderDict))
+ :rtype: None
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'margin_market_leverage'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_funding_book" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method set_user_market_leverage" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- # verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `list_funding_book`"
- ) # noqa: E501
+ # verify the required parameter 'margin_market_leverage' is set
+ if self.api_client.client_side_validation and ('margin_market_leverage' not in local_var_params or # noqa: E501
+ local_var_params['margin_market_leverage'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `margin_market_leverage` when calling `set_user_market_leverage`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
header_params = {}
@@ -950,47 +1041,42 @@ def list_funding_book_with_http_info(self, currency, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ if 'margin_market_leverage' in local_var_params:
+ body_params = local_var_params['margin_market_leverage']
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/funding_book',
- 'GET',
+ '/margin/leverage/user_market_setting', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[FundingBookItem]', # noqa: E501
+ response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def list_loans(self, status, side, **kwargs): # noqa: E501
- """List all loans(Deprecated) # noqa: E501
+ def list_margin_user_account(self, **kwargs): # noqa: E501
+ """Query user's isolated margin account list # noqa: E501
+ Supports querying risk ratio isolated accounts and margin ratio isolated accounts # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_loans(status, side, async_req=True)
+ >>> thread = api.list_margin_user_account(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str status: Loan status (required)
- :param str side: Lend or borrow (required)
- :param str currency: Retrieve data of the specified currency
:param str currency_pair: Currency pair
- :param str sort_by: Specify which field is used to sort. `create_time` or `rate` is supported. Default to `create_time`
- :param bool reverse_sort: Whether to sort in descending order. Default to `true`
- :param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -998,30 +1084,24 @@ def list_loans(self, status, side, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: list[gate_api.Loan]
+ :rtype: list[gate_api.MarginAccount]
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.list_loans_with_http_info(status, side, **kwargs) # noqa: E501
+ return self.list_margin_user_account_with_http_info(**kwargs) # noqa: E501
- def list_loans_with_http_info(self, status, side, **kwargs): # noqa: E501
- """List all loans(Deprecated) # noqa: E501
+ def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501
+ """Query user's isolated margin account list # noqa: E501
+ Supports querying risk ratio isolated accounts and margin ratio isolated accounts # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_loans_with_http_info(status, side, async_req=True)
+ >>> thread = api.list_margin_user_account_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str status: Loan status (required)
- :param str side: Lend or borrow (required)
- :param str currency: Retrieve data of the specified currency
:param str currency_pair: Currency pair
- :param str sort_by: Specify which field is used to sort. `create_time` or `rate` is supported. Default to `create_time`
- :param bool reverse_sort: Whether to sort in descending order. Default to `true`
- :param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1031,71 +1111,41 @@ def list_loans_with_http_info(self, status, side, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(list[gate_api.Loan], status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.MarginAccount], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['status', 'side', 'currency', 'currency_pair', 'sort_by', 'reverse_sort', 'page', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_loans" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_margin_user_account" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- # verify the required parameter 'status' is set
- if self.api_client.client_side_validation and (
- 'status' not in local_var_params or local_var_params['status'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `status` when calling `list_loans`") # noqa: E501
- # verify the required parameter 'side' is set
- if self.api_client.client_side_validation and (
- 'side' not in local_var_params or local_var_params['side'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `side` when calling `list_loans`") # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_loans`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_loans`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_loans`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+
collection_formats = {}
path_params = {}
query_params = []
- if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501
- query_params.append(('status', local_var_params['status'])) # noqa: E501
- if 'side' in local_var_params and local_var_params['side'] is not None: # noqa: E501
- query_params.append(('side', local_var_params['side'])) # noqa: E501
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501
query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501
- if 'sort_by' in local_var_params and local_var_params['sort_by'] is not None: # noqa: E501
- query_params.append(('sort_by', local_var_params['sort_by'])) # noqa: E501
- if 'reverse_sort' in local_var_params and local_var_params['reverse_sort'] is not None: # noqa: E501
- query_params.append(('reverse_sort', local_var_params['reverse_sort'])) # noqa: E501
- if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
- query_params.append(('page', local_var_params['page'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
header_params = {}
@@ -1104,39 +1154,43 @@ def list_loans_with_http_info(self, status, side, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/loans',
- 'GET',
+ '/margin/user/account', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[Loan]', # noqa: E501
+ response_type='list[MarginAccount]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def create_loan(self, loan, **kwargs): # noqa: E501
- """Lend or borrow(Deprecated) # noqa: E501
+ def list_cross_margin_loans(self, status, **kwargs): # noqa: E501
+ """Query cross margin borrow history (deprecated) # noqa: E501
+ Sorted by creation time in descending order by default. Set `reverse=false` for ascending order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_loan(loan, async_req=True)
+ >>> thread = api.list_cross_margin_loans(status, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param Loan loan: (required)
+ :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required)
+ :param str currency: Query by specified currency, includes all currencies if not specified
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1144,23 +1198,28 @@ def create_loan(self, loan, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: gate_api.Loan
+ :rtype: list[gate_api.CrossMarginLoan]
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.create_loan_with_http_info(loan, **kwargs) # noqa: E501
+ return self.list_cross_margin_loans_with_http_info(status, **kwargs) # noqa: E501
- def create_loan_with_http_info(self, loan, **kwargs): # noqa: E501
- """Lend or borrow(Deprecated) # noqa: E501
+ def list_cross_margin_loans_with_http_info(self, status, **kwargs): # noqa: E501
+ """Query cross margin borrow history (deprecated) # noqa: E501
+ Sorted by creation time in descending order by default. Set `reverse=false` for ascending order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_loan_with_http_info(loan, async_req=True)
+ >>> thread = api.list_cross_margin_loans_with_http_info(status, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param Loan loan: (required)
+ :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required)
+ :param str currency: Query by specified currency, includes all currencies if not specified
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1170,150 +1229,63 @@ def create_loan_with_http_info(self, loan, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(gate_api.Loan, status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.CrossMarginLoan], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['loan']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_loan" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'loan' is set
- if self.api_client.client_side_validation and (
- 'loan' not in local_var_params or local_var_params['loan'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `loan` when calling `create_loan`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'loan' in local_var_params:
- body_params = local_var_params['loan']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/loans',
- 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Loan', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ all_params = [
+ 'status',
+ 'currency',
+ 'limit',
+ 'offset',
+ 'reverse'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
- def merge_loans(self, currency, ids, **kwargs): # noqa: E501
- """Merge multiple lending loans(Deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.merge_loans(currency, ids, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
- :param str ids: A comma-separated (,) list of IDs of the loans lent. Maximum of 20 IDs are allowed in a request (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: gate_api.Loan
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.merge_loans_with_http_info(currency, ids, **kwargs) # noqa: E501
-
- def merge_loans_with_http_info(self, currency, ids, **kwargs): # noqa: E501
- """Merge multiple lending loans(Deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.merge_loans_with_http_info(currency, ids, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
- :param str ids: A comma-separated (,) list of IDs of the loans lent. Maximum of 20 IDs are allowed in a request (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(gate_api.Loan, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['currency', 'ids']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method merge_loans" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_cross_margin_loans" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- # verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `currency` when calling `merge_loans`") # noqa: E501
- # verify the required parameter 'ids' is set
- if self.api_client.client_side_validation and (
- 'ids' not in local_var_params or local_var_params['ids'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `ids` when calling `merge_loans`") # noqa: E501
-
+ # verify the required parameter 'status' is set
+ if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501
+ local_var_params['status'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `status` when calling `list_cross_margin_loans`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_loans`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_loans`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_cross_margin_loans`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
+ if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501
+ query_params.append(('status', local_var_params['status'])) # noqa: E501
if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
query_params.append(('currency', local_var_params['currency'])) # noqa: E501
- if 'ids' in local_var_params and local_var_params['ids'] is not None: # noqa: E501
- query_params.append(('ids', local_var_params['ids'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
+ if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501
+ query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501
header_params = {}
@@ -1322,40 +1294,43 @@ def merge_loans_with_http_info(self, currency, ids, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/merged_loans',
- 'POST',
+ '/margin/cross/loans', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='Loan', # noqa: E501
+ response_type='list[CrossMarginLoan]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def get_loan(self, loan_id, side, **kwargs): # noqa: E501
- """Retrieve one single loan detail(Deprecated) # noqa: E501
+ def list_cross_margin_repayments(self, **kwargs): # noqa: E501
+ """Retrieve cross margin repayments. (deprecated) # noqa: E501
+ Sorted by creation time in descending order by default. Set `reverse=false` for ascending order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_loan(loan_id, side, async_req=True)
+ >>> thread = api.list_cross_margin_repayments(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str loan_id: Loan ID (required)
- :param str side: Lend or borrow (required)
+ :param str currency:
+ :param str loan_id:
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1363,24 +1338,28 @@ def get_loan(self, loan_id, side, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: gate_api.Loan
+ :rtype: list[gate_api.CrossMarginRepayment]
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.get_loan_with_http_info(loan_id, side, **kwargs) # noqa: E501
+ return self.list_cross_margin_repayments_with_http_info(**kwargs) # noqa: E501
- def get_loan_with_http_info(self, loan_id, side, **kwargs): # noqa: E501
- """Retrieve one single loan detail(Deprecated) # noqa: E501
+ def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501
+ """Retrieve cross margin repayments. (deprecated) # noqa: E501
+ Sorted by creation time in descending order by default. Set `reverse=false` for ascending order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_loan_with_http_info(loan_id, side, async_req=True)
+ >>> thread = api.list_cross_margin_repayments_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str loan_id: Loan ID (required)
- :param str side: Lend or borrow (required)
+ :param str currency:
+ :param str loan_id:
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1390,41 +1369,59 @@ def get_loan_with_http_info(self, loan_id, side, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(gate_api.Loan, status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.CrossMarginRepayment], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['loan_id', 'side']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency',
+ 'loan_id',
+ 'limit',
+ 'offset',
+ 'reverse'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_loan" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_cross_margin_repayments" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- # verify the required parameter 'loan_id' is set
- if self.api_client.client_side_validation and (
- 'loan_id' not in local_var_params or local_var_params['loan_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `loan_id` when calling `get_loan`") # noqa: E501
- # verify the required parameter 'side' is set
- if self.api_client.client_side_validation and (
- 'side' not in local_var_params or local_var_params['side'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `side` when calling `get_loan`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_repayments`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_repayments`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_cross_margin_repayments`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
- if 'loan_id' in local_var_params:
- path_params['loan_id'] = local_var_params['loan_id'] # noqa: E501
query_params = []
- if 'side' in local_var_params and local_var_params['side'] is not None: # noqa: E501
- query_params.append(('side', local_var_params['side'])) # noqa: E501
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if 'loan_id' in local_var_params and local_var_params['loan_id'] is not None: # noqa: E501
+ query_params.append(('loan_id', local_var_params['loan_id'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
+ if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501
+ query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501
header_params = {}
@@ -1433,2446 +1430,24 @@ def get_loan_with_http_info(self, loan_id, side, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/loans/{loan_id}',
- 'GET',
+ '/margin/cross/repayments', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='Loan', # noqa: E501
+ response_type='list[CrossMarginRepayment]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def cancel_loan(self, loan_id, currency, **kwargs): # noqa: E501
- """Cancel lending loan(Deprecated) # noqa: E501
-
- Only lent loans can be cancelled # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.cancel_loan(loan_id, currency, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_id: Loan ID (required)
- :param str currency: Retrieve data of the specified currency (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: gate_api.Loan
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.cancel_loan_with_http_info(loan_id, currency, **kwargs) # noqa: E501
-
- def cancel_loan_with_http_info(self, loan_id, currency, **kwargs): # noqa: E501
- """Cancel lending loan(Deprecated) # noqa: E501
-
- Only lent loans can be cancelled # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.cancel_loan_with_http_info(loan_id, currency, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_id: Loan ID (required)
- :param str currency: Retrieve data of the specified currency (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(gate_api.Loan, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['loan_id', 'currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method cancel_loan" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'loan_id' is set
- if self.api_client.client_side_validation and (
- 'loan_id' not in local_var_params or local_var_params['loan_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `loan_id` when calling `cancel_loan`") # noqa: E501
- # verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `currency` when calling `cancel_loan`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'loan_id' in local_var_params:
- path_params['loan_id'] = local_var_params['loan_id'] # noqa: E501
-
- query_params = []
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/loans/{loan_id}',
- 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Loan', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def update_loan(self, loan_id, loan_patch, **kwargs): # noqa: E501
- """Modify a loan(Deprecated) # noqa: E501
-
- Only `auto_renew` modification is supported currently # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_loan(loan_id, loan_patch, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_id: Loan ID (required)
- :param LoanPatch loan_patch: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: gate_api.Loan
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.update_loan_with_http_info(loan_id, loan_patch, **kwargs) # noqa: E501
-
- def update_loan_with_http_info(self, loan_id, loan_patch, **kwargs): # noqa: E501
- """Modify a loan(Deprecated) # noqa: E501
-
- Only `auto_renew` modification is supported currently # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_loan_with_http_info(loan_id, loan_patch, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_id: Loan ID (required)
- :param LoanPatch loan_patch: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(gate_api.Loan, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['loan_id', 'loan_patch']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method update_loan" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'loan_id' is set
- if self.api_client.client_side_validation and (
- 'loan_id' not in local_var_params or local_var_params['loan_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `loan_id` when calling `update_loan`") # noqa: E501
- # verify the required parameter 'loan_patch' is set
- if self.api_client.client_side_validation and (
- 'loan_patch' not in local_var_params or local_var_params['loan_patch'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `loan_patch` when calling `update_loan`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'loan_id' in local_var_params:
- path_params['loan_id'] = local_var_params['loan_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'loan_patch' in local_var_params:
- body_params = local_var_params['loan_patch']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/loans/{loan_id}',
- 'PATCH',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Loan', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def list_loan_repayments(self, loan_id, **kwargs): # noqa: E501
- """List loan repayment records(Deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_loan_repayments(loan_id, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_id: Loan ID (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: list[gate_api.Repayment]
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.list_loan_repayments_with_http_info(loan_id, **kwargs) # noqa: E501
-
- def list_loan_repayments_with_http_info(self, loan_id, **kwargs): # noqa: E501
- """List loan repayment records(Deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_loan_repayments_with_http_info(loan_id, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_id: Loan ID (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(list[gate_api.Repayment], status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['loan_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_loan_repayments" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'loan_id' is set
- if self.api_client.client_side_validation and (
- 'loan_id' not in local_var_params or local_var_params['loan_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `loan_id` when calling `list_loan_repayments`"
- ) # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'loan_id' in local_var_params:
- path_params['loan_id'] = local_var_params['loan_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/loans/{loan_id}/repayment',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[Repayment]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def repay_loan(self, loan_id, repay_request, **kwargs): # noqa: E501
- """Repay a loan(Deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.repay_loan(loan_id, repay_request, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_id: Loan ID (required)
- :param RepayRequest repay_request: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: gate_api.Loan
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.repay_loan_with_http_info(loan_id, repay_request, **kwargs) # noqa: E501
-
- def repay_loan_with_http_info(self, loan_id, repay_request, **kwargs): # noqa: E501
- """Repay a loan(Deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.repay_loan_with_http_info(loan_id, repay_request, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_id: Loan ID (required)
- :param RepayRequest repay_request: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(gate_api.Loan, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['loan_id', 'repay_request']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method repay_loan" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'loan_id' is set
- if self.api_client.client_side_validation and (
- 'loan_id' not in local_var_params or local_var_params['loan_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `loan_id` when calling `repay_loan`") # noqa: E501
- # verify the required parameter 'repay_request' is set
- if self.api_client.client_side_validation and (
- 'repay_request' not in local_var_params or local_var_params['repay_request'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `repay_request` when calling `repay_loan`"
- ) # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'loan_id' in local_var_params:
- path_params['loan_id'] = local_var_params['loan_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'repay_request' in local_var_params:
- body_params = local_var_params['repay_request']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/loans/{loan_id}/repayment',
- 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Loan', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def list_loan_records(self, loan_id, **kwargs): # noqa: E501
- """List repayment records of a specific loan(Deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_loan_records(loan_id, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_id: Loan ID (required)
- :param str status: Loan record status
- :param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: list[gate_api.LoanRecord]
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.list_loan_records_with_http_info(loan_id, **kwargs) # noqa: E501
-
- def list_loan_records_with_http_info(self, loan_id, **kwargs): # noqa: E501
- """List repayment records of a specific loan(Deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_loan_records_with_http_info(loan_id, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_id: Loan ID (required)
- :param str status: Loan record status
- :param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(list[gate_api.LoanRecord], status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['loan_id', 'status', 'page', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_loan_records" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'loan_id' is set
- if self.api_client.client_side_validation and (
- 'loan_id' not in local_var_params or local_var_params['loan_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `loan_id` when calling `list_loan_records`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_loan_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_loan_records`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_loan_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'loan_id' in local_var_params and local_var_params['loan_id'] is not None: # noqa: E501
- query_params.append(('loan_id', local_var_params['loan_id'])) # noqa: E501
- if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501
- query_params.append(('status', local_var_params['status'])) # noqa: E501
- if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
- query_params.append(('page', local_var_params['page'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/loan_records',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[LoanRecord]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def get_loan_record(self, loan_record_id, loan_id, **kwargs): # noqa: E501
- """Get one single loan record(Deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_loan_record(loan_record_id, loan_id, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_record_id: Loan record ID (required)
- :param str loan_id: Loan ID (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: gate_api.LoanRecord
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_loan_record_with_http_info(loan_record_id, loan_id, **kwargs) # noqa: E501
-
- def get_loan_record_with_http_info(self, loan_record_id, loan_id, **kwargs): # noqa: E501
- """Get one single loan record(Deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_loan_record_with_http_info(loan_record_id, loan_id, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_record_id: Loan record ID (required)
- :param str loan_id: Loan ID (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(gate_api.LoanRecord, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['loan_record_id', 'loan_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_loan_record" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'loan_record_id' is set
- if self.api_client.client_side_validation and (
- 'loan_record_id' not in local_var_params or local_var_params['loan_record_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `loan_record_id` when calling `get_loan_record`"
- ) # noqa: E501
- # verify the required parameter 'loan_id' is set
- if self.api_client.client_side_validation and (
- 'loan_id' not in local_var_params or local_var_params['loan_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError("Missing the required parameter `loan_id` when calling `get_loan_record`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'loan_record_id' in local_var_params:
- path_params['loan_record_id'] = local_var_params['loan_record_id'] # noqa: E501
-
- query_params = []
- if 'loan_id' in local_var_params and local_var_params['loan_id'] is not None: # noqa: E501
- query_params.append(('loan_id', local_var_params['loan_id'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/loan_records/{loan_record_id}',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='LoanRecord', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def update_loan_record(self, loan_record_id, loan_patch, **kwargs): # noqa: E501
- """Modify a loan record(Deprecated) # noqa: E501
-
- Only `auto_renew` modification is supported currently # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_loan_record(loan_record_id, loan_patch, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_record_id: Loan record ID (required)
- :param LoanPatch loan_patch: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: gate_api.LoanRecord
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.update_loan_record_with_http_info(loan_record_id, loan_patch, **kwargs) # noqa: E501
-
- def update_loan_record_with_http_info(self, loan_record_id, loan_patch, **kwargs): # noqa: E501
- """Modify a loan record(Deprecated) # noqa: E501
-
- Only `auto_renew` modification is supported currently # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_loan_record_with_http_info(loan_record_id, loan_patch, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_record_id: Loan record ID (required)
- :param LoanPatch loan_patch: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(gate_api.LoanRecord, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['loan_record_id', 'loan_patch']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method update_loan_record" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'loan_record_id' is set
- if self.api_client.client_side_validation and (
- 'loan_record_id' not in local_var_params or local_var_params['loan_record_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `loan_record_id` when calling `update_loan_record`"
- ) # noqa: E501
- # verify the required parameter 'loan_patch' is set
- if self.api_client.client_side_validation and (
- 'loan_patch' not in local_var_params or local_var_params['loan_patch'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `loan_patch` when calling `update_loan_record`"
- ) # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'loan_record_id' in local_var_params:
- path_params['loan_record_id'] = local_var_params['loan_record_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'loan_patch' in local_var_params:
- body_params = local_var_params['loan_patch']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/loan_records/{loan_record_id}',
- 'PATCH',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='LoanRecord', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def get_margin_borrowable(self, currency, **kwargs): # noqa: E501
- """Get the max borrowable amount for a specific margin currency(Deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_margin_borrowable(currency, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
- :param str currency_pair: Currency pair
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: gate_api.MarginBorrowable
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_margin_borrowable_with_http_info(currency, **kwargs) # noqa: E501
-
- def get_margin_borrowable_with_http_info(self, currency, **kwargs): # noqa: E501
- """Get the max borrowable amount for a specific margin currency(Deprecated) # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_margin_borrowable_with_http_info(currency, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
- :param str currency_pair: Currency pair
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(gate_api.MarginBorrowable, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['currency', 'currency_pair']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_margin_borrowable" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `get_margin_borrowable`"
- ) # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
- if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501
- query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/borrowable',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='MarginBorrowable', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def list_cross_margin_currencies(self, **kwargs): # noqa: E501
- """Currencies supported by cross margin. # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_cross_margin_currencies(async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: list[gate_api.CrossMarginCurrency]
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.list_cross_margin_currencies_with_http_info(**kwargs) # noqa: E501
-
- def list_cross_margin_currencies_with_http_info(self, **kwargs): # noqa: E501
- """Currencies supported by cross margin. # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_cross_margin_currencies_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(list[gate_api.CrossMarginCurrency], status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_cross_margin_currencies" % k
- )
- local_var_params[k] = v
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/cross/currencies',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[CrossMarginCurrency]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def get_cross_margin_currency(self, currency, **kwargs): # noqa: E501
- """Retrieve detail of one single currency supported by cross margin # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_currency(currency, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Currency name (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: gate_api.CrossMarginCurrency
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_cross_margin_currency_with_http_info(currency, **kwargs) # noqa: E501
-
- def get_cross_margin_currency_with_http_info(self, currency, **kwargs): # noqa: E501
- """Retrieve detail of one single currency supported by cross margin # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_currency_with_http_info(currency, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Currency name (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(gate_api.CrossMarginCurrency, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_cross_margin_currency" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `get_cross_margin_currency`"
- ) # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'currency' in local_var_params:
- path_params['currency'] = local_var_params['currency'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/cross/currencies/{currency}',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='CrossMarginCurrency', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def get_cross_margin_account(self, **kwargs): # noqa: E501
- """Retrieve cross margin account # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_account(async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: gate_api.CrossMarginAccount
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_cross_margin_account_with_http_info(**kwargs) # noqa: E501
-
- def get_cross_margin_account_with_http_info(self, **kwargs): # noqa: E501
- """Retrieve cross margin account # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_account_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(gate_api.CrossMarginAccount, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_cross_margin_account" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/cross/accounts',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='CrossMarginAccount', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def list_cross_margin_account_book(self, **kwargs): # noqa: E501
- """Retrieve cross margin account change history # noqa: E501
-
- Record time range cannot exceed 30 days # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_cross_margin_account_book(async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Filter by currency
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
- :param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
- :param str type: Only retrieve changes of the specified type. All types will be returned if not specified.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: list[gate_api.CrossMarginAccountBook]
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.list_cross_margin_account_book_with_http_info(**kwargs) # noqa: E501
-
- def list_cross_margin_account_book_with_http_info(self, **kwargs): # noqa: E501
- """Retrieve cross margin account change history # noqa: E501
-
- Record time range cannot exceed 30 days # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_cross_margin_account_book_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Filter by currency
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
- :param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
- :param str type: Only retrieve changes of the specified type. All types will be returned if not specified.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(list[gate_api.CrossMarginAccountBook], status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['currency', '_from', 'to', 'page', 'limit', 'type']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_cross_margin_account_book" % k
- )
- local_var_params[k] = v
- del local_var_params['kwargs']
-
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_cross_margin_account_book`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_cross_margin_account_book`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_cross_margin_account_book`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
- if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
- query_params.append(('from', local_var_params['_from'])) # noqa: E501
- if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
- query_params.append(('to', local_var_params['to'])) # noqa: E501
- if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
- query_params.append(('page', local_var_params['page'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501
- query_params.append(('type', local_var_params['type'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/cross/account_book',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[CrossMarginAccountBook]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def list_cross_margin_loans(self, status, **kwargs): # noqa: E501
- """List cross margin borrow history # noqa: E501
-
- Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_cross_margin_loans(status, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required)
- :param str currency: Filter by currency
- :param int limit: Maximum number of records to be returned in a single list
- :param int offset: List offset, starting from 0
- :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: list[gate_api.CrossMarginLoan]
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.list_cross_margin_loans_with_http_info(status, **kwargs) # noqa: E501
-
- def list_cross_margin_loans_with_http_info(self, status, **kwargs): # noqa: E501
- """List cross margin borrow history # noqa: E501
-
- Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_cross_margin_loans_with_http_info(status, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required)
- :param str currency: Filter by currency
- :param int limit: Maximum number of records to be returned in a single list
- :param int offset: List offset, starting from 0
- :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(list[gate_api.CrossMarginLoan], status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['status', 'currency', 'limit', 'offset', 'reverse']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_cross_margin_loans" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'status' is set
- if self.api_client.client_side_validation and (
- 'status' not in local_var_params or local_var_params['status'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `status` when calling `list_cross_margin_loans`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_cross_margin_loans`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_cross_margin_loans`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_cross_margin_loans`, must be a value greater than or equal to `0`"
- ) # noqa: E501
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501
- query_params.append(('status', local_var_params['status'])) # noqa: E501
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
- query_params.append(('offset', local_var_params['offset'])) # noqa: E501
- if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501
- query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/cross/loans',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[CrossMarginLoan]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def create_cross_margin_loan(self, cross_margin_loan, **kwargs): # noqa: E501
- """Create a cross margin borrow loan # noqa: E501
-
- Borrow amount cannot be less than currency minimum borrow amount # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_cross_margin_loan(cross_margin_loan, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param CrossMarginLoan cross_margin_loan: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: gate_api.CrossMarginLoan
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_cross_margin_loan_with_http_info(cross_margin_loan, **kwargs) # noqa: E501
-
- def create_cross_margin_loan_with_http_info(self, cross_margin_loan, **kwargs): # noqa: E501
- """Create a cross margin borrow loan # noqa: E501
-
- Borrow amount cannot be less than currency minimum borrow amount # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_cross_margin_loan_with_http_info(cross_margin_loan, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param CrossMarginLoan cross_margin_loan: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(gate_api.CrossMarginLoan, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['cross_margin_loan']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_cross_margin_loan" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'cross_margin_loan' is set
- if self.api_client.client_side_validation and (
- 'cross_margin_loan' not in local_var_params or local_var_params['cross_margin_loan'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `cross_margin_loan` when calling `create_cross_margin_loan`"
- ) # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'cross_margin_loan' in local_var_params:
- body_params = local_var_params['cross_margin_loan']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/cross/loans',
- 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='CrossMarginLoan', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def get_cross_margin_loan(self, loan_id, **kwargs): # noqa: E501
- """Retrieve single borrow loan detail # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_loan(loan_id, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_id: Borrow loan ID (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: gate_api.CrossMarginLoan
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_cross_margin_loan_with_http_info(loan_id, **kwargs) # noqa: E501
-
- def get_cross_margin_loan_with_http_info(self, loan_id, **kwargs): # noqa: E501
- """Retrieve single borrow loan detail # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_loan_with_http_info(loan_id, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str loan_id: Borrow loan ID (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(gate_api.CrossMarginLoan, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['loan_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_cross_margin_loan" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'loan_id' is set
- if self.api_client.client_side_validation and (
- 'loan_id' not in local_var_params or local_var_params['loan_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `loan_id` when calling `get_cross_margin_loan`"
- ) # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'loan_id' in local_var_params:
- path_params['loan_id'] = local_var_params['loan_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/cross/loans/{loan_id}',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='CrossMarginLoan', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def list_cross_margin_repayments(self, **kwargs): # noqa: E501
- """Retrieve cross margin repayments # noqa: E501
-
- Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_cross_margin_repayments(async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency:
- :param str loan_id:
- :param int limit: Maximum number of records to be returned in a single list
- :param int offset: List offset, starting from 0
- :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: list[gate_api.CrossMarginRepayment]
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.list_cross_margin_repayments_with_http_info(**kwargs) # noqa: E501
-
- def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501
- """Retrieve cross margin repayments # noqa: E501
-
- Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.list_cross_margin_repayments_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency:
- :param str loan_id:
- :param int limit: Maximum number of records to be returned in a single list
- :param int offset: List offset, starting from 0
- :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(list[gate_api.CrossMarginRepayment], status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['currency', 'loan_id', 'limit', 'offset', 'reverse']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_cross_margin_repayments" % k
- )
- local_var_params[k] = v
- del local_var_params['kwargs']
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_cross_margin_repayments`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_cross_margin_repayments`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_cross_margin_repayments`, must be a value greater than or equal to `0`"
- ) # noqa: E501
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
- if 'loan_id' in local_var_params and local_var_params['loan_id'] is not None: # noqa: E501
- query_params.append(('loan_id', local_var_params['loan_id'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
- query_params.append(('offset', local_var_params['offset'])) # noqa: E501
- if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501
- query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/cross/repayments',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[CrossMarginRepayment]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def repay_cross_margin_loan(self, cross_margin_repay_request, **kwargs): # noqa: E501
- """Cross margin repayments # noqa: E501
-
- When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred.When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.repay_cross_margin_loan(cross_margin_repay_request, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param CrossMarginRepayRequest cross_margin_repay_request: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: list[gate_api.CrossMarginLoan]
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.repay_cross_margin_loan_with_http_info(cross_margin_repay_request, **kwargs) # noqa: E501
-
- def repay_cross_margin_loan_with_http_info(self, cross_margin_repay_request, **kwargs): # noqa: E501
- """Cross margin repayments # noqa: E501
-
- When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred.When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.repay_cross_margin_loan_with_http_info(cross_margin_repay_request, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param CrossMarginRepayRequest cross_margin_repay_request: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(list[gate_api.CrossMarginLoan], status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['cross_margin_repay_request']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method repay_cross_margin_loan" % k)
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'cross_margin_repay_request' is set
- if self.api_client.client_side_validation and (
- 'cross_margin_repay_request' not in local_var_params
- or local_var_params['cross_margin_repay_request'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `cross_margin_repay_request` when calling `repay_cross_margin_loan`"
- ) # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'cross_margin_repay_request' in local_var_params:
- body_params = local_var_params['cross_margin_repay_request']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/cross/repayments',
- 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[CrossMarginLoan]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def get_cross_margin_interest_records(self, **kwargs): # noqa: E501
- """Interest records for the cross margin account # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_interest_records(async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
- :param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: list[gate_api.UniLoanInterestRecord]
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_cross_margin_interest_records_with_http_info(**kwargs) # noqa: E501
-
- def get_cross_margin_interest_records_with_http_info(self, **kwargs): # noqa: E501
- """Interest records for the cross margin account # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_interest_records_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
- :param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(list[gate_api.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['currency', 'page', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method get_cross_margin_interest_records" % k
- )
- local_var_params[k] = v
- del local_var_params['kwargs']
-
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `get_cross_margin_interest_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `get_cross_margin_interest_records`, must be a value less than or equal to `100`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `get_cross_margin_interest_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
- if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
- query_params.append(('page', local_var_params['page'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/cross/interest_records',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[UniLoanInterestRecord]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def get_cross_margin_transferable(self, currency, **kwargs): # noqa: E501
- """Get the max transferable amount for a specific cross margin currency # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_transferable(currency, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: gate_api.CrossMarginTransferable
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_cross_margin_transferable_with_http_info(currency, **kwargs) # noqa: E501
-
- def get_cross_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E501
- """Get the max transferable amount for a specific cross margin currency # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_transferable_with_http_info(currency, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(gate_api.CrossMarginTransferable, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method get_cross_margin_transferable" % k
- )
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `get_cross_margin_transferable`"
- ) # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/cross/transferable',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='CrossMarginTransferable', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def get_cross_margin_estimate_rate(self, currencies, **kwargs): # noqa: E501
- """Estimated interest rates # noqa: E501
-
- Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_estimate_rate(currencies, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param list[str] currencies: An array of up to 10 specifying the currency name (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: dict
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_cross_margin_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501
-
- def get_cross_margin_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501
- """Estimated interest rates # noqa: E501
-
- Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_estimate_rate_with_http_info(currencies, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param list[str] currencies: An array of up to 10 specifying the currency name (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(dict, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['currencies']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method get_cross_margin_estimate_rate" % k
- )
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'currencies' is set
- if self.api_client.client_side_validation and (
- 'currencies' not in local_var_params or local_var_params['currencies'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currencies` when calling `get_cross_margin_estimate_rate`"
- ) # noqa: E501
-
- if self.api_client.client_side_validation and (
- 'currencies' in local_var_params and len(local_var_params['currencies']) > 10 # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `currencies` when calling `get_cross_margin_estimate_rate`, number of items must be less than or equal to `10`"
- ) # noqa: E501
- if self.api_client.client_side_validation and (
- 'currencies' in local_var_params and len(local_var_params['currencies']) < 1 # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `currencies` when calling `get_cross_margin_estimate_rate`, number of items must be greater than or equal to `1`"
- ) # noqa: E501
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501
- query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501
- collection_formats['currencies'] = 'multi' # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/cross/estimate_rate',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='dict(str, str)', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
-
- def get_cross_margin_borrowable(self, currency, **kwargs): # noqa: E501
- """Get the max borrowable amount for a specific cross margin currency # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_borrowable(currency, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: gate_api.PortfolioBorrowable
- :return: If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_cross_margin_borrowable_with_http_info(currency, **kwargs) # noqa: E501
-
- def get_cross_margin_borrowable_with_http_info(self, currency, **kwargs): # noqa: E501
- """Get the max borrowable amount for a specific cross margin currency # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_cross_margin_borrowable_with_http_info(currency, async_req=True)
- >>> result = thread.get()
-
- :param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :rtype: tuple(gate_api.PortfolioBorrowable, status_code(int), headers(HTTPHeaderDict))
- :return: If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
-
- for k, v in six.iteritems(local_var_params['kwargs']):
- if k not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method get_cross_margin_borrowable" % k
- )
- local_var_params[k] = v
- del local_var_params['kwargs']
- # verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `get_cross_margin_borrowable`"
- ) # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
- query_params.append(('currency', local_var_params['currency'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['apiv4'] # noqa: E501
-
- return self.api_client.call_api(
- '/margin/cross/borrowable',
- 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='PortfolioBorrowable', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
diff --git a/gate_api/api/margin_uni_api.py b/gate_api/api/margin_uni_api.py
index 69e6c71..6ba4bde 100644
--- a/gate_api/api/margin_uni_api.py
+++ b/gate_api/api/margin_uni_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class MarginUniApi(object):
@@ -81,12 +84,23 @@ def list_uni_currency_pairs_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_uni_currency_pairs" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_uni_currency_pairs" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -103,14 +117,14 @@ def list_uni_currency_pairs_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/margin/uni/currency_pairs',
- 'GET',
+ '/margin/uni/currency_pairs', 'GET',
path_params,
query_params,
header_params,
@@ -123,11 +137,10 @@ def list_uni_currency_pairs_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501
- """Get detail of lending market # noqa: E501
+ """Get lending market details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -151,7 +164,7 @@ def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501
return self.get_uni_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501
def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501
- """Get detail of lending market # noqa: E501
+ """Get lending market details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -176,21 +189,30 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa
local_var_params = locals()
- all_params = ['currency_pair']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_uni_currency_pair" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_uni_currency_pair" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency_pair' is set
- if self.api_client.client_side_validation and (
- 'currency_pair' not in local_var_params or local_var_params['currency_pair'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency_pair` when calling `get_uni_currency_pair`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501
+ local_var_params['currency_pair'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_currency_pair`") # noqa: E501
collection_formats = {}
@@ -207,14 +229,14 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/margin/uni/currency_pairs/{currency_pair}',
- 'GET',
+ '/margin/uni/currency_pairs/{currency_pair}', 'GET',
path_params,
query_params,
header_params,
@@ -227,20 +249,19 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501
- """Estimate interest Rate # noqa: E501
+ """Estimate interest rate for isolated margin currencies # noqa: E501
- Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501
+ Interest rates change hourly based on lending depth, so completely accurate rates cannot be provided. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_margin_uni_estimate_rate(currencies, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param list[str] currencies: An array of up to 10 specifying the currency name (required)
+ :param list[str] currencies: Array of currency names to query, maximum 10 (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -256,16 +277,16 @@ def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501
return self.get_margin_uni_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501
def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501
- """Estimate interest Rate # noqa: E501
+ """Estimate interest rate for isolated margin currencies # noqa: E501
- Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501
+ Interest rates change hourly based on lending depth, so completely accurate rates cannot be provided. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_margin_uni_estimate_rate_with_http_info(currencies, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param list[str] currencies: An array of up to 10 specifying the currency name (required)
+ :param list[str] currencies: Array of currency names to query, maximum 10 (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -282,36 +303,37 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): #
local_var_params = locals()
- all_params = ['currencies']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currencies'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method get_margin_uni_estimate_rate" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method get_margin_uni_estimate_rate" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currencies' is set
- if self.api_client.client_side_validation and (
- 'currencies' not in local_var_params or local_var_params['currencies'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currencies` when calling `get_margin_uni_estimate_rate`"
- ) # noqa: E501
-
- if self.api_client.client_side_validation and (
- 'currencies' in local_var_params and len(local_var_params['currencies']) > 10 # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be less than or equal to `10`"
- ) # noqa: E501
- if self.api_client.client_side_validation and (
- 'currencies' in local_var_params and len(local_var_params['currencies']) < 1 # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501
+ local_var_params['currencies'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currencies` when calling `get_margin_uni_estimate_rate`") # noqa: E501
+
+ if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501
+ len(local_var_params['currencies']) > 10): # noqa: E501
+ raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be less than or equal to `10`") # noqa: E501
+ if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501
+ len(local_var_params['currencies']) < 1): # noqa: E501
+ raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -328,14 +350,14 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): #
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/uni/estimate_rate',
- 'GET',
+ '/margin/uni/estimate_rate', 'GET',
path_params,
query_params,
header_params,
@@ -348,11 +370,10 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): #
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_uni_loans(self, **kwargs): # noqa: E501
- """List loans # noqa: E501
+ """Query loans # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -361,9 +382,9 @@ def list_uni_loans(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str currency_pair: Currency pair
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -379,7 +400,7 @@ def list_uni_loans(self, **kwargs): # noqa: E501
return self.list_uni_loans_with_http_info(**kwargs) # noqa: E501
def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501
- """List loans # noqa: E501
+ """Query loans # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -388,9 +409,9 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str currency_pair: Currency pair
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -407,33 +428,36 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency_pair', 'currency', 'page', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair',
+ 'currency',
+ 'page',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_uni_loans" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_uni_loans" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_uni_loans`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value less than or equal to `100`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -455,14 +479,14 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/uni/loans',
- 'GET',
+ '/margin/uni/loans', 'GET',
path_params,
query_params,
header_params,
@@ -475,8 +499,7 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_uni_loan(self, create_uni_loan, **kwargs): # noqa: E501
"""Borrow or repay # noqa: E501
@@ -528,21 +551,30 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5
local_var_params = locals()
- all_params = ['create_uni_loan']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'create_uni_loan'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_uni_loan" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_uni_loan" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'create_uni_loan' is set
- if self.api_client.client_side_validation and (
- 'create_uni_loan' not in local_var_params or local_var_params['create_uni_loan'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `create_uni_loan` when calling `create_uni_loan`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('create_uni_loan' not in local_var_params or # noqa: E501
+ local_var_params['create_uni_loan'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `create_uni_loan` when calling `create_uni_loan`") # noqa: E501
collection_formats = {}
@@ -560,15 +592,13 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5
body_params = local_var_params['create_uni_loan']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/uni/loans',
- 'POST',
+ '/margin/uni/loans', 'POST',
path_params,
query_params,
header_params,
@@ -581,11 +611,10 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_uni_loan_records(self, **kwargs): # noqa: E501
- """Get load records # noqa: E501
+ """Query loan records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -593,11 +622,11 @@ def list_uni_loan_records(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str type: type: borrow - borrow, repay - repay
- :param str currency: Retrieve data of the specified currency
+ :param str type: Type: `borrow` - borrow, `repay` - repay
+ :param str currency: Query by specified currency name
:param str currency_pair: Currency pair
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -613,7 +642,7 @@ def list_uni_loan_records(self, **kwargs): # noqa: E501
return self.list_uni_loan_records_with_http_info(**kwargs) # noqa: E501
def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501
- """Get load records # noqa: E501
+ """Query loan records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -621,11 +650,11 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str type: type: borrow - borrow, repay - repay
- :param str currency: Retrieve data of the specified currency
+ :param str type: Type: `borrow` - borrow, `repay` - repay
+ :param str currency: Query by specified currency name
:param str currency_pair: Currency pair
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -642,33 +671,37 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['type', 'currency', 'currency_pair', 'page', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'type',
+ 'currency',
+ 'currency_pair',
+ 'page',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_uni_loan_records" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_uni_loan_records" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value less than or equal to `100`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -692,14 +725,14 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/uni/loan_records',
- 'GET',
+ '/margin/uni/loan_records', 'GET',
path_params,
query_params,
header_params,
@@ -712,11 +745,10 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_uni_loan_interest_records(self, **kwargs): # noqa: E501
- """List interest records # noqa: E501
+ """Query interest deduction records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -725,9 +757,11 @@ def list_uni_loan_interest_records(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str currency_pair: Currency pair
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -743,7 +777,7 @@ def list_uni_loan_interest_records(self, **kwargs): # noqa: E501
return self.list_uni_loan_interest_records_with_http_info(**kwargs) # noqa: E501
def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501
- """List interest records # noqa: E501
+ """Query interest deduction records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -752,9 +786,11 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str currency_pair: Currency pair
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param int page: Page number
- :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -771,35 +807,38 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency_pair', 'currency', 'page', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair',
+ 'currency',
+ 'page',
+ 'limit',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_uni_loan_interest_records" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_uni_loan_interest_records" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value less than or equal to `100`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -813,6 +852,10 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501
query_params.append(('page', local_var_params['page'])) # noqa: E501
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
header_params = {}
@@ -821,14 +864,14 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/uni/interest_records',
- 'GET',
+ '/margin/uni/interest_records', 'GET',
path_params,
query_params,
header_params,
@@ -841,11 +884,10 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501
- """Get maximum borrowable # noqa: E501
+ """Query maximum borrowable amount by currency # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -853,7 +895,7 @@ def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
+ :param str currency: Query by specified currency name (required)
:param str currency_pair: Currency pair (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -870,7 +912,7 @@ def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501
return self.get_uni_borrowable_with_http_info(currency, currency_pair, **kwargs) # noqa: E501
def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): # noqa: E501
- """Get maximum borrowable # noqa: E501
+ """Query maximum borrowable amount by currency # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -878,7 +920,7 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs):
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency (required)
+ :param str currency: Query by specified currency name (required)
:param str currency_pair: Currency pair (required)
:param _return_http_data_only: response data without head status code
and headers
@@ -896,28 +938,35 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs):
local_var_params = locals()
- all_params = ['currency', 'currency_pair']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency',
+ 'currency_pair'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_uni_borrowable" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_uni_borrowable" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `get_uni_borrowable`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_borrowable`") # noqa: E501
# verify the required parameter 'currency_pair' is set
- if self.api_client.client_side_validation and (
- 'currency_pair' not in local_var_params or local_var_params['currency_pair'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency_pair` when calling `get_uni_borrowable`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501
+ local_var_params['currency_pair'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_borrowable`") # noqa: E501
collection_formats = {}
@@ -936,14 +985,14 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs):
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/margin/uni/borrowable',
- 'GET',
+ '/margin/uni/borrowable', 'GET',
path_params,
query_params,
header_params,
@@ -956,5 +1005,4 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs):
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
diff --git a/gate_api/api/multi_collateral_loan_api.py b/gate_api/api/multi_collateral_loan_api.py
new file mode 100644
index 0000000..4578f3f
--- /dev/null
+++ b/gate_api/api/multi_collateral_loan_api.py
@@ -0,0 +1,1461 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import re # noqa: F401
+
+# python 2 and python 3 compatibility library
+import six
+
+from gate_api.api_client import ApiClient
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class MultiCollateralLoanApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def list_multi_collateral_orders(self, **kwargs): # noqa: E501
+ """Query multi-currency collateral order list # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_multi_collateral_orders(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int page: Page number
+ :param int limit: Maximum number of records returned in a single list
+ :param str sort: Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending.
+ :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.MultiCollateralOrder]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_multi_collateral_orders_with_http_info(**kwargs) # noqa: E501
+
+ def list_multi_collateral_orders_with_http_info(self, **kwargs): # noqa: E501
+ """Query multi-currency collateral order list # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_multi_collateral_orders_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int page: Page number
+ :param int limit: Maximum number of records returned in a single list
+ :param str sort: Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending.
+ :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.MultiCollateralOrder], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'page',
+ 'limit',
+ 'sort',
+ 'order_type'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_multi_collateral_orders" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_multi_collateral_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_collateral_orders`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_collateral_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501
+ query_params.append(('sort', local_var_params['sort'])) # noqa: E501
+ if 'order_type' in local_var_params and local_var_params['order_type'] is not None: # noqa: E501
+ query_params.append(('order_type', local_var_params['order_type'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/loan/multi_collateral/orders', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[MultiCollateralOrder]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def create_multi_collateral(self, create_multi_collateral_order, **kwargs): # noqa: E501
+ """Place multi-currency collateral order # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_multi_collateral(create_multi_collateral_order, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param CreateMultiCollateralOrder create_multi_collateral_order: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.OrderResp
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_multi_collateral_with_http_info(create_multi_collateral_order, **kwargs) # noqa: E501
+
+ def create_multi_collateral_with_http_info(self, create_multi_collateral_order, **kwargs): # noqa: E501
+ """Place multi-currency collateral order # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_multi_collateral_with_http_info(create_multi_collateral_order, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param CreateMultiCollateralOrder create_multi_collateral_order: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.OrderResp, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'create_multi_collateral_order'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_multi_collateral" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'create_multi_collateral_order' is set
+ if self.api_client.client_side_validation and ('create_multi_collateral_order' not in local_var_params or # noqa: E501
+ local_var_params['create_multi_collateral_order'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `create_multi_collateral_order` when calling `create_multi_collateral`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'create_multi_collateral_order' in local_var_params:
+ body_params = local_var_params['create_multi_collateral_order']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/loan/multi_collateral/orders', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='OrderResp', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_multi_collateral_order_detail(self, order_id, **kwargs): # noqa: E501
+ """Query order details # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_multi_collateral_order_detail(order_id, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str order_id: Order ID returned when order is successfully created (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.MultiCollateralOrder
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_multi_collateral_order_detail_with_http_info(order_id, **kwargs) # noqa: E501
+
+ def get_multi_collateral_order_detail_with_http_info(self, order_id, **kwargs): # noqa: E501
+ """Query order details # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_multi_collateral_order_detail_with_http_info(order_id, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str order_id: Order ID returned when order is successfully created (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.MultiCollateralOrder, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_multi_collateral_order_detail" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'order_id' is set
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `get_multi_collateral_order_detail`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'order_id' in local_var_params:
+ path_params['order_id'] = local_var_params['order_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/loan/multi_collateral/orders/{order_id}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='MultiCollateralOrder', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_multi_repay_records(self, type, **kwargs): # noqa: E501
+ """Query multi-currency collateral repayment records # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_multi_repay_records(type, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation (required)
+ :param str borrow_currency: Borrowed currency
+ :param int page: Page number
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.MultiRepayRecord]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_multi_repay_records_with_http_info(type, **kwargs) # noqa: E501
+
+ def list_multi_repay_records_with_http_info(self, type, **kwargs): # noqa: E501
+ """Query multi-currency collateral repayment records # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_multi_repay_records_with_http_info(type, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation (required)
+ :param str borrow_currency: Borrowed currency
+ :param int page: Page number
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.MultiRepayRecord], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'type',
+ 'borrow_currency',
+ 'page',
+ 'limit',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_multi_repay_records" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'type' is set
+ if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501
+ local_var_params['type'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `type` when calling `list_multi_repay_records`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_multi_repay_records`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_repay_records`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_repay_records`, must be a value greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501
+ query_params.append(('type', local_var_params['type'])) # noqa: E501
+ if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501
+ query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/loan/multi_collateral/repay', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[MultiRepayRecord]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def repay_multi_collateral_loan(self, repay_multi_loan, **kwargs): # noqa: E501
+ """Multi-currency collateral repayment # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.repay_multi_collateral_loan(repay_multi_loan, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param RepayMultiLoan repay_multi_loan: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.MultiRepayResp
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.repay_multi_collateral_loan_with_http_info(repay_multi_loan, **kwargs) # noqa: E501
+
+ def repay_multi_collateral_loan_with_http_info(self, repay_multi_loan, **kwargs): # noqa: E501
+ """Multi-currency collateral repayment # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.repay_multi_collateral_loan_with_http_info(repay_multi_loan, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param RepayMultiLoan repay_multi_loan: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.MultiRepayResp, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'repay_multi_loan'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method repay_multi_collateral_loan" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'repay_multi_loan' is set
+ if self.api_client.client_side_validation and ('repay_multi_loan' not in local_var_params or # noqa: E501
+ local_var_params['repay_multi_loan'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `repay_multi_loan` when calling `repay_multi_collateral_loan`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'repay_multi_loan' in local_var_params:
+ body_params = local_var_params['repay_multi_loan']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/loan/multi_collateral/repay', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='MultiRepayResp', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_multi_collateral_records(self, **kwargs): # noqa: E501
+ """Query collateral adjustment records # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_multi_collateral_records(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int page: Page number
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param str collateral_currency: Collateral currency
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.MultiCollateralRecord]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_multi_collateral_records_with_http_info(**kwargs) # noqa: E501
+
+ def list_multi_collateral_records_with_http_info(self, **kwargs): # noqa: E501
+ """Query collateral adjustment records # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_multi_collateral_records_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int page: Page number
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param str collateral_currency: Collateral currency
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.MultiCollateralRecord], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'page',
+ 'limit',
+ '_from',
+ 'to',
+ 'collateral_currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_multi_collateral_records" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_multi_collateral_records`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_collateral_records`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_collateral_records`, must be a value greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
+ if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501
+ query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/loan/multi_collateral/mortgage', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[MultiCollateralRecord]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def operate_multi_collateral(self, collateral_adjust, **kwargs): # noqa: E501
+ """Add or withdraw collateral # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.operate_multi_collateral(collateral_adjust, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param CollateralAdjust collateral_adjust: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.CollateralAdjustRes
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.operate_multi_collateral_with_http_info(collateral_adjust, **kwargs) # noqa: E501
+
+ def operate_multi_collateral_with_http_info(self, collateral_adjust, **kwargs): # noqa: E501
+ """Add or withdraw collateral # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.operate_multi_collateral_with_http_info(collateral_adjust, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param CollateralAdjust collateral_adjust: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.CollateralAdjustRes, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'collateral_adjust'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method operate_multi_collateral" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'collateral_adjust' is set
+ if self.api_client.client_side_validation and ('collateral_adjust' not in local_var_params or # noqa: E501
+ local_var_params['collateral_adjust'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `collateral_adjust` when calling `operate_multi_collateral`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'collateral_adjust' in local_var_params:
+ body_params = local_var_params['collateral_adjust']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/loan/multi_collateral/mortgage', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='CollateralAdjustRes', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_user_currency_quota(self, type, currency, **kwargs): # noqa: E501
+ """Query user's collateral and borrowing currency quota information # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_user_currency_quota(type, currency, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str type: Currency type: collateral - Collateral currency, borrow - Borrowing currency (required)
+ :param str currency: When it is a collateral currency, multiple currencies can be provided separated by commas; when it is a borrowing currency, only one currency can be provided. (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.CurrencyQuota]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_user_currency_quota_with_http_info(type, currency, **kwargs) # noqa: E501
+
+ def list_user_currency_quota_with_http_info(self, type, currency, **kwargs): # noqa: E501
+ """Query user's collateral and borrowing currency quota information # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_user_currency_quota_with_http_info(type, currency, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str type: Currency type: collateral - Collateral currency, borrow - Borrowing currency (required)
+ :param str currency: When it is a collateral currency, multiple currencies can be provided separated by commas; when it is a borrowing currency, only one currency can be provided. (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.CurrencyQuota], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'type',
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_user_currency_quota" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'type' is set
+ if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501
+ local_var_params['type'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `type` when calling `list_user_currency_quota`") # noqa: E501
+ # verify the required parameter 'currency' is set
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `list_user_currency_quota`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501
+ query_params.append(('type', local_var_params['type'])) # noqa: E501
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/loan/multi_collateral/currency_quota', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[CurrencyQuota]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_multi_collateral_currencies(self, **kwargs): # noqa: E501
+ """Query supported borrowing and collateral currencies for multi-currency collateral # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_multi_collateral_currencies(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.MultiCollateralCurrency
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_multi_collateral_currencies_with_http_info(**kwargs) # noqa: E501
+
+ def list_multi_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501
+ """Query supported borrowing and collateral currencies for multi-currency collateral # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_multi_collateral_currencies_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.MultiCollateralCurrency, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_multi_collateral_currencies" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/loan/multi_collateral/currencies', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='MultiCollateralCurrency', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_multi_collateral_ltv(self, **kwargs): # noqa: E501
+ """Query collateralization ratio information # noqa: E501
+
+ Multi-currency collateral ratio is fixed, independent of currency # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_multi_collateral_ltv(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.CollateralLtv
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_multi_collateral_ltv_with_http_info(**kwargs) # noqa: E501
+
+ def get_multi_collateral_ltv_with_http_info(self, **kwargs): # noqa: E501
+ """Query collateralization ratio information # noqa: E501
+
+ Multi-currency collateral ratio is fixed, independent of currency # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_multi_collateral_ltv_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.CollateralLtv, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_multi_collateral_ltv" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/loan/multi_collateral/ltv', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='CollateralLtv', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_multi_collateral_fix_rate(self, **kwargs): # noqa: E501
+ """Query currency's 7-day and 30-day fixed interest rates # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_multi_collateral_fix_rate(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.CollateralFixRate]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_multi_collateral_fix_rate_with_http_info(**kwargs) # noqa: E501
+
+ def get_multi_collateral_fix_rate_with_http_info(self, **kwargs): # noqa: E501
+ """Query currency's 7-day and 30-day fixed interest rates # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_multi_collateral_fix_rate_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.CollateralFixRate], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_multi_collateral_fix_rate" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/loan/multi_collateral/fixed_rate', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[CollateralFixRate]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_multi_collateral_current_rate(self, currencies, **kwargs): # noqa: E501
+ """Query currency's current interest rate # noqa: E501
+
+ Query currency's current interest rate for the previous hour, current interest rate updates hourly # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_multi_collateral_current_rate(currencies, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param list[str] currencies: Specify currency name query array, separated by commas, maximum 100 items (required)
+ :param str vip_level: VIP level, defaults to 0 if not specified
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.CollateralCurrentRate]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_multi_collateral_current_rate_with_http_info(currencies, **kwargs) # noqa: E501
+
+ def get_multi_collateral_current_rate_with_http_info(self, currencies, **kwargs): # noqa: E501
+ """Query currency's current interest rate # noqa: E501
+
+ Query currency's current interest rate for the previous hour, current interest rate updates hourly # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_multi_collateral_current_rate_with_http_info(currencies, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param list[str] currencies: Specify currency name query array, separated by commas, maximum 100 items (required)
+ :param str vip_level: VIP level, defaults to 0 if not specified
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.CollateralCurrentRate], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currencies',
+ 'vip_level'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_multi_collateral_current_rate" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'currencies' is set
+ if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501
+ local_var_params['currencies'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currencies` when calling `get_multi_collateral_current_rate`") # noqa: E501
+
+ if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501
+ len(local_var_params['currencies']) > 100): # noqa: E501
+ raise ApiValueError("Invalid value for parameter `currencies` when calling `get_multi_collateral_current_rate`, number of items must be less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501
+ len(local_var_params['currencies']) < 1): # noqa: E501
+ raise ApiValueError("Invalid value for parameter `currencies` when calling `get_multi_collateral_current_rate`, number of items must be greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501
+ query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501
+ collection_formats['currencies'] = 'multi' # noqa: E501
+ if 'vip_level' in local_var_params and local_var_params['vip_level'] is not None: # noqa: E501
+ query_params.append(('vip_level', local_var_params['vip_level'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/loan/multi_collateral/current_rate', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[CollateralCurrentRate]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/gate_api/api/options_api.py b/gate_api/api/options_api.py
index 2db4041..3c6fd4a 100644
--- a/gate_api/api/options_api.py
+++ b/gate_api/api/options_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class OptionsApi(object):
@@ -34,7 +37,7 @@ def __init__(self, api_client=None):
self.api_client = api_client
def list_options_underlyings(self, **kwargs): # noqa: E501
- """List all underlyings # noqa: E501
+ """List all underlying assets # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -57,7 +60,7 @@ def list_options_underlyings(self, **kwargs): # noqa: E501
return self.list_options_underlyings_with_http_info(**kwargs) # noqa: E501
def list_options_underlyings_with_http_info(self, **kwargs): # noqa: E501
- """List all underlyings # noqa: E501
+ """List all underlying assets # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -81,12 +84,23 @@ def list_options_underlyings_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_options_underlyings" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_underlyings" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -103,14 +117,14 @@ def list_options_underlyings_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/options/underlyings',
- 'GET',
+ '/options/underlyings', 'GET',
path_params,
query_params,
header_params,
@@ -123,11 +137,10 @@ def list_options_underlyings_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_expirations(self, underlying, **kwargs): # noqa: E501
- """List all expiration times # noqa: E501
+ """List all expiration dates # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -151,7 +164,7 @@ def list_options_expirations(self, underlying, **kwargs): # noqa: E501
return self.list_options_expirations_with_http_info(underlying, **kwargs) # noqa: E501
def list_options_expirations_with_http_info(self, underlying, **kwargs): # noqa: E501
- """List all expiration times # noqa: E501
+ """List all expiration dates # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -176,21 +189,30 @@ def list_options_expirations_with_http_info(self, underlying, **kwargs): # noqa
local_var_params = locals()
- all_params = ['underlying']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'underlying'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_options_expirations" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_expirations" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'underlying' is set
- if self.api_client.client_side_validation and (
- 'underlying' not in local_var_params or local_var_params['underlying'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `underlying` when calling `list_options_expirations`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501
+ local_var_params['underlying'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_expirations`") # noqa: E501
collection_formats = {}
@@ -207,14 +229,14 @@ def list_options_expirations_with_http_info(self, underlying, **kwargs): # noqa
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/options/expirations',
- 'GET',
+ '/options/expirations', 'GET',
path_params,
query_params,
header_params,
@@ -227,11 +249,10 @@ def list_options_expirations_with_http_info(self, underlying, **kwargs): # noqa
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_contracts(self, underlying, **kwargs): # noqa: E501
- """List all the contracts with specified underlying and expiration time # noqa: E501
+ """List all contracts for specified underlying and expiration date # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -240,7 +261,7 @@ def list_options_contracts(self, underlying, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str underlying: Underlying (Obtained by listing underlying endpoint) (required)
- :param int expiration: Unix timestamp of the expiration time
+ :param int expiration: Unix timestamp of expiration date
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -256,7 +277,7 @@ def list_options_contracts(self, underlying, **kwargs): # noqa: E501
return self.list_options_contracts_with_http_info(underlying, **kwargs) # noqa: E501
def list_options_contracts_with_http_info(self, underlying, **kwargs): # noqa: E501
- """List all the contracts with specified underlying and expiration time # noqa: E501
+ """List all contracts for specified underlying and expiration date # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -265,7 +286,7 @@ def list_options_contracts_with_http_info(self, underlying, **kwargs): # noqa:
:param bool async_req: execute request asynchronously
:param str underlying: Underlying (Obtained by listing underlying endpoint) (required)
- :param int expiration: Unix timestamp of the expiration time
+ :param int expiration: Unix timestamp of expiration date
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -282,21 +303,31 @@ def list_options_contracts_with_http_info(self, underlying, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['underlying', 'expiration']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'underlying',
+ 'expiration'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_options_contracts" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_contracts" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'underlying' is set
- if self.api_client.client_side_validation and (
- 'underlying' not in local_var_params or local_var_params['underlying'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `underlying` when calling `list_options_contracts`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501
+ local_var_params['underlying'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_contracts`") # noqa: E501
collection_formats = {}
@@ -315,14 +346,14 @@ def list_options_contracts_with_http_info(self, underlying, **kwargs): # noqa:
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/options/contracts',
- 'GET',
+ '/options/contracts', 'GET',
path_params,
query_params,
header_params,
@@ -335,11 +366,10 @@ def list_options_contracts_with_http_info(self, underlying, **kwargs): # noqa:
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_options_contract(self, contract, **kwargs): # noqa: E501
- """Query specified contract detail # noqa: E501
+ """Query specified contract details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -363,7 +393,7 @@ def get_options_contract(self, contract, **kwargs): # noqa: E501
return self.get_options_contract_with_http_info(contract, **kwargs) # noqa: E501
def get_options_contract_with_http_info(self, contract, **kwargs): # noqa: E501
- """Query specified contract detail # noqa: E501
+ """Query specified contract details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -388,21 +418,30 @@ def get_options_contract_with_http_info(self, contract, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['contract']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'contract'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_options_contract" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_options_contract" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `get_options_contract`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `get_options_contract`") # noqa: E501
collection_formats = {}
@@ -419,14 +458,14 @@ def get_options_contract_with_http_info(self, contract, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/options/contracts/{contract}',
- 'GET',
+ '/options/contracts/{contract}', 'GET',
path_params,
query_params,
header_params,
@@ -439,8 +478,7 @@ def get_options_contract_with_http_info(self, contract, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_settlements(self, underlying, **kwargs): # noqa: E501
"""List settlement history # noqa: E501
@@ -452,10 +490,10 @@ def list_options_settlements(self, underlying, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str underlying: Underlying (Obtained by listing underlying endpoint) (required)
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -480,10 +518,10 @@ def list_options_settlements_with_http_info(self, underlying, **kwargs): # noqa
:param bool async_req: execute request asynchronously
:param str underlying: Underlying (Obtained by listing underlying endpoint) (required)
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -500,40 +538,41 @@ def list_options_settlements_with_http_info(self, underlying, **kwargs): # noqa
local_var_params = locals()
- all_params = ['underlying', 'limit', 'offset', '_from', 'to']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'underlying',
+ 'limit',
+ 'offset',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_options_settlements" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_settlements" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'underlying' is set
- if self.api_client.client_side_validation and (
- 'underlying' not in local_var_params or local_var_params['underlying'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `underlying` when calling `list_options_settlements`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_settlements`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_settlements`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_options_settlements`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501
+ local_var_params['underlying'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_settlements`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_settlements`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_settlements`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_options_settlements`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -557,14 +596,14 @@ def list_options_settlements_with_http_info(self, underlying, **kwargs): # noqa
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/options/settlements',
- 'GET',
+ '/options/settlements', 'GET',
path_params,
query_params,
header_params,
@@ -577,11 +616,10 @@ def list_options_settlements_with_http_info(self, underlying, **kwargs): # noqa
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_options_settlement(self, contract, underlying, at, **kwargs): # noqa: E501
- """Get specified contract's settlement # noqa: E501
+ """Get specified contract settlement information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -607,7 +645,7 @@ def get_options_settlement(self, contract, underlying, at, **kwargs): # noqa: E
return self.get_options_settlement_with_http_info(contract, underlying, at, **kwargs) # noqa: E501
def get_options_settlement_with_http_info(self, contract, underlying, at, **kwargs): # noqa: E501
- """Get specified contract's settlement # noqa: E501
+ """Get specified contract settlement information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -634,35 +672,40 @@ def get_options_settlement_with_http_info(self, contract, underlying, at, **kwar
local_var_params = locals()
- all_params = ['contract', 'underlying', 'at']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'contract',
+ 'underlying',
+ 'at'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_options_settlement" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_options_settlement" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `get_options_settlement`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `get_options_settlement`") # noqa: E501
# verify the required parameter 'underlying' is set
- if self.api_client.client_side_validation and (
- 'underlying' not in local_var_params or local_var_params['underlying'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `underlying` when calling `get_options_settlement`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501
+ local_var_params['underlying'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `underlying` when calling `get_options_settlement`") # noqa: E501
# verify the required parameter 'at' is set
- if self.api_client.client_side_validation and (
- 'at' not in local_var_params or local_var_params['at'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `at` when calling `get_options_settlement`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('at' not in local_var_params or # noqa: E501
+ local_var_params['at'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `at` when calling `get_options_settlement`") # noqa: E501
collection_formats = {}
@@ -683,14 +726,14 @@ def get_options_settlement_with_http_info(self, contract, underlying, at, **kwar
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/options/settlements/{contract}',
- 'GET',
+ '/options/settlements/{contract}', 'GET',
path_params,
query_params,
header_params,
@@ -703,11 +746,10 @@ def get_options_settlement_with_http_info(self, contract, underlying, at, **kwar
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_my_options_settlements(self, underlying, **kwargs): # noqa: E501
- """List my options settlements # noqa: E501
+ """Query personal settlement records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -717,10 +759,10 @@ def list_my_options_settlements(self, underlying, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str underlying: Underlying (Obtained by listing underlying endpoint) (required)
:param str contract: Options contract name
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -736,7 +778,7 @@ def list_my_options_settlements(self, underlying, **kwargs): # noqa: E501
return self.list_my_options_settlements_with_http_info(underlying, **kwargs) # noqa: E501
def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # noqa: E501
- """List my options settlements # noqa: E501
+ """Query personal settlement records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -746,10 +788,10 @@ def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # n
:param bool async_req: execute request asynchronously
:param str underlying: Underlying (Obtained by listing underlying endpoint) (required)
:param str contract: Options contract name
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -766,42 +808,42 @@ def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # n
local_var_params = locals()
- all_params = ['underlying', 'contract', 'limit', 'offset', '_from', 'to']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'underlying',
+ 'contract',
+ 'limit',
+ 'offset',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_my_options_settlements" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_my_options_settlements" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'underlying' is set
- if self.api_client.client_side_validation and (
- 'underlying' not in local_var_params or local_var_params['underlying'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `underlying` when calling `list_my_options_settlements`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_my_options_settlements`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_my_options_settlements`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_my_options_settlements`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501
+ local_var_params['underlying'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `underlying` when calling `list_my_options_settlements`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_options_settlements`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_options_settlements`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_my_options_settlements`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -827,14 +869,14 @@ def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # n
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/options/my_settlements',
- 'GET',
+ '/options/my_settlements', 'GET',
path_params,
query_params,
header_params,
@@ -847,11 +889,10 @@ def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # n
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_order_book(self, contract, **kwargs): # noqa: E501
- """Options order book # noqa: E501
+ """Query options contract order book # noqa: E501
Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -861,9 +902,9 @@ def list_options_order_book(self, contract, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str contract: Options contract name (required)
- :param str interval: Order depth. 0 means no aggregation is applied. default to 0
- :param int limit: Maximum number of order depth data in asks or bids
- :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update
+ :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified
+ :param int limit: Number of depth levels
+ :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time depth changes
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -879,7 +920,7 @@ def list_options_order_book(self, contract, **kwargs): # noqa: E501
return self.list_options_order_book_with_http_info(contract, **kwargs) # noqa: E501
def list_options_order_book_with_http_info(self, contract, **kwargs): # noqa: E501
- """Options order book # noqa: E501
+ """Query options contract order book # noqa: E501
Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -889,9 +930,9 @@ def list_options_order_book_with_http_info(self, contract, **kwargs): # noqa: E
:param bool async_req: execute request asynchronously
:param str contract: Options contract name (required)
- :param str interval: Order depth. 0 means no aggregation is applied. default to 0
- :param int limit: Maximum number of order depth data in asks or bids
- :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update
+ :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified
+ :param int limit: Number of depth levels
+ :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time depth changes
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -908,34 +949,38 @@ def list_options_order_book_with_http_info(self, contract, **kwargs): # noqa: E
local_var_params = locals()
- all_params = ['contract', 'interval', 'limit', 'with_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'contract',
+ 'interval',
+ 'limit',
+ 'with_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_options_order_book" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_order_book" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `list_options_order_book`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 50
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_order_book`, must be a value less than or equal to `50`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_order_book`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `list_options_order_book`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 50: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_order_book`, must be a value less than or equal to `50`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_order_book`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -957,14 +1002,14 @@ def list_options_order_book_with_http_info(self, contract, **kwargs): # noqa: E
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/options/order_book',
- 'GET',
+ '/options/order_book', 'GET',
path_params,
query_params,
header_params,
@@ -977,11 +1022,10 @@ def list_options_order_book_with_http_info(self, contract, **kwargs): # noqa: E
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_tickers(self, underlying, **kwargs): # noqa: E501
- """List tickers of options contracts # noqa: E501
+ """Query options market ticker information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1005,7 +1049,7 @@ def list_options_tickers(self, underlying, **kwargs): # noqa: E501
return self.list_options_tickers_with_http_info(underlying, **kwargs) # noqa: E501
def list_options_tickers_with_http_info(self, underlying, **kwargs): # noqa: E501
- """List tickers of options contracts # noqa: E501
+ """Query options market ticker information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1030,21 +1074,30 @@ def list_options_tickers_with_http_info(self, underlying, **kwargs): # noqa: E5
local_var_params = locals()
- all_params = ['underlying']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'underlying'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_options_tickers" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_tickers" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'underlying' is set
- if self.api_client.client_side_validation and (
- 'underlying' not in local_var_params or local_var_params['underlying'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `underlying` when calling `list_options_tickers`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501
+ local_var_params['underlying'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_tickers`") # noqa: E501
collection_formats = {}
@@ -1061,14 +1114,14 @@ def list_options_tickers_with_http_info(self, underlying, **kwargs): # noqa: E5
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/options/tickers',
- 'GET',
+ '/options/tickers', 'GET',
path_params,
query_params,
header_params,
@@ -1081,11 +1134,10 @@ def list_options_tickers_with_http_info(self, underlying, **kwargs): # noqa: E5
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_underlying_tickers(self, underlying, **kwargs): # noqa: E501
- """Get underlying ticker # noqa: E501
+ """Query underlying ticker information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1109,7 +1161,7 @@ def list_options_underlying_tickers(self, underlying, **kwargs): # noqa: E501
return self.list_options_underlying_tickers_with_http_info(underlying, **kwargs) # noqa: E501
def list_options_underlying_tickers_with_http_info(self, underlying, **kwargs): # noqa: E501
- """Get underlying ticker # noqa: E501
+ """Query underlying ticker information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1134,23 +1186,30 @@ def list_options_underlying_tickers_with_http_info(self, underlying, **kwargs):
local_var_params = locals()
- all_params = ['underlying']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'underlying'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_options_underlying_tickers" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_underlying_tickers" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'underlying' is set
- if self.api_client.client_side_validation and (
- 'underlying' not in local_var_params or local_var_params['underlying'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `underlying` when calling `list_options_underlying_tickers`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501
+ local_var_params['underlying'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_underlying_tickers`") # noqa: E501
collection_formats = {}
@@ -1167,14 +1226,14 @@ def list_options_underlying_tickers_with_http_info(self, underlying, **kwargs):
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/options/underlying/tickers/{underlying}',
- 'GET',
+ '/options/underlying/tickers/{underlying}', 'GET',
path_params,
query_params,
header_params,
@@ -1187,11 +1246,10 @@ def list_options_underlying_tickers_with_http_info(self, underlying, **kwargs):
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_candlesticks(self, contract, **kwargs): # noqa: E501
- """Get options candlesticks # noqa: E501
+ """Options contract market candlestick chart # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1200,10 +1258,10 @@ def list_options_candlesticks(self, contract, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str contract: Options contract name (required)
- :param int limit: Maximum number of records to be returned in a single list
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str interval: Interval time between data points
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str interval: Time interval between data points
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1219,7 +1277,7 @@ def list_options_candlesticks(self, contract, **kwargs): # noqa: E501
return self.list_options_candlesticks_with_http_info(contract, **kwargs) # noqa: E501
def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa: E501
- """Get options candlesticks # noqa: E501
+ """Options contract market candlestick chart # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1228,10 +1286,10 @@ def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa:
:param bool async_req: execute request asynchronously
:param str contract: Options contract name (required)
- :param int limit: Maximum number of records to be returned in a single list
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str interval: Interval time between data points
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str interval: Time interval between data points
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1248,34 +1306,39 @@ def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['contract', 'limit', '_from', 'to', 'interval']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'contract',
+ 'limit',
+ '_from',
+ 'to',
+ 'interval'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_options_candlesticks" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_candlesticks" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `list_options_candlesticks`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_candlesticks`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_candlesticks`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `list_options_candlesticks`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_candlesticks`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_candlesticks`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1299,14 +1362,14 @@ def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa:
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/options/candlesticks',
- 'GET',
+ '/options/candlesticks', 'GET',
path_params,
query_params,
header_params,
@@ -1319,11 +1382,10 @@ def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa:
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_underlying_candlesticks(self, underlying, **kwargs): # noqa: E501
- """Mark price candlesticks of an underlying # noqa: E501
+ """Underlying index price candlestick chart # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1332,10 +1394,10 @@ def list_options_underlying_candlesticks(self, underlying, **kwargs): # noqa: E
:param bool async_req: execute request asynchronously
:param str underlying: Underlying (Obtained by listing underlying endpoint) (required)
- :param int limit: Maximum number of records to be returned in a single list
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str interval: Interval time between data points
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str interval: Time interval between data points
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1351,7 +1413,7 @@ def list_options_underlying_candlesticks(self, underlying, **kwargs): # noqa: E
return self.list_options_underlying_candlesticks_with_http_info(underlying, **kwargs) # noqa: E501
def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwargs): # noqa: E501
- """Mark price candlesticks of an underlying # noqa: E501
+ """Underlying index price candlestick chart # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1360,10 +1422,10 @@ def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwar
:param bool async_req: execute request asynchronously
:param str underlying: Underlying (Obtained by listing underlying endpoint) (required)
- :param int limit: Maximum number of records to be returned in a single list
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str interval: Interval time between data points
+ :param int limit: Maximum number of records returned in a single list
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str interval: Time interval between data points
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1380,36 +1442,39 @@ def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwar
local_var_params = locals()
- all_params = ['underlying', 'limit', '_from', 'to', 'interval']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'underlying',
+ 'limit',
+ '_from',
+ 'to',
+ 'interval'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_options_underlying_candlesticks" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_underlying_candlesticks" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'underlying' is set
- if self.api_client.client_side_validation and (
- 'underlying' not in local_var_params or local_var_params['underlying'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `underlying` when calling `list_options_underlying_candlesticks`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_underlying_candlesticks`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_underlying_candlesticks`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501
+ local_var_params['underlying'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_underlying_candlesticks`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_underlying_candlesticks`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_underlying_candlesticks`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1433,14 +1498,14 @@ def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwar
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/options/underlying/candlesticks',
- 'GET',
+ '/options/underlying/candlesticks', 'GET',
path_params,
query_params,
header_params,
@@ -1453,11 +1518,10 @@ def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwar
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_trades(self, **kwargs): # noqa: E501
- """Options trade history # noqa: E501
+ """Market trade records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1466,11 +1530,11 @@ def list_options_trades(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str contract: Options contract name
- :param str type: `C` is call, while `P` is put
- :param int limit: Maximum number of records to be returned in a single list
+ :param str type: `C` for call, `P` for put
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1486,7 +1550,7 @@ def list_options_trades(self, **kwargs): # noqa: E501
return self.list_options_trades_with_http_info(**kwargs) # noqa: E501
def list_options_trades_with_http_info(self, **kwargs): # noqa: E501
- """Options trade history # noqa: E501
+ """Market trade records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1495,11 +1559,11 @@ def list_options_trades_with_http_info(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str contract: Options contract name
- :param str type: `C` is call, while `P` is put
- :param int limit: Maximum number of records to be returned in a single list
+ :param str type: `C` for call, `P` for put
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1516,33 +1580,38 @@ def list_options_trades_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['contract', 'type', 'limit', 'offset', '_from', 'to']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'contract',
+ 'type',
+ 'limit',
+ 'offset',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_options_trades" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_trades" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_trades`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_trades`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_options_trades`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_trades`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_trades`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_options_trades`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1568,14 +1637,14 @@ def list_options_trades_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/options/trades',
- 'GET',
+ '/options/trades', 'GET',
path_params,
query_params,
header_params,
@@ -1588,11 +1657,10 @@ def list_options_trades_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_account(self, **kwargs): # noqa: E501
- """List options account # noqa: E501
+ """Query account information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1615,7 +1683,7 @@ def list_options_account(self, **kwargs): # noqa: E501
return self.list_options_account_with_http_info(**kwargs) # noqa: E501
def list_options_account_with_http_info(self, **kwargs): # noqa: E501
- """List options account # noqa: E501
+ """Query account information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1639,12 +1707,23 @@ def list_options_account_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_options_account" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_account" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -1661,14 +1740,14 @@ def list_options_account_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/options/accounts',
- 'GET',
+ '/options/accounts', 'GET',
path_params,
query_params,
header_params,
@@ -1681,11 +1760,10 @@ def list_options_account_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_account_book(self, **kwargs): # noqa: E501
- """List account changing history # noqa: E501
+ """Query account change history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1693,11 +1771,11 @@ def list_options_account_book(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str type: Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str type: Change types: - dnw: Deposit & Withdrawal - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: Settlement P&L
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1713,7 +1791,7 @@ def list_options_account_book(self, **kwargs): # noqa: E501
return self.list_options_account_book_with_http_info(**kwargs) # noqa: E501
def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501
- """List account changing history # noqa: E501
+ """Query account change history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1721,11 +1799,11 @@ def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
- :param str type: Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
+ :param str type: Change types: - dnw: Deposit & Withdrawal - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: Settlement P&L
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1742,33 +1820,37 @@ def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['limit', 'offset', '_from', 'to', 'type']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'limit',
+ 'offset',
+ '_from',
+ 'to',
+ 'type'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_options_account_book" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_account_book" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_account_book`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_account_book`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_options_account_book`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_account_book`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_account_book`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_options_account_book`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1792,14 +1874,14 @@ def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/options/account_book',
- 'GET',
+ '/options/account_book', 'GET',
path_params,
query_params,
header_params,
@@ -1812,8 +1894,7 @@ def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_positions(self, **kwargs): # noqa: E501
"""List user's positions of specified underlying # noqa: E501
@@ -1865,12 +1946,24 @@ def list_options_positions_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['underlying']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'underlying'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_options_positions" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_positions" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -1889,14 +1982,14 @@ def list_options_positions_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/options/positions',
- 'GET',
+ '/options/positions', 'GET',
path_params,
query_params,
header_params,
@@ -1909,8 +2002,7 @@ def list_options_positions_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_options_position(self, contract, **kwargs): # noqa: E501
"""Get specified contract position # noqa: E501
@@ -1962,21 +2054,30 @@ def get_options_position_with_http_info(self, contract, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['contract']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'contract'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_options_position" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_options_position" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'contract' is set
- if self.api_client.client_side_validation and (
- 'contract' not in local_var_params or local_var_params['contract'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `contract` when calling `get_options_position`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501
+ local_var_params['contract'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `contract` when calling `get_options_position`") # noqa: E501
collection_formats = {}
@@ -1993,14 +2094,14 @@ def get_options_position_with_http_info(self, contract, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/options/positions/{contract}',
- 'GET',
+ '/options/positions/{contract}', 'GET',
path_params,
query_params,
header_params,
@@ -2013,8 +2114,7 @@ def get_options_position_with_http_info(self, contract, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_position_close(self, underlying, **kwargs): # noqa: E501
"""List user's liquidation history of specified underlying # noqa: E501
@@ -2068,23 +2168,31 @@ def list_options_position_close_with_http_info(self, underlying, **kwargs): # n
local_var_params = locals()
- all_params = ['underlying', 'contract']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'underlying',
+ 'contract'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_options_position_close" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_position_close" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'underlying' is set
- if self.api_client.client_side_validation and (
- 'underlying' not in local_var_params or local_var_params['underlying'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `underlying` when calling `list_options_position_close`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501
+ local_var_params['underlying'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_position_close`") # noqa: E501
collection_formats = {}
@@ -2103,14 +2211,14 @@ def list_options_position_close_with_http_info(self, underlying, **kwargs): # n
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/options/position_close',
- 'GET',
+ '/options/position_close', 'GET',
path_params,
query_params,
header_params,
@@ -2123,8 +2231,7 @@ def list_options_position_close_with_http_info(self, underlying, **kwargs): # n
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_options_orders(self, status, **kwargs): # noqa: E501
"""List options orders # noqa: E501
@@ -2135,13 +2242,13 @@ def list_options_orders(self, status, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str status: Only list the orders with this status (required)
+ :param str status: Query order list based on status (required)
:param str contract: Options contract name
:param str underlying: Underlying
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2165,13 +2272,13 @@ def list_options_orders_with_http_info(self, status, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str status: Only list the orders with this status (required)
+ :param str status: Query order list based on status (required)
:param str contract: Options contract name
:param str underlying: Underlying
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2188,40 +2295,43 @@ def list_options_orders_with_http_info(self, status, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['status', 'contract', 'underlying', 'limit', 'offset', '_from', 'to']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'status',
+ 'contract',
+ 'underlying',
+ 'limit',
+ 'offset',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_options_orders" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_options_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'status' is set
- if self.api_client.client_side_validation and (
- 'status' not in local_var_params or local_var_params['status'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `status` when calling `list_options_orders`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_orders`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_options_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_options_orders`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501
+ local_var_params['status'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `status` when calling `list_options_orders`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_orders`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_options_orders`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -2249,14 +2359,14 @@ def list_options_orders_with_http_info(self, status, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/options/orders',
- 'GET',
+ '/options/orders', 'GET',
path_params,
query_params,
header_params,
@@ -2269,8 +2379,7 @@ def list_options_orders_with_http_info(self, status, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_options_order(self, options_order, **kwargs): # noqa: E501
"""Create an options order # noqa: E501
@@ -2322,21 +2431,30 @@ def create_options_order_with_http_info(self, options_order, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['options_order']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'options_order'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_options_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_options_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'options_order' is set
- if self.api_client.client_side_validation and (
- 'options_order' not in local_var_params or local_var_params['options_order'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `options_order` when calling `create_options_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('options_order' not in local_var_params or # noqa: E501
+ local_var_params['options_order'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `options_order` when calling `create_options_order`") # noqa: E501
collection_formats = {}
@@ -2353,19 +2471,18 @@ def create_options_order_with_http_info(self, options_order, **kwargs): # noqa:
if 'options_order' in local_var_params:
body_params = local_var_params['options_order']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/options/orders',
- 'POST',
+ '/options/orders', 'POST',
path_params,
query_params,
header_params,
@@ -2378,11 +2495,10 @@ def create_options_order_with_http_info(self, options_order, **kwargs): # noqa:
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def cancel_options_orders(self, **kwargs): # noqa: E501
- """Cancel all `open` orders matched # noqa: E501
+ """Cancel all orders with 'open' status # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2392,7 +2508,7 @@ def cancel_options_orders(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str contract: Options contract name
:param str underlying: Underlying
- :param str side: All bids or asks. Both included if not specified
+ :param str side: Specify all bids or all asks, both included if not specified
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2408,7 +2524,7 @@ def cancel_options_orders(self, **kwargs): # noqa: E501
return self.cancel_options_orders_with_http_info(**kwargs) # noqa: E501
def cancel_options_orders_with_http_info(self, **kwargs): # noqa: E501
- """Cancel all `open` orders matched # noqa: E501
+ """Cancel all orders with 'open' status # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2418,7 +2534,7 @@ def cancel_options_orders_with_http_info(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str contract: Options contract name
:param str underlying: Underlying
- :param str side: All bids or asks. Both included if not specified
+ :param str side: Specify all bids or all asks, both included if not specified
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2435,12 +2551,26 @@ def cancel_options_orders_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['contract', 'underlying', 'side']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'contract',
+ 'underlying',
+ 'side'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method cancel_options_orders" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_options_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -2463,14 +2593,14 @@ def cancel_options_orders_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/options/orders',
- 'DELETE',
+ '/options/orders', 'DELETE',
path_params,
query_params,
header_params,
@@ -2483,11 +2613,10 @@ def cancel_options_orders_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_options_order(self, order_id, **kwargs): # noqa: E501
- """Get a single order # noqa: E501
+ """Query single order details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2495,7 +2624,7 @@ def get_options_order(self, order_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int order_id: Order ID returned on successful order creation (required)
+ :param int order_id: Order ID returned when order is successfully created (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2511,7 +2640,7 @@ def get_options_order(self, order_id, **kwargs): # noqa: E501
return self.get_options_order_with_http_info(order_id, **kwargs) # noqa: E501
def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501
- """Get a single order # noqa: E501
+ """Query single order details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2519,7 +2648,7 @@ def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int order_id: Order ID returned on successful order creation (required)
+ :param int order_id: Order ID returned when order is successfully created (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2536,21 +2665,30 @@ def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_options_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_options_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `get_options_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `get_options_order`") # noqa: E501
collection_formats = {}
@@ -2567,14 +2705,14 @@ def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/options/orders/{order_id}',
- 'GET',
+ '/options/orders/{order_id}', 'GET',
path_params,
query_params,
header_params,
@@ -2587,11 +2725,10 @@ def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def cancel_options_order(self, order_id, **kwargs): # noqa: E501
- """Cancel a single order # noqa: E501
+ """Cancel single order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2599,7 +2736,7 @@ def cancel_options_order(self, order_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int order_id: Order ID returned on successful order creation (required)
+ :param int order_id: Order ID returned when order is successfully created (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2615,7 +2752,7 @@ def cancel_options_order(self, order_id, **kwargs): # noqa: E501
return self.cancel_options_order_with_http_info(order_id, **kwargs) # noqa: E501
def cancel_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501
- """Cancel a single order # noqa: E501
+ """Cancel single order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2623,7 +2760,7 @@ def cancel_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int order_id: Order ID returned on successful order creation (required)
+ :param int order_id: Order ID returned when order is successfully created (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2640,21 +2777,30 @@ def cancel_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method cancel_options_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_options_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `cancel_options_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_options_order`") # noqa: E501
collection_formats = {}
@@ -2671,14 +2817,14 @@ def cancel_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/options/orders/{order_id}',
- 'DELETE',
+ '/options/orders/{order_id}', 'DELETE',
path_params,
query_params,
header_params,
@@ -2691,11 +2837,128 @@ def cancel_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def countdown_cancel_all_options(self, countdown_cancel_all_options_task, **kwargs): # noqa: E501
+ """Countdown cancel orders # noqa: E501
+
+ Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.countdown_cancel_all_options(countdown_cancel_all_options_task, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param CountdownCancelAllOptionsTask countdown_cancel_all_options_task: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.TriggerTime
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.countdown_cancel_all_options_with_http_info(countdown_cancel_all_options_task, **kwargs) # noqa: E501
+
+ def countdown_cancel_all_options_with_http_info(self, countdown_cancel_all_options_task, **kwargs): # noqa: E501
+ """Countdown cancel orders # noqa: E501
+
+ Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.countdown_cancel_all_options_with_http_info(countdown_cancel_all_options_task, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param CountdownCancelAllOptionsTask countdown_cancel_all_options_task: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.TriggerTime, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'countdown_cancel_all_options_task'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method countdown_cancel_all_options" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'countdown_cancel_all_options_task' is set
+ if self.api_client.client_side_validation and ('countdown_cancel_all_options_task' not in local_var_params or # noqa: E501
+ local_var_params['countdown_cancel_all_options_task'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `countdown_cancel_all_options_task` when calling `countdown_cancel_all_options`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'countdown_cancel_all_options_task' in local_var_params:
+ body_params = local_var_params['countdown_cancel_all_options_task']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/options/countdown_cancel_all', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='TriggerTime', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def list_my_options_trades(self, underlying, **kwargs): # noqa: E501
- """List personal trading history # noqa: E501
+ """Query personal trading records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2705,10 +2968,10 @@ def list_my_options_trades(self, underlying, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str underlying: Underlying (Obtained by listing underlying endpoint) (required)
:param str contract: Options contract name
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2724,7 +2987,7 @@ def list_my_options_trades(self, underlying, **kwargs): # noqa: E501
return self.list_my_options_trades_with_http_info(underlying, **kwargs) # noqa: E501
def list_my_options_trades_with_http_info(self, underlying, **kwargs): # noqa: E501
- """List personal trading history # noqa: E501
+ """Query personal trading records # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2734,10 +2997,10 @@ def list_my_options_trades_with_http_info(self, underlying, **kwargs): # noqa:
:param bool async_req: execute request asynchronously
:param str underlying: Underlying (Obtained by listing underlying endpoint) (required)
:param str contract: Options contract name
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
- :param int _from: Start timestamp
- :param int to: End timestamp
+ :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
+ :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2754,40 +3017,42 @@ def list_my_options_trades_with_http_info(self, underlying, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['underlying', 'contract', 'limit', 'offset', '_from', 'to']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'underlying',
+ 'contract',
+ 'limit',
+ 'offset',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_my_options_trades" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_my_options_trades" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'underlying' is set
- if self.api_client.client_side_validation and (
- 'underlying' not in local_var_params or local_var_params['underlying'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `underlying` when calling `list_my_options_trades`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_my_options_trades`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_my_options_trades`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_my_options_trades`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501
+ local_var_params['underlying'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `underlying` when calling `list_my_options_trades`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_options_trades`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_options_trades`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_my_options_trades`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -2813,14 +3078,14 @@ def list_my_options_trades_with_http_info(self, underlying, **kwargs): # noqa:
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/options/my_trades',
- 'GET',
+ '/options/my_trades', 'GET',
path_params,
query_params,
header_params,
@@ -2833,5 +3098,344 @@ def list_my_options_trades_with_http_info(self, underlying, **kwargs): # noqa:
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def get_options_mmp(self, **kwargs): # noqa: E501
+ """MMP Query. # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_options_mmp(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str underlying: Underlying
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.OptionsMMP]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_options_mmp_with_http_info(**kwargs) # noqa: E501
+
+ def get_options_mmp_with_http_info(self, **kwargs): # noqa: E501
+ """MMP Query. # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_options_mmp_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str underlying: Underlying
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.OptionsMMP], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'underlying'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_options_mmp" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501
+ query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/options/mmp', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[OptionsMMP]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def set_options_mmp(self, options_mmp, **kwargs): # noqa: E501
+ """MMP Settings # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.set_options_mmp(options_mmp, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param OptionsMMP options_mmp: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.OptionsMMP
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.set_options_mmp_with_http_info(options_mmp, **kwargs) # noqa: E501
+
+ def set_options_mmp_with_http_info(self, options_mmp, **kwargs): # noqa: E501
+ """MMP Settings # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.set_options_mmp_with_http_info(options_mmp, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param OptionsMMP options_mmp: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.OptionsMMP, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'options_mmp'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method set_options_mmp" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'options_mmp' is set
+ if self.api_client.client_side_validation and ('options_mmp' not in local_var_params or # noqa: E501
+ local_var_params['options_mmp'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `options_mmp` when calling `set_options_mmp`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'options_mmp' in local_var_params:
+ body_params = local_var_params['options_mmp']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/options/mmp', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='OptionsMMP', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def reset_options_mmp(self, options_mmp_reset, **kwargs): # noqa: E501
+ """MMP Reset # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.reset_options_mmp(options_mmp_reset, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param OptionsMMPReset options_mmp_reset: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.OptionsMMP
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.reset_options_mmp_with_http_info(options_mmp_reset, **kwargs) # noqa: E501
+
+ def reset_options_mmp_with_http_info(self, options_mmp_reset, **kwargs): # noqa: E501
+ """MMP Reset # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.reset_options_mmp_with_http_info(options_mmp_reset, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param OptionsMMPReset options_mmp_reset: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.OptionsMMP, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'options_mmp_reset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method reset_options_mmp" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'options_mmp_reset' is set
+ if self.api_client.client_side_validation and ('options_mmp_reset' not in local_var_params or # noqa: E501
+ local_var_params['options_mmp_reset'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `options_mmp_reset` when calling `reset_options_mmp`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'options_mmp_reset' in local_var_params:
+ body_params = local_var_params['options_mmp_reset']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/options/mmp/reset', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='OptionsMMP', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/gate_api/api/rebate_api.py b/gate_api/api/rebate_api.py
index 81d3af3..f04f15e 100644
--- a/gate_api/api/rebate_api.py
+++ b/gate_api/api/rebate_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class RebateApi(object):
@@ -34,20 +37,20 @@ def __init__(self, api_client=None):
self.api_client = api_client
def agency_transaction_history(self, **kwargs): # noqa: E501
- """The broker obtains the transaction history of the recommended user # noqa: E501
+ """Broker obtains transaction history of recommended users # noqa: E501
- Record time range cannot exceed 30 days # noqa: E501
+ Record query time range cannot exceed 30 days # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.agency_transaction_history(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs
- :param str user_id: User ID. If not specified, all user records will be returned
- :param int _from: Time range beginning, default to 7 days before current time
- :param int to: Time range ending, default to current time
- :param int limit: Maximum number of records to be returned in a single list
+ :param str currency_pair: Specify the trading pair. If not specified, returns all trading pairs
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -64,20 +67,20 @@ def agency_transaction_history(self, **kwargs): # noqa: E501
return self.agency_transaction_history_with_http_info(**kwargs) # noqa: E501
def agency_transaction_history_with_http_info(self, **kwargs): # noqa: E501
- """The broker obtains the transaction history of the recommended user # noqa: E501
+ """Broker obtains transaction history of recommended users # noqa: E501
- Record time range cannot exceed 30 days # noqa: E501
+ Record query time range cannot exceed 30 days # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.agency_transaction_history_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs
- :param str user_id: User ID. If not specified, all user records will be returned
- :param int _from: Time range beginning, default to 7 days before current time
- :param int to: Time range ending, default to current time
- :param int limit: Maximum number of records to be returned in a single list
+ :param str currency_pair: Specify the trading pair. If not specified, returns all trading pairs
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _return_http_data_only: response data without head status code
and headers
@@ -95,35 +98,38 @@ def agency_transaction_history_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency_pair', 'user_id', '_from', 'to', 'limit', 'offset']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair',
+ 'user_id',
+ '_from',
+ 'to',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method agency_transaction_history" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method agency_transaction_history" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `agency_transaction_history`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `agency_transaction_history`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `agency_transaction_history`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `agency_transaction_history`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `agency_transaction_history`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `agency_transaction_history`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -149,14 +155,14 @@ def agency_transaction_history_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/rebate/agency/transaction_history',
- 'GET',
+ '/rebate/agency/transaction_history', 'GET',
path_params,
query_params,
header_params,
@@ -169,24 +175,24 @@ def agency_transaction_history_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def agency_commissions_history(self, **kwargs): # noqa: E501
- """The broker obtains the commission history of the recommended user # noqa: E501
+ """Broker obtains rebate history of recommended users # noqa: E501
- Record time range cannot exceed 30 days # noqa: E501
+ Record query time range cannot exceed 30 days # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.agency_commissions_history(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Filter by currency. Return all currency records if not specified
- :param str user_id: User ID. If not specified, all user records will be returned
- :param int _from: Time range beginning, default to 7 days before current time
- :param int to: Time range ending, default to current time
- :param int limit: Maximum number of records to be returned in a single list
+ :param str currency: Specify the currency. If not specified, returns all currencies
+ :param int commission_type: Rebate type: 1 - Direct rebate, 2 - Indirect rebate, 3 - Self rebate
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -203,20 +209,21 @@ def agency_commissions_history(self, **kwargs): # noqa: E501
return self.agency_commissions_history_with_http_info(**kwargs) # noqa: E501
def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501
- """The broker obtains the commission history of the recommended user # noqa: E501
+ """Broker obtains rebate history of recommended users # noqa: E501
- Record time range cannot exceed 30 days # noqa: E501
+ Record query time range cannot exceed 30 days # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.agency_commissions_history_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Filter by currency. Return all currency records if not specified
- :param str user_id: User ID. If not specified, all user records will be returned
- :param int _from: Time range beginning, default to 7 days before current time
- :param int to: Time range ending, default to current time
- :param int limit: Maximum number of records to be returned in a single list
+ :param str currency: Specify the currency. If not specified, returns all currencies
+ :param int commission_type: Rebate type: 1 - Direct rebate, 2 - Indirect rebate, 3 - Self rebate
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _return_http_data_only: response data without head status code
and headers
@@ -234,35 +241,39 @@ def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency', 'user_id', '_from', 'to', 'limit', 'offset']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency',
+ 'commission_type',
+ 'user_id',
+ '_from',
+ 'to',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method agency_commissions_history" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method agency_commissions_history" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `agency_commissions_history`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `agency_commissions_history`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `agency_commissions_history`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `agency_commissions_history`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `agency_commissions_history`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `agency_commissions_history`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -270,6 +281,8 @@ def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501
query_params = []
if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if 'commission_type' in local_var_params and local_var_params['commission_type'] is not None: # noqa: E501
+ query_params.append(('commission_type', local_var_params['commission_type'])) # noqa: E501
if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501
query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501
if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
@@ -288,14 +301,14 @@ def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/rebate/agency/commission_history',
- 'GET',
+ '/rebate/agency/commission_history', 'GET',
path_params,
query_params,
header_params,
@@ -308,5 +321,901 @@ def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def partner_transaction_history(self, **kwargs): # noqa: E501
+ """Partner obtains transaction history of recommended users # noqa: E501
+
+ Record query time range cannot exceed 30 days # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.partner_transaction_history(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency_pair: Specify the trading pair. If not specified, returns all trading pairs
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.PartnerTransactionHistory
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.partner_transaction_history_with_http_info(**kwargs) # noqa: E501
+
+ def partner_transaction_history_with_http_info(self, **kwargs): # noqa: E501
+ """Partner obtains transaction history of recommended users # noqa: E501
+
+ Record query time range cannot exceed 30 days # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.partner_transaction_history_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency_pair: Specify the trading pair. If not specified, returns all trading pairs
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.PartnerTransactionHistory, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currency_pair',
+ 'user_id',
+ '_from',
+ 'to',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method partner_transaction_history" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `partner_transaction_history`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `partner_transaction_history`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `partner_transaction_history`, must be a value greater than or equal to `0`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501
+ query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501
+ if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501
+ query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/rebate/partner/transaction_history', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='PartnerTransactionHistory', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def partner_commissions_history(self, **kwargs): # noqa: E501
+ """Partner obtains rebate records of recommended users # noqa: E501
+
+ Record query time range cannot exceed 30 days # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.partner_commissions_history(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Specify the currency. If not specified, returns all currencies
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.PartnerCommissionHistory
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.partner_commissions_history_with_http_info(**kwargs) # noqa: E501
+
+ def partner_commissions_history_with_http_info(self, **kwargs): # noqa: E501
+ """Partner obtains rebate records of recommended users # noqa: E501
+
+ Record query time range cannot exceed 30 days # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.partner_commissions_history_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Specify the currency. If not specified, returns all currencies
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.PartnerCommissionHistory, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currency',
+ 'user_id',
+ '_from',
+ 'to',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method partner_commissions_history" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `partner_commissions_history`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `partner_commissions_history`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `partner_commissions_history`, must be a value greater than or equal to `0`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501
+ query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/rebate/partner/commission_history', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='PartnerCommissionHistory', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def partner_sub_list(self, **kwargs): # noqa: E501
+ """Partner subordinate list # noqa: E501
+
+ Including sub-agents, direct customers, and indirect customers # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.partner_sub_list(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.PartnerSubList
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.partner_sub_list_with_http_info(**kwargs) # noqa: E501
+
+ def partner_sub_list_with_http_info(self, **kwargs): # noqa: E501
+ """Partner subordinate list # noqa: E501
+
+ Including sub-agents, direct customers, and indirect customers # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.partner_sub_list_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.PartnerSubList, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'user_id',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method partner_sub_list" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `partner_sub_list`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `partner_sub_list`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `partner_sub_list`, must be a value greater than or equal to `0`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501
+ query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/rebate/partner/sub_list', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='PartnerSubList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def rebate_broker_commission_history(self, **kwargs): # noqa: E501
+ """Broker obtains user's rebate records # noqa: E501
+
+ Record query time range cannot exceed 30 days # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.rebate_broker_commission_history(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int _from: Start time of the query record. If not specified, defaults to 30 days before the current time
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.BrokerCommission]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.rebate_broker_commission_history_with_http_info(**kwargs) # noqa: E501
+
+ def rebate_broker_commission_history_with_http_info(self, **kwargs): # noqa: E501
+ """Broker obtains user's rebate records # noqa: E501
+
+ Record query time range cannot exceed 30 days # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.rebate_broker_commission_history_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int _from: Start time of the query record. If not specified, defaults to 30 days before the current time
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.BrokerCommission], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'limit',
+ 'offset',
+ 'user_id',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method rebate_broker_commission_history" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `rebate_broker_commission_history`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `rebate_broker_commission_history`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `rebate_broker_commission_history`, must be a value greater than or equal to `0`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
+ if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501
+ query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/rebate/broker/commission_history', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[BrokerCommission]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def rebate_broker_transaction_history(self, **kwargs): # noqa: E501
+ """Broker obtains user's trading history # noqa: E501
+
+ Record query time range cannot exceed 30 days # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.rebate_broker_transaction_history(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int _from: Start time of the query record. If not specified, defaults to 30 days before the current time
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.BrokerTransaction]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.rebate_broker_transaction_history_with_http_info(**kwargs) # noqa: E501
+
+ def rebate_broker_transaction_history_with_http_info(self, **kwargs): # noqa: E501
+ """Broker obtains user's trading history # noqa: E501
+
+ Record query time range cannot exceed 30 days # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.rebate_broker_transaction_history_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int limit: Maximum number of records returned in a single list
+ :param int offset: List offset, starting from 0
+ :param int user_id: User ID. If not specified, all user records will be returned
+ :param int _from: Start time of the query record. If not specified, defaults to 30 days before the current time
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.BrokerTransaction], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'limit',
+ 'offset',
+ 'user_id',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method rebate_broker_transaction_history" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `rebate_broker_transaction_history`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `rebate_broker_transaction_history`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `rebate_broker_transaction_history`, must be a value greater than or equal to `0`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
+ if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501
+ query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/rebate/broker/transaction_history', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[BrokerTransaction]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def rebate_user_info(self, **kwargs): # noqa: E501
+ """User obtains rebate information # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.rebate_user_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.RebateUserInfo]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.rebate_user_info_with_http_info(**kwargs) # noqa: E501
+
+ def rebate_user_info_with_http_info(self, **kwargs): # noqa: E501
+ """User obtains rebate information # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.rebate_user_info_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.RebateUserInfo], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method rebate_user_info" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/rebate/user/info', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[RebateUserInfo]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def user_sub_relation(self, user_id_list, **kwargs): # noqa: E501
+ """User subordinate relationship # noqa: E501
+
+ Query whether the specified user is within the system # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.user_sub_relation(user_id_list, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str user_id_list: Query user ID list, separated by commas. If more than 100, only 100 will be returned (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.UserSubRelation
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.user_sub_relation_with_http_info(user_id_list, **kwargs) # noqa: E501
+
+ def user_sub_relation_with_http_info(self, user_id_list, **kwargs): # noqa: E501
+ """User subordinate relationship # noqa: E501
+
+ Query whether the specified user is within the system # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.user_sub_relation_with_http_info(user_id_list, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str user_id_list: Query user ID list, separated by commas. If more than 100, only 100 will be returned (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.UserSubRelation, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'user_id_list'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method user_sub_relation" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'user_id_list' is set
+ if self.api_client.client_side_validation and ('user_id_list' not in local_var_params or # noqa: E501
+ local_var_params['user_id_list'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `user_id_list` when calling `user_sub_relation`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'user_id_list' in local_var_params and local_var_params['user_id_list'] is not None: # noqa: E501
+ query_params.append(('user_id_list', local_var_params['user_id_list'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/rebate/user/sub_relation', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UserSubRelation', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/gate_api/api/spot_api.py b/gate_api/api/spot_api.py
index 8889db2..1894742 100644
--- a/gate_api/api/spot_api.py
+++ b/gate_api/api/spot_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class SpotApi(object):
@@ -34,9 +37,9 @@ def __init__(self, api_client=None):
self.api_client = api_client
def list_currencies(self, **kwargs): # noqa: E501
- """List all currencies' details # noqa: E501
+ """Query all currency information # noqa: E501
- Currency has two forms: 1. Only currency name, e.g., BTC, USDT 2. `_`, e.g., `HT_ETH` The latter one occurs when one currency has multiple chains. Currency detail contains a `chain` field whatever the form is. To retrieve all chains of one currency, you can use use all the details which has the name of the currency or name starting with `_`. # noqa: E501
+ When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_currencies(async_req=True)
@@ -58,9 +61,9 @@ def list_currencies(self, **kwargs): # noqa: E501
return self.list_currencies_with_http_info(**kwargs) # noqa: E501
def list_currencies_with_http_info(self, **kwargs): # noqa: E501
- """List all currencies' details # noqa: E501
+ """Query all currency information # noqa: E501
- Currency has two forms: 1. Only currency name, e.g., BTC, USDT 2. `_`, e.g., `HT_ETH` The latter one occurs when one currency has multiple chains. Currency detail contains a `chain` field whatever the form is. To retrieve all chains of one currency, you can use use all the details which has the name of the currency or name starting with `_`. # noqa: E501
+ When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_currencies_with_http_info(async_req=True)
@@ -83,12 +86,23 @@ def list_currencies_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_currencies" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_currencies" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -105,14 +119,14 @@ def list_currencies_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/spot/currencies',
- 'GET',
+ '/spot/currencies', 'GET',
path_params,
query_params,
header_params,
@@ -125,11 +139,10 @@ def list_currencies_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_currency(self, currency, **kwargs): # noqa: E501
- """Get details of a specific currency # noqa: E501
+ """Query single currency information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -153,7 +166,7 @@ def get_currency(self, currency, **kwargs): # noqa: E501
return self.get_currency_with_http_info(currency, **kwargs) # noqa: E501
def get_currency_with_http_info(self, currency, **kwargs): # noqa: E501
- """Get details of a specific currency # noqa: E501
+ """Query single currency information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -178,18 +191,29 @@ def get_currency_with_http_info(self, currency, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_currency" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_currency" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `currency` when calling `get_currency`") # noqa: E501
collection_formats = {}
@@ -207,14 +231,14 @@ def get_currency_with_http_info(self, currency, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/spot/currencies/{currency}',
- 'GET',
+ '/spot/currencies/{currency}', 'GET',
path_params,
query_params,
header_params,
@@ -227,11 +251,10 @@ def get_currency_with_http_info(self, currency, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_currency_pairs(self, **kwargs): # noqa: E501
- """List all currency pairs supported # noqa: E501
+ """Query all supported currency pairs # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -254,7 +277,7 @@ def list_currency_pairs(self, **kwargs): # noqa: E501
return self.list_currency_pairs_with_http_info(**kwargs) # noqa: E501
def list_currency_pairs_with_http_info(self, **kwargs): # noqa: E501
- """List all currency pairs supported # noqa: E501
+ """Query all supported currency pairs # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -278,12 +301,23 @@ def list_currency_pairs_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_currency_pairs" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_currency_pairs" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -300,14 +334,14 @@ def list_currency_pairs_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/spot/currency_pairs',
- 'GET',
+ '/spot/currency_pairs', 'GET',
path_params,
query_params,
header_params,
@@ -320,11 +354,10 @@ def list_currency_pairs_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_currency_pair(self, currency_pair, **kwargs): # noqa: E501
- """Get details of a specifc currency pair # noqa: E501
+ """Query single currency pair details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -348,7 +381,7 @@ def get_currency_pair(self, currency_pair, **kwargs): # noqa: E501
return self.get_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501
def get_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501
- """Get details of a specifc currency pair # noqa: E501
+ """Query single currency pair details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -373,21 +406,30 @@ def get_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E5
local_var_params = locals()
- all_params = ['currency_pair']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_currency_pair" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_currency_pair" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency_pair' is set
- if self.api_client.client_side_validation and (
- 'currency_pair' not in local_var_params or local_var_params['currency_pair'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency_pair` when calling `get_currency_pair`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501
+ local_var_params['currency_pair'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_currency_pair`") # noqa: E501
collection_formats = {}
@@ -404,14 +446,14 @@ def get_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E5
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/spot/currency_pairs/{currency_pair}',
- 'GET',
+ '/spot/currency_pairs/{currency_pair}', 'GET',
path_params,
query_params,
header_params,
@@ -424,13 +466,12 @@ def get_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E5
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_tickers(self, **kwargs): # noqa: E501
- """Retrieve ticker information # noqa: E501
+ """Get currency pair ticker information # noqa: E501
- Return only related data if `currency_pair` is specified; otherwise return all of them # noqa: E501
+ If `currency_pair` is specified, only query that currency pair; otherwise return all information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_tickers(async_req=True)
@@ -454,9 +495,9 @@ def list_tickers(self, **kwargs): # noqa: E501
return self.list_tickers_with_http_info(**kwargs) # noqa: E501
def list_tickers_with_http_info(self, **kwargs): # noqa: E501
- """Retrieve ticker information # noqa: E501
+ """Get currency pair ticker information # noqa: E501
- Return only related data if `currency_pair` is specified; otherwise return all of them # noqa: E501
+ If `currency_pair` is specified, only query that currency pair; otherwise return all information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_tickers_with_http_info(async_req=True)
@@ -481,12 +522,25 @@ def list_tickers_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency_pair', 'timezone']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair',
+ 'timezone'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_tickers" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_tickers" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -507,14 +561,14 @@ def list_tickers_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/spot/tickers',
- 'GET',
+ '/spot/tickers', 'GET',
path_params,
query_params,
header_params,
@@ -527,13 +581,12 @@ def list_tickers_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_order_book(self, currency_pair, **kwargs): # noqa: E501
- """Retrieve order book # noqa: E501
+ """Get market depth information # noqa: E501
- Order book will be sorted by price from high to low on bids; low to high on asks # noqa: E501
+ Market depth buy orders are sorted by price from high to low, sell orders are sorted from low to high # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_order_book(currency_pair, async_req=True)
@@ -541,9 +594,9 @@ def list_order_book(self, currency_pair, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str currency_pair: Currency pair (required)
- :param str interval: Order depth. 0 means no aggregation is applied. default to 0
- :param int limit: Maximum number of order depth data in asks or bids
- :param bool with_id: Return order book ID
+ :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified
+ :param int limit: Number of depth levels
+ :param bool with_id: Return order book update ID
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -559,9 +612,9 @@ def list_order_book(self, currency_pair, **kwargs): # noqa: E501
return self.list_order_book_with_http_info(currency_pair, **kwargs) # noqa: E501
def list_order_book_with_http_info(self, currency_pair, **kwargs): # noqa: E501
- """Retrieve order book # noqa: E501
+ """Get market depth information # noqa: E501
- Order book will be sorted by price from high to low on bids; low to high on asks # noqa: E501
+ Market depth buy orders are sorted by price from high to low, sell orders are sorted from low to high # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_order_book_with_http_info(currency_pair, async_req=True)
@@ -569,9 +622,9 @@ def list_order_book_with_http_info(self, currency_pair, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str currency_pair: Currency pair (required)
- :param str interval: Order depth. 0 means no aggregation is applied. default to 0
- :param int limit: Maximum number of order depth data in asks or bids
- :param bool with_id: Return order book ID
+ :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified
+ :param int limit: Number of depth levels
+ :param bool with_id: Return order book update ID
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -588,28 +641,36 @@ def list_order_book_with_http_info(self, currency_pair, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency_pair', 'interval', 'limit', 'with_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair',
+ 'interval',
+ 'limit',
+ 'with_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_order_book" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_order_book" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency_pair' is set
- if self.api_client.client_side_validation and (
- 'currency_pair' not in local_var_params or local_var_params['currency_pair'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency_pair` when calling `list_order_book`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_order_book`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501
+ local_var_params['currency_pair'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency_pair` when calling `list_order_book`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_order_book`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -631,14 +692,14 @@ def list_order_book_with_http_info(self, currency_pair, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/spot/order_book',
- 'GET',
+ '/spot/order_book', 'GET',
path_params,
query_params,
header_params,
@@ -651,13 +712,12 @@ def list_order_book_with_http_info(self, currency_pair, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_trades(self, currency_pair, **kwargs): # noqa: E501
- """Retrieve market trades # noqa: E501
+ """Query market transaction records # noqa: E501
- You can use `from` and `to` to query by time range, or use `last_id` by scrolling page. The default behavior is by time range. Scrolling query using `last_id` is not recommended any more. If `last_id` is specified, time range query parameters will be ignored. # noqa: E501
+ Supports querying by time range using `from` and `to` parameters or pagination based on `last_id`. By default, queries the last 30 days. Pagination based on `last_id` is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. When using limit&page pagination to retrieve data, the maximum number of pages is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_trades(currency_pair, async_req=True)
@@ -665,11 +725,11 @@ def list_trades(self, currency_pair, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str currency_pair: Currency pair (required)
- :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000
- :param str last_id: Specify list staring point using the `id` of last record in previous list-query results
- :param bool reverse: Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified.
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
+ :param int limit: Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000
+ :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used
+ :param bool reverse: Whether to retrieve data less than `last_id`. Default returns records greater than `last_id`. Set to `true` to trace back market trade records, `false` to get latest trades. No effect when `last_id` is not set.
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
:param int page: Page number
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -686,9 +746,9 @@ def list_trades(self, currency_pair, **kwargs): # noqa: E501
return self.list_trades_with_http_info(currency_pair, **kwargs) # noqa: E501
def list_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501
- """Retrieve market trades # noqa: E501
+ """Query market transaction records # noqa: E501
- You can use `from` and `to` to query by time range, or use `last_id` by scrolling page. The default behavior is by time range. Scrolling query using `last_id` is not recommended any more. If `last_id` is specified, time range query parameters will be ignored. # noqa: E501
+ Supports querying by time range using `from` and `to` parameters or pagination based on `last_id`. By default, queries the last 30 days. Pagination based on `last_id` is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. When using limit&page pagination to retrieve data, the maximum number of pages is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_trades_with_http_info(currency_pair, async_req=True)
@@ -696,11 +756,11 @@ def list_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str currency_pair: Currency pair (required)
- :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000
- :param str last_id: Specify list staring point using the `id` of last record in previous list-query results
- :param bool reverse: Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified.
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
+ :param int limit: Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000
+ :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used
+ :param bool reverse: Whether to retrieve data less than `last_id`. Default returns records greater than `last_id`. Set to `true` to trace back market trade records, `false` to get latest trades. No effect when `last_id` is not set.
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
:param int page: Page number
:param _return_http_data_only: response data without head status code
and headers
@@ -718,40 +778,43 @@ def list_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency_pair', 'limit', 'last_id', 'reverse', '_from', 'to', 'page']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair',
+ 'limit',
+ 'last_id',
+ 'reverse',
+ '_from',
+ 'to',
+ 'page'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_trades" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_trades" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency_pair' is set
- if self.api_client.client_side_validation and (
- 'currency_pair' not in local_var_params or local_var_params['currency_pair'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency_pair` when calling `list_trades`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_trades`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_trades`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_trades`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501
+ local_var_params['currency_pair'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency_pair` when calling `list_trades`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_trades`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_trades`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_trades`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -779,14 +842,14 @@ def list_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/spot/trades',
- 'GET',
+ '/spot/trades', 'GET',
path_params,
query_params,
header_params,
@@ -799,11 +862,10 @@ def list_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_candlesticks(self, currency_pair, **kwargs): # noqa: E501
- """Market candlesticks # noqa: E501
+ """Market K-line chart # noqa: E501
Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -813,10 +875,10 @@ def list_candlesticks(self, currency_pair, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str currency_pair: Currency pair (required)
- :param int limit: 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝
- :param int _from: 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间
- :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time
- :param str interval: Interval time between data points. Note that `30d` means 1 natual month, not 30 days
+ :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected.
+ :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified
+ :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision
+ :param str interval: Time interval between data points. Note that `30d` represents a calendar month, not aligned to 30 days
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -832,7 +894,7 @@ def list_candlesticks(self, currency_pair, **kwargs): # noqa: E501
return self.list_candlesticks_with_http_info(currency_pair, **kwargs) # noqa: E501
def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E501
- """Market candlesticks # noqa: E501
+ """Market K-line chart # noqa: E501
Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -842,10 +904,10 @@ def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E5
:param bool async_req: execute request asynchronously
:param str currency_pair: Currency pair (required)
- :param int limit: 指定数据点的数量,适用于取最近 `limit` 数量的数据,该字段与 `from`, `to` 互斥,如果指定了 `from`, `to` 中的任意字段,该字段会被拒绝
- :param int _from: 指定 K 线图的起始时间,注意时间格式为秒(s)精度的 Unix 时间戳,不指定则默认为 to - 100 * interval,即向前最多 100 个点的时间
- :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time
- :param str interval: Interval time between data points. Note that `30d` means 1 natual month, not 30 days
+ :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected.
+ :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified
+ :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision
+ :param str interval: Time interval between data points. Note that `30d` represents a calendar month, not aligned to 30 days
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -862,28 +924,37 @@ def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E5
local_var_params = locals()
- all_params = ['currency_pair', 'limit', '_from', 'to', 'interval']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair',
+ 'limit',
+ '_from',
+ 'to',
+ 'interval'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_candlesticks" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_candlesticks" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency_pair' is set
- if self.api_client.client_side_validation and (
- 'currency_pair' not in local_var_params or local_var_params['currency_pair'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency_pair` when calling `list_candlesticks`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_candlesticks`, must be a value less than or equal to `1000`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501
+ local_var_params['currency_pair'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency_pair` when calling `list_candlesticks`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_candlesticks`, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -907,14 +978,14 @@ def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E5
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/spot/candlesticks',
- 'GET',
+ '/spot/candlesticks', 'GET',
path_params,
query_params,
header_params,
@@ -927,20 +998,19 @@ def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E5
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_fee(self, **kwargs): # noqa: E501
- """Query user trading fee rates # noqa: E501
+ """Query account fee rates # noqa: E501
- This API is deprecated in favour of new fee retrieving API `/wallet/fee`. # noqa: E501
+ This API is deprecated. The new fee query API is `/wallet/fee` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_fee(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs
+ :param str currency_pair: Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs.
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -948,7 +1018,7 @@ def get_fee(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: gate_api.TradeFee
+ :rtype: gate_api.SpotFee
:return: If the method is called asynchronously,
returns the request thread.
"""
@@ -956,16 +1026,16 @@ def get_fee(self, **kwargs): # noqa: E501
return self.get_fee_with_http_info(**kwargs) # noqa: E501
def get_fee_with_http_info(self, **kwargs): # noqa: E501
- """Query user trading fee rates # noqa: E501
+ """Query account fee rates # noqa: E501
- This API is deprecated in favour of new fee retrieving API `/wallet/fee`. # noqa: E501
+ This API is deprecated. The new fee query API is `/wallet/fee` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_fee_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs
+ :param str currency_pair: Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs.
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -975,19 +1045,31 @@ def get_fee_with_http_info(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(gate_api.TradeFee, status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(gate_api.SpotFee, status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['currency_pair']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_fee" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_fee" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -1006,31 +1088,30 @@ def get_fee_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/fee',
- 'GET',
+ '/spot/fee', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='TradeFee', # noqa: E501
+ response_type='SpotFee', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_batch_spot_fee(self, currency_pairs, **kwargs): # noqa: E501
- """Query a batch of user trading fee rates # noqa: E501
+ """Batch query account fee rates # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1038,7 +1119,7 @@ def get_batch_spot_fee(self, currency_pairs, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pairs: A request can only query up to 50 currency pairs (required)
+ :param str currency_pairs: Maximum 50 currency pairs per request (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1054,7 +1135,7 @@ def get_batch_spot_fee(self, currency_pairs, **kwargs): # noqa: E501
return self.get_batch_spot_fee_with_http_info(currency_pairs, **kwargs) # noqa: E501
def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa: E501
- """Query a batch of user trading fee rates # noqa: E501
+ """Batch query account fee rates # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1062,7 +1143,7 @@ def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa:
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pairs: A request can only query up to 50 currency pairs (required)
+ :param str currency_pairs: Maximum 50 currency pairs per request (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1079,21 +1160,30 @@ def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['currency_pairs']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pairs'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_batch_spot_fee" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_batch_spot_fee" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency_pairs' is set
- if self.api_client.client_side_validation and (
- 'currency_pairs' not in local_var_params or local_var_params['currency_pairs'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency_pairs` when calling `get_batch_spot_fee`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency_pairs' not in local_var_params or # noqa: E501
+ local_var_params['currency_pairs'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency_pairs` when calling `get_batch_spot_fee`") # noqa: E501
collection_formats = {}
@@ -1110,14 +1200,14 @@ def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa:
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/batch_fee',
- 'GET',
+ '/spot/batch_fee', 'GET',
path_params,
query_params,
header_params,
@@ -1130,11 +1220,10 @@ def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa:
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_spot_accounts(self, **kwargs): # noqa: E501
- """List spot accounts # noqa: E501
+ """List spot trading accounts # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1142,7 +1231,7 @@ def list_spot_accounts(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1158,7 +1247,7 @@ def list_spot_accounts(self, **kwargs): # noqa: E501
return self.list_spot_accounts_with_http_info(**kwargs) # noqa: E501
def list_spot_accounts_with_http_info(self, **kwargs): # noqa: E501
- """List spot accounts # noqa: E501
+ """List spot trading accounts # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1166,7 +1255,7 @@ def list_spot_accounts_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1183,12 +1272,24 @@ def list_spot_accounts_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_spot_accounts" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_spot_accounts" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -1207,14 +1308,14 @@ def list_spot_accounts_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/accounts',
- 'GET',
+ '/spot/accounts', 'GET',
path_params,
query_params,
header_params,
@@ -1227,25 +1328,25 @@ def list_spot_accounts_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_spot_account_book(self, **kwargs): # noqa: E501
- """Query account book # noqa: E501
+ """Query spot account transaction history # noqa: E501
- Record time range cannot exceed 30 days # noqa: E501
+ Record query time range cannot exceed 30 days. When using limit&page pagination to retrieve data, the maximum number of pages is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_spot_account_book(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
+ :param str currency: Query by specified currency name
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
:param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
- :param str type: Only retrieve changes of the specified type. All types will be returned if not specified.
+ :param int limit: Maximum number of records returned in a single list
+ :param str type: Query by specified account change type. If not specified, all change types will be included.
+ :param str code: Specify account change code for query. If not specified, all change types are included. This parameter has higher priority than `type`
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1261,21 +1362,22 @@ def list_spot_account_book(self, **kwargs): # noqa: E501
return self.list_spot_account_book_with_http_info(**kwargs) # noqa: E501
def list_spot_account_book_with_http_info(self, **kwargs): # noqa: E501
- """Query account book # noqa: E501
+ """Query spot account transaction history # noqa: E501
- Record time range cannot exceed 30 days # noqa: E501
+ Record query time range cannot exceed 30 days. When using limit&page pagination to retrieve data, the maximum number of pages is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_spot_account_book_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
+ :param str currency: Query by specified currency name
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
:param int page: Page number
- :param int limit: Maximum number of records to be returned in a single list
- :param str type: Only retrieve changes of the specified type. All types will be returned if not specified.
+ :param int limit: Maximum number of records returned in a single list
+ :param str type: Query by specified account change type. If not specified, all change types will be included.
+ :param str code: Specify account change code for query. If not specified, all change types are included. This parameter has higher priority than `type`
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1292,33 +1394,39 @@ def list_spot_account_book_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency', '_from', 'to', 'page', 'limit', 'type']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency',
+ '_from',
+ 'to',
+ 'page',
+ 'limit',
+ 'type',
+ 'code'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_spot_account_book" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_spot_account_book" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_spot_account_book`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_spot_account_book`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_spot_account_book`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_spot_account_book`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_spot_account_book`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_spot_account_book`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1336,6 +1444,8 @@ def list_spot_account_book_with_http_info(self, **kwargs): # noqa: E501
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501
query_params.append(('type', local_var_params['type'])) # noqa: E501
+ if 'code' in local_var_params and local_var_params['code'] is not None: # noqa: E501
+ query_params.append(('code', local_var_params['code'])) # noqa: E501
header_params = {}
@@ -1344,14 +1454,14 @@ def list_spot_account_book_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/account_book',
- 'GET',
+ '/spot/account_book', 'GET',
path_params,
query_params,
header_params,
@@ -1364,13 +1474,12 @@ def list_spot_account_book_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_batch_orders(self, order, **kwargs): # noqa: E501
- """Create a batch of orders # noqa: E501
+ """Batch place orders # noqa: E501
- Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders # noqa: E501
+ Batch order requirements: 1. Custom order field `text` must be specified 2. Up to 4 currency pairs per request, with up to 10 orders per currency pair 3. Spot orders and margin orders cannot be mixed; all `account` fields in the same request must be identical # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_batch_orders(order, async_req=True)
@@ -1378,6 +1487,7 @@ def create_batch_orders(self, order, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param list[Order] order: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1393,9 +1503,9 @@ def create_batch_orders(self, order, **kwargs): # noqa: E501
return self.create_batch_orders_with_http_info(order, **kwargs) # noqa: E501
def create_batch_orders_with_http_info(self, order, **kwargs): # noqa: E501
- """Create a batch of orders # noqa: E501
+ """Batch place orders # noqa: E501
- Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders # noqa: E501
+ Batch order requirements: 1. Custom order field `text` must be specified 2. Up to 4 currency pairs per request, with up to 10 orders per currency pair 3. Spot orders and margin orders cannot be mixed; all `account` fields in the same request must be identical # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_batch_orders_with_http_info(order, async_req=True)
@@ -1403,6 +1513,7 @@ def create_batch_orders_with_http_info(self, order, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param list[Order] order: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1419,21 +1530,31 @@ def create_batch_orders_with_http_info(self, order, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['order']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'order',
+ 'x_gate_exptime'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_batch_orders" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_batch_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'order' is set
- if self.api_client.client_side_validation and (
- 'order' not in local_var_params or local_var_params['order'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order` when calling `create_batch_orders`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order' not in local_var_params or # noqa: E501
+ local_var_params['order'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order` when calling `create_batch_orders`") # noqa: E501
collection_formats = {}
@@ -1442,6 +1563,8 @@ def create_batch_orders_with_http_info(self, order, **kwargs): # noqa: E501
query_params = []
header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
form_params = []
local_var_files = {}
@@ -1450,19 +1573,18 @@ def create_batch_orders_with_http_info(self, order, **kwargs): # noqa: E501
if 'order' in local_var_params:
body_params = local_var_params['order']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/batch_orders',
- 'POST',
+ '/spot/batch_orders', 'POST',
path_params,
query_params,
header_params,
@@ -1475,13 +1597,12 @@ def create_batch_orders_with_http_info(self, order, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_all_open_orders(self, **kwargs): # noqa: E501
"""List all open orders # noqa: E501
- List open orders in all currency pairs. Note that pagination parameters affect record number in each currency pair's open order list. No pagination is applied to the number of currency pairs returned. All currency pairs with open orders will be returned. Spot and margin orders are returned by default. To list cross margin orders, `account` must be set to `cross_margin` # noqa: E501
+ Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control trading pairs. All trading pairs with pending orders will be returned. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_all_open_orders(async_req=True)
@@ -1490,7 +1611,7 @@ def list_all_open_orders(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param int page: Page number
:param int limit: Maximum number of records returned in one page in each currency pair
- :param str account: Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only
+ :param str account: Specify query account
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1508,7 +1629,7 @@ def list_all_open_orders(self, **kwargs): # noqa: E501
def list_all_open_orders_with_http_info(self, **kwargs): # noqa: E501
"""List all open orders # noqa: E501
- List open orders in all currency pairs. Note that pagination parameters affect record number in each currency pair's open order list. No pagination is applied to the number of currency pairs returned. All currency pairs with open orders will be returned. Spot and margin orders are returned by default. To list cross margin orders, `account` must be set to `cross_margin` # noqa: E501
+ Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control trading pairs. All trading pairs with pending orders will be returned. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_all_open_orders_with_http_info(async_req=True)
@@ -1517,7 +1638,7 @@ def list_all_open_orders_with_http_info(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param int page: Page number
:param int limit: Maximum number of records returned in one page in each currency pair
- :param str account: Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only
+ :param str account: Specify query account
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1534,33 +1655,35 @@ def list_all_open_orders_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['page', 'limit', 'account']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'page',
+ 'limit',
+ 'account'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_all_open_orders" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_all_open_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_all_open_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_all_open_orders`, must be a value less than or equal to `100`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_all_open_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_all_open_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_all_open_orders`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_all_open_orders`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1580,14 +1703,14 @@ def list_all_open_orders_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/open_orders',
- 'GET',
+ '/spot/open_orders', 'GET',
path_params,
query_params,
header_params,
@@ -1600,13 +1723,12 @@ def list_all_open_orders_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_cross_liquidate_order(self, liquidate_order, **kwargs): # noqa: E501
- """close position when cross-currency is disabled # noqa: E501
+ """Close position when cross-currency is disabled # noqa: E501
- Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 # noqa: E501
+ Currently, only cross-margin accounts are supported to place buy orders for disabled currencies. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in pending orders) / 0.998 # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_cross_liquidate_order(liquidate_order, async_req=True)
@@ -1629,9 +1751,9 @@ def create_cross_liquidate_order(self, liquidate_order, **kwargs): # noqa: E501
return self.create_cross_liquidate_order_with_http_info(liquidate_order, **kwargs) # noqa: E501
def create_cross_liquidate_order_with_http_info(self, liquidate_order, **kwargs): # noqa: E501
- """close position when cross-currency is disabled # noqa: E501
+ """Close position when cross-currency is disabled # noqa: E501
- Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 # noqa: E501
+ Currently, only cross-margin accounts are supported to place buy orders for disabled currencies. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in pending orders) / 0.998 # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_cross_liquidate_order_with_http_info(liquidate_order, async_req=True)
@@ -1655,23 +1777,30 @@ def create_cross_liquidate_order_with_http_info(self, liquidate_order, **kwargs)
local_var_params = locals()
- all_params = ['liquidate_order']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'liquidate_order'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method create_cross_liquidate_order" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method create_cross_liquidate_order" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'liquidate_order' is set
- if self.api_client.client_side_validation and (
- 'liquidate_order' not in local_var_params or local_var_params['liquidate_order'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `liquidate_order` when calling `create_cross_liquidate_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('liquidate_order' not in local_var_params or # noqa: E501
+ local_var_params['liquidate_order'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `liquidate_order` when calling `create_cross_liquidate_order`") # noqa: E501
collection_formats = {}
@@ -1688,19 +1817,18 @@ def create_cross_liquidate_order_with_http_info(self, liquidate_order, **kwargs)
if 'liquidate_order' in local_var_params:
body_params = local_var_params['liquidate_order']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/cross_liquidate_orders',
- 'POST',
+ '/spot/cross_liquidate_orders', 'POST',
path_params,
query_params,
header_params,
@@ -1713,27 +1841,26 @@ def create_cross_liquidate_order_with_http_info(self, liquidate_order, **kwargs)
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_orders(self, currency_pair, status, **kwargs): # noqa: E501
"""List orders # noqa: E501
- Spot and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported. Time range parameters are handled as order finish time. # noqa: E501
+ Note that query results default to spot order lists for spot, unified account, and isolated margin accounts. When `status` is set to `open` (i.e., when querying pending order lists), only `page` and `limit` pagination controls are supported. `limit` can only be set to a maximum of 100. The `side` parameter and time range query parameters `from` and `to` are not supported. When `status` is set to `finished` (i.e., when querying historical orders), in addition to pagination queries, `from` and `to` time range queries are also supported. Additionally, the `side` parameter can be set to filter one-sided history. Time range filter parameters are processed according to the order end time. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_orders(currency_pair, status, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pair: Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. (required)
+ :param str currency_pair: Query by specified currency pair. Required for open orders, optional for filled orders (required)
:param str status: List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled (required)
:param int page: Page number
:param int limit: Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100
- :param str account: Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
- :param str side: All bids or asks. Both included if not specified
+ :param str account: Specify query account
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param str side: Specify all bids or all asks, both included if not specified
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1751,21 +1878,21 @@ def list_orders(self, currency_pair, status, **kwargs): # noqa: E501
def list_orders_with_http_info(self, currency_pair, status, **kwargs): # noqa: E501
"""List orders # noqa: E501
- Spot and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported. Time range parameters are handled as order finish time. # noqa: E501
+ Note that query results default to spot order lists for spot, unified account, and isolated margin accounts. When `status` is set to `open` (i.e., when querying pending order lists), only `page` and `limit` pagination controls are supported. `limit` can only be set to a maximum of 100. The `side` parameter and time range query parameters `from` and `to` are not supported. When `status` is set to `finished` (i.e., when querying historical orders), in addition to pagination queries, `from` and `to` time range queries are also supported. Additionally, the `side` parameter can be set to filter one-sided history. Time range filter parameters are processed according to the order end time. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_orders_with_http_info(currency_pair, status, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pair: Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. (required)
+ :param str currency_pair: Query by specified currency pair. Required for open orders, optional for filled orders (required)
:param str status: List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled (required)
:param int page: Page number
:param int limit: Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100
- :param str account: Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
- :param str side: All bids or asks. Both included if not specified
+ :param str account: Specify query account
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param str side: Specify all bids or all asks, both included if not specified
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1782,45 +1909,48 @@ def list_orders_with_http_info(self, currency_pair, status, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['currency_pair', 'status', 'page', 'limit', 'account', '_from', 'to', 'side']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair',
+ 'status',
+ 'page',
+ 'limit',
+ 'account',
+ '_from',
+ 'to',
+ 'side'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_orders" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency_pair' is set
- if self.api_client.client_side_validation and (
- 'currency_pair' not in local_var_params or local_var_params['currency_pair'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency_pair` when calling `list_orders`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501
+ local_var_params['currency_pair'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency_pair` when calling `list_orders`") # noqa: E501
# verify the required parameter 'status' is set
- if self.api_client.client_side_validation and (
- 'status' not in local_var_params or local_var_params['status'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501
+ local_var_params['status'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `status` when calling `list_orders`") # noqa: E501
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_orders`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_orders`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_orders`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1850,14 +1980,14 @@ def list_orders_with_http_info(self, currency_pair, status, **kwargs): # noqa:
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/orders',
- 'GET',
+ '/spot/orders', 'GET',
path_params,
query_params,
header_params,
@@ -1870,13 +2000,12 @@ def list_orders_with_http_info(self, currency_pair, status, **kwargs): # noqa:
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_order(self, order, **kwargs): # noqa: E501
"""Create an order # noqa: E501
- 支持现货、杠杆、全仓杠杆下单。通过 `account` 字段来使用不同的账户,默认为 `spot` ,即使用现货账户下单。 使用杠杆账户交易,即 `account` 设置为 `margin` 的时候,可以设置 `auto_borrow` 为 `true`, 在账户余额不足的情况,由系统自动执行 `POST /margin/loans` 借入不足部分。 杠杆下单成交之后的获取到的资产是否自动用于归还逐仓杠杆账户的借入单,取决于用户逐仓杠杆**账户**的自动还款设置, 该账户自动还款设置可以通过 `/margin/auto_repay` 来查询和设置。 使用全仓杠杆账户交易,即 `account` 设置为 `cross_margin` 的时候,同样可以启用 `auto_borrow` 来实现自动借入不足部分,但是与逐仓杠杆账户不同的是,全仓杠杆账户的委托是否自动还款取决于下单时的 `auto_repay` 设置,该设置只对当前委托生效,即只有该委托成交之后获取到的资产会用来还款全仓杠杆账户的借入单。 全仓杠杆账户下单目前支持同时开启 `auto_borrow` 和 `auto_repay`。 自动还款会在订单结束时触发,即 `status` 为 `cancelled` 或者 `closed` 。 **委托状态** 挂单中的委托状态是 `open` ,在数量全部成交之前保持为 `open` 。如果被全部吃掉,则订单结束,状态变成 `closed` 。 假如全部成交之前,订单被撤销,不管是否有部分成交,状态都会变为 `cancelled` **冰山委托** `iceberg` 用来设置冰山委托显示的数量,如果需要完全隐藏,设置为 `-1` 。注意隐藏部分成交时按照 taker 的手续费率收取。 **限制用户自成交** 设置 `stp_act` 来决定使用限制用户自成交的策略 # noqa: E501
+ Supports spot, margin, leverage, and cross-margin leverage orders. Use different accounts through the `account` field. Default is `spot`, which means using the spot account to place orders. If the user has a `unified` account, the default is to place orders with the unified account. When using leveraged account trading (i.e., when `account` is set to `margin`), you can set `auto_borrow` to `true`. In case of insufficient account balance, the system will automatically execute `POST /margin/uni/loans` to borrow the insufficient amount. Whether assets obtained after leveraged order execution are automatically used to repay borrowing orders of the isolated margin account depends on the automatic repayment settings of the user's isolated margin account. Account automatic repayment settings can be queried and set through `/margin/auto_repay`. When using unified account trading (i.e., when `account` is set to `unified`), `auto_borrow` can also be enabled to realize automatic borrowing of insufficient amounts. However, unlike the isolated margin account, whether unified account orders are automatically repaid depends on the `auto_repay` setting when placing the order. This setting only applies to the current order, meaning only assets obtained after order execution will be used to repay borrowing orders of the cross-margin account. Unified account ordering currently supports enabling both `auto_borrow` and `auto_repay` simultaneously. Auto repayment will be triggered when the order ends, i.e., when `status` is `cancelled` or `closed`. **Order Status** The order status in pending orders is `open`, which remains `open` until all quantity is filled. If fully filled, the order ends and status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of partial fills, the status will become `cancelled`. **Iceberg Orders** `iceberg` is used to set the displayed quantity of iceberg orders and does not support complete hiding. Note that hidden portions are charged according to the taker's fee rate. **Self-Trade Prevention** Set `stp_act` to determine the self-trade prevention strategy to use # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_order(order, async_req=True)
@@ -1884,6 +2013,7 @@ def create_order(self, order, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param Order order: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1901,7 +2031,7 @@ def create_order(self, order, **kwargs): # noqa: E501
def create_order_with_http_info(self, order, **kwargs): # noqa: E501
"""Create an order # noqa: E501
- 支持现货、杠杆、全仓杠杆下单。通过 `account` 字段来使用不同的账户,默认为 `spot` ,即使用现货账户下单。 使用杠杆账户交易,即 `account` 设置为 `margin` 的时候,可以设置 `auto_borrow` 为 `true`, 在账户余额不足的情况,由系统自动执行 `POST /margin/loans` 借入不足部分。 杠杆下单成交之后的获取到的资产是否自动用于归还逐仓杠杆账户的借入单,取决于用户逐仓杠杆**账户**的自动还款设置, 该账户自动还款设置可以通过 `/margin/auto_repay` 来查询和设置。 使用全仓杠杆账户交易,即 `account` 设置为 `cross_margin` 的时候,同样可以启用 `auto_borrow` 来实现自动借入不足部分,但是与逐仓杠杆账户不同的是,全仓杠杆账户的委托是否自动还款取决于下单时的 `auto_repay` 设置,该设置只对当前委托生效,即只有该委托成交之后获取到的资产会用来还款全仓杠杆账户的借入单。 全仓杠杆账户下单目前支持同时开启 `auto_borrow` 和 `auto_repay`。 自动还款会在订单结束时触发,即 `status` 为 `cancelled` 或者 `closed` 。 **委托状态** 挂单中的委托状态是 `open` ,在数量全部成交之前保持为 `open` 。如果被全部吃掉,则订单结束,状态变成 `closed` 。 假如全部成交之前,订单被撤销,不管是否有部分成交,状态都会变为 `cancelled` **冰山委托** `iceberg` 用来设置冰山委托显示的数量,如果需要完全隐藏,设置为 `-1` 。注意隐藏部分成交时按照 taker 的手续费率收取。 **限制用户自成交** 设置 `stp_act` 来决定使用限制用户自成交的策略 # noqa: E501
+ Supports spot, margin, leverage, and cross-margin leverage orders. Use different accounts through the `account` field. Default is `spot`, which means using the spot account to place orders. If the user has a `unified` account, the default is to place orders with the unified account. When using leveraged account trading (i.e., when `account` is set to `margin`), you can set `auto_borrow` to `true`. In case of insufficient account balance, the system will automatically execute `POST /margin/uni/loans` to borrow the insufficient amount. Whether assets obtained after leveraged order execution are automatically used to repay borrowing orders of the isolated margin account depends on the automatic repayment settings of the user's isolated margin account. Account automatic repayment settings can be queried and set through `/margin/auto_repay`. When using unified account trading (i.e., when `account` is set to `unified`), `auto_borrow` can also be enabled to realize automatic borrowing of insufficient amounts. However, unlike the isolated margin account, whether unified account orders are automatically repaid depends on the `auto_repay` setting when placing the order. This setting only applies to the current order, meaning only assets obtained after order execution will be used to repay borrowing orders of the cross-margin account. Unified account ordering currently supports enabling both `auto_borrow` and `auto_repay` simultaneously. Auto repayment will be triggered when the order ends, i.e., when `status` is `cancelled` or `closed`. **Order Status** The order status in pending orders is `open`, which remains `open` until all quantity is filled. If fully filled, the order ends and status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of partial fills, the status will become `cancelled`. **Iceberg Orders** `iceberg` is used to set the displayed quantity of iceberg orders and does not support complete hiding. Note that hidden portions are charged according to the taker's fee rate. **Self-Trade Prevention** Set `stp_act` to determine the self-trade prevention strategy to use # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_order_with_http_info(order, async_req=True)
@@ -1909,6 +2039,7 @@ def create_order_with_http_info(self, order, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param Order order: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1925,18 +2056,30 @@ def create_order_with_http_info(self, order, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['order']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'order',
+ 'x_gate_exptime'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'order' is set
- if self.api_client.client_side_validation and (
- 'order' not in local_var_params or local_var_params['order'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('order' not in local_var_params or # noqa: E501
+ local_var_params['order'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `order` when calling `create_order`") # noqa: E501
collection_formats = {}
@@ -1946,6 +2089,8 @@ def create_order_with_http_info(self, order, **kwargs): # noqa: E501
query_params = []
header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
form_params = []
local_var_files = {}
@@ -1954,19 +2099,18 @@ def create_order_with_http_info(self, order, **kwargs): # noqa: E501
if 'order' in local_var_params:
body_params = local_var_params['order']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/orders',
- 'POST',
+ '/spot/orders', 'POST',
path_params,
query_params,
header_params,
@@ -1979,22 +2123,23 @@ def create_order_with_http_info(self, order, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def cancel_orders(self, currency_pair, **kwargs): # noqa: E501
+ def cancel_orders(self, **kwargs): # noqa: E501
"""Cancel all `open` orders in specified currency pair # noqa: E501
- If `account` is not set, all open orders, including spot, margin and cross margin ones, will be cancelled. You can set `account` to cancel only orders within the specified account # noqa: E501
+ When the `account` parameter is not specified, all pending orders including spot, unified account, and isolated margin will be cancelled. When `currency_pair` is not specified, all trading pair pending orders will be cancelled. You can specify a particular account to cancel all pending orders under that account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.cancel_orders(currency_pair, async_req=True)
+ >>> thread = api.cancel_orders(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pair: Currency pair (required)
- :param str side: All bids or asks. Both included if not specified
- :param str account: Specify account type - classic account:Default to all account types being included - portfolio margin account:`cross_margin` only
+ :param str currency_pair: Currency pair
+ :param str side: Specify all bids or all asks, both included if not specified
+ :param str account: Specify account type Classic account: All are included if not specified Unified account: Specify `unified`
+ :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2002,26 +2147,28 @@ def cancel_orders(self, currency_pair, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: list[gate_api.Order]
+ :rtype: list[gate_api.OrderCancel]
:return: If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.cancel_orders_with_http_info(currency_pair, **kwargs) # noqa: E501
+ return self.cancel_orders_with_http_info(**kwargs) # noqa: E501
- def cancel_orders_with_http_info(self, currency_pair, **kwargs): # noqa: E501
+ def cancel_orders_with_http_info(self, **kwargs): # noqa: E501
"""Cancel all `open` orders in specified currency pair # noqa: E501
- If `account` is not set, all open orders, including spot, margin and cross margin ones, will be cancelled. You can set `account` to cancel only orders within the specified account # noqa: E501
+ When the `account` parameter is not specified, all pending orders including spot, unified account, and isolated margin will be cancelled. When `currency_pair` is not specified, all trading pair pending orders will be cancelled. You can specify a particular account to cancel all pending orders under that account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.cancel_orders_with_http_info(currency_pair, async_req=True)
+ >>> thread = api.cancel_orders_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pair: Currency pair (required)
- :param str side: All bids or asks. Both included if not specified
- :param str account: Specify account type - classic account:Default to all account types being included - portfolio margin account:`cross_margin` only
+ :param str currency_pair: Currency pair
+ :param str side: Specify all bids or all asks, both included if not specified
+ :param str account: Specify account type Classic account: All are included if not specified Unified account: Specify `unified`
+ :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2031,28 +2178,37 @@ def cancel_orders_with_http_info(self, currency_pair, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(list[gate_api.Order], status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.OrderCancel], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['currency_pair', 'side', 'account']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair',
+ 'side',
+ 'account',
+ 'action_mode',
+ 'x_gate_exptime'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method cancel_orders" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- # verify the required parameter 'currency_pair' is set
- if self.api_client.client_side_validation and (
- 'currency_pair' not in local_var_params or local_var_params['currency_pair'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency_pair` when calling `cancel_orders`"
- ) # noqa: E501
collection_formats = {}
@@ -2065,39 +2221,42 @@ def cancel_orders_with_http_info(self, currency_pair, **kwargs): # noqa: E501
query_params.append(('side', local_var_params['side'])) # noqa: E501
if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501
query_params.append(('account', local_var_params['account'])) # noqa: E501
+ if 'action_mode' in local_var_params and local_var_params['action_mode'] is not None: # noqa: E501
+ query_params.append(('action_mode', local_var_params['action_mode'])) # noqa: E501
header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/orders',
- 'DELETE',
+ '/spot/orders', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[Order]', # noqa: E501
+ response_type='list[OrderCancel]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def cancel_batch_orders(self, cancel_batch_order, **kwargs): # noqa: E501
- """Cancel a batch of orders with an ID list # noqa: E501
+ """Cancel batch orders by specified ID list # noqa: E501
Multiple currency pairs can be specified, but maximum 20 orders are allowed per request # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -2107,6 +2266,7 @@ def cancel_batch_orders(self, cancel_batch_order, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param list[CancelBatchOrder] cancel_batch_order: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2122,7 +2282,7 @@ def cancel_batch_orders(self, cancel_batch_order, **kwargs): # noqa: E501
return self.cancel_batch_orders_with_http_info(cancel_batch_order, **kwargs) # noqa: E501
def cancel_batch_orders_with_http_info(self, cancel_batch_order, **kwargs): # noqa: E501
- """Cancel a batch of orders with an ID list # noqa: E501
+ """Cancel batch orders by specified ID list # noqa: E501
Multiple currency pairs can be specified, but maximum 20 orders are allowed per request # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -2132,6 +2292,7 @@ def cancel_batch_orders_with_http_info(self, cancel_batch_order, **kwargs): # n
:param bool async_req: execute request asynchronously
:param list[CancelBatchOrder] cancel_batch_order: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2148,21 +2309,31 @@ def cancel_batch_orders_with_http_info(self, cancel_batch_order, **kwargs): # n
local_var_params = locals()
- all_params = ['cancel_batch_order']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'cancel_batch_order',
+ 'x_gate_exptime'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method cancel_batch_orders" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_batch_orders" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'cancel_batch_order' is set
- if self.api_client.client_side_validation and (
- 'cancel_batch_order' not in local_var_params or local_var_params['cancel_batch_order'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `cancel_batch_order` when calling `cancel_batch_orders`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('cancel_batch_order' not in local_var_params or # noqa: E501
+ local_var_params['cancel_batch_order'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `cancel_batch_order` when calling `cancel_batch_orders`") # noqa: E501
collection_formats = {}
@@ -2171,6 +2342,8 @@ def cancel_batch_orders_with_http_info(self, cancel_batch_order, **kwargs): # n
query_params = []
header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
form_params = []
local_var_files = {}
@@ -2179,19 +2352,18 @@ def cancel_batch_orders_with_http_info(self, cancel_batch_order, **kwargs): # n
if 'cancel_batch_order' in local_var_params:
body_params = local_var_params['cancel_batch_order']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/cancel_batch_orders',
- 'POST',
+ '/spot/cancel_batch_orders', 'POST',
path_params,
query_params,
header_params,
@@ -2204,22 +2376,21 @@ def cancel_batch_orders_with_http_info(self, cancel_batch_order, **kwargs): # n
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_order(self, order_id, currency_pair, **kwargs): # noqa: E501
- """Get a single order # noqa: E501
+ """Query single order details # noqa: E501
- Spot and margin orders are queried by default. If cross margin orders are needed or portfolio margin account are used, account must be set to cross_margin. # noqa: E501
+ By default, queries orders for spot, unified account, and isolated margin accounts. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order(order_id, currency_pair, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)
- :param str currency_pair: Currency pair (required)
- :param str account: Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only
+ :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required)
+ :param str currency_pair: Specify the trading pair to query. This field is required when querying pending order records. This field can be omitted when querying filled order records. (required)
+ :param str account: Specify query account
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2235,18 +2406,18 @@ def get_order(self, order_id, currency_pair, **kwargs): # noqa: E501
return self.get_order_with_http_info(order_id, currency_pair, **kwargs) # noqa: E501
def get_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: E501
- """Get a single order # noqa: E501
+ """Query single order details # noqa: E501
- Spot and margin orders are queried by default. If cross margin orders are needed or portfolio margin account are used, account must be set to cross_margin. # noqa: E501
+ By default, queries orders for spot, unified account, and isolated margin accounts. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_with_http_info(order_id, currency_pair, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)
- :param str currency_pair: Currency pair (required)
- :param str account: Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only
+ :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required)
+ :param str currency_pair: Specify the trading pair to query. This field is required when querying pending order records. This field can be omitted when querying filled order records. (required)
+ :param str account: Specify query account
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2263,23 +2434,35 @@ def get_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['order_id', 'currency_pair', 'account']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'order_id',
+ 'currency_pair',
+ 'account'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `order_id` when calling `get_order`") # noqa: E501
# verify the required parameter 'currency_pair' is set
- if self.api_client.client_side_validation and (
- 'currency_pair' not in local_var_params or local_var_params['currency_pair'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501
+ local_var_params['currency_pair'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_order`") # noqa: E501
collection_formats = {}
@@ -2301,14 +2484,14 @@ def get_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa:
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/orders/{order_id}',
- 'GET',
+ '/spot/orders/{order_id}', 'GET',
path_params,
query_params,
header_params,
@@ -2321,22 +2504,23 @@ def get_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa:
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def cancel_order(self, order_id, currency_pair, **kwargs): # noqa: E501
- """Cancel a single order # noqa: E501
+ """Cancel single order # noqa: E501
- Spot and margin orders are cancelled by default. If trying to cancel cross margin orders or portfolio margin account are used, account must be set to cross_margin # noqa: E501
+ By default, orders for spot, unified accounts and leveraged accounts are revoked. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.cancel_order(order_id, currency_pair, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)
+ :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required)
:param str currency_pair: Currency pair (required)
- :param str account: Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only
+ :param str account: Specify query account
+ :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2352,18 +2536,20 @@ def cancel_order(self, order_id, currency_pair, **kwargs): # noqa: E501
return self.cancel_order_with_http_info(order_id, currency_pair, **kwargs) # noqa: E501
def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: E501
- """Cancel a single order # noqa: E501
+ """Cancel single order # noqa: E501
- Spot and margin orders are cancelled by default. If trying to cancel cross margin orders or portfolio margin account are used, account must be set to cross_margin # noqa: E501
+ By default, orders for spot, unified accounts and leveraged accounts are revoked. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.cancel_order_with_http_info(order_id, currency_pair, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)
+ :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required)
:param str currency_pair: Currency pair (required)
- :param str account: Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only
+ :param str account: Specify query account
+ :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2380,26 +2566,38 @@ def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noq
local_var_params = locals()
- all_params = ['order_id', 'currency_pair', 'account']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'order_id',
+ 'currency_pair',
+ 'account',
+ 'action_mode',
+ 'x_gate_exptime'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method cancel_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_order`") # noqa: E501
# verify the required parameter 'currency_pair' is set
- if self.api_client.client_side_validation and (
- 'currency_pair' not in local_var_params or local_var_params['currency_pair'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency_pair` when calling `cancel_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501
+ local_var_params['currency_pair'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency_pair` when calling `cancel_order`") # noqa: E501
collection_formats = {}
@@ -2412,22 +2610,26 @@ def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noq
query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501
if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501
query_params.append(('account', local_var_params['account'])) # noqa: E501
+ if 'action_mode' in local_var_params and local_var_params['action_mode'] is not None: # noqa: E501
+ query_params.append(('action_mode', local_var_params['action_mode'])) # noqa: E501
header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/orders/{order_id}',
- 'DELETE',
+ '/spot/orders/{order_id}', 'DELETE',
path_params,
query_params,
header_params,
@@ -2440,23 +2642,23 @@ def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noq
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
- def amend_order(self, order_id, currency_pair, order_patch, **kwargs): # noqa: E501
- """Amend an order # noqa: E501
+ def amend_order(self, order_id, order_patch, **kwargs): # noqa: E501
+ """Amend single order # noqa: E501
- 默认修改现货、逐仓杠杆账户的订单,如果需要修改全仓杠杆账户订单,必须指定 `account` 为 `cross_margin`,统一账户 `account` 只能指定为 `cross_margin`。 目前只支持修改价格或数量(二选一) 关于限速:修改订单和创建订单共享限速规则 关于匹配优先级:只修改数量变小不影响匹配优先级,修改价格或修改数量变大则优先级将调整到新价格最后面 注意事项:修改数量小于已成交数量会触发撤单操作 # noqa: E501
+ Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.amend_order(order_id, currency_pair, order_patch, async_req=True)
+ >>> thread = api.amend_order(order_id, order_patch, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)
- :param str currency_pair: Currency pair (required)
+ :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required)
:param OrderPatch order_patch: (required)
- :param str account: Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only
+ :param str currency_pair: Currency pair
+ :param str account: Specify query account
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2469,22 +2671,23 @@ def amend_order(self, order_id, currency_pair, order_patch, **kwargs): # noqa:
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.amend_order_with_http_info(order_id, currency_pair, order_patch, **kwargs) # noqa: E501
+ return self.amend_order_with_http_info(order_id, order_patch, **kwargs) # noqa: E501
- def amend_order_with_http_info(self, order_id, currency_pair, order_patch, **kwargs): # noqa: E501
- """Amend an order # noqa: E501
+ def amend_order_with_http_info(self, order_id, order_patch, **kwargs): # noqa: E501
+ """Amend single order # noqa: E501
- 默认修改现货、逐仓杠杆账户的订单,如果需要修改全仓杠杆账户订单,必须指定 `account` 为 `cross_margin`,统一账户 `account` 只能指定为 `cross_margin`。 目前只支持修改价格或数量(二选一) 关于限速:修改订单和创建订单共享限速规则 关于匹配优先级:只修改数量变小不影响匹配优先级,修改价格或修改数量变大则优先级将调整到新价格最后面 注意事项:修改数量小于已成交数量会触发撤单操作 # noqa: E501
+ Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.amend_order_with_http_info(order_id, currency_pair, order_patch, async_req=True)
+ >>> thread = api.amend_order_with_http_info(order_id, order_patch, async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)
- :param str currency_pair: Currency pair (required)
+ :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required)
:param OrderPatch order_patch: (required)
- :param str account: Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only
+ :param str currency_pair: Currency pair
+ :param str account: Specify query account
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2501,30 +2704,37 @@ def amend_order_with_http_info(self, order_id, currency_pair, order_patch, **kwa
local_var_params = locals()
- all_params = ['order_id', 'currency_pair', 'order_patch', 'account']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'order_id',
+ 'order_patch',
+ 'currency_pair',
+ 'account',
+ 'x_gate_exptime'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method amend_order" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method amend_order" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `order_id` when calling `amend_order`") # noqa: E501
- # verify the required parameter 'currency_pair' is set
- if self.api_client.client_side_validation and (
- 'currency_pair' not in local_var_params or local_var_params['currency_pair'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency_pair` when calling `amend_order`"
- ) # noqa: E501
# verify the required parameter 'order_patch' is set
- if self.api_client.client_side_validation and (
- 'order_patch' not in local_var_params or local_var_params['order_patch'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('order_patch' not in local_var_params or # noqa: E501
+ local_var_params['order_patch'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `order_patch` when calling `amend_order`") # noqa: E501
collection_formats = {}
@@ -2540,6 +2750,8 @@ def amend_order_with_http_info(self, order_id, currency_pair, order_patch, **kwa
query_params.append(('account', local_var_params['account'])) # noqa: E501
header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
form_params = []
local_var_files = {}
@@ -2548,19 +2760,18 @@ def amend_order_with_http_info(self, order_id, currency_pair, order_patch, **kwa
if 'order_patch' in local_var_params:
body_params = local_var_params['order_patch']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/orders/{order_id}',
- 'PATCH',
+ '/spot/orders/{order_id}', 'PATCH',
path_params,
query_params,
header_params,
@@ -2573,13 +2784,12 @@ def amend_order_with_http_info(self, order_id, currency_pair, order_patch, **kwa
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_my_trades(self, **kwargs): # noqa: E501
- """List personal trading history # noqa: E501
+ """Query personal trading records # noqa: E501
- Spot and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range. If you don't specify `from` and/or `to` parameters, only the last 7 days of data will be retured. The range of `from` and `to` is not alloed to exceed 30 days. Time range parameters are handled as order finish time. # noqa: E501
+ By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_my_trades(async_req=True)
@@ -2587,12 +2797,12 @@ def list_my_trades(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str currency_pair: Retrieve results with specified currency pair
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000
:param int page: Page number
:param str order_id: Filter trades with specified order ID. `currency_pair` is also required if this field is present
- :param str account: Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
+ :param str account: Specify query account
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -2608,9 +2818,9 @@ def list_my_trades(self, **kwargs): # noqa: E501
return self.list_my_trades_with_http_info(**kwargs) # noqa: E501
def list_my_trades_with_http_info(self, **kwargs): # noqa: E501
- """List personal trading history # noqa: E501
+ """Query personal trading records # noqa: E501
- Spot and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range. If you don't specify `from` and/or `to` parameters, only the last 7 days of data will be retured. The range of `from` and `to` is not alloed to exceed 30 days. Time range parameters are handled as order finish time. # noqa: E501
+ By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_my_trades_with_http_info(async_req=True)
@@ -2618,12 +2828,12 @@ def list_my_trades_with_http_info(self, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str currency_pair: Retrieve results with specified currency pair
- :param int limit: Maximum number of records to be returned in a single list
+ :param int limit: Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000
:param int page: Page number
:param str order_id: Filter trades with specified order ID. `currency_pair` is also required if this field is present
- :param str account: Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only
- :param int _from: Start timestamp of the query
- :param int to: Time range ending, default to current time
+ :param str account: Specify query account
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2640,33 +2850,39 @@ def list_my_trades_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency_pair', 'limit', 'page', 'order_id', 'account', '_from', 'to']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair',
+ 'limit',
+ 'page',
+ 'order_id',
+ 'account',
+ '_from',
+ 'to'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_my_trades" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_my_trades" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_my_trades`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_my_trades`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `page` when calling `list_my_trades`, must be a value greater than or equal to `1`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_trades`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_trades`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_my_trades`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -2694,14 +2910,14 @@ def list_my_trades_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/my_trades',
- 'GET',
+ '/spot/my_trades', 'GET',
path_params,
query_params,
header_params,
@@ -2714,8 +2930,7 @@ def list_my_trades_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_system_time(self, **kwargs): # noqa: E501
"""Get server current time # noqa: E501
@@ -2765,12 +2980,23 @@ def get_system_time_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = []
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_system_time" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_system_time" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -2787,14 +3013,14 @@ def get_system_time_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/spot/time',
- 'GET',
+ '/spot/time', 'GET',
path_params,
query_params,
header_params,
@@ -2807,13 +3033,12 @@ def get_system_time_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def countdown_cancel_all_spot(self, countdown_cancel_all_spot_task, **kwargs): # noqa: E501
"""Countdown cancel orders # noqa: E501
- When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501
+ Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.countdown_cancel_all_spot(countdown_cancel_all_spot_task, async_req=True)
@@ -2838,7 +3063,7 @@ def countdown_cancel_all_spot(self, countdown_cancel_all_spot_task, **kwargs):
def countdown_cancel_all_spot_with_http_info(self, countdown_cancel_all_spot_task, **kwargs): # noqa: E501
"""Countdown cancel orders # noqa: E501
- When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501
+ Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.countdown_cancel_all_spot_with_http_info(countdown_cancel_all_spot_task, async_req=True)
@@ -2862,22 +3087,30 @@ def countdown_cancel_all_spot_with_http_info(self, countdown_cancel_all_spot_tas
local_var_params = locals()
- all_params = ['countdown_cancel_all_spot_task']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'countdown_cancel_all_spot_task'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method countdown_cancel_all_spot" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method countdown_cancel_all_spot" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'countdown_cancel_all_spot_task' is set
- if self.api_client.client_side_validation and (
- 'countdown_cancel_all_spot_task' not in local_var_params
- or local_var_params['countdown_cancel_all_spot_task'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `countdown_cancel_all_spot_task` when calling `countdown_cancel_all_spot`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('countdown_cancel_all_spot_task' not in local_var_params or # noqa: E501
+ local_var_params['countdown_cancel_all_spot_task'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `countdown_cancel_all_spot_task` when calling `countdown_cancel_all_spot`") # noqa: E501
collection_formats = {}
@@ -2894,19 +3127,18 @@ def countdown_cancel_all_spot_with_http_info(self, countdown_cancel_all_spot_tas
if 'countdown_cancel_all_spot_task' in local_var_params:
body_params = local_var_params['countdown_cancel_all_spot_task']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/countdown_cancel_all',
- 'POST',
+ '/spot/countdown_cancel_all', 'POST',
path_params,
query_params,
header_params,
@@ -2919,11 +3151,288 @@ def countdown_cancel_all_spot_with_http_info(self, countdown_cancel_all_spot_tas
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def amend_batch_orders(self, batch_amend_item, **kwargs): # noqa: E501
+ """Batch modification of orders # noqa: E501
+
+ Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return content order of batch modification orders is consistent with the order list order. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.amend_batch_orders(batch_amend_item, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param list[BatchAmendItem] batch_amend_item: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.BatchOrder]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.amend_batch_orders_with_http_info(batch_amend_item, **kwargs) # noqa: E501
+
+ def amend_batch_orders_with_http_info(self, batch_amend_item, **kwargs): # noqa: E501
+ """Batch modification of orders # noqa: E501
+
+ Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return content order of batch modification orders is consistent with the order list order. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.amend_batch_orders_with_http_info(batch_amend_item, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param list[BatchAmendItem] batch_amend_item: (required)
+ :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.BatchOrder], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'batch_amend_item',
+ 'x_gate_exptime'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method amend_batch_orders" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'batch_amend_item' is set
+ if self.api_client.client_side_validation and ('batch_amend_item' not in local_var_params or # noqa: E501
+ local_var_params['batch_amend_item'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `batch_amend_item` when calling `amend_batch_orders`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+ if 'x_gate_exptime' in local_var_params:
+ header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'batch_amend_item' in local_var_params:
+ body_params = local_var_params['batch_amend_item']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/spot/amend_batch_orders', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[BatchOrder]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_spot_insurance_history(self, business, currency, _from, to, **kwargs): # noqa: E501
+ """Query spot insurance fund historical data # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_spot_insurance_history(business, currency, _from, to, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str business: Leverage business, margin - position by position; unified - unified account (required)
+ :param str currency: Currency (required)
+ :param int _from: Start timestamp in seconds (required)
+ :param int to: End timestamp in seconds (required)
+ :param int page: Page number
+ :param int limit: The maximum number of items returned in the list, the default value is 30
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.SpotInsuranceHistory]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_spot_insurance_history_with_http_info(business, currency, _from, to, **kwargs) # noqa: E501
+
+ def get_spot_insurance_history_with_http_info(self, business, currency, _from, to, **kwargs): # noqa: E501
+ """Query spot insurance fund historical data # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_spot_insurance_history_with_http_info(business, currency, _from, to, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str business: Leverage business, margin - position by position; unified - unified account (required)
+ :param str currency: Currency (required)
+ :param int _from: Start timestamp in seconds (required)
+ :param int to: End timestamp in seconds (required)
+ :param int page: Page number
+ :param int limit: The maximum number of items returned in the list, the default value is 30
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.SpotInsuranceHistory], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'business',
+ 'currency',
+ '_from',
+ 'to',
+ 'page',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_spot_insurance_history" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'business' is set
+ if self.api_client.client_side_validation and ('business' not in local_var_params or # noqa: E501
+ local_var_params['business'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `business` when calling `get_spot_insurance_history`") # noqa: E501
+ # verify the required parameter 'currency' is set
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `get_spot_insurance_history`") # noqa: E501
+ # verify the required parameter '_from' is set
+ if self.api_client.client_side_validation and ('_from' not in local_var_params or # noqa: E501
+ local_var_params['_from'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `_from` when calling `get_spot_insurance_history`") # noqa: E501
+ # verify the required parameter 'to' is set
+ if self.api_client.client_side_validation and ('to' not in local_var_params or # noqa: E501
+ local_var_params['to'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `to` when calling `get_spot_insurance_history`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `get_spot_insurance_history`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `get_spot_insurance_history`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `get_spot_insurance_history`, must be a value greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'business' in local_var_params and local_var_params['business'] is not None: # noqa: E501
+ query_params.append(('business', local_var_params['business'])) # noqa: E501
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/spot/insurance_history', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[SpotInsuranceHistory]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def list_spot_price_triggered_orders(self, status, **kwargs): # noqa: E501
- """Retrieve running auto order list # noqa: E501
+ """Query running auto order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2931,10 +3440,10 @@ def list_spot_price_triggered_orders(self, status, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str status: Only list the orders with this status (required)
- :param str market: Currency pair
- :param str account: Trading account type. Portfolio margin account must set to `cross_margin`
- :param int limit: Maximum number of records to be returned in a single list
+ :param str status: Query order list based on status (required)
+ :param str market: Trading market
+ :param str account: Trading account type. Unified account must be set to `unified`
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -2951,7 +3460,7 @@ def list_spot_price_triggered_orders(self, status, **kwargs): # noqa: E501
return self.list_spot_price_triggered_orders_with_http_info(status, **kwargs) # noqa: E501
def list_spot_price_triggered_orders_with_http_info(self, status, **kwargs): # noqa: E501
- """Retrieve running auto order list # noqa: E501
+ """Query running auto order list # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -2959,10 +3468,10 @@ def list_spot_price_triggered_orders_with_http_info(self, status, **kwargs): #
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str status: Only list the orders with this status (required)
- :param str market: Currency pair
- :param str account: Trading account type. Portfolio margin account must set to `cross_margin`
- :param int limit: Maximum number of records to be returned in a single list
+ :param str status: Query order list based on status (required)
+ :param str market: Trading market
+ :param str account: Trading account type. Unified account must be set to `unified`
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _return_http_data_only: response data without head status code
and headers
@@ -2980,42 +3489,41 @@ def list_spot_price_triggered_orders_with_http_info(self, status, **kwargs): #
local_var_params = locals()
- all_params = ['status', 'market', 'account', 'limit', 'offset']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'status',
+ 'market',
+ 'account',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_spot_price_triggered_orders" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_spot_price_triggered_orders" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'status' is set
- if self.api_client.client_side_validation and (
- 'status' not in local_var_params or local_var_params['status'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `status` when calling `list_spot_price_triggered_orders`"
- ) # noqa: E501
-
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_spot_price_triggered_orders`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_spot_price_triggered_orders`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_spot_price_triggered_orders`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501
+ local_var_params['status'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `status` when calling `list_spot_price_triggered_orders`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_spot_price_triggered_orders`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_spot_price_triggered_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_spot_price_triggered_orders`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -3039,14 +3547,14 @@ def list_spot_price_triggered_orders_with_http_info(self, status, **kwargs): #
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/price_orders',
- 'GET',
+ '/spot/price_orders', 'GET',
path_params,
query_params,
header_params,
@@ -3059,11 +3567,10 @@ def list_spot_price_triggered_orders_with_http_info(self, status, **kwargs): #
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_spot_price_triggered_order(self, spot_price_triggered_order, **kwargs): # noqa: E501
- """Create a price-triggered order # noqa: E501
+ """Create price-triggered order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3087,7 +3594,7 @@ def create_spot_price_triggered_order(self, spot_price_triggered_order, **kwargs
return self.create_spot_price_triggered_order_with_http_info(spot_price_triggered_order, **kwargs) # noqa: E501
def create_spot_price_triggered_order_with_http_info(self, spot_price_triggered_order, **kwargs): # noqa: E501
- """Create a price-triggered order # noqa: E501
+ """Create price-triggered order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3112,24 +3619,30 @@ def create_spot_price_triggered_order_with_http_info(self, spot_price_triggered_
local_var_params = locals()
- all_params = ['spot_price_triggered_order']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'spot_price_triggered_order'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method create_spot_price_triggered_order" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method create_spot_price_triggered_order" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'spot_price_triggered_order' is set
- if self.api_client.client_side_validation and (
- 'spot_price_triggered_order' not in local_var_params
- or local_var_params['spot_price_triggered_order'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `spot_price_triggered_order` when calling `create_spot_price_triggered_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('spot_price_triggered_order' not in local_var_params or # noqa: E501
+ local_var_params['spot_price_triggered_order'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `spot_price_triggered_order` when calling `create_spot_price_triggered_order`") # noqa: E501
collection_formats = {}
@@ -3146,19 +3659,18 @@ def create_spot_price_triggered_order_with_http_info(self, spot_price_triggered_
if 'spot_price_triggered_order' in local_var_params:
body_params = local_var_params['spot_price_triggered_order']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/price_orders',
- 'POST',
+ '/spot/price_orders', 'POST',
path_params,
query_params,
header_params,
@@ -3171,11 +3683,10 @@ def create_spot_price_triggered_order_with_http_info(self, spot_price_triggered_
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def cancel_spot_price_triggered_order_list(self, **kwargs): # noqa: E501
- """Cancel all open orders # noqa: E501
+ """Cancel all auto orders # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3183,8 +3694,8 @@ def cancel_spot_price_triggered_order_list(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str market: Currency pair
- :param str account: Trading account type. Portfolio margin account must set to `cross_margin`
+ :param str market: Trading market
+ :param str account: Trading account type. Unified account must be set to `unified`
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -3200,7 +3711,7 @@ def cancel_spot_price_triggered_order_list(self, **kwargs): # noqa: E501
return self.cancel_spot_price_triggered_order_list_with_http_info(**kwargs) # noqa: E501
def cancel_spot_price_triggered_order_list_with_http_info(self, **kwargs): # noqa: E501
- """Cancel all open orders # noqa: E501
+ """Cancel all auto orders # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3208,8 +3719,8 @@ def cancel_spot_price_triggered_order_list_with_http_info(self, **kwargs): # no
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str market: Currency pair
- :param str account: Trading account type. Portfolio margin account must set to `cross_margin`
+ :param str market: Trading market
+ :param str account: Trading account type. Unified account must be set to `unified`
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -3226,13 +3737,24 @@ def cancel_spot_price_triggered_order_list_with_http_info(self, **kwargs): # no
local_var_params = locals()
- all_params = ['market', 'account']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'market',
+ 'account'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method cancel_spot_price_triggered_order_list" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_spot_price_triggered_order_list" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
@@ -3254,14 +3776,14 @@ def cancel_spot_price_triggered_order_list_with_http_info(self, **kwargs): # no
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/price_orders',
- 'DELETE',
+ '/spot/price_orders', 'DELETE',
path_params,
query_params,
header_params,
@@ -3274,11 +3796,10 @@ def cancel_spot_price_triggered_order_list_with_http_info(self, **kwargs): # no
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501
- """Get a price-triggered order # noqa: E501
+ """Query single auto order details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3286,7 +3807,7 @@ def get_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -3302,7 +3823,7 @@ def get_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501
return self.get_spot_price_triggered_order_with_http_info(order_id, **kwargs) # noqa: E501
def get_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # noqa: E501
- """Get a price-triggered order # noqa: E501
+ """Query single auto order details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3310,7 +3831,7 @@ def get_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): #
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -3327,23 +3848,30 @@ def get_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): #
local_var_params = locals()
- all_params = ['order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method get_spot_price_triggered_order" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method get_spot_price_triggered_order" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `get_spot_price_triggered_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `get_spot_price_triggered_order`") # noqa: E501
collection_formats = {}
@@ -3360,14 +3888,14 @@ def get_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): #
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/price_orders/{order_id}',
- 'GET',
+ '/spot/price_orders/{order_id}', 'GET',
path_params,
query_params,
header_params,
@@ -3380,11 +3908,10 @@ def get_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): #
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def cancel_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501
- """cancel a price-triggered order # noqa: E501
+ """Cancel single auto order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3392,7 +3919,7 @@ def cancel_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -3408,7 +3935,7 @@ def cancel_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501
return self.cancel_spot_price_triggered_order_with_http_info(order_id, **kwargs) # noqa: E501
def cancel_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # noqa: E501
- """cancel a price-triggered order # noqa: E501
+ """Cancel single auto order # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -3416,7 +3943,7 @@ def cancel_spot_price_triggered_order_with_http_info(self, order_id, **kwargs):
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str order_id: Retrieve the data of the order with the specified ID (required)
+ :param str order_id: ID returned when order is successfully created (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -3433,23 +3960,30 @@ def cancel_spot_price_triggered_order_with_http_info(self, order_id, **kwargs):
local_var_params = locals()
- all_params = ['order_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'order_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method cancel_spot_price_triggered_order" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_spot_price_triggered_order" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'order_id' is set
- if self.api_client.client_side_validation and (
- 'order_id' not in local_var_params or local_var_params['order_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `order_id` when calling `cancel_spot_price_triggered_order`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
+ local_var_params['order_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_spot_price_triggered_order`") # noqa: E501
collection_formats = {}
@@ -3466,14 +4000,14 @@ def cancel_spot_price_triggered_order_with_http_info(self, order_id, **kwargs):
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/spot/price_orders/{order_id}',
- 'DELETE',
+ '/spot/price_orders/{order_id}', 'DELETE',
path_params,
query_params,
header_params,
@@ -3486,5 +4020,4 @@ def cancel_spot_price_triggered_order_with_http_info(self, order_id, **kwargs):
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
diff --git a/gate_api/api/sub_account_api.py b/gate_api/api/sub_account_api.py
index fdf3c00..2c864c3 100644
--- a/gate_api/api/sub_account_api.py
+++ b/gate_api/api/sub_account_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class SubAccountApi(object):
@@ -42,7 +45,7 @@ def list_sub_accounts(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str type: `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default.
+ :param str type: Enter `0` to list all types of sub-accounts (currently supporting cross-margin sub-accounts and regular sub-accounts). Enter `1` to query regular sub-accounts only. If no parameter is passed, only regular sub-accounts will be queried by default.
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -66,7 +69,7 @@ def list_sub_accounts_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str type: `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default.
+ :param str type: Enter `0` to list all types of sub-accounts (currently supporting cross-margin sub-accounts and regular sub-accounts). Enter `1` to query regular sub-accounts only. If no parameter is passed, only regular sub-accounts will be queried by default.
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -83,12 +86,24 @@ def list_sub_accounts_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['type']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'type'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_sub_accounts" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_sub_accounts" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -107,14 +122,14 @@ def list_sub_accounts_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/sub_accounts',
- 'GET',
+ '/sub_accounts', 'GET',
path_params,
query_params,
header_params,
@@ -127,8 +142,7 @@ def list_sub_accounts_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_sub_accounts(self, sub_account, **kwargs): # noqa: E501
"""Create a new sub-account # noqa: E501
@@ -180,21 +194,30 @@ def create_sub_accounts_with_http_info(self, sub_account, **kwargs): # noqa: E5
local_var_params = locals()
- all_params = ['sub_account']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'sub_account'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_sub_accounts" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_sub_accounts" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'sub_account' is set
- if self.api_client.client_side_validation and (
- 'sub_account' not in local_var_params or local_var_params['sub_account'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `sub_account` when calling `create_sub_accounts`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('sub_account' not in local_var_params or # noqa: E501
+ local_var_params['sub_account'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `sub_account` when calling `create_sub_accounts`") # noqa: E501
collection_formats = {}
@@ -211,19 +234,18 @@ def create_sub_accounts_with_http_info(self, sub_account, **kwargs): # noqa: E5
if 'sub_account' in local_var_params:
body_params = local_var_params['sub_account']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/sub_accounts',
- 'POST',
+ '/sub_accounts', 'POST',
path_params,
query_params,
header_params,
@@ -236,11 +258,10 @@ def create_sub_accounts_with_http_info(self, sub_account, **kwargs): # noqa: E5
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_sub_account(self, user_id, **kwargs): # noqa: E501
- """Get the sub-account # noqa: E501
+ """Get sub-account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -248,7 +269,7 @@ def get_sub_account(self, user_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: Sub-account user id (required)
+ :param int user_id: Sub-account user ID (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -264,7 +285,7 @@ def get_sub_account(self, user_id, **kwargs): # noqa: E501
return self.get_sub_account_with_http_info(user_id, **kwargs) # noqa: E501
def get_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
- """Get the sub-account # noqa: E501
+ """Get sub-account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -272,7 +293,7 @@ def get_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: Sub-account user id (required)
+ :param int user_id: Sub-account user ID (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -289,18 +310,29 @@ def get_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['user_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'user_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_sub_account" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_sub_account" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'user_id' is set
- if self.api_client.client_side_validation and (
- 'user_id' not in local_var_params or local_var_params['user_id'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501
+ local_var_params['user_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `user_id` when calling `get_sub_account`") # noqa: E501
collection_formats = {}
@@ -318,14 +350,14 @@ def get_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/sub_accounts/{user_id}',
- 'GET',
+ '/sub_accounts/{user_id}', 'GET',
path_params,
query_params,
header_params,
@@ -338,11 +370,10 @@ def get_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_sub_account_keys(self, user_id, **kwargs): # noqa: E501
- """List all API Key of the sub-account # noqa: E501
+ """List all API key pairs of the sub-account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -350,7 +381,7 @@ def list_sub_account_keys(self, user_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: Sub-account user id (required)
+ :param int user_id: Sub-account user ID (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -366,7 +397,7 @@ def list_sub_account_keys(self, user_id, **kwargs): # noqa: E501
return self.list_sub_account_keys_with_http_info(user_id, **kwargs) # noqa: E501
def list_sub_account_keys_with_http_info(self, user_id, **kwargs): # noqa: E501
- """List all API Key of the sub-account # noqa: E501
+ """List all API key pairs of the sub-account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -374,7 +405,7 @@ def list_sub_account_keys_with_http_info(self, user_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: Sub-account user id (required)
+ :param int user_id: Sub-account user ID (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -391,21 +422,30 @@ def list_sub_account_keys_with_http_info(self, user_id, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['user_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'user_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_sub_account_keys" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_sub_account_keys" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'user_id' is set
- if self.api_client.client_side_validation and (
- 'user_id' not in local_var_params or local_var_params['user_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `user_id` when calling `list_sub_account_keys`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501
+ local_var_params['user_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `user_id` when calling `list_sub_account_keys`") # noqa: E501
collection_formats = {}
@@ -422,14 +462,14 @@ def list_sub_account_keys_with_http_info(self, user_id, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/sub_accounts/{user_id}/keys',
- 'GET',
+ '/sub_accounts/{user_id}/keys', 'GET',
path_params,
query_params,
header_params,
@@ -442,11 +482,10 @@ def list_sub_account_keys_with_http_info(self, user_id, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def create_sub_account_keys(self, user_id, sub_account_key, **kwargs): # noqa: E501
- """Create API Key of the sub-account # noqa: E501
+ """Create new sub-account API key pair # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -454,7 +493,7 @@ def create_sub_account_keys(self, user_id, sub_account_key, **kwargs): # noqa:
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: Sub-account user id (required)
+ :param int user_id: Sub-account user ID (required)
:param SubAccountKey sub_account_key: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -463,7 +502,7 @@ def create_sub_account_keys(self, user_id, sub_account_key, **kwargs): # noqa:
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: list[gate_api.SubAccountKey]
+ :rtype: gate_api.SubAccountKey
:return: If the method is called asynchronously,
returns the request thread.
"""
@@ -471,7 +510,7 @@ def create_sub_account_keys(self, user_id, sub_account_key, **kwargs): # noqa:
return self.create_sub_account_keys_with_http_info(user_id, sub_account_key, **kwargs) # noqa: E501
def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwargs): # noqa: E501
- """Create API Key of the sub-account # noqa: E501
+ """Create new sub-account API key pair # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -479,7 +518,7 @@ def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwa
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: Sub-account user id (required)
+ :param int user_id: Sub-account user ID (required)
:param SubAccountKey sub_account_key: (required)
:param _return_http_data_only: response data without head status code
and headers
@@ -490,35 +529,42 @@ def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwa
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(list[gate_api.SubAccountKey], status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(gate_api.SubAccountKey, status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['user_id', 'sub_account_key']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'user_id',
+ 'sub_account_key'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_sub_account_keys" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_sub_account_keys" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'user_id' is set
- if self.api_client.client_side_validation and (
- 'user_id' not in local_var_params or local_var_params['user_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `user_id` when calling `create_sub_account_keys`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501
+ local_var_params['user_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `user_id` when calling `create_sub_account_keys`") # noqa: E501
# verify the required parameter 'sub_account_key' is set
- if self.api_client.client_side_validation and (
- 'sub_account_key' not in local_var_params or local_var_params['sub_account_key'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `sub_account_key` when calling `create_sub_account_keys`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('sub_account_key' not in local_var_params or # noqa: E501
+ local_var_params['sub_account_key'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `sub_account_key` when calling `create_sub_account_keys`") # noqa: E501
collection_formats = {}
@@ -537,36 +583,34 @@ def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwa
if 'sub_account_key' in local_var_params:
body_params = local_var_params['sub_account_key']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/sub_accounts/{user_id}/keys',
- 'POST',
+ '/sub_accounts/{user_id}/keys', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[SubAccountKey]', # noqa: E501
+ response_type='SubAccountKey', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_sub_account_key(self, user_id, key, **kwargs): # noqa: E501
- """Get the API Key of the sub-account # noqa: E501
+ """Get specific API key pair of the sub-account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -574,8 +618,8 @@ def get_sub_account_key(self, user_id, key, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: Sub-account user id (required)
- :param str key: The API Key of the sub-account (required)
+ :param int user_id: Sub-account user ID (required)
+ :param str key: Sub-account API key (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -591,7 +635,7 @@ def get_sub_account_key(self, user_id, key, **kwargs): # noqa: E501
return self.get_sub_account_key_with_http_info(user_id, key, **kwargs) # noqa: E501
def get_sub_account_key_with_http_info(self, user_id, key, **kwargs): # noqa: E501
- """Get the API Key of the sub-account # noqa: E501
+ """Get specific API key pair of the sub-account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -599,8 +643,8 @@ def get_sub_account_key_with_http_info(self, user_id, key, **kwargs): # noqa: E
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: Sub-account user id (required)
- :param str key: The API Key of the sub-account (required)
+ :param int user_id: Sub-account user ID (required)
+ :param str key: Sub-account API key (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -617,25 +661,34 @@ def get_sub_account_key_with_http_info(self, user_id, key, **kwargs): # noqa: E
local_var_params = locals()
- all_params = ['user_id', 'key']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'user_id',
+ 'key'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_sub_account_key" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_sub_account_key" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'user_id' is set
- if self.api_client.client_side_validation and (
- 'user_id' not in local_var_params or local_var_params['user_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `user_id` when calling `get_sub_account_key`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501
+ local_var_params['user_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `user_id` when calling `get_sub_account_key`") # noqa: E501
# verify the required parameter 'key' is set
- if self.api_client.client_side_validation and (
- 'key' not in local_var_params or local_var_params['key'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501
+ local_var_params['key'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `key` when calling `get_sub_account_key`") # noqa: E501
collection_formats = {}
@@ -655,14 +708,14 @@ def get_sub_account_key_with_http_info(self, user_id, key, **kwargs): # noqa: E
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/sub_accounts/{user_id}/keys/{key}',
- 'GET',
+ '/sub_accounts/{user_id}/keys/{key}', 'GET',
path_params,
query_params,
header_params,
@@ -675,11 +728,10 @@ def get_sub_account_key_with_http_info(self, user_id, key, **kwargs): # noqa: E
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def update_sub_account_keys(self, user_id, key, sub_account_key, **kwargs): # noqa: E501
- """Update API key of the sub-account # noqa: E501
+ """Update sub-account API key pair # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -687,8 +739,8 @@ def update_sub_account_keys(self, user_id, key, sub_account_key, **kwargs): # n
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: Sub-account user id (required)
- :param str key: The API Key of the sub-account (required)
+ :param int user_id: Sub-account user ID (required)
+ :param str key: Sub-account API key (required)
:param SubAccountKey sub_account_key: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -705,7 +757,7 @@ def update_sub_account_keys(self, user_id, key, sub_account_key, **kwargs): # n
return self.update_sub_account_keys_with_http_info(user_id, key, sub_account_key, **kwargs) # noqa: E501
def update_sub_account_keys_with_http_info(self, user_id, key, sub_account_key, **kwargs): # noqa: E501
- """Update API key of the sub-account # noqa: E501
+ """Update sub-account API key pair # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -713,8 +765,8 @@ def update_sub_account_keys_with_http_info(self, user_id, key, sub_account_key,
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: Sub-account user id (required)
- :param str key: The API Key of the sub-account (required)
+ :param int user_id: Sub-account user ID (required)
+ :param str key: Sub-account API key (required)
:param SubAccountKey sub_account_key: (required)
:param _return_http_data_only: response data without head status code
and headers
@@ -732,35 +784,40 @@ def update_sub_account_keys_with_http_info(self, user_id, key, sub_account_key,
local_var_params = locals()
- all_params = ['user_id', 'key', 'sub_account_key']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'user_id',
+ 'key',
+ 'sub_account_key'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method update_sub_account_keys" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_sub_account_keys" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'user_id' is set
- if self.api_client.client_side_validation and (
- 'user_id' not in local_var_params or local_var_params['user_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `user_id` when calling `update_sub_account_keys`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501
+ local_var_params['user_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `user_id` when calling `update_sub_account_keys`") # noqa: E501
# verify the required parameter 'key' is set
- if self.api_client.client_side_validation and (
- 'key' not in local_var_params or local_var_params['key'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `key` when calling `update_sub_account_keys`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501
+ local_var_params['key'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `key` when calling `update_sub_account_keys`") # noqa: E501
# verify the required parameter 'sub_account_key' is set
- if self.api_client.client_side_validation and (
- 'sub_account_key' not in local_var_params or local_var_params['sub_account_key'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `sub_account_key` when calling `update_sub_account_keys`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('sub_account_key' not in local_var_params or # noqa: E501
+ local_var_params['sub_account_key'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `sub_account_key` when calling `update_sub_account_keys`") # noqa: E501
collection_formats = {}
@@ -782,15 +839,13 @@ def update_sub_account_keys_with_http_info(self, user_id, key, sub_account_key,
body_params = local_var_params['sub_account_key']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/sub_accounts/{user_id}/keys/{key}',
- 'PUT',
+ '/sub_accounts/{user_id}/keys/{key}', 'PUT',
path_params,
query_params,
header_params,
@@ -803,11 +858,10 @@ def update_sub_account_keys_with_http_info(self, user_id, key, sub_account_key,
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def delete_sub_account_keys(self, user_id, key, **kwargs): # noqa: E501
- """Delete API key of the sub-account # noqa: E501
+ """Delete sub-account API key pair # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -815,8 +869,8 @@ def delete_sub_account_keys(self, user_id, key, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: Sub-account user id (required)
- :param str key: The API Key of the sub-account (required)
+ :param int user_id: Sub-account user ID (required)
+ :param str key: Sub-account API key (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -832,7 +886,7 @@ def delete_sub_account_keys(self, user_id, key, **kwargs): # noqa: E501
return self.delete_sub_account_keys_with_http_info(user_id, key, **kwargs) # noqa: E501
def delete_sub_account_keys_with_http_info(self, user_id, key, **kwargs): # noqa: E501
- """Delete API key of the sub-account # noqa: E501
+ """Delete sub-account API key pair # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -840,8 +894,8 @@ def delete_sub_account_keys_with_http_info(self, user_id, key, **kwargs): # noq
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: Sub-account user id (required)
- :param str key: The API Key of the sub-account (required)
+ :param int user_id: Sub-account user ID (required)
+ :param str key: Sub-account API key (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -858,28 +912,35 @@ def delete_sub_account_keys_with_http_info(self, user_id, key, **kwargs): # noq
local_var_params = locals()
- all_params = ['user_id', 'key']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'user_id',
+ 'key'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method delete_sub_account_keys" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_sub_account_keys" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'user_id' is set
- if self.api_client.client_side_validation and (
- 'user_id' not in local_var_params or local_var_params['user_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `user_id` when calling `delete_sub_account_keys`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501
+ local_var_params['user_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `user_id` when calling `delete_sub_account_keys`") # noqa: E501
# verify the required parameter 'key' is set
- if self.api_client.client_side_validation and (
- 'key' not in local_var_params or local_var_params['key'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `key` when calling `delete_sub_account_keys`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501
+ local_var_params['key'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `key` when calling `delete_sub_account_keys`") # noqa: E501
collection_formats = {}
@@ -901,8 +962,7 @@ def delete_sub_account_keys_with_http_info(self, user_id, key, **kwargs): # noq
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/sub_accounts/{user_id}/keys/{key}',
- 'DELETE',
+ '/sub_accounts/{user_id}/keys/{key}', 'DELETE',
path_params,
query_params,
header_params,
@@ -915,11 +975,10 @@ def delete_sub_account_keys_with_http_info(self, user_id, key, **kwargs): # noq
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def lock_sub_account(self, user_id, **kwargs): # noqa: E501
- """Lock the sub-account # noqa: E501
+ """Lock sub-account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -927,7 +986,7 @@ def lock_sub_account(self, user_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: The user id of the sub-account (required)
+ :param int user_id: Sub-account user ID (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -943,7 +1002,7 @@ def lock_sub_account(self, user_id, **kwargs): # noqa: E501
return self.lock_sub_account_with_http_info(user_id, **kwargs) # noqa: E501
def lock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
- """Lock the sub-account # noqa: E501
+ """Lock sub-account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -951,7 +1010,7 @@ def lock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: The user id of the sub-account (required)
+ :param int user_id: Sub-account user ID (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -968,21 +1027,30 @@ def lock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['user_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'user_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method lock_sub_account" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method lock_sub_account" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'user_id' is set
- if self.api_client.client_side_validation and (
- 'user_id' not in local_var_params or local_var_params['user_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `user_id` when calling `lock_sub_account`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501
+ local_var_params['user_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `user_id` when calling `lock_sub_account`") # noqa: E501
collection_formats = {}
@@ -1002,8 +1070,7 @@ def lock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/sub_accounts/{user_id}/lock',
- 'POST',
+ '/sub_accounts/{user_id}/lock', 'POST',
path_params,
query_params,
header_params,
@@ -1016,11 +1083,10 @@ def lock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def unlock_sub_account(self, user_id, **kwargs): # noqa: E501
- """Unlock the sub-account # noqa: E501
+ """Unlock sub-account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1028,7 +1094,7 @@ def unlock_sub_account(self, user_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: The user id of the sub-account (required)
+ :param int user_id: Sub-account user ID (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1044,7 +1110,7 @@ def unlock_sub_account(self, user_id, **kwargs): # noqa: E501
return self.unlock_sub_account_with_http_info(user_id, **kwargs) # noqa: E501
def unlock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
- """Unlock the sub-account # noqa: E501
+ """Unlock sub-account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1052,7 +1118,7 @@ def unlock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param int user_id: The user id of the sub-account (required)
+ :param int user_id: Sub-account user ID (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1069,21 +1135,30 @@ def unlock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['user_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'user_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method unlock_sub_account" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method unlock_sub_account" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'user_id' is set
- if self.api_client.client_side_validation and (
- 'user_id' not in local_var_params or local_var_params['user_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `user_id` when calling `unlock_sub_account`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501
+ local_var_params['user_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `user_id` when calling `unlock_sub_account`") # noqa: E501
collection_formats = {}
@@ -1103,8 +1178,7 @@ def unlock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/sub_accounts/{user_id}/unlock',
- 'POST',
+ '/sub_accounts/{user_id}/unlock', 'POST',
path_params,
query_params,
header_params,
@@ -1117,5 +1191,109 @@ def unlock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def list_unified_mode(self, **kwargs): # noqa: E501
+ """Get sub-account mode # noqa: E501
+
+ Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_unified_mode(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.SubUserMode]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_unified_mode_with_http_info(**kwargs) # noqa: E501
+
+ def list_unified_mode_with_http_info(self, **kwargs): # noqa: E501
+ """Get sub-account mode # noqa: E501
+
+ Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_unified_mode_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.SubUserMode], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_unified_mode" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/sub_accounts/unified_mode', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[SubUserMode]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/gate_api/api/unified_api.py b/gate_api/api/unified_api.py
new file mode 100644
index 0000000..a6deb68
--- /dev/null
+++ b/gate_api/api/unified_api.py
@@ -0,0 +1,2582 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import re # noqa: F401
+
+# python 2 and python 3 compatibility library
+import six
+
+from gate_api.api_client import ApiClient
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class UnifiedApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def list_unified_accounts(self, **kwargs): # noqa: E501
+ """Get unified account information # noqa: E501
+
+ The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. For specific formulas, please refer to [Margin Formula](#margin-formula) # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_unified_accounts(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Query by specified currency name
+ :param str sub_uid: Sub account user ID
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.UnifiedAccount
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_unified_accounts_with_http_info(**kwargs) # noqa: E501
+
+ def list_unified_accounts_with_http_info(self, **kwargs): # noqa: E501
+ """Get unified account information # noqa: E501
+
+ The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. For specific formulas, please refer to [Margin Formula](#margin-formula) # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_unified_accounts_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Query by specified currency name
+ :param str sub_uid: Sub account user ID
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.UnifiedAccount, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currency',
+ 'sub_uid'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_unified_accounts" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if 'sub_uid' in local_var_params and local_var_params['sub_uid'] is not None: # noqa: E501
+ query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/accounts', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UnifiedAccount', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_unified_borrowable(self, currency, **kwargs): # noqa: E501
+ """Query maximum borrowable amount for unified account # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_borrowable(currency, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Query by specified currency name (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.UnifiedBorrowable
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_unified_borrowable_with_http_info(currency, **kwargs) # noqa: E501
+
+ def get_unified_borrowable_with_http_info(self, currency, **kwargs): # noqa: E501
+ """Query maximum borrowable amount for unified account # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_borrowable_with_http_info(currency, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Query by specified currency name (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.UnifiedBorrowable, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_unified_borrowable" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'currency' is set
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `get_unified_borrowable`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/borrowable', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UnifiedBorrowable', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_unified_transferable(self, currency, **kwargs): # noqa: E501
+ """Query maximum transferable amount for unified account # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_transferable(currency, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Query by specified currency name (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.UnifiedTransferable
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_unified_transferable_with_http_info(currency, **kwargs) # noqa: E501
+
+ def get_unified_transferable_with_http_info(self, currency, **kwargs): # noqa: E501
+ """Query maximum transferable amount for unified account # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_transferable_with_http_info(currency, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Query by specified currency name (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.UnifiedTransferable, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_unified_transferable" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'currency' is set
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `get_unified_transferable`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/transferable', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UnifiedTransferable', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_unified_transferables(self, currencies, **kwargs): # noqa: E501
+ """Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_transferables(currencies, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currencies: Specify the currency name to query in batches, and support up to 100 pass parameters at a time (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.TransferablesResult]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_unified_transferables_with_http_info(currencies, **kwargs) # noqa: E501
+
+ def get_unified_transferables_with_http_info(self, currencies, **kwargs): # noqa: E501
+ """Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_transferables_with_http_info(currencies, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currencies: Specify the currency name to query in batches, and support up to 100 pass parameters at a time (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.TransferablesResult], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currencies'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_unified_transferables" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'currencies' is set
+ if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501
+ local_var_params['currencies'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currencies` when calling `get_unified_transferables`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501
+ query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/transferables', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[TransferablesResult]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_unified_borrowable_list(self, currencies, **kwargs): # noqa: E501
+ """Batch query unified account maximum borrowable amount # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_borrowable_list(currencies, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param list[str] currencies: Specify currency names for querying in an array, separated by commas, maximum 10 currencies (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.UnifiedBorrowable1]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_unified_borrowable_list_with_http_info(currencies, **kwargs) # noqa: E501
+
+ def get_unified_borrowable_list_with_http_info(self, currencies, **kwargs): # noqa: E501
+ """Batch query unified account maximum borrowable amount # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_borrowable_list_with_http_info(currencies, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param list[str] currencies: Specify currency names for querying in an array, separated by commas, maximum 10 currencies (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.UnifiedBorrowable1], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currencies'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_unified_borrowable_list" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'currencies' is set
+ if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501
+ local_var_params['currencies'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currencies` when calling `get_unified_borrowable_list`") # noqa: E501
+
+ if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501
+ len(local_var_params['currencies']) > 10): # noqa: E501
+ raise ApiValueError("Invalid value for parameter `currencies` when calling `get_unified_borrowable_list`, number of items must be less than or equal to `10`") # noqa: E501
+ if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501
+ len(local_var_params['currencies']) < 1): # noqa: E501
+ raise ApiValueError("Invalid value for parameter `currencies` when calling `get_unified_borrowable_list`, number of items must be greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501
+ query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501
+ collection_formats['currencies'] = 'multi' # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/batch_borrowable', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[UnifiedBorrowable1]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_unified_loans(self, **kwargs): # noqa: E501
+ """Query loans # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_unified_loans(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Query by specified currency name
+ :param int page: Page number
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param str type: Loan type: platform borrowing - platform, margin borrowing - margin
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.UniLoan]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_unified_loans_with_http_info(**kwargs) # noqa: E501
+
+ def list_unified_loans_with_http_info(self, **kwargs): # noqa: E501
+ """Query loans # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_unified_loans_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Query by specified currency name
+ :param int page: Page number
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param str type: Loan type: platform borrowing - platform, margin borrowing - margin
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.UniLoan], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currency',
+ 'page',
+ 'limit',
+ 'type'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_unified_loans" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_unified_loans`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loans`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loans`, must be a value greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501
+ query_params.append(('type', local_var_params['type'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/loans', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[UniLoan]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def create_unified_loan(self, unified_loan, **kwargs): # noqa: E501
+ """Borrow or repay # noqa: E501
+
+ When borrowing, ensure the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and user. Loan interest will be automatically deducted from the account at regular intervals. Users are responsible for managing repayment of borrowed amounts. For repayment, use `repaid_all=true` to repay all available amounts # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_unified_loan(unified_loan, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param UnifiedLoan unified_loan: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.UnifiedLoanResult
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_unified_loan_with_http_info(unified_loan, **kwargs) # noqa: E501
+
+ def create_unified_loan_with_http_info(self, unified_loan, **kwargs): # noqa: E501
+ """Borrow or repay # noqa: E501
+
+ When borrowing, ensure the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and user. Loan interest will be automatically deducted from the account at regular intervals. Users are responsible for managing repayment of borrowed amounts. For repayment, use `repaid_all=true` to repay all available amounts # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_unified_loan_with_http_info(unified_loan, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param UnifiedLoan unified_loan: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.UnifiedLoanResult, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'unified_loan'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_unified_loan" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'unified_loan' is set
+ if self.api_client.client_side_validation and ('unified_loan' not in local_var_params or # noqa: E501
+ local_var_params['unified_loan'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `unified_loan` when calling `create_unified_loan`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'unified_loan' in local_var_params:
+ body_params = local_var_params['unified_loan']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/loans', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UnifiedLoanResult', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_unified_loan_records(self, **kwargs): # noqa: E501
+ """Query loan records # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_unified_loan_records(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str type: Loan record type: borrow - borrowing, repay - repayment
+ :param str currency: Query by specified currency name
+ :param int page: Page number
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.UnifiedLoanRecord]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_unified_loan_records_with_http_info(**kwargs) # noqa: E501
+
+ def list_unified_loan_records_with_http_info(self, **kwargs): # noqa: E501
+ """Query loan records # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_unified_loan_records_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str type: Loan record type: borrow - borrowing, repay - repayment
+ :param str currency: Query by specified currency name
+ :param int page: Page number
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.UnifiedLoanRecord], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'type',
+ 'currency',
+ 'page',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_unified_loan_records" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_unified_loan_records`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loan_records`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loan_records`, must be a value greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501
+ query_params.append(('type', local_var_params['type'])) # noqa: E501
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/loan_records', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[UnifiedLoanRecord]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_unified_loan_interest_records(self, **kwargs): # noqa: E501
+ """Query interest deduction records # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_unified_loan_interest_records(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Query by specified currency name
+ :param int page: Page number
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param str type: Loan type: platform borrowing - platform, margin borrowing - margin. Defaults to margin if not specified
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.UniLoanInterestRecord]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_unified_loan_interest_records_with_http_info(**kwargs) # noqa: E501
+
+ def list_unified_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501
+ """Query interest deduction records # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_unified_loan_interest_records_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Query by specified currency name
+ :param int page: Page number
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param int _from: Start timestamp for the query
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param str type: Loan type: platform borrowing - platform, margin borrowing - margin. Defaults to margin if not specified
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currency',
+ 'page',
+ 'limit',
+ '_from',
+ 'to',
+ 'type'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_unified_loan_interest_records" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_unified_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loan_interest_records`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
+ if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501
+ query_params.append(('type', local_var_params['type'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/interest_records', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[UniLoanInterestRecord]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_unified_risk_units(self, **kwargs): # noqa: E501
+ """Get user risk unit details # noqa: E501
+
+ Get user risk unit details, only valid in portfolio margin mode # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_risk_units(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.UnifiedRiskUnits
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_unified_risk_units_with_http_info(**kwargs) # noqa: E501
+
+ def get_unified_risk_units_with_http_info(self, **kwargs): # noqa: E501
+ """Get user risk unit details # noqa: E501
+
+ Get user risk unit details, only valid in portfolio margin mode # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_risk_units_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.UnifiedRiskUnits, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_unified_risk_units" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/risk_units', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UnifiedRiskUnits', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_unified_mode(self, **kwargs): # noqa: E501
+ """Query mode of the unified account # noqa: E501
+
+ Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_mode(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.UnifiedModeSet
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_unified_mode_with_http_info(**kwargs) # noqa: E501
+
+ def get_unified_mode_with_http_info(self, **kwargs): # noqa: E501
+ """Query mode of the unified account # noqa: E501
+
+ Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_mode_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.UnifiedModeSet, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_unified_mode" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/unified_mode', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UnifiedModeSet', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def set_unified_mode(self, unified_mode_set, **kwargs): # noqa: E501
+ """Set unified account mode # noqa: E501
+
+ Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.set_unified_mode(unified_mode_set, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param UnifiedModeSet unified_mode_set: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: None
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.set_unified_mode_with_http_info(unified_mode_set, **kwargs) # noqa: E501
+
+ def set_unified_mode_with_http_info(self, unified_mode_set, **kwargs): # noqa: E501
+ """Set unified account mode # noqa: E501
+
+ Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.set_unified_mode_with_http_info(unified_mode_set, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param UnifiedModeSet unified_mode_set: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: None
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'unified_mode_set'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method set_unified_mode" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'unified_mode_set' is set
+ if self.api_client.client_side_validation and ('unified_mode_set' not in local_var_params or # noqa: E501
+ local_var_params['unified_mode_set'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `unified_mode_set` when calling `set_unified_mode`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'unified_mode_set' in local_var_params:
+ body_params = local_var_params['unified_mode_set']
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/unified_mode', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_unified_estimate_rate(self, currencies, **kwargs): # noqa: E501
+ """Query unified account estimated interest rate # noqa: E501
+
+ Interest rates fluctuate hourly based on lending depth, so exact rates cannot be provided. When a currency is not supported, the interest rate returned will be an empty string # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_estimate_rate(currencies, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param list[str] currencies: Specify currency names for querying in an array, separated by commas, maximum 10 currencies (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: dict
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_unified_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501
+
+ def get_unified_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501
+ """Query unified account estimated interest rate # noqa: E501
+
+ Interest rates fluctuate hourly based on lending depth, so exact rates cannot be provided. When a currency is not supported, the interest rate returned will be an empty string # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_unified_estimate_rate_with_http_info(currencies, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param list[str] currencies: Specify currency names for querying in an array, separated by commas, maximum 10 currencies (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(dict, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currencies'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_unified_estimate_rate" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'currencies' is set
+ if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501
+ local_var_params['currencies'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currencies` when calling `get_unified_estimate_rate`") # noqa: E501
+
+ if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501
+ len(local_var_params['currencies']) > 10): # noqa: E501
+ raise ApiValueError("Invalid value for parameter `currencies` when calling `get_unified_estimate_rate`, number of items must be less than or equal to `10`") # noqa: E501
+ if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501
+ len(local_var_params['currencies']) < 1): # noqa: E501
+ raise ApiValueError("Invalid value for parameter `currencies` when calling `get_unified_estimate_rate`, number of items must be greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501
+ query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501
+ collection_formats['currencies'] = 'multi' # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/estimate_rate', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='dict(str, str)', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_currency_discount_tiers(self, **kwargs): # noqa: E501
+ """Query unified account tiered # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_currency_discount_tiers(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.UnifiedDiscount]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_currency_discount_tiers_with_http_info(**kwargs) # noqa: E501
+
+ def list_currency_discount_tiers_with_http_info(self, **kwargs): # noqa: E501
+ """Query unified account tiered # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_currency_discount_tiers_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.UnifiedDiscount], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_currency_discount_tiers" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/currency_discount_tiers', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[UnifiedDiscount]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_loan_margin_tiers(self, **kwargs): # noqa: E501
+ """Query unified account tiered loan margin # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_loan_margin_tiers(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.UnifiedMarginTiers]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_loan_margin_tiers_with_http_info(**kwargs) # noqa: E501
+
+ def list_loan_margin_tiers_with_http_info(self, **kwargs): # noqa: E501
+ """Query unified account tiered loan margin # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_loan_margin_tiers_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.UnifiedMarginTiers], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_loan_margin_tiers" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/loan_margin_tiers', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[UnifiedMarginTiers]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def calculate_portfolio_margin(self, unified_portfolio_input, **kwargs): # noqa: E501
+ """Portfolio margin calculator # noqa: E501
+
+ Portfolio Margin Calculator When inputting simulated position portfolios, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.calculate_portfolio_margin(unified_portfolio_input, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param UnifiedPortfolioInput unified_portfolio_input: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.UnifiedPortfolioOutput
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.calculate_portfolio_margin_with_http_info(unified_portfolio_input, **kwargs) # noqa: E501
+
+ def calculate_portfolio_margin_with_http_info(self, unified_portfolio_input, **kwargs): # noqa: E501
+ """Portfolio margin calculator # noqa: E501
+
+ Portfolio Margin Calculator When inputting simulated position portfolios, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.calculate_portfolio_margin_with_http_info(unified_portfolio_input, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param UnifiedPortfolioInput unified_portfolio_input: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.UnifiedPortfolioOutput, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'unified_portfolio_input'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method calculate_portfolio_margin" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'unified_portfolio_input' is set
+ if self.api_client.client_side_validation and ('unified_portfolio_input' not in local_var_params or # noqa: E501
+ local_var_params['unified_portfolio_input'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `unified_portfolio_input` when calling `calculate_portfolio_margin`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'unified_portfolio_input' in local_var_params:
+ body_params = local_var_params['unified_portfolio_input']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/portfolio_calculator', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UnifiedPortfolioOutput', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_user_leverage_currency_config(self, currency, **kwargs): # noqa: E501
+ """Maximum and minimum currency leverage that can be set # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_user_leverage_currency_config(currency, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Currency (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.UnifiedLeverageConfig
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_user_leverage_currency_config_with_http_info(currency, **kwargs) # noqa: E501
+
+ def get_user_leverage_currency_config_with_http_info(self, currency, **kwargs): # noqa: E501
+ """Maximum and minimum currency leverage that can be set # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_user_leverage_currency_config_with_http_info(currency, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Currency (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.UnifiedLeverageConfig, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_user_leverage_currency_config" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'currency' is set
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `get_user_leverage_currency_config`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/leverage/user_currency_config', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UnifiedLeverageConfig', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_user_leverage_currency_setting(self, **kwargs): # noqa: E501
+ """Get user currency leverage # noqa: E501
+
+ Get user currency leverage. If currency is not specified, query all currencies # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_user_leverage_currency_setting(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Currency
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.UnifiedLeverageSetting]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_user_leverage_currency_setting_with_http_info(**kwargs) # noqa: E501
+
+ def get_user_leverage_currency_setting_with_http_info(self, **kwargs): # noqa: E501
+ """Get user currency leverage # noqa: E501
+
+ Get user currency leverage. If currency is not specified, query all currencies # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_user_leverage_currency_setting_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Currency
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.UnifiedLeverageSetting], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_user_leverage_currency_setting" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/leverage/user_currency_setting', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[UnifiedLeverageSetting]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def set_user_leverage_currency_setting(self, unified_leverage_setting, **kwargs): # noqa: E501
+ """Set loan currency leverage # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.set_user_leverage_currency_setting(unified_leverage_setting, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param UnifiedLeverageSetting unified_leverage_setting: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: None
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.set_user_leverage_currency_setting_with_http_info(unified_leverage_setting, **kwargs) # noqa: E501
+
+ def set_user_leverage_currency_setting_with_http_info(self, unified_leverage_setting, **kwargs): # noqa: E501
+ """Set loan currency leverage # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.set_user_leverage_currency_setting_with_http_info(unified_leverage_setting, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param UnifiedLeverageSetting unified_leverage_setting: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: None
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'unified_leverage_setting'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method set_user_leverage_currency_setting" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'unified_leverage_setting' is set
+ if self.api_client.client_side_validation and ('unified_leverage_setting' not in local_var_params or # noqa: E501
+ local_var_params['unified_leverage_setting'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `unified_leverage_setting` when calling `set_user_leverage_currency_setting`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'unified_leverage_setting' in local_var_params:
+ body_params = local_var_params['unified_leverage_setting']
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/leverage/user_currency_setting', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_unified_currencies(self, **kwargs): # noqa: E501
+ """List of loan currencies supported by unified account # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_unified_currencies(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Currency
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.UnifiedCurrency]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_unified_currencies_with_http_info(**kwargs) # noqa: E501
+
+ def list_unified_currencies_with_http_info(self, **kwargs): # noqa: E501
+ """List of loan currencies supported by unified account # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_unified_currencies_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Currency
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.UnifiedCurrency], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_unified_currencies" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/currencies', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[UnifiedCurrency]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_history_loan_rate(self, currency, **kwargs): # noqa: E501
+ """Get historical lending rates # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_history_loan_rate(currency, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Currency (required)
+ :param str tier: VIP level for the floating rate to be queried
+ :param int page: Page number
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.UnifiedHistoryLoanRate
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_history_loan_rate_with_http_info(currency, **kwargs) # noqa: E501
+
+ def get_history_loan_rate_with_http_info(self, currency, **kwargs): # noqa: E501
+ """Get historical lending rates # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_history_loan_rate_with_http_info(currency, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Currency (required)
+ :param str tier: VIP level for the floating rate to be queried
+ :param int page: Page number
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.UnifiedHistoryLoanRate, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currency',
+ 'tier',
+ 'page',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_history_loan_rate" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'currency' is set
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `get_history_loan_rate`") # noqa: E501
+
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `get_history_loan_rate`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `get_history_loan_rate`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `get_history_loan_rate`, must be a value greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'tier' in local_var_params and local_var_params['tier'] is not None: # noqa: E501
+ query_params.append(('tier', local_var_params['tier'])) # noqa: E501
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/history_loan_rate', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UnifiedHistoryLoanRate', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def set_unified_collateral(self, unified_collateral_req, **kwargs): # noqa: E501
+ """Set collateral currency # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.set_unified_collateral(unified_collateral_req, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param UnifiedCollateralReq unified_collateral_req: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.UnifiedCollateralRes
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.set_unified_collateral_with_http_info(unified_collateral_req, **kwargs) # noqa: E501
+
+ def set_unified_collateral_with_http_info(self, unified_collateral_req, **kwargs): # noqa: E501
+ """Set collateral currency # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.set_unified_collateral_with_http_info(unified_collateral_req, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param UnifiedCollateralReq unified_collateral_req: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.UnifiedCollateralRes, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'unified_collateral_req'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method set_unified_collateral" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'unified_collateral_req' is set
+ if self.api_client.client_side_validation and ('unified_collateral_req' not in local_var_params or # noqa: E501
+ local_var_params['unified_collateral_req'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `unified_collateral_req` when calling `set_unified_collateral`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'unified_collateral_req' in local_var_params:
+ body_params = local_var_params['unified_collateral_req']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/unified/collateral_currencies', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UnifiedCollateralRes', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/gate_api/api/wallet_api.py b/gate_api/api/wallet_api.py
index 3a9dbcb..0284850 100644
--- a/gate_api/api/wallet_api.py
+++ b/gate_api/api/wallet_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class WalletApi(object):
@@ -34,7 +37,7 @@ def __init__(self, api_client=None):
self.api_client = api_client
def list_currency_chains(self, currency, **kwargs): # noqa: E501
- """List chains supported for specified currency # noqa: E501
+ """Query chains supported for specified currency # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -58,7 +61,7 @@ def list_currency_chains(self, currency, **kwargs): # noqa: E501
return self.list_currency_chains_with_http_info(currency, **kwargs) # noqa: E501
def list_currency_chains_with_http_info(self, currency, **kwargs): # noqa: E501
- """List chains supported for specified currency # noqa: E501
+ """Query chains supported for specified currency # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -83,21 +86,30 @@ def list_currency_chains_with_http_info(self, currency, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_currency_chains" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_currency_chains" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `list_currency_chains`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `list_currency_chains`") # noqa: E501
collection_formats = {}
@@ -114,14 +126,14 @@ def list_currency_chains_with_http_info(self, currency, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
- '/wallet/currency_chains',
- 'GET',
+ '/wallet/currency_chains', 'GET',
path_params,
query_params,
header_params,
@@ -134,8 +146,7 @@ def list_currency_chains_with_http_info(self, currency, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_deposit_address(self, currency, **kwargs): # noqa: E501
"""Generate currency deposit address # noqa: E501
@@ -187,21 +198,30 @@ def get_deposit_address_with_http_info(self, currency, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_deposit_address" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_deposit_address" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `get_deposit_address`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `get_deposit_address`") # noqa: E501
collection_formats = {}
@@ -218,14 +238,14 @@ def get_deposit_address_with_http_info(self, currency, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/deposit_address',
- 'GET',
+ '/wallet/deposit_address', 'GET',
path_params,
query_params,
header_params,
@@ -238,23 +258,25 @@ def get_deposit_address_with_http_info(self, currency, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_withdrawals(self, **kwargs): # noqa: E501
- """Retrieve withdrawal records # noqa: E501
+ """Get withdrawal records # noqa: E501
- Record time range cannot exceed 30 days # noqa: E501
+ Record query time range cannot exceed 30 days # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_withdrawals(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Filter by currency. Return all currency records if not specified
- :param int _from: Time range beginning, default to 7 days before current time
- :param int to: Time range ending, default to current time
- :param int limit: Maximum number of records to be returned in a single list
+ :param str currency: Specify the currency. If not specified, returns all currencies
+ :param str withdraw_id: Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled
+ :param str asset_class: Currency type of withdrawal record, empty by default. Supports querying withdrawal records in main zone and innovation zone on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone
+ :param str withdraw_order_id: User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -263,7 +285,7 @@ def list_withdrawals(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: list[gate_api.LedgerRecord]
+ :rtype: list[gate_api.WithdrawalRecord]
:return: If the method is called asynchronously,
returns the request thread.
"""
@@ -271,19 +293,22 @@ def list_withdrawals(self, **kwargs): # noqa: E501
return self.list_withdrawals_with_http_info(**kwargs) # noqa: E501
def list_withdrawals_with_http_info(self, **kwargs): # noqa: E501
- """Retrieve withdrawal records # noqa: E501
+ """Get withdrawal records # noqa: E501
- Record time range cannot exceed 30 days # noqa: E501
+ Record query time range cannot exceed 30 days # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_withdrawals_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Filter by currency. Return all currency records if not specified
- :param int _from: Time range beginning, default to 7 days before current time
- :param int to: Time range ending, default to current time
- :param int limit: Maximum number of records to be returned in a single list
+ :param str currency: Specify the currency. If not specified, returns all currencies
+ :param str withdraw_id: Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled
+ :param str asset_class: Currency type of withdrawal record, empty by default. Supports querying withdrawal records in main zone and innovation zone on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone
+ :param str withdraw_order_id: User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _return_http_data_only: response data without head status code
and headers
@@ -294,40 +319,47 @@ def list_withdrawals_with_http_info(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(list[gate_api.LedgerRecord], status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.WithdrawalRecord], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['currency', '_from', 'to', 'limit', 'offset']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency',
+ 'withdraw_id',
+ 'asset_class',
+ 'withdraw_order_id',
+ '_from',
+ 'to',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_withdrawals" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_withdrawals" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_withdrawals`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_withdrawals`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_withdrawals`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_withdrawals`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_withdrawals`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_withdrawals`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -335,6 +367,12 @@ def list_withdrawals_with_http_info(self, **kwargs): # noqa: E501
query_params = []
if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if 'withdraw_id' in local_var_params and local_var_params['withdraw_id'] is not None: # noqa: E501
+ query_params.append(('withdraw_id', local_var_params['withdraw_id'])) # noqa: E501
+ if 'asset_class' in local_var_params and local_var_params['asset_class'] is not None: # noqa: E501
+ query_params.append(('asset_class', local_var_params['asset_class'])) # noqa: E501
+ if 'withdraw_order_id' in local_var_params and local_var_params['withdraw_order_id'] is not None: # noqa: E501
+ query_params.append(('withdraw_order_id', local_var_params['withdraw_order_id'])) # noqa: E501
if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
query_params.append(('from', local_var_params['_from'])) # noqa: E501
if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
@@ -351,43 +389,42 @@ def list_withdrawals_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/withdrawals',
- 'GET',
+ '/wallet/withdrawals', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[LedgerRecord]', # noqa: E501
+ response_type='list[WithdrawalRecord]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_deposits(self, **kwargs): # noqa: E501
- """Retrieve deposit records # noqa: E501
+ """Get deposit records # noqa: E501
- Record time range cannot exceed 30 days # noqa: E501
+ Record query time range cannot exceed 30 days # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_deposits(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Filter by currency. Return all currency records if not specified
- :param int _from: Time range beginning, default to 7 days before current time
- :param int to: Time range ending, default to current time
- :param int limit: Maximum number of records to be returned in a single list
+ :param str currency: Specify the currency. If not specified, returns all currencies
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of entries returned in the list, limited to 500 transactions
:param int offset: List offset, starting from 0
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -396,7 +433,7 @@ def list_deposits(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: list[gate_api.LedgerRecord]
+ :rtype: list[gate_api.DepositRecord]
:return: If the method is called asynchronously,
returns the request thread.
"""
@@ -404,19 +441,19 @@ def list_deposits(self, **kwargs): # noqa: E501
return self.list_deposits_with_http_info(**kwargs) # noqa: E501
def list_deposits_with_http_info(self, **kwargs): # noqa: E501
- """Retrieve deposit records # noqa: E501
+ """Get deposit records # noqa: E501
- Record time range cannot exceed 30 days # noqa: E501
+ Record query time range cannot exceed 30 days # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_deposits_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Filter by currency. Return all currency records if not specified
- :param int _from: Time range beginning, default to 7 days before current time
- :param int to: Time range ending, default to current time
- :param int limit: Maximum number of records to be returned in a single list
+ :param str currency: Specify the currency. If not specified, returns all currencies
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of entries returned in the list, limited to 500 transactions
:param int offset: List offset, starting from 0
:param _return_http_data_only: response data without head status code
and headers
@@ -427,40 +464,44 @@ def list_deposits_with_http_info(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(list[gate_api.LedgerRecord], status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.DepositRecord], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['currency', '_from', 'to', 'limit', 'offset']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency',
+ '_from',
+ 'to',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_deposits" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_deposits" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_deposits`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_deposits`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_deposits`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_deposits`, must be a value less than or equal to `500`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_deposits`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_deposits`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -484,33 +525,32 @@ def list_deposits_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/deposits',
- 'GET',
+ '/wallet/deposits', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[LedgerRecord]', # noqa: E501
+ response_type='list[DepositRecord]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def transfer(self, transfer, **kwargs): # noqa: E501
"""Transfer between trading accounts # noqa: E501
- Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - cross margin 5. spot - options # noqa: E501
+ Balance transfers between personal trading accounts. Currently supports the following transfer operations: 1. Spot account - Margin account 2. Spot account - Perpetual futures account 3. Spot account - Delivery futures account 4. Spot account - Options account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.transfer(transfer, async_req=True)
@@ -535,7 +575,7 @@ def transfer(self, transfer, **kwargs): # noqa: E501
def transfer_with_http_info(self, transfer, **kwargs): # noqa: E501
"""Transfer between trading accounts # noqa: E501
- Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - cross margin 5. spot - options # noqa: E501
+ Balance transfers between personal trading accounts. Currently supports the following transfer operations: 1. Spot account - Margin account 2. Spot account - Perpetual futures account 3. Spot account - Delivery futures account 4. Spot account - Options account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.transfer_with_http_info(transfer, async_req=True)
@@ -559,18 +599,29 @@ def transfer_with_http_info(self, transfer, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['transfer']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'transfer'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method transfer" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method transfer" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'transfer' is set
- if self.api_client.client_side_validation and (
- 'transfer' not in local_var_params or local_var_params['transfer'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('transfer' not in local_var_params or # noqa: E501
+ local_var_params['transfer'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `transfer` when calling `transfer`") # noqa: E501
collection_formats = {}
@@ -588,19 +639,18 @@ def transfer_with_http_info(self, transfer, **kwargs): # noqa: E501
if 'transfer' in local_var_params:
body_params = local_var_params['transfer']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/transfers',
- 'POST',
+ '/wallet/transfers', 'POST',
path_params,
query_params,
header_params,
@@ -613,23 +663,22 @@ def transfer_with_http_info(self, transfer, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_sub_account_transfers(self, **kwargs): # noqa: E501
- """Retrieve transfer records between main and sub accounts # noqa: E501
+ """Get transfer records between main and sub accounts # noqa: E501
- Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved # noqa: E501
+ Record query time range cannot exceed 30 days > Note: Only records after 2020-04-10 can be retrieved # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_sub_account_transfers(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
- :param int _from: Time range beginning, default to 7 days before current time
- :param int to: Time range ending, default to current time
- :param int limit: Maximum number of records to be returned in a single list
+ :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -638,7 +687,7 @@ def list_sub_account_transfers(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: list[gate_api.SubAccountTransfer]
+ :rtype: list[gate_api.SubAccountTransferRecordItem]
:return: If the method is called asynchronously,
returns the request thread.
"""
@@ -646,19 +695,19 @@ def list_sub_account_transfers(self, **kwargs): # noqa: E501
return self.list_sub_account_transfers_with_http_info(**kwargs) # noqa: E501
def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501
- """Retrieve transfer records between main and sub accounts # noqa: E501
+ """Get transfer records between main and sub accounts # noqa: E501
- Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved # noqa: E501
+ Record query time range cannot exceed 30 days > Note: Only records after 2020-04-10 can be retrieved # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_sub_account_transfers_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
- :param int _from: Time range beginning, default to 7 days before current time
- :param int to: Time range ending, default to current time
- :param int limit: Maximum number of records to be returned in a single list
+ :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
+ :param int _from: Start time for querying records, defaults to 7 days before current time if not specified
+ :param int to: End timestamp for the query, defaults to current time if not specified
+ :param int limit: Maximum number of records returned in a single list
:param int offset: List offset, starting from 0
:param _return_http_data_only: response data without head status code
and headers
@@ -669,42 +718,44 @@ def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: tuple(list[gate_api.SubAccountTransfer], status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(list[gate_api.SubAccountTransferRecordItem], status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['sub_uid', '_from', 'to', 'limit', 'offset']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'sub_uid',
+ '_from',
+ 'to',
+ 'limit',
+ 'offset'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_sub_account_transfers" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_sub_account_transfers" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_sub_account_transfers`, must be a value less than or equal to `1000`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `limit` when calling `list_sub_account_transfers`, must be a value greater than or equal to `1`"
- ) # noqa: E501
- if (
- self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0
- ): # noqa: E501
- raise ApiValueError(
- "Invalid value for parameter `offset` when calling `list_sub_account_transfers`, must be a value greater than or equal to `0`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_sub_account_transfers`, must be a value less than or equal to `1000`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_sub_account_transfers`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_sub_account_transfers`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -728,33 +779,32 @@ def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/sub_account_transfers',
- 'GET',
+ '/wallet/sub_account_transfers', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='list[SubAccountTransfer]', # noqa: E501
+ response_type='list[SubAccountTransferRecordItem]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def transfer_with_sub_account(self, sub_account_transfer, **kwargs): # noqa: E501
"""Transfer between main and sub accounts # noqa: E501
- Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. # noqa: E501
+ Supports transfers to/from sub-account's spot or futures accounts. Note that regardless of which sub-account is operated, only the main account's spot account is used # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.transfer_with_sub_account(sub_account_transfer, async_req=True)
@@ -769,7 +819,7 @@ def transfer_with_sub_account(self, sub_account_transfer, **kwargs): # noqa: E5
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: None
+ :rtype: gate_api.TransactionID
:return: If the method is called asynchronously,
returns the request thread.
"""
@@ -779,7 +829,7 @@ def transfer_with_sub_account(self, sub_account_transfer, **kwargs): # noqa: E5
def transfer_with_sub_account_with_http_info(self, sub_account_transfer, **kwargs): # noqa: E501
"""Transfer between main and sub accounts # noqa: E501
- Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. # noqa: E501
+ Supports transfers to/from sub-account's spot or futures accounts. Note that regardless of which sub-account is operated, only the main account's spot account is used # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.transfer_with_sub_account_with_http_info(sub_account_transfer, async_req=True)
@@ -796,29 +846,37 @@ def transfer_with_sub_account_with_http_info(self, sub_account_transfer, **kwarg
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: None
+ :rtype: tuple(gate_api.TransactionID, status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['sub_account_transfer']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'sub_account_transfer'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method transfer_with_sub_account" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method transfer_with_sub_account" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'sub_account_transfer' is set
- if self.api_client.client_side_validation and (
- 'sub_account_transfer' not in local_var_params
- or local_var_params['sub_account_transfer'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `sub_account_transfer` when calling `transfer_with_sub_account`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('sub_account_transfer' not in local_var_params or # noqa: E501
+ local_var_params['sub_account_transfer'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `sub_account_transfer` when calling `transfer_with_sub_account`") # noqa: E501
collection_formats = {}
@@ -834,36 +892,37 @@ def transfer_with_sub_account_with_http_info(self, sub_account_transfer, **kwarg
body_params = None
if 'sub_account_transfer' in local_var_params:
body_params = local_var_params['sub_account_transfer']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/sub_account_transfers',
- 'POST',
+ '/wallet/sub_account_transfers', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type=None, # noqa: E501
+ response_type='TransactionID', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def sub_account_to_sub_account(self, sub_account_to_sub_account, **kwargs): # noqa: E501
- """Sub-account transfers to sub-account # noqa: E501
+ """Transfer between sub-accounts # noqa: E501
- It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer. # noqa: E501
+ Supports balance transfers between two sub-accounts under the same main account. You can use either the main account's API Key or the source sub-account's API Key to perform the operation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.sub_account_to_sub_account(sub_account_to_sub_account, async_req=True)
@@ -878,7 +937,7 @@ def sub_account_to_sub_account(self, sub_account_to_sub_account, **kwargs): # n
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: None
+ :rtype: gate_api.TransactionID
:return: If the method is called asynchronously,
returns the request thread.
"""
@@ -886,9 +945,9 @@ def sub_account_to_sub_account(self, sub_account_to_sub_account, **kwargs): # n
return self.sub_account_to_sub_account_with_http_info(sub_account_to_sub_account, **kwargs) # noqa: E501
def sub_account_to_sub_account_with_http_info(self, sub_account_to_sub_account, **kwargs): # noqa: E501
- """Sub-account transfers to sub-account # noqa: E501
+ """Transfer between sub-accounts # noqa: E501
- It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer. # noqa: E501
+ Supports balance transfers between two sub-accounts under the same main account. You can use either the main account's API Key or the source sub-account's API Key to perform the operation # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.sub_account_to_sub_account_with_http_info(sub_account_to_sub_account, async_req=True)
@@ -905,31 +964,37 @@ def sub_account_to_sub_account_with_http_info(self, sub_account_to_sub_account,
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :rtype: None
+ :rtype: tuple(gate_api.TransactionID, status_code(int), headers(HTTPHeaderDict))
:return: If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
- all_params = ['sub_account_to_sub_account']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'sub_account_to_sub_account'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method sub_account_to_sub_account" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method sub_account_to_sub_account" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'sub_account_to_sub_account' is set
- if self.api_client.client_side_validation and (
- 'sub_account_to_sub_account' not in local_var_params
- or local_var_params['sub_account_to_sub_account'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `sub_account_to_sub_account` when calling `sub_account_to_sub_account`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('sub_account_to_sub_account' not in local_var_params or # noqa: E501
+ local_var_params['sub_account_to_sub_account'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `sub_account_to_sub_account` when calling `sub_account_to_sub_account`") # noqa: E501
collection_formats = {}
@@ -945,34 +1010,150 @@ def sub_account_to_sub_account_with_http_info(self, sub_account_to_sub_account,
body_params = None
if 'sub_account_to_sub_account' in local_var_params:
body_params = local_var_params['sub_account_to_sub_account']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/sub_account_to_sub_account',
- 'POST',
+ '/wallet/sub_account_to_sub_account', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type=None, # noqa: E501
+ response_type='TransactionID', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def get_transfer_order_status(self, **kwargs): # noqa: E501
+ """Transfer status query # noqa: E501
+
+ Supports querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_transfer_order_status(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str client_order_id: Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters
+ :param str tx_id: Transfer operation number, cannot be empty at the same time as client_order_id
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.TransferOrderStatus
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_transfer_order_status_with_http_info(**kwargs) # noqa: E501
+
+ def get_transfer_order_status_with_http_info(self, **kwargs): # noqa: E501
+ """Transfer status query # noqa: E501
+
+ Supports querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_transfer_order_status_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str client_order_id: Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters
+ :param str tx_id: Transfer operation number, cannot be empty at the same time as client_order_id
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.TransferOrderStatus, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'client_order_id',
+ 'tx_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_transfer_order_status" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'client_order_id' in local_var_params and local_var_params['client_order_id'] is not None: # noqa: E501
+ query_params.append(('client_order_id', local_var_params['client_order_id'])) # noqa: E501
+ if 'tx_id' in local_var_params and local_var_params['tx_id'] is not None: # noqa: E501
+ query_params.append(('tx_id', local_var_params['tx_id'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/wallet/order_status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='TransferOrderStatus', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def list_withdraw_status(self, **kwargs): # noqa: E501
- """Retrieve withdrawal status # noqa: E501
+ """Query withdrawal status # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -980,7 +1161,7 @@ def list_withdraw_status(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -996,7 +1177,7 @@ def list_withdraw_status(self, **kwargs): # noqa: E501
return self.list_withdraw_status_with_http_info(**kwargs) # noqa: E501
def list_withdraw_status_with_http_info(self, **kwargs): # noqa: E501
- """Retrieve withdrawal status # noqa: E501
+ """Query withdrawal status # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1004,7 +1185,7 @@ def list_withdraw_status_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Retrieve data of the specified currency
+ :param str currency: Query by specified currency name
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1021,12 +1202,24 @@ def list_withdraw_status_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_withdraw_status" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_withdraw_status" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -1045,14 +1238,14 @@ def list_withdraw_status_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/withdraw_status',
- 'GET',
+ '/wallet/withdraw_status', 'GET',
path_params,
query_params,
header_params,
@@ -1065,11 +1258,10 @@ def list_withdraw_status_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_sub_account_balances(self, **kwargs): # noqa: E501
- """Retrieve sub account balances # noqa: E501
+ """Query sub-account balance information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1077,7 +1269,7 @@ def list_sub_account_balances(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
+ :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1093,7 +1285,7 @@ def list_sub_account_balances(self, **kwargs): # noqa: E501
return self.list_sub_account_balances_with_http_info(**kwargs) # noqa: E501
def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501
- """Retrieve sub account balances # noqa: E501
+ """Query sub-account balance information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1101,7 +1293,7 @@ def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
+ :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1118,12 +1310,24 @@ def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['sub_uid']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'sub_uid'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_sub_account_balances" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_sub_account_balances" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -1142,14 +1346,14 @@ def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/sub_account_balances',
- 'GET',
+ '/wallet/sub_account_balances', 'GET',
path_params,
query_params,
header_params,
@@ -1162,11 +1366,10 @@ def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_sub_account_margin_balances(self, **kwargs): # noqa: E501
- """Query sub accounts' margin balances # noqa: E501
+ """Query sub-account isolated margin account balance information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1174,7 +1377,7 @@ def list_sub_account_margin_balances(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
+ :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1190,7 +1393,7 @@ def list_sub_account_margin_balances(self, **kwargs): # noqa: E501
return self.list_sub_account_margin_balances_with_http_info(**kwargs) # noqa: E501
def list_sub_account_margin_balances_with_http_info(self, **kwargs): # noqa: E501
- """Query sub accounts' margin balances # noqa: E501
+ """Query sub-account isolated margin account balance information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1198,7 +1401,7 @@ def list_sub_account_margin_balances_with_http_info(self, **kwargs): # noqa: E5
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
+ :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1215,13 +1418,23 @@ def list_sub_account_margin_balances_with_http_info(self, **kwargs): # noqa: E5
local_var_params = locals()
- all_params = ['sub_uid']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'sub_uid'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_sub_account_margin_balances" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_sub_account_margin_balances" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
@@ -1241,14 +1454,14 @@ def list_sub_account_margin_balances_with_http_info(self, **kwargs): # noqa: E5
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/sub_account_margin_balances',
- 'GET',
+ '/wallet/sub_account_margin_balances', 'GET',
path_params,
query_params,
header_params,
@@ -1261,11 +1474,10 @@ def list_sub_account_margin_balances_with_http_info(self, **kwargs): # noqa: E5
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_sub_account_futures_balances(self, **kwargs): # noqa: E501
- """Query sub accounts' futures account balances # noqa: E501
+ """Query sub-account perpetual futures account balance information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1273,8 +1485,8 @@ def list_sub_account_futures_balances(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
- :param str settle: Query only balances of specified settle currency
+ :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
+ :param str settle: Query balance of specified settlement currency
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1290,7 +1502,7 @@ def list_sub_account_futures_balances(self, **kwargs): # noqa: E501
return self.list_sub_account_futures_balances_with_http_info(**kwargs) # noqa: E501
def list_sub_account_futures_balances_with_http_info(self, **kwargs): # noqa: E501
- """Query sub accounts' futures account balances # noqa: E501
+ """Query sub-account perpetual futures account balance information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1298,8 +1510,8 @@ def list_sub_account_futures_balances_with_http_info(self, **kwargs): # noqa: E
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
- :param str settle: Query only balances of specified settle currency
+ :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
+ :param str settle: Query balance of specified settlement currency
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1316,13 +1528,24 @@ def list_sub_account_futures_balances_with_http_info(self, **kwargs): # noqa: E
local_var_params = locals()
- all_params = ['sub_uid', 'settle']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'sub_uid',
+ 'settle'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_sub_account_futures_balances" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_sub_account_futures_balances" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
@@ -1344,14 +1567,14 @@ def list_sub_account_futures_balances_with_http_info(self, **kwargs): # noqa: E
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/sub_account_futures_balances',
- 'GET',
+ '/wallet/sub_account_futures_balances', 'GET',
path_params,
query_params,
header_params,
@@ -1364,11 +1587,10 @@ def list_sub_account_futures_balances_with_http_info(self, **kwargs): # noqa: E
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_sub_account_cross_margin_balances(self, **kwargs): # noqa: E501
- """Query subaccount's cross_margin account info # noqa: E501
+ """Query sub-account cross margin account balance information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1376,7 +1598,7 @@ def list_sub_account_cross_margin_balances(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
+ :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1392,7 +1614,7 @@ def list_sub_account_cross_margin_balances(self, **kwargs): # noqa: E501
return self.list_sub_account_cross_margin_balances_with_http_info(**kwargs) # noqa: E501
def list_sub_account_cross_margin_balances_with_http_info(self, **kwargs): # noqa: E501
- """Query subaccount's cross_margin account info # noqa: E501
+ """Query sub-account cross margin account balance information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1400,7 +1622,7 @@ def list_sub_account_cross_margin_balances_with_http_info(self, **kwargs): # no
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
+ :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1417,13 +1639,23 @@ def list_sub_account_cross_margin_balances_with_http_info(self, **kwargs): # no
local_var_params = locals()
- all_params = ['sub_uid']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'sub_uid'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
raise ApiTypeError(
- "Got an unexpected keyword argument '%s'" " to method list_sub_account_cross_margin_balances" % k
+ "Got an unexpected keyword argument '%s'"
+ " to method list_sub_account_cross_margin_balances" % k
)
local_var_params[k] = v
del local_var_params['kwargs']
@@ -1443,14 +1675,14 @@ def list_sub_account_cross_margin_balances_with_http_info(self, **kwargs): # no
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/sub_account_cross_margin_balances',
- 'GET',
+ '/wallet/sub_account_cross_margin_balances', 'GET',
path_params,
query_params,
header_params,
@@ -1463,11 +1695,10 @@ def list_sub_account_cross_margin_balances_with_http_info(self, **kwargs): # no
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def list_saved_address(self, currency, **kwargs): # noqa: E501
- """Query saved address # noqa: E501
+ """Query withdrawal address whitelist # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1477,7 +1708,8 @@ def list_saved_address(self, currency, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str currency: Currency (required)
:param str chain: Chain name
- :param str limit: Maximum number returned, 100 at most
+ :param str limit: Maximum number returned, up to 100
+ :param int page: Page number
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1493,7 +1725,7 @@ def list_saved_address(self, currency, **kwargs): # noqa: E501
return self.list_saved_address_with_http_info(currency, **kwargs) # noqa: E501
def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501
- """Query saved address # noqa: E501
+ """Query withdrawal address whitelist # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1503,7 +1735,8 @@ def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501
:param bool async_req: execute request asynchronously
:param str currency: Currency (required)
:param str chain: Chain name
- :param str limit: Maximum number returned, 100 at most
+ :param str limit: Maximum number returned, up to 100
+ :param int page: Page number
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1520,22 +1753,36 @@ def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency', 'chain', 'limit']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency',
+ 'chain',
+ 'limit',
+ 'page'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_saved_address" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_saved_address" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'currency' is set
- if self.api_client.client_side_validation and (
- 'currency' not in local_var_params or local_var_params['currency'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `currency` when calling `list_saved_address`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501
+ local_var_params['currency'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `currency` when calling `list_saved_address`") # noqa: E501
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_saved_address`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1547,6 +1794,8 @@ def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501
query_params.append(('chain', local_var_params['chain'])) # noqa: E501
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
header_params = {}
@@ -1555,14 +1804,14 @@ def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/saved_address',
- 'GET',
+ '/wallet/saved_address', 'GET',
path_params,
query_params,
header_params,
@@ -1575,11 +1824,10 @@ def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_trade_fee(self, **kwargs): # noqa: E501
- """Retrieve personal trading fee # noqa: E501
+ """Query personal trading fees # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1587,8 +1835,8 @@ def get_trade_fee(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs
- :param str settle: Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same.
+ :param str currency_pair: Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs.
+ :param str settle: Specify the settlement currency of the contract to get more accurate fee settings. This field is optional. Generally, the fee settings for all settlement currencies are the same.
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1604,7 +1852,7 @@ def get_trade_fee(self, **kwargs): # noqa: E501
return self.get_trade_fee_with_http_info(**kwargs) # noqa: E501
def get_trade_fee_with_http_info(self, **kwargs): # noqa: E501
- """Retrieve personal trading fee # noqa: E501
+ """Query personal trading fees # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -1612,8 +1860,8 @@ def get_trade_fee_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs
- :param str settle: Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same.
+ :param str currency_pair: Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs.
+ :param str settle: Specify the settlement currency of the contract to get more accurate fee settings. This field is optional. Generally, the fee settings for all settlement currencies are the same.
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1630,12 +1878,25 @@ def get_trade_fee_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency_pair', 'settle']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency_pair',
+ 'settle'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_trade_fee" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_trade_fee" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -1656,14 +1917,14 @@ def get_trade_fee_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/fee',
- 'GET',
+ '/wallet/fee', 'GET',
path_params,
query_params,
header_params,
@@ -1676,20 +1937,19 @@ def get_trade_fee_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
def get_total_balance(self, **kwargs): # noqa: E501
- """Retrieve user's total balances # noqa: E501
+ """Query personal account totals # noqa: E501
- This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` to query margin account balance - `GET /futures/{settle}/accounts` to query futures account balance # noqa: E501
+ This query endpoint returns the total *estimated value* of all currencies in each account converted to the input currency. Exchange rates and related account balance information may be cached for up to 1 minute. It is not recommended to use this interface data for real-time calculations. For real-time calculations, query the corresponding balance interface based on account type, such as: - `GET /spot/accounts` to query spot account - `GET /margin/accounts` to query margin account - `GET /futures/{settle}/accounts` to query futures account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_total_balance(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default.
+ :param str currency: Target currency type for statistical conversion. Accepts BTC, CNY, USD, and USDT. USDT is the default value
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
@@ -1705,16 +1965,16 @@ def get_total_balance(self, **kwargs): # noqa: E501
return self.get_total_balance_with_http_info(**kwargs) # noqa: E501
def get_total_balance_with_http_info(self, **kwargs): # noqa: E501
- """Retrieve user's total balances # noqa: E501
+ """Query personal account totals # noqa: E501
- This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` to query margin account balance - `GET /futures/{settle}/accounts` to query futures account balance # noqa: E501
+ This query endpoint returns the total *estimated value* of all currencies in each account converted to the input currency. Exchange rates and related account balance information may be cached for up to 1 minute. It is not recommended to use this interface data for real-time calculations. For real-time calculations, query the corresponding balance interface based on account type, such as: - `GET /spot/accounts` to query spot account - `GET /margin/accounts` to query margin account - `GET /futures/{settle}/accounts` to query futures account # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_total_balance_with_http_info(async_req=True)
>>> result = thread.get()
:param bool async_req: execute request asynchronously
- :param str currency: Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default.
+ :param str currency: Target currency type for statistical conversion. Accepts BTC, CNY, USD, and USDT. USDT is the default value
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1731,12 +1991,24 @@ def get_total_balance_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['currency']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'currency'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_total_balance" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_total_balance" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
@@ -1755,14 +2027,14 @@ def get_total_balance_with_http_info(self, **kwargs): # noqa: E501
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/wallet/total_balance',
- 'GET',
+ '/wallet/total_balance', 'GET',
path_params,
query_params,
header_params,
@@ -1775,5 +2047,480 @@ def get_total_balance_with_http_info(self, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def list_small_balance(self, **kwargs): # noqa: E501
+ """Get list of convertible small balance currencies # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_small_balance(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.SmallBalance]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_small_balance_with_http_info(**kwargs) # noqa: E501
+
+ def list_small_balance_with_http_info(self, **kwargs): # noqa: E501
+ """Get list of convertible small balance currencies # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_small_balance_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.SmallBalance], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_small_balance" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/wallet/small_balance', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[SmallBalance]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def convert_small_balance(self, convert_small_balance, **kwargs): # noqa: E501
+ """Convert small balance currency # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.convert_small_balance(convert_small_balance, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param ConvertSmallBalance convert_small_balance: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: None
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.convert_small_balance_with_http_info(convert_small_balance, **kwargs) # noqa: E501
+
+ def convert_small_balance_with_http_info(self, convert_small_balance, **kwargs): # noqa: E501
+ """Convert small balance currency # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.convert_small_balance_with_http_info(convert_small_balance, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param ConvertSmallBalance convert_small_balance: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: None
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'convert_small_balance'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method convert_small_balance" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'convert_small_balance' is set
+ if self.api_client.client_side_validation and ('convert_small_balance' not in local_var_params or # noqa: E501
+ local_var_params['convert_small_balance'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `convert_small_balance` when calling `convert_small_balance`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'convert_small_balance' in local_var_params:
+ body_params = local_var_params['convert_small_balance']
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/wallet/small_balance', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_small_balance_history(self, **kwargs): # noqa: E501
+ """Get convertible small balance currency history # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_small_balance_history(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Currency to convert
+ :param int page: Page number
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.SmallBalanceHistory]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_small_balance_history_with_http_info(**kwargs) # noqa: E501
+
+ def list_small_balance_history_with_http_info(self, **kwargs): # noqa: E501
+ """Get convertible small balance currency history # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_small_balance_history_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param str currency: Currency to convert
+ :param int page: Page number
+ :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.SmallBalanceHistory], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'currency',
+ 'page',
+ 'limit'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_small_balance_history" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `page` when calling `list_small_balance_history`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_small_balance_history`, must be a value less than or equal to `100`") # noqa: E501
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_small_balance_history`, must be a value greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501
+ query_params.append(('currency', local_var_params['currency'])) # noqa: E501
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/wallet/small_balance_history', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[SmallBalanceHistory]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_push_orders(self, **kwargs): # noqa: E501
+ """Get UID transfer history # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_push_orders(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int id: Order ID
+ :param int _from: Start time for querying records. If not specified, defaults to 7 days before the current time. Unix timestamp in seconds
+ :param int to: End time for querying records. If not specified, defaults to the current time. Unix timestamp in seconds
+ :param int limit: Maximum number of items returned in the list, default value is 100
+ :param int offset: List offset, starting from 0
+ :param str transaction_type: Order type returned in the list: `withdraw`, `deposit`. Default is `withdraw`.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: list[gate_api.UidPushOrder]
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_push_orders_with_http_info(**kwargs) # noqa: E501
+
+ def list_push_orders_with_http_info(self, **kwargs): # noqa: E501
+ """Get UID transfer history # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_push_orders_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param int id: Order ID
+ :param int _from: Start time for querying records. If not specified, defaults to 7 days before the current time. Unix timestamp in seconds
+ :param int to: End time for querying records. If not specified, defaults to the current time. Unix timestamp in seconds
+ :param int limit: Maximum number of items returned in the list, default value is 100
+ :param int offset: List offset, starting from 0
+ :param str transaction_type: Order type returned in the list: `withdraw`, `deposit`. Default is `withdraw`.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(list[gate_api.UidPushOrder], status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'id',
+ '_from',
+ 'to',
+ 'limit',
+ 'offset',
+ 'transaction_type'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_push_orders" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+
+ if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `limit` when calling `list_push_orders`, must be a value greater than or equal to `1`") # noqa: E501
+ if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
+ raise ApiValueError("Invalid value for parameter `offset` when calling `list_push_orders`, must be a value greater than or equal to `0`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'id' in local_var_params and local_var_params['id'] is not None: # noqa: E501
+ query_params.append(('id', local_var_params['id'])) # noqa: E501
+ if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501
+ query_params.append(('from', local_var_params['_from'])) # noqa: E501
+ if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501
+ query_params.append(('to', local_var_params['to'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
+ if 'transaction_type' in local_var_params and local_var_params['transaction_type'] is not None: # noqa: E501
+ query_params.append(('transaction_type', local_var_params['transaction_type'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/wallet/push', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[UidPushOrder]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/gate_api/api/withdrawal_api.py b/gate_api/api/withdrawal_api.py
index 4b9ba17..7fb64dd 100644
--- a/gate_api/api/withdrawal_api.py
+++ b/gate_api/api/withdrawal_api.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,10 @@
import six
from gate_api.api_client import ApiClient
-from gate_api.exceptions import ApiTypeError, ApiValueError # noqa: F401
+from gate_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class WithdrawalApi(object):
@@ -36,6 +39,7 @@ def __init__(self, api_client=None):
def withdraw(self, ledger_record, **kwargs): # noqa: E501
"""Withdraw # noqa: E501
+ If the recipient's on-chain address is also Gate, no transaction fee will be charged # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.withdraw(ledger_record, async_req=True)
@@ -60,6 +64,7 @@ def withdraw(self, ledger_record, **kwargs): # noqa: E501
def withdraw_with_http_info(self, ledger_record, **kwargs): # noqa: E501
"""Withdraw # noqa: E501
+ If the recipient's on-chain address is also Gate, no transaction fee will be charged # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.withdraw_with_http_info(ledger_record, async_req=True)
@@ -83,18 +88,29 @@ def withdraw_with_http_info(self, ledger_record, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['ledger_record']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'ledger_record'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method withdraw" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method withdraw" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'ledger_record' is set
- if self.api_client.client_side_validation and (
- 'ledger_record' not in local_var_params or local_var_params['ledger_record'] is None # noqa: E501
- ): # noqa: E501
+ if self.api_client.client_side_validation and ('ledger_record' not in local_var_params or # noqa: E501
+ local_var_params['ledger_record'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `ledger_record` when calling `withdraw`") # noqa: E501
collection_formats = {}
@@ -112,19 +128,18 @@ def withdraw_with_http_info(self, ledger_record, **kwargs): # noqa: E501
if 'ledger_record' in local_var_params:
body_params = local_var_params['ledger_record']
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']
- ) # noqa: E501
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/withdrawals',
- 'POST',
+ '/withdrawals', 'POST',
path_params,
query_params,
header_params,
@@ -137,9 +152,126 @@ def withdraw_with_http_info(self, ledger_record, **kwargs): # noqa: E501
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
+ collection_formats=collection_formats)
+
+ def withdraw_push_order(self, uid_push_withdrawal, **kwargs): # noqa: E501
+ """UID transfer # noqa: E501
+
+ Transfers between main spot accounts. Both parties cannot be sub-accounts # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.withdraw_push_order(uid_push_withdrawal, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param UidPushWithdrawal uid_push_withdrawal: (required)
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: gate_api.UidPushWithdrawalResp
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.withdraw_push_order_with_http_info(uid_push_withdrawal, **kwargs) # noqa: E501
+
+ def withdraw_push_order_with_http_info(self, uid_push_withdrawal, **kwargs): # noqa: E501
+ """UID transfer # noqa: E501
+
+ Transfers between main spot accounts. Both parties cannot be sub-accounts # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.withdraw_push_order_with_http_info(uid_push_withdrawal, async_req=True)
+ >>> result = thread.get()
+
+ :param bool async_req: execute request asynchronously
+ :param UidPushWithdrawal uid_push_withdrawal: (required)
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :rtype: tuple(gate_api.UidPushWithdrawalResp, status_code(int), headers(HTTPHeaderDict))
+ :return: If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'uid_push_withdrawal'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
)
+ for k, v in six.iteritems(local_var_params['kwargs']):
+ if k not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method withdraw_push_order" % k
+ )
+ local_var_params[k] = v
+ del local_var_params['kwargs']
+ # verify the required parameter 'uid_push_withdrawal' is set
+ if self.api_client.client_side_validation and ('uid_push_withdrawal' not in local_var_params or # noqa: E501
+ local_var_params['uid_push_withdrawal'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `uid_push_withdrawal` when calling `withdraw_push_order`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'uid_push_withdrawal' in local_var_params:
+ body_params = local_var_params['uid_push_withdrawal']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiv4'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/withdrawals/push', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UidPushWithdrawalResp', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def cancel_withdrawal(self, withdrawal_id, **kwargs): # noqa: E501
"""Cancel withdrawal with specified ID # noqa: E501
@@ -190,21 +322,30 @@ def cancel_withdrawal_with_http_info(self, withdrawal_id, **kwargs): # noqa: E5
local_var_params = locals()
- all_params = ['withdrawal_id']
- all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout'])
+ all_params = [
+ 'withdrawal_id'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
for k, v in six.iteritems(local_var_params['kwargs']):
if k not in all_params:
- raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method cancel_withdrawal" % k)
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_withdrawal" % k
+ )
local_var_params[k] = v
del local_var_params['kwargs']
# verify the required parameter 'withdrawal_id' is set
- if self.api_client.client_side_validation and (
- 'withdrawal_id' not in local_var_params or local_var_params['withdrawal_id'] is None # noqa: E501
- ): # noqa: E501
- raise ApiValueError(
- "Missing the required parameter `withdrawal_id` when calling `cancel_withdrawal`"
- ) # noqa: E501
+ if self.api_client.client_side_validation and ('withdrawal_id' not in local_var_params or # noqa: E501
+ local_var_params['withdrawal_id'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `withdrawal_id` when calling `cancel_withdrawal`") # noqa: E501
collection_formats = {}
@@ -221,14 +362,14 @@ def cancel_withdrawal_with_http_info(self, withdrawal_id, **kwargs): # noqa: E5
body_params = None
# HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(['application/json']) # noqa: E501
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['apiv4'] # noqa: E501
return self.api_client.call_api(
- '/withdrawals/{withdrawal_id}',
- 'DELETE',
+ '/withdrawals/{withdrawal_id}', 'DELETE',
path_params,
query_params,
header_params,
@@ -241,5 +382,4 @@ def cancel_withdrawal_with_http_info(self, withdrawal_id, **kwargs): # noqa: E5
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- )
+ collection_formats=collection_formats)
diff --git a/gate_api/api_client.py b/gate_api/api_client.py
index 74b2be9..5d90c48 100644
--- a/gate_api/api_client.py
+++ b/gate_api/api_client.py
@@ -1,10 +1,10 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -70,7 +70,8 @@ class ApiClient(object):
}
_pool = None
- def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None, pool_threads=1):
+ def __init__(self, configuration=None, header_name=None, header_value=None,
+ cookie=None, pool_threads=1):
if configuration is None:
configuration = Configuration.get_default_copy()
self.configuration = configuration
@@ -82,7 +83,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, cook
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
- self.user_agent = 'OpenAPI-Generator/4.56.0/python'
+ self.user_agent = 'OpenAPI-Generator/7.1.8/python'
self.client_side_validation = configuration.client_side_validation
def __enter__(self):
@@ -102,7 +103,7 @@ def close(self):
@property
def pool(self):
"""Create thread pool on first request
- avoids instantiating unused threadpool for blocking clients.
+ avoids instantiating unused threadpool for blocking clients.
"""
if self._pool is None:
atexit.register(self.close)
@@ -122,23 +123,12 @@ def set_default_header(self, header_name, header_value):
self.default_headers[header_name] = header_value
def __call_api(
- self,
- resource_path,
- method,
- path_params=None,
- query_params=None,
- header_params=None,
- body=None,
- post_params=None,
- files=None,
- response_type=None,
- auth_settings=None,
- _return_http_data_only=None,
- collection_formats=None,
- _preload_content=True,
- _request_timeout=None,
- _host=None,
- ):
+ self, resource_path, method, path_params=None,
+ query_params=None, header_params=None, body=None, post_params=None,
+ files=None, response_type=None, auth_settings=None,
+ _return_http_data_only=None, collection_formats=None,
+ _preload_content=True, _request_timeout=None, _host=None):
+
config = self.configuration
# header parameters
@@ -148,26 +138,33 @@ def __call_api(
header_params['Cookie'] = self.cookie
if header_params:
header_params = self.sanitize_for_serialization(header_params)
- header_params = dict(self.parameters_to_tuples(header_params, collection_formats))
+ header_params = dict(self.parameters_to_tuples(header_params,
+ collection_formats))
# path parameters
if path_params:
path_params = self.sanitize_for_serialization(path_params)
- path_params = self.parameters_to_tuples(path_params, collection_formats)
+ path_params = self.parameters_to_tuples(path_params,
+ collection_formats)
for k, v in path_params:
# specified safe chars, encode everything
- resource_path = resource_path.replace('{%s}' % k, quote(str(v), safe=config.safe_chars_for_path_param))
+ resource_path = resource_path.replace(
+ '{%s}' % k,
+ quote(str(v), safe=config.safe_chars_for_path_param)
+ )
# query parameters
if query_params:
query_params = self.sanitize_for_serialization(query_params)
- query_params = self.parameters_to_tuples(query_params, collection_formats)
+ query_params = self.parameters_to_tuples(query_params,
+ collection_formats)
# post parameters
if post_params or files:
post_params = post_params if post_params else []
post_params = self.sanitize_for_serialization(post_params)
- post_params = self.parameters_to_tuples(post_params, collection_formats)
+ post_params = self.parameters_to_tuples(post_params,
+ collection_formats)
post_params.extend(self.files_parameters(files))
# body
@@ -187,15 +184,10 @@ def __call_api(
try:
# perform request and return response
response_data = self.request(
- method,
- url,
- query_params=query_params,
- headers=header_params,
- post_params=post_params,
- body=body,
+ method, url, query_params=query_params, headers=header_params,
+ post_params=post_params, body=body,
_preload_content=_preload_content,
- _request_timeout=_request_timeout,
- )
+ _request_timeout=_request_timeout)
except ApiException as e:
e.body = e.body.decode('utf-8') if six.PY3 else e.body
try:
@@ -232,7 +224,8 @@ def __call_api(
if _return_http_data_only:
return return_data
else:
- return (return_data, response_data.status, response_data.getheaders())
+ return (return_data, response_data.status,
+ response_data.getheaders())
def sanitize_for_serialization(self, obj):
"""Builds a JSON POST object.
@@ -253,9 +246,11 @@ def sanitize_for_serialization(self, obj):
elif isinstance(obj, self.PRIMITIVE_TYPES):
return obj
elif isinstance(obj, list):
- return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj]
+ return [self.sanitize_for_serialization(sub_obj)
+ for sub_obj in obj]
elif isinstance(obj, tuple):
- return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj)
+ return tuple(self.sanitize_for_serialization(sub_obj)
+ for sub_obj in obj)
elif isinstance(obj, (datetime.datetime, datetime.date)):
return obj.isoformat()
@@ -267,13 +262,12 @@ def sanitize_for_serialization(self, obj):
# and attributes which value is not None.
# Convert attribute name to json key in
# model definition for request.
- obj_dict = {
- obj.attribute_map[attr]: getattr(obj, attr)
- for attr, _ in six.iteritems(obj.openapi_types)
- if getattr(obj, attr) is not None
- }
+ obj_dict = {obj.attribute_map[attr]: getattr(obj, attr)
+ for attr, _ in six.iteritems(obj.openapi_types)
+ if getattr(obj, attr) is not None}
- return {key: self.sanitize_for_serialization(val) for key, val in six.iteritems(obj_dict)}
+ return {key: self.sanitize_for_serialization(val)
+ for key, val in six.iteritems(obj_dict)}
def deserialize(self, response, response_type):
"""Deserializes response into an object.
@@ -311,11 +305,13 @@ def __deserialize(self, data, klass):
if type(klass) == str:
if klass.startswith('list['):
sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
- return [self.__deserialize(sub_data, sub_kls) for sub_data in data]
+ return [self.__deserialize(sub_data, sub_kls)
+ for sub_data in data]
if klass.startswith('dict('):
sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2)
- return {k: self.__deserialize(v, sub_kls) for k, v in six.iteritems(data)}
+ return {k: self.__deserialize(v, sub_kls)
+ for k, v in six.iteritems(data)}
# convert str to class
if klass in self.NATIVE_TYPES_MAPPING:
@@ -334,25 +330,12 @@ def __deserialize(self, data, klass):
else:
return self.__deserialize_model(data, klass)
- def call_api(
- self,
- resource_path,
- method,
- path_params=None,
- query_params=None,
- header_params=None,
- body=None,
- post_params=None,
- files=None,
- response_type=None,
- auth_settings=None,
- async_req=None,
- _return_http_data_only=None,
- collection_formats=None,
- _preload_content=True,
- _request_timeout=None,
- _host=None,
- ):
+ def call_api(self, resource_path, method,
+ path_params=None, query_params=None, header_params=None,
+ body=None, post_params=None, files=None,
+ response_type=None, auth_settings=None, async_req=None,
+ _return_http_data_only=None, collection_formats=None,
+ _preload_content=True, _request_timeout=None, _host=None):
"""Makes the HTTP request (synchronous) and returns deserialized data.
To make an async_req request, set the async_req parameter.
@@ -391,122 +374,84 @@ def call_api(
then the method will return the response directly.
"""
if not async_req:
- return self.__call_api(
- resource_path,
- method,
- path_params,
- query_params,
- header_params,
- body,
- post_params,
- files,
- response_type,
- auth_settings,
- _return_http_data_only,
- collection_formats,
- _preload_content,
- _request_timeout,
- _host,
- )
-
- return self.pool.apply_async(
- self.__call_api,
- (
- resource_path,
- method,
- path_params,
- query_params,
- header_params,
- body,
- post_params,
- files,
- response_type,
- auth_settings,
- _return_http_data_only,
- collection_formats,
- _preload_content,
- _request_timeout,
- _host,
- ),
- )
-
- def request(
- self,
- method,
- url,
- query_params=None,
- headers=None,
- post_params=None,
- body=None,
- _preload_content=True,
- _request_timeout=None,
- ):
+ return self.__call_api(resource_path, method,
+ path_params, query_params, header_params,
+ body, post_params, files,
+ response_type, auth_settings,
+ _return_http_data_only, collection_formats,
+ _preload_content, _request_timeout, _host)
+
+ return self.pool.apply_async(self.__call_api, (resource_path,
+ method, path_params,
+ query_params,
+ header_params, body,
+ post_params, files,
+ response_type,
+ auth_settings,
+ _return_http_data_only,
+ collection_formats,
+ _preload_content,
+ _request_timeout,
+ _host))
+
+ def request(self, method, url, query_params=None, headers=None,
+ post_params=None, body=None, _preload_content=True,
+ _request_timeout=None):
"""Makes the HTTP request using RESTClient."""
if method == "GET":
- return self.rest_client.GET(
- url,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- headers=headers,
- )
+ return self.rest_client.GET(url,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ headers=headers)
elif method == "HEAD":
- return self.rest_client.HEAD(
- url,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- headers=headers,
- )
+ return self.rest_client.HEAD(url,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ headers=headers)
elif method == "OPTIONS":
- return self.rest_client.OPTIONS(
- url,
- query_params=query_params,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- )
+ return self.rest_client.OPTIONS(url,
+ query_params=query_params,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout)
elif method == "POST":
- return self.rest_client.POST(
- url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
+ return self.rest_client.POST(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
elif method == "PUT":
- return self.rest_client.PUT(
- url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
+ return self.rest_client.PUT(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
elif method == "PATCH":
- return self.rest_client.PATCH(
- url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
+ return self.rest_client.PATCH(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
elif method == "DELETE":
- return self.rest_client.DELETE(
- url,
- query_params=query_params,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
+ return self.rest_client.DELETE(url,
+ query_params=query_params,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
else:
- raise ApiValueError("http method must be `GET`, `HEAD`, `OPTIONS`," " `POST`, `PATCH`, `PUT` or `DELETE`.")
+ raise ApiValueError(
+ "http method must be `GET`, `HEAD`, `OPTIONS`,"
+ " `POST`, `PATCH`, `PUT` or `DELETE`."
+ )
def parameters_to_tuples(self, params, collection_formats):
"""Get parameters as list of tuples, formatting collections.
@@ -532,7 +477,8 @@ def parameters_to_tuples(self, params, collection_formats):
delimiter = '|'
else: # csv is the default
delimiter = ','
- new_params.append((k, delimiter.join(str(value) for value in v)))
+ new_params.append(
+ (k, delimiter.join(str(value) for value in v)))
else:
new_params.append((k, v))
return new_params
@@ -554,8 +500,10 @@ def files_parameters(self, files=None):
with open(n, 'rb') as f:
filename = os.path.basename(f.name)
filedata = f.read()
- mimetype = mimetypes.guess_type(filename)[0] or 'application/octet-stream'
- params.append(tuple([k, tuple([filename, filedata, mimetype])]))
+ mimetype = (mimetypes.guess_type(filename)[0] or
+ 'application/octet-stream')
+ params.append(
+ tuple([k, tuple([filename, filedata, mimetype])]))
return params
@@ -618,7 +566,9 @@ def update_params_for_auth(self, method, url, headers, querys, body, auth_settin
elif auth_setting['in'] == 'query':
querys.append((auth_setting['key'], auth_setting['value']))
else:
- raise ApiValueError('Authentication token must be in `query` or `header`')
+ raise ApiValueError(
+ 'Authentication token must be in `query` or `header`'
+ )
def gen_sign(self, method, url, query_string=None, body=None):
"""generate authentication headers
@@ -637,7 +587,8 @@ def gen_sign(self, method, url, query_string=None, body=None):
m.update(body.encode('utf-8'))
hashed_payload = m.hexdigest()
s = '%s\n%s\n%s\n%s\n%s' % (method, url, query_string or "", hashed_payload, t)
- sign = hmac.new(self.configuration.secret.encode('utf-8'), s.encode('utf-8'), hashlib.sha512).hexdigest()
+ sign = hmac.new(self.configuration.secret.encode('utf-8'), s.encode('utf-8'),
+ hashlib.sha512).hexdigest()
return {'KEY': self.configuration.key, 'Timestamp': str(t), 'SIGN': sign}
def __deserialize_file(self, response):
@@ -655,7 +606,8 @@ def __deserialize_file(self, response):
content_disposition = response.getheader("Content-Disposition")
if content_disposition:
- filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).group(1)
+ filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
+ content_disposition).group(1)
path = os.path.join(os.path.dirname(path), filename)
with open(path, "wb") as f:
@@ -696,7 +648,10 @@ def __deserialize_date(self, string):
except ImportError:
return string
except ValueError:
- raise rest.ApiException(status=0, reason="Failed to parse `{0}` as date object".format(string))
+ raise rest.ApiException(
+ status=0,
+ reason="Failed to parse `{0}` as date object".format(string)
+ )
def __deserialize_datetime(self, string):
"""Deserializes string to datetime.
@@ -711,7 +666,13 @@ def __deserialize_datetime(self, string):
except ImportError:
return string
except ValueError:
- raise rest.ApiException(status=0, reason=("Failed to parse `{0}` as datetime object".format(string)))
+ raise rest.ApiException(
+ status=0,
+ reason=(
+ "Failed to parse `{0}` as datetime object"
+ .format(string)
+ )
+ )
def __deserialize_model(self, data, klass):
"""Deserializes list or dict to model.
@@ -721,14 +682,17 @@ def __deserialize_model(self, data, klass):
:return: model object.
"""
has_discriminator = False
- if hasattr(klass, 'get_real_child_model') and klass.discriminator_value_class_map:
+ if (hasattr(klass, 'get_real_child_model')
+ and klass.discriminator_value_class_map):
has_discriminator = True
if not klass.openapi_types and has_discriminator is False:
return data
kwargs = {}
- if data is not None and klass.openapi_types is not None and isinstance(data, (list, dict)):
+ if (data is not None and
+ klass.openapi_types is not None and
+ isinstance(data, (list, dict))):
for attr, attr_type in six.iteritems(klass.openapi_types):
if klass.attribute_map[attr] in data:
value = data[klass.attribute_map[attr]]
diff --git a/gate_api/configuration.py b/gate_api/configuration.py
index a2a34fe..e1a45a1 100644
--- a/gate_api/configuration.py
+++ b/gate_api/configuration.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -25,53 +25,50 @@
class Configuration(object):
"""NOTE: This class is auto generated by OpenAPI Generator
- Ref: https://openapi-generator.tech
- Do not edit the class manually.
-
- :param host: Base url
- :param key: APIv4 key
- :param secret: APIv4 secret
- :param username: Username for HTTP basic authentication
- :param password: Password for HTTP basic authentication
- :param discard_unknown_keys: Boolean value indicating whether to discard
- unknown properties. A server may send a response that includes additional
- properties that are not known by the client in the following scenarios:
- 1. The OpenAPI document is incomplete, i.e. it does not match the server
- implementation.
- 2. The client was generated using an older version of the OpenAPI document
- and the server has been upgraded since then.
- If a schema in the OpenAPI document defines the additionalProperties attribute,
- then all undeclared properties received by the server are injected into the
- additional properties map. In that case, there are undeclared properties, and
- nothing to discard.
-
- :Example:
-
- You can set the APIv4 key and secret like:
-
- conf = gate_api.Configuration(
- key='example_key'
- secret='example_secret'
- )
-
- The following headers will be added to the HTTP request:
- KEY: example_key
- SIGN: generated_signature_using_example_secret
- Timestamp: request_timestamp
+ Ref: https://openapi-generator.tech
+ Do not edit the class manually.
+
+ :param host: Base url
+ :param key: APIv4 key
+ :param secret: APIv4 secret
+ :param username: Username for HTTP basic authentication
+ :param password: Password for HTTP basic authentication
+ :param discard_unknown_keys: Boolean value indicating whether to discard
+ unknown properties. A server may send a response that includes additional
+ properties that are not known by the client in the following scenarios:
+ 1. The OpenAPI document is incomplete, i.e. it does not match the server
+ implementation.
+ 2. The client was generated using an older version of the OpenAPI document
+ and the server has been upgraded since then.
+ If a schema in the OpenAPI document defines the additionalProperties attribute,
+ then all undeclared properties received by the server are injected into the
+ additional properties map. In that case, there are undeclared properties, and
+ nothing to discard.
+
+ :Example:
+
+ You can set the APIv4 key and secret like:
+
+conf = gate_api.Configuration(
+ key='example_key'
+ secret='example_secret'
+)
+
+ The following headers will be added to the HTTP request:
+ KEY: example_key
+ SIGN: generated_signature_using_example_secret
+ Timestamp: request_timestamp
"""
_default = None
- def __init__(
- self,
- host="https://api.gateio.ws/api/v4",
- key=None,
- secret=None,
- username=None,
- password=None,
- discard_unknown_keys=False,
- ):
- """Constructor"""
+ def __init__(self, host="https://api.gateio.ws/api/v4",
+ key=None, secret=None,
+ username=None, password=None,
+ discard_unknown_keys=False,
+ ):
+ """Constructor
+ """
self.host = host
"""Default Base url
"""
@@ -290,7 +287,9 @@ def get_basic_auth_token(self):
password = ""
if self.password is not None:
password = self.password
- return urllib3.util.make_headers(basic_auth=username + ':' + password).get('authorization')
+ return urllib3.util.make_headers(
+ basic_auth=username + ':' + password
+ ).get('authorization')
def auth_settings(self):
"""Gets Auth Settings dict for api client.
@@ -311,13 +310,12 @@ def to_debug_report(self):
:return: The report for debugging.
"""
- return (
- "Python SDK Debug Report:\n"
- "OS: {env}\n"
- "Python Version: {pyversion}\n"
- "Version of the API: 4.56.0\n"
- "SDK Package Version: 4.56.0".format(env=sys.platform, pyversion=sys.version)
- )
+ return "Python SDK Debug Report:\n"\
+ "OS: {env}\n"\
+ "Python Version: {pyversion}\n"\
+ "Version of the API: v4.105.8\n"\
+ "SDK Package Version: 7.1.8".\
+ format(env=sys.platform, pyversion=sys.version)
def get_host_settings(self):
"""Gets an array of host settings
@@ -327,12 +325,12 @@ def get_host_settings(self):
return [
{
'url': "https://api.gateio.ws/api/v4",
- 'description': "Real Trading",
+ 'description': "Real trading",
},
{
'url': "https://fx-api-testnet.gateio.ws/api/v4",
- 'description': "TestNet Trading",
- },
+ 'description': "TestNet trading",
+ }
]
def get_host_from_settings(self, index, variables=None):
@@ -349,20 +347,22 @@ def get_host_from_settings(self, index, variables=None):
except IndexError:
raise ValueError(
"Invalid index {0} when selecting the host settings. "
- "Must be less than {1}".format(index, len(servers))
- )
+ "Must be less than {1}".format(index, len(servers)))
url = server['url']
# go through variables and replace placeholders
for variable_name, variable in server['variables'].items():
- used_value = variables.get(variable_name, variable['default_value'])
+ used_value = variables.get(
+ variable_name, variable['default_value'])
- if 'enum_values' in variable and used_value not in variable['enum_values']:
+ if 'enum_values' in variable \
+ and used_value not in variable['enum_values']:
raise ValueError(
"The variable `{0}` in the host URL has invalid value "
- "{1}. Must be {2}.".format(variable_name, variables[variable_name], variable['enum_values'])
- )
+ "{1}. Must be {2}.".format(
+ variable_name, variables[variable_name],
+ variable['enum_values']))
url = url.replace("{" + variable_name + "}", used_value)
diff --git a/gate_api/exceptions.py b/gate_api/exceptions.py
index 4825398..31ff2ea 100644
--- a/gate_api/exceptions.py
+++ b/gate_api/exceptions.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,8 +18,9 @@ class OpenApiException(Exception):
class ApiTypeError(OpenApiException, TypeError):
- def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None):
- """Raises an exception for TypeErrors
+ def __init__(self, msg, path_to_item=None, valid_classes=None,
+ key_type=None):
+ """ Raises an exception for TypeErrors
Args:
msg (str): the exception message
@@ -81,6 +82,7 @@ def __init__(self, msg, path_to_item=None):
class ApiException(OpenApiException):
+
def __init__(self, status=None, reason=None, http_resp=None):
if http_resp:
self.status = http_resp.status
@@ -95,9 +97,11 @@ def __init__(self, status=None, reason=None, http_resp=None):
def __str__(self):
"""Custom error messages for exception"""
- error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason)
+ error_message = "({0})\n"\
+ "Reason: {1}\n".format(self.status, self.reason)
if self.headers:
- error_message += "HTTP response headers: {0}\n".format(self.headers)
+ error_message += "HTTP response headers: {0}\n".format(
+ self.headers)
if self.body:
error_message += "HTTP response body: {0}\n".format(self.body)
diff --git a/gate_api/models/__init__.py b/gate_api/models/__init__.py
index 0c7f44b..4976416 100644
--- a/gate_api/models/__init__.py
+++ b/gate_api/models/__init__.py
@@ -2,11 +2,11 @@
# flake8: noqa
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -17,86 +17,129 @@
from gate_api.models.account_balance import AccountBalance
from gate_api.models.account_detail import AccountDetail
from gate_api.models.account_detail_key import AccountDetailKey
+from gate_api.models.account_rate_limit import AccountRateLimit
from gate_api.models.agency_commission import AgencyCommission
from gate_api.models.agency_commission_history import AgencyCommissionHistory
from gate_api.models.agency_transaction import AgencyTransaction
from gate_api.models.agency_transaction_history import AgencyTransactionHistory
-from gate_api.models.api_v4_key_perm import ApiV4KeyPerm
from gate_api.models.auto_repay_setting import AutoRepaySetting
+from gate_api.models.batch_amend_item import BatchAmendItem
+from gate_api.models.batch_amend_order_req import BatchAmendOrderReq
from gate_api.models.batch_futures_order import BatchFuturesOrder
from gate_api.models.batch_order import BatchOrder
+from gate_api.models.borrow_currency_info import BorrowCurrencyInfo
+from gate_api.models.broker_commission import BrokerCommission
+from gate_api.models.broker_commission1 import BrokerCommission1
+from gate_api.models.broker_commission_sub_broker_info import BrokerCommissionSubBrokerInfo
+from gate_api.models.broker_transaction import BrokerTransaction
+from gate_api.models.broker_transaction1 import BrokerTransaction1
from gate_api.models.cancel_batch_order import CancelBatchOrder
from gate_api.models.cancel_order_result import CancelOrderResult
+from gate_api.models.collateral_adjust import CollateralAdjust
+from gate_api.models.collateral_adjust_res import CollateralAdjustRes
from gate_api.models.collateral_align import CollateralAlign
+from gate_api.models.collateral_currency import CollateralCurrency
+from gate_api.models.collateral_currency_info import CollateralCurrencyInfo
+from gate_api.models.collateral_currency_res import CollateralCurrencyRes
+from gate_api.models.collateral_current_rate import CollateralCurrentRate
+from gate_api.models.collateral_fix_rate import CollateralFixRate
from gate_api.models.collateral_loan_currency import CollateralLoanCurrency
+from gate_api.models.collateral_ltv import CollateralLtv
from gate_api.models.collateral_order import CollateralOrder
from gate_api.models.collateral_record import CollateralRecord
from gate_api.models.contract import Contract
from gate_api.models.contract_stat import ContractStat
+from gate_api.models.convert_small_balance import ConvertSmallBalance
from gate_api.models.countdown_cancel_all_futures_task import CountdownCancelAllFuturesTask
+from gate_api.models.countdown_cancel_all_options_task import CountdownCancelAllOptionsTask
from gate_api.models.countdown_cancel_all_spot_task import CountdownCancelAllSpotTask
from gate_api.models.create_collateral_order import CreateCollateralOrder
+from gate_api.models.create_multi_collateral_order import CreateMultiCollateralOrder
from gate_api.models.create_uni_lend import CreateUniLend
from gate_api.models.create_uni_loan import CreateUniLoan
-from gate_api.models.cross_margin_account import CrossMarginAccount
-from gate_api.models.cross_margin_account_book import CrossMarginAccountBook
from gate_api.models.cross_margin_balance import CrossMarginBalance
-from gate_api.models.cross_margin_balance1 import CrossMarginBalance1
-from gate_api.models.cross_margin_currency import CrossMarginCurrency
from gate_api.models.cross_margin_loan import CrossMarginLoan
-from gate_api.models.cross_margin_repay_request import CrossMarginRepayRequest
from gate_api.models.cross_margin_repayment import CrossMarginRepayment
-from gate_api.models.cross_margin_transferable import CrossMarginTransferable
from gate_api.models.currency import Currency
from gate_api.models.currency_chain import CurrencyChain
from gate_api.models.currency_pair import CurrencyPair
+from gate_api.models.currency_quota import CurrencyQuota
+from gate_api.models.debit_fee import DebitFee
from gate_api.models.delivery_candlestick import DeliveryCandlestick
from gate_api.models.delivery_contract import DeliveryContract
from gate_api.models.delivery_settlement import DeliverySettlement
+from gate_api.models.delivery_ticker import DeliveryTicker
from gate_api.models.deposit_address import DepositAddress
-from gate_api.models.flash_swap_currency import FlashSwapCurrency
+from gate_api.models.deposit_record import DepositRecord
+from gate_api.models.dual_get_orders import DualGetOrders
+from gate_api.models.dual_get_plans import DualGetPlans
+from gate_api.models.eth2_rate_list import Eth2RateList
+from gate_api.models.eth2_swap import Eth2Swap
+from gate_api.models.find_coin import FindCoin
from gate_api.models.flash_swap_currency_pair import FlashSwapCurrencyPair
from gate_api.models.flash_swap_order import FlashSwapOrder
from gate_api.models.flash_swap_order_preview import FlashSwapOrderPreview
from gate_api.models.flash_swap_order_request import FlashSwapOrderRequest
from gate_api.models.flash_swap_preview_request import FlashSwapPreviewRequest
from gate_api.models.funding_account import FundingAccount
-from gate_api.models.funding_book_item import FundingBookItem
from gate_api.models.funding_rate_record import FundingRateRecord
+from gate_api.models.future_cancel_order_result import FutureCancelOrderResult
from gate_api.models.futures_account import FuturesAccount
from gate_api.models.futures_account_book import FuturesAccountBook
from gate_api.models.futures_account_history import FuturesAccountHistory
from gate_api.models.futures_auto_deleverage import FuturesAutoDeleverage
+from gate_api.models.futures_batch_amend_order_request import FuturesBatchAmendOrderRequest
from gate_api.models.futures_candlestick import FuturesCandlestick
from gate_api.models.futures_fee import FuturesFee
from gate_api.models.futures_index_constituents import FuturesIndexConstituents
from gate_api.models.futures_initial_order import FuturesInitialOrder
+from gate_api.models.futures_limit_risk_tiers import FuturesLimitRiskTiers
from gate_api.models.futures_liq_order import FuturesLiqOrder
from gate_api.models.futures_liquidate import FuturesLiquidate
from gate_api.models.futures_order import FuturesOrder
from gate_api.models.futures_order_amendment import FuturesOrderAmendment
from gate_api.models.futures_order_book import FuturesOrderBook
from gate_api.models.futures_order_book_item import FuturesOrderBookItem
+from gate_api.models.futures_position_cross_mode import FuturesPositionCrossMode
from gate_api.models.futures_premium_index import FuturesPremiumIndex
from gate_api.models.futures_price_trigger import FuturesPriceTrigger
from gate_api.models.futures_price_triggered_order import FuturesPriceTriggeredOrder
+from gate_api.models.futures_risk_limit_tier import FuturesRiskLimitTier
from gate_api.models.futures_ticker import FuturesTicker
from gate_api.models.futures_trade import FuturesTrade
from gate_api.models.index_constituent import IndexConstituent
+from gate_api.models.inline_object import InlineObject
+from gate_api.models.inline_response200 import InlineResponse200
+from gate_api.models.inline_response2001 import InlineResponse2001
from gate_api.models.insurance_record import InsuranceRecord
from gate_api.models.ledger_record import LedgerRecord
from gate_api.models.liquidate_order import LiquidateOrder
-from gate_api.models.loan import Loan
-from gate_api.models.loan_patch import LoanPatch
-from gate_api.models.loan_record import LoanRecord
from gate_api.models.margin_account import MarginAccount
from gate_api.models.margin_account_book import MarginAccountBook
from gate_api.models.margin_account_currency import MarginAccountCurrency
-from gate_api.models.margin_borrowable import MarginBorrowable
-from gate_api.models.margin_currency_pair import MarginCurrencyPair
+from gate_api.models.margin_leverage_tier import MarginLeverageTier
+from gate_api.models.margin_market_leverage import MarginMarketLeverage
+from gate_api.models.margin_tiers import MarginTiers
from gate_api.models.margin_transferable import MarginTransferable
from gate_api.models.max_uni_borrowable import MaxUniBorrowable
+from gate_api.models.mock_futures_order import MockFuturesOrder
+from gate_api.models.mock_futures_position import MockFuturesPosition
+from gate_api.models.mock_margin_result import MockMarginResult
+from gate_api.models.mock_options_order import MockOptionsOrder
+from gate_api.models.mock_options_position import MockOptionsPosition
+from gate_api.models.mock_risk_unit import MockRiskUnit
+from gate_api.models.mock_spot_balance import MockSpotBalance
+from gate_api.models.mock_spot_order import MockSpotOrder
from gate_api.models.multi_chain_address_item import MultiChainAddressItem
+from gate_api.models.multi_collateral_currency import MultiCollateralCurrency
+from gate_api.models.multi_collateral_item import MultiCollateralItem
+from gate_api.models.multi_collateral_order import MultiCollateralOrder
+from gate_api.models.multi_collateral_record import MultiCollateralRecord
+from gate_api.models.multi_collateral_record_currency import MultiCollateralRecordCurrency
+from gate_api.models.multi_loan_item import MultiLoanItem
+from gate_api.models.multi_loan_repay_item import MultiLoanRepayItem
+from gate_api.models.multi_repay_record import MultiRepayRecord
+from gate_api.models.multi_repay_resp import MultiRepayResp
from gate_api.models.my_futures_trade import MyFuturesTrade
from gate_api.models.my_futures_trade_time_range import MyFuturesTradeTimeRange
from gate_api.models.open_orders import OpenOrders
@@ -104,6 +147,8 @@
from gate_api.models.options_account_book import OptionsAccountBook
from gate_api.models.options_candlestick import OptionsCandlestick
from gate_api.models.options_contract import OptionsContract
+from gate_api.models.options_mmp import OptionsMMP
+from gate_api.models.options_mmp_reset import OptionsMMPReset
from gate_api.models.options_my_settlements import OptionsMySettlements
from gate_api.models.options_my_trade import OptionsMyTrade
from gate_api.models.options_order import OptionsOrder
@@ -116,42 +161,60 @@
from gate_api.models.options_underlying_ticker import OptionsUnderlyingTicker
from gate_api.models.order import Order
from gate_api.models.order_book import OrderBook
+from gate_api.models.order_cancel import OrderCancel
from gate_api.models.order_patch import OrderPatch
from gate_api.models.order_resp import OrderResp
+from gate_api.models.partner_commission_history import PartnerCommissionHistory
+from gate_api.models.partner_sub import PartnerSub
+from gate_api.models.partner_sub_list import PartnerSubList
+from gate_api.models.partner_transaction_history import PartnerTransactionHistory
from gate_api.models.patch_uni_lend import PatchUniLend
-from gate_api.models.portfolio_account import PortfolioAccount
-from gate_api.models.portfolio_borrowable import PortfolioBorrowable
-from gate_api.models.portfolio_loan import PortfolioLoan
-from gate_api.models.portfolio_loan_record import PortfolioLoanRecord
-from gate_api.models.portfolio_margin_balance import PortfolioMarginBalance
-from gate_api.models.portfolio_mode import PortfolioMode
-from gate_api.models.portfolio_transferable import PortfolioTransferable
+from gate_api.models.place_dual_investment_order import PlaceDualInvestmentOrder
from gate_api.models.position import Position
from gate_api.models.position_close import PositionClose
from gate_api.models.position_close_order import PositionCloseOrder
+from gate_api.models.profit_loss_range import ProfitLossRange
+from gate_api.models.rebate_user_info import RebateUserInfo
+from gate_api.models.repay_currency_res import RepayCurrencyRes
from gate_api.models.repay_loan import RepayLoan
+from gate_api.models.repay_multi_loan import RepayMultiLoan
from gate_api.models.repay_record import RepayRecord
-from gate_api.models.repay_request import RepayRequest
+from gate_api.models.repay_record_currency import RepayRecordCurrency
+from gate_api.models.repay_record_left_interest import RepayRecordLeftInterest
+from gate_api.models.repay_record_repaid_currency import RepayRecordRepaidCurrency
+from gate_api.models.repay_record_total_interest import RepayRecordTotalInterest
from gate_api.models.repay_resp import RepayResp
-from gate_api.models.repayment import Repayment
+from gate_api.models.risk_units import RiskUnits
from gate_api.models.saved_address import SavedAddress
+from gate_api.models.small_balance import SmallBalance
+from gate_api.models.small_balance_history import SmallBalanceHistory
from gate_api.models.spot_account import SpotAccount
from gate_api.models.spot_account_book import SpotAccountBook
+from gate_api.models.spot_currency_chain import SpotCurrencyChain
from gate_api.models.spot_fee import SpotFee
+from gate_api.models.spot_insurance_history import SpotInsuranceHistory
from gate_api.models.spot_price_put_order import SpotPricePutOrder
from gate_api.models.spot_price_trigger import SpotPriceTrigger
from gate_api.models.spot_price_triggered_order import SpotPriceTriggeredOrder
from gate_api.models.stp_group import StpGroup
from gate_api.models.stp_group_user import StpGroupUser
+from gate_api.models.structured_buy import StructuredBuy
+from gate_api.models.structured_get_project_list import StructuredGetProjectList
+from gate_api.models.structured_order_list import StructuredOrderList
from gate_api.models.sub_account import SubAccount
from gate_api.models.sub_account_balance import SubAccountBalance
from gate_api.models.sub_account_cross_margin_balance import SubAccountCrossMarginBalance
from gate_api.models.sub_account_futures_balance import SubAccountFuturesBalance
from gate_api.models.sub_account_key import SubAccountKey
+from gate_api.models.sub_account_key_perms import SubAccountKeyPerms
from gate_api.models.sub_account_margin_balance import SubAccountMarginBalance
from gate_api.models.sub_account_to_sub_account import SubAccountToSubAccount
from gate_api.models.sub_account_transfer import SubAccountTransfer
+from gate_api.models.sub_account_transfer_record_item import SubAccountTransferRecordItem
from gate_api.models.sub_cross_margin_account import SubCrossMarginAccount
+from gate_api.models.sub_user_mode import SubUserMode
+from gate_api.models.swap_coin import SwapCoin
+from gate_api.models.swap_coin_struct import SwapCoinStruct
from gate_api.models.system_time import SystemTime
from gate_api.models.ticker import Ticker
from gate_api.models.total_balance import TotalBalance
@@ -159,9 +222,15 @@
from gate_api.models.trade_fee import TradeFee
from gate_api.models.transaction_id import TransactionID
from gate_api.models.transfer import Transfer
+from gate_api.models.transfer_order_status import TransferOrderStatus
+from gate_api.models.transferables_result import TransferablesResult
from gate_api.models.trigger_order_response import TriggerOrderResponse
from gate_api.models.trigger_time import TriggerTime
+from gate_api.models.uid_push_order import UidPushOrder
+from gate_api.models.uid_push_withdrawal import UidPushWithdrawal
+from gate_api.models.uid_push_withdrawal_resp import UidPushWithdrawalResp
from gate_api.models.uni_currency import UniCurrency
+from gate_api.models.uni_currency_interest import UniCurrencyInterest
from gate_api.models.uni_currency_pair import UniCurrencyPair
from gate_api.models.uni_interest_record import UniInterestRecord
from gate_api.models.uni_lend import UniLend
@@ -170,6 +239,32 @@
from gate_api.models.uni_loan import UniLoan
from gate_api.models.uni_loan_interest_record import UniLoanInterestRecord
from gate_api.models.uni_loan_record import UniLoanRecord
+from gate_api.models.unified_account import UnifiedAccount
+from gate_api.models.unified_balance import UnifiedBalance
+from gate_api.models.unified_borrowable import UnifiedBorrowable
+from gate_api.models.unified_borrowable1 import UnifiedBorrowable1
+from gate_api.models.unified_collateral_req import UnifiedCollateralReq
+from gate_api.models.unified_collateral_res import UnifiedCollateralRes
+from gate_api.models.unified_currency import UnifiedCurrency
+from gate_api.models.unified_discount import UnifiedDiscount
+from gate_api.models.unified_discount_tiers import UnifiedDiscountTiers
+from gate_api.models.unified_history_loan_rate import UnifiedHistoryLoanRate
+from gate_api.models.unified_history_loan_rate_rates import UnifiedHistoryLoanRateRates
+from gate_api.models.unified_leverage_config import UnifiedLeverageConfig
+from gate_api.models.unified_leverage_setting import UnifiedLeverageSetting
+from gate_api.models.unified_loan import UnifiedLoan
+from gate_api.models.unified_loan_record import UnifiedLoanRecord
+from gate_api.models.unified_loan_result import UnifiedLoanResult
+from gate_api.models.unified_margin_tiers import UnifiedMarginTiers
+from gate_api.models.unified_mode_set import UnifiedModeSet
+from gate_api.models.unified_portfolio_input import UnifiedPortfolioInput
+from gate_api.models.unified_portfolio_output import UnifiedPortfolioOutput
+from gate_api.models.unified_risk_units import UnifiedRiskUnits
+from gate_api.models.unified_settings import UnifiedSettings
+from gate_api.models.unified_transferable import UnifiedTransferable
from gate_api.models.user_ltv_info import UserLtvInfo
+from gate_api.models.user_sub import UserSub
+from gate_api.models.user_sub_relation import UserSubRelation
from gate_api.models.user_total_amount import UserTotalAmount
from gate_api.models.withdraw_status import WithdrawStatus
+from gate_api.models.withdrawal_record import WithdrawalRecord
diff --git a/gate_api/models/account_balance.py b/gate_api/models/account_balance.py
index 70d9ef7..f213fb7 100644
--- a/gate_api/models/account_balance.py
+++ b/gate_api/models/account_balance.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,12 +32,22 @@ class AccountBalance(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'amount': 'str', 'currency': 'str'}
-
- attribute_map = {'amount': 'amount', 'currency': 'currency'}
-
- def __init__(self, amount=None, currency=None, local_vars_configuration=None): # noqa: E501
- # type: (str, str, Configuration) -> None
+ openapi_types = {
+ 'amount': 'str',
+ 'currency': 'str',
+ 'unrealised_pnl': 'str',
+ 'borrowed': 'str'
+ }
+
+ attribute_map = {
+ 'amount': 'amount',
+ 'currency': 'currency',
+ 'unrealised_pnl': 'unrealised_pnl',
+ 'borrowed': 'borrowed'
+ }
+
+ def __init__(self, amount=None, currency=None, unrealised_pnl=None, borrowed=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, Configuration) -> None
"""AccountBalance - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -45,12 +55,18 @@ def __init__(self, amount=None, currency=None, local_vars_configuration=None):
self._amount = None
self._currency = None
+ self._unrealised_pnl = None
+ self._borrowed = None
self.discriminator = None
if amount is not None:
self.amount = amount
if currency is not None:
self.currency = currency
+ if unrealised_pnl is not None:
+ self.unrealised_pnl = unrealised_pnl
+ if borrowed is not None:
+ self.borrowed = borrowed
@property
def amount(self):
@@ -98,11 +114,58 @@ def currency(self, currency):
allowed_values = ["BTC", "CNY", "USD", "USDT"] # noqa: E501
if self.local_vars_configuration.client_side_validation and currency not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `currency` ({0}), must be one of {1}".format(currency, allowed_values) # noqa: E501
+ "Invalid value for `currency` ({0}), must be one of {1}" # noqa: E501
+ .format(currency, allowed_values)
)
self._currency = currency
+ @property
+ def unrealised_pnl(self):
+ """Gets the unrealised_pnl of this AccountBalance. # noqa: E501
+
+ Unrealised_pnl, this field will only appear in futures, options, delivery, and total accounts # noqa: E501
+
+ :return: The unrealised_pnl of this AccountBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._unrealised_pnl
+
+ @unrealised_pnl.setter
+ def unrealised_pnl(self, unrealised_pnl):
+ """Sets the unrealised_pnl of this AccountBalance.
+
+ Unrealised_pnl, this field will only appear in futures, options, delivery, and total accounts # noqa: E501
+
+ :param unrealised_pnl: The unrealised_pnl of this AccountBalance. # noqa: E501
+ :type: str
+ """
+
+ self._unrealised_pnl = unrealised_pnl
+
+ @property
+ def borrowed(self):
+ """Gets the borrowed of this AccountBalance. # noqa: E501
+
+ Total borrowed amount, this field will only appear in margin and cross_margin accounts # noqa: E501
+
+ :return: The borrowed of this AccountBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._borrowed
+
+ @borrowed.setter
+ def borrowed(self, borrowed):
+ """Sets the borrowed of this AccountBalance.
+
+ Total borrowed amount, this field will only appear in margin and cross_margin accounts # noqa: E501
+
+ :param borrowed: The borrowed of this AccountBalance. # noqa: E501
+ :type: str
+ """
+
+ self._borrowed = borrowed
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -110,16 +173,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/account_detail.py b/gate_api/models/account_detail.py
index b7a1ad9..7854045 100644
--- a/gate_api/models/account_detail.py
+++ b/gate_api/models/account_detail.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -36,20 +36,22 @@ class AccountDetail(object):
'ip_whitelist': 'list[str]',
'currency_pairs': 'list[str]',
'user_id': 'int',
+ 'tier': 'int',
'key': 'AccountDetailKey',
+ 'copy_trading_role': 'int'
}
attribute_map = {
'ip_whitelist': 'ip_whitelist',
'currency_pairs': 'currency_pairs',
'user_id': 'user_id',
+ 'tier': 'tier',
'key': 'key',
+ 'copy_trading_role': 'copy_trading_role'
}
- def __init__(
- self, ip_whitelist=None, currency_pairs=None, user_id=None, key=None, local_vars_configuration=None
- ): # noqa: E501
- # type: (list[str], list[str], int, AccountDetailKey, Configuration) -> None
+ def __init__(self, ip_whitelist=None, currency_pairs=None, user_id=None, tier=None, key=None, copy_trading_role=None, local_vars_configuration=None): # noqa: E501
+ # type: (list[str], list[str], int, int, AccountDetailKey, int, Configuration) -> None
"""AccountDetail - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -58,7 +60,9 @@ def __init__(
self._ip_whitelist = None
self._currency_pairs = None
self._user_id = None
+ self._tier = None
self._key = None
+ self._copy_trading_role = None
self.discriminator = None
if ip_whitelist is not None:
@@ -67,14 +71,18 @@ def __init__(
self.currency_pairs = currency_pairs
if user_id is not None:
self.user_id = user_id
+ if tier is not None:
+ self.tier = tier
if key is not None:
self.key = key
+ if copy_trading_role is not None:
+ self.copy_trading_role = copy_trading_role
@property
def ip_whitelist(self):
"""Gets the ip_whitelist of this AccountDetail. # noqa: E501
- IP whitelist # noqa: E501
+ IP Whitelist # noqa: E501
:return: The ip_whitelist of this AccountDetail. # noqa: E501
:rtype: list[str]
@@ -85,7 +93,7 @@ def ip_whitelist(self):
def ip_whitelist(self, ip_whitelist):
"""Sets the ip_whitelist of this AccountDetail.
- IP whitelist # noqa: E501
+ IP Whitelist # noqa: E501
:param ip_whitelist: The ip_whitelist of this AccountDetail. # noqa: E501
:type: list[str]
@@ -97,7 +105,7 @@ def ip_whitelist(self, ip_whitelist):
def currency_pairs(self):
"""Gets the currency_pairs of this AccountDetail. # noqa: E501
- CurrencyPair whitelisting # noqa: E501
+ Trading pair whitelist # noqa: E501
:return: The currency_pairs of this AccountDetail. # noqa: E501
:rtype: list[str]
@@ -108,7 +116,7 @@ def currency_pairs(self):
def currency_pairs(self, currency_pairs):
"""Sets the currency_pairs of this AccountDetail.
- CurrencyPair whitelisting # noqa: E501
+ Trading pair whitelist # noqa: E501
:param currency_pairs: The currency_pairs of this AccountDetail. # noqa: E501
:type: list[str]
@@ -139,6 +147,29 @@ def user_id(self, user_id):
self._user_id = user_id
+ @property
+ def tier(self):
+ """Gets the tier of this AccountDetail. # noqa: E501
+
+ User VIP level # noqa: E501
+
+ :return: The tier of this AccountDetail. # noqa: E501
+ :rtype: int
+ """
+ return self._tier
+
+ @tier.setter
+ def tier(self, tier):
+ """Sets the tier of this AccountDetail.
+
+ User VIP level # noqa: E501
+
+ :param tier: The tier of this AccountDetail. # noqa: E501
+ :type: int
+ """
+
+ self._tier = tier
+
@property
def key(self):
"""Gets the key of this AccountDetail. # noqa: E501
@@ -160,6 +191,29 @@ def key(self, key):
self._key = key
+ @property
+ def copy_trading_role(self):
+ """Gets the copy_trading_role of this AccountDetail. # noqa: E501
+
+ User role: 0 - Normal user, 1 - Copy trading leader, 2 - Follower, 3 - Both leader and follower # noqa: E501
+
+ :return: The copy_trading_role of this AccountDetail. # noqa: E501
+ :rtype: int
+ """
+ return self._copy_trading_role
+
+ @copy_trading_role.setter
+ def copy_trading_role(self, copy_trading_role):
+ """Sets the copy_trading_role of this AccountDetail.
+
+ User role: 0 - Normal user, 1 - Copy trading leader, 2 - Follower, 3 - Both leader and follower # noqa: E501
+
+ :param copy_trading_role: The copy_trading_role of this AccountDetail. # noqa: E501
+ :type: int
+ """
+
+ self._copy_trading_role = copy_trading_role
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -167,16 +221,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/account_detail_key.py b/gate_api/models/account_detail_key.py
index e9b7d5e..d9e3728 100644
--- a/gate_api/models/account_detail_key.py
+++ b/gate_api/models/account_detail_key.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,13 @@ class AccountDetailKey(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'mode': 'int'}
+ openapi_types = {
+ 'mode': 'int'
+ }
- attribute_map = {'mode': 'mode'}
+ attribute_map = {
+ 'mode': 'mode'
+ }
def __init__(self, mode=None, local_vars_configuration=None): # noqa: E501
# type: (int, Configuration) -> None
@@ -53,7 +57,7 @@ def __init__(self, mode=None, local_vars_configuration=None): # noqa: E501
def mode(self):
"""Gets the mode of this AccountDetailKey. # noqa: E501
- mode: 1 - classic account 2 - portfolio margin account # noqa: E501
+ Mode: 1 - Classic mode, 2 - Legacy unified mode # noqa: E501
:return: The mode of this AccountDetailKey. # noqa: E501
:rtype: int
@@ -64,7 +68,7 @@ def mode(self):
def mode(self, mode):
"""Sets the mode of this AccountDetailKey.
- mode: 1 - classic account 2 - portfolio margin account # noqa: E501
+ Mode: 1 - Classic mode, 2 - Legacy unified mode # noqa: E501
:param mode: The mode of this AccountDetailKey. # noqa: E501
:type: int
@@ -79,16 +83,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/account_rate_limit.py b/gate_api/models/account_rate_limit.py
new file mode 100644
index 0000000..2fd7e27
--- /dev/null
+++ b/gate_api/models/account_rate_limit.py
@@ -0,0 +1,207 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class AccountRateLimit(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'tier': 'str',
+ 'ratio': 'str',
+ 'main_ratio': 'str',
+ 'updated_at': 'str'
+ }
+
+ attribute_map = {
+ 'tier': 'tier',
+ 'ratio': 'ratio',
+ 'main_ratio': 'main_ratio',
+ 'updated_at': 'updated_at'
+ }
+
+ def __init__(self, tier=None, ratio=None, main_ratio=None, updated_at=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, Configuration) -> None
+ """AccountRateLimit - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._tier = None
+ self._ratio = None
+ self._main_ratio = None
+ self._updated_at = None
+ self.discriminator = None
+
+ if tier is not None:
+ self.tier = tier
+ if ratio is not None:
+ self.ratio = ratio
+ if main_ratio is not None:
+ self.main_ratio = main_ratio
+ if updated_at is not None:
+ self.updated_at = updated_at
+
+ @property
+ def tier(self):
+ """Gets the tier of this AccountRateLimit. # noqa: E501
+
+ Frequency limit level (For detailed frequency limit rules, see [Transaction ratio frequency limit](#rate-limit-based-on-fill-ratio)) # noqa: E501
+
+ :return: The tier of this AccountRateLimit. # noqa: E501
+ :rtype: str
+ """
+ return self._tier
+
+ @tier.setter
+ def tier(self, tier):
+ """Sets the tier of this AccountRateLimit.
+
+ Frequency limit level (For detailed frequency limit rules, see [Transaction ratio frequency limit](#rate-limit-based-on-fill-ratio)) # noqa: E501
+
+ :param tier: The tier of this AccountRateLimit. # noqa: E501
+ :type: str
+ """
+
+ self._tier = tier
+
+ @property
+ def ratio(self):
+ """Gets the ratio of this AccountRateLimit. # noqa: E501
+
+ Fill rate # noqa: E501
+
+ :return: The ratio of this AccountRateLimit. # noqa: E501
+ :rtype: str
+ """
+ return self._ratio
+
+ @ratio.setter
+ def ratio(self, ratio):
+ """Sets the ratio of this AccountRateLimit.
+
+ Fill rate # noqa: E501
+
+ :param ratio: The ratio of this AccountRateLimit. # noqa: E501
+ :type: str
+ """
+
+ self._ratio = ratio
+
+ @property
+ def main_ratio(self):
+ """Gets the main_ratio of this AccountRateLimit. # noqa: E501
+
+ Total fill ratio of main account # noqa: E501
+
+ :return: The main_ratio of this AccountRateLimit. # noqa: E501
+ :rtype: str
+ """
+ return self._main_ratio
+
+ @main_ratio.setter
+ def main_ratio(self, main_ratio):
+ """Sets the main_ratio of this AccountRateLimit.
+
+ Total fill ratio of main account # noqa: E501
+
+ :param main_ratio: The main_ratio of this AccountRateLimit. # noqa: E501
+ :type: str
+ """
+
+ self._main_ratio = main_ratio
+
+ @property
+ def updated_at(self):
+ """Gets the updated_at of this AccountRateLimit. # noqa: E501
+
+ Update time # noqa: E501
+
+ :return: The updated_at of this AccountRateLimit. # noqa: E501
+ :rtype: str
+ """
+ return self._updated_at
+
+ @updated_at.setter
+ def updated_at(self, updated_at):
+ """Sets the updated_at of this AccountRateLimit.
+
+ Update time # noqa: E501
+
+ :param updated_at: The updated_at of this AccountRateLimit. # noqa: E501
+ :type: str
+ """
+
+ self._updated_at = updated_at
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, AccountRateLimit):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, AccountRateLimit):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/agency_commission.py b/gate_api/models/agency_commission.py
index cf5d6ce..d843953 100644
--- a/gate_api/models/agency_commission.py
+++ b/gate_api/models/agency_commission.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -38,7 +38,7 @@ class AgencyCommission(object):
'group_name': 'str',
'commission_amount': 'str',
'commission_asset': 'str',
- 'source': 'str',
+ 'source': 'str'
}
attribute_map = {
@@ -47,19 +47,10 @@ class AgencyCommission(object):
'group_name': 'group_name',
'commission_amount': 'commission_amount',
'commission_asset': 'commission_asset',
- 'source': 'source',
+ 'source': 'source'
}
- def __init__(
- self,
- commission_time=None,
- user_id=None,
- group_name=None,
- commission_amount=None,
- commission_asset=None,
- source=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, commission_time=None, user_id=None, group_name=None, commission_amount=None, commission_asset=None, source=None, local_vars_configuration=None): # noqa: E501
# type: (int, int, str, str, str, str, Configuration) -> None
"""AgencyCommission - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -91,7 +82,7 @@ def __init__(
def commission_time(self):
"""Gets the commission_time of this AgencyCommission. # noqa: E501
- Commission Time. (unix timestamp) # noqa: E501
+ Commission time (Unix timestamp in seconds) # noqa: E501
:return: The commission_time of this AgencyCommission. # noqa: E501
:rtype: int
@@ -102,7 +93,7 @@ def commission_time(self):
def commission_time(self, commission_time):
"""Sets the commission_time of this AgencyCommission.
- Commission Time. (unix timestamp) # noqa: E501
+ Commission time (Unix timestamp in seconds) # noqa: E501
:param commission_time: The commission_time of this AgencyCommission. # noqa: E501
:type: int
@@ -160,7 +151,7 @@ def group_name(self, group_name):
def commission_amount(self):
"""Gets the commission_amount of this AgencyCommission. # noqa: E501
- Commission Amount # noqa: E501
+ Transaction amount # noqa: E501
:return: The commission_amount of this AgencyCommission. # noqa: E501
:rtype: str
@@ -171,7 +162,7 @@ def commission_amount(self):
def commission_amount(self, commission_amount):
"""Sets the commission_amount of this AgencyCommission.
- Commission Amount # noqa: E501
+ Transaction amount # noqa: E501
:param commission_amount: The commission_amount of this AgencyCommission. # noqa: E501
:type: str
@@ -206,7 +197,7 @@ def commission_asset(self, commission_asset):
def source(self):
"""Gets the source of this AgencyCommission. # noqa: E501
- Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501
+ Commission source: SPOT - Spot commission, FUTURES - Futures commission # noqa: E501
:return: The source of this AgencyCommission. # noqa: E501
:rtype: str
@@ -217,7 +208,7 @@ def source(self):
def source(self, source):
"""Sets the source of this AgencyCommission.
- Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501
+ Commission source: SPOT - Spot commission, FUTURES - Futures commission # noqa: E501
:param source: The source of this AgencyCommission. # noqa: E501
:type: str
@@ -232,16 +223,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/agency_commission_history.py b/gate_api/models/agency_commission_history.py
index b1a9e7a..50fd672 100644
--- a/gate_api/models/agency_commission_history.py
+++ b/gate_api/models/agency_commission_history.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,17 @@ class AgencyCommissionHistory(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency_pair': 'str', 'total': 'int', 'list': 'list[AgencyCommission]'}
-
- attribute_map = {'currency_pair': 'currency_pair', 'total': 'total', 'list': 'list'}
+ openapi_types = {
+ 'currency_pair': 'str',
+ 'total': 'int',
+ 'list': 'list[AgencyCommission]'
+ }
+
+ attribute_map = {
+ 'currency_pair': 'currency_pair',
+ 'total': 'total',
+ 'list': 'list'
+ }
def __init__(self, currency_pair=None, total=None, list=None, local_vars_configuration=None): # noqa: E501
# type: (str, int, list[AgencyCommission], Configuration) -> None
@@ -105,7 +113,7 @@ def total(self, total):
def list(self):
"""Gets the list of this AgencyCommissionHistory. # noqa: E501
- List of comission history # noqa: E501
+ List of commission history # noqa: E501
:return: The list of this AgencyCommissionHistory. # noqa: E501
:rtype: list[AgencyCommission]
@@ -116,7 +124,7 @@ def list(self):
def list(self, list):
"""Sets the list of this AgencyCommissionHistory.
- List of comission history # noqa: E501
+ List of commission history # noqa: E501
:param list: The list of this AgencyCommissionHistory. # noqa: E501
:type: list[AgencyCommission]
@@ -131,16 +139,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/agency_transaction.py b/gate_api/models/agency_transaction.py
index f0b62cf..abdf119 100644
--- a/gate_api/models/agency_transaction.py
+++ b/gate_api/models/agency_transaction.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -41,7 +41,7 @@ class AgencyTransaction(object):
'currency_pair': 'str',
'amount': 'str',
'amount_asset': 'str',
- 'source': 'str',
+ 'source': 'str'
}
attribute_map = {
@@ -53,22 +53,10 @@ class AgencyTransaction(object):
'currency_pair': 'currency_pair',
'amount': 'amount',
'amount_asset': 'amount_asset',
- 'source': 'source',
+ 'source': 'source'
}
- def __init__(
- self,
- transaction_time=None,
- user_id=None,
- group_name=None,
- fee=None,
- fee_asset=None,
- currency_pair=None,
- amount=None,
- amount_asset=None,
- source=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=None, fee_asset=None, currency_pair=None, amount=None, amount_asset=None, source=None, local_vars_configuration=None): # noqa: E501
# type: (int, int, str, str, str, str, str, str, str, Configuration) -> None
"""AgencyTransaction - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -247,7 +235,7 @@ def currency_pair(self, currency_pair):
def amount(self):
"""Gets the amount of this AgencyTransaction. # noqa: E501
- Commission Amount # noqa: E501
+ Transaction amount # noqa: E501
:return: The amount of this AgencyTransaction. # noqa: E501
:rtype: str
@@ -258,7 +246,7 @@ def amount(self):
def amount(self, amount):
"""Sets the amount of this AgencyTransaction.
- Commission Amount # noqa: E501
+ Transaction amount # noqa: E501
:param amount: The amount of this AgencyTransaction. # noqa: E501
:type: str
@@ -293,7 +281,7 @@ def amount_asset(self, amount_asset):
def source(self):
"""Gets the source of this AgencyTransaction. # noqa: E501
- Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501
+ Commission source: SPOT - Spot commission, FUTURES - Futures commission # noqa: E501
:return: The source of this AgencyTransaction. # noqa: E501
:rtype: str
@@ -304,7 +292,7 @@ def source(self):
def source(self, source):
"""Sets the source of this AgencyTransaction.
- Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501
+ Commission source: SPOT - Spot commission, FUTURES - Futures commission # noqa: E501
:param source: The source of this AgencyTransaction. # noqa: E501
:type: str
@@ -319,16 +307,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/agency_transaction_history.py b/gate_api/models/agency_transaction_history.py
index ff7578c..99dfdeb 100644
--- a/gate_api/models/agency_transaction_history.py
+++ b/gate_api/models/agency_transaction_history.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,17 @@ class AgencyTransactionHistory(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency_pair': 'str', 'total': 'int', 'list': 'list[AgencyTransaction]'}
-
- attribute_map = {'currency_pair': 'currency_pair', 'total': 'total', 'list': 'list'}
+ openapi_types = {
+ 'currency_pair': 'str',
+ 'total': 'int',
+ 'list': 'list[AgencyTransaction]'
+ }
+
+ attribute_map = {
+ 'currency_pair': 'currency_pair',
+ 'total': 'total',
+ 'list': 'list'
+ }
def __init__(self, currency_pair=None, total=None, list=None, local_vars_configuration=None): # noqa: E501
# type: (str, int, list[AgencyTransaction], Configuration) -> None
@@ -131,16 +139,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/auto_repay_setting.py b/gate_api/models/auto_repay_setting.py
index f7a157b..a3d0994 100644
--- a/gate_api/models/auto_repay_setting.py
+++ b/gate_api/models/auto_repay_setting.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,13 @@ class AutoRepaySetting(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'status': 'str'}
+ openapi_types = {
+ 'status': 'str'
+ }
- attribute_map = {'status': 'status'}
+ attribute_map = {
+ 'status': 'status'
+ }
def __init__(self, status=None, local_vars_configuration=None): # noqa: E501
# type: (str, Configuration) -> None
@@ -53,7 +57,7 @@ def __init__(self, status=None, local_vars_configuration=None): # noqa: E501
def status(self):
"""Gets the status of this AutoRepaySetting. # noqa: E501
- Auto repayment status. `on` - enabled, `off` - disabled # noqa: E501
+ Auto repayment status: `on` - enabled, `off` - disabled # noqa: E501
:return: The status of this AutoRepaySetting. # noqa: E501
:rtype: str
@@ -64,7 +68,7 @@ def status(self):
def status(self, status):
"""Sets the status of this AutoRepaySetting.
- Auto repayment status. `on` - enabled, `off` - disabled # noqa: E501
+ Auto repayment status: `on` - enabled, `off` - disabled # noqa: E501
:param status: The status of this AutoRepaySetting. # noqa: E501
:type: str
@@ -72,7 +76,8 @@ def status(self, status):
allowed_values = ["on", "off"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values) # noqa: E501
+ "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
+ .format(status, allowed_values)
)
self._status = status
@@ -84,16 +89,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/batch_amend_item.py b/gate_api/models/batch_amend_item.py
new file mode 100644
index 0000000..7125ac0
--- /dev/null
+++ b/gate_api/models/batch_amend_item.py
@@ -0,0 +1,296 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class BatchAmendItem(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'order_id': 'str',
+ 'currency_pair': 'str',
+ 'account': 'str',
+ 'amount': 'str',
+ 'price': 'str',
+ 'amend_text': 'str',
+ 'action_mode': 'str'
+ }
+
+ attribute_map = {
+ 'order_id': 'order_id',
+ 'currency_pair': 'currency_pair',
+ 'account': 'account',
+ 'amount': 'amount',
+ 'price': 'price',
+ 'amend_text': 'amend_text',
+ 'action_mode': 'action_mode'
+ }
+
+ def __init__(self, order_id=None, currency_pair=None, account=None, amount=None, price=None, amend_text=None, action_mode=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, Configuration) -> None
+ """BatchAmendItem - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._order_id = None
+ self._currency_pair = None
+ self._account = None
+ self._amount = None
+ self._price = None
+ self._amend_text = None
+ self._action_mode = None
+ self.discriminator = None
+
+ self.order_id = order_id
+ self.currency_pair = currency_pair
+ if account is not None:
+ self.account = account
+ if amount is not None:
+ self.amount = amount
+ if price is not None:
+ self.price = price
+ if amend_text is not None:
+ self.amend_text = amend_text
+ if action_mode is not None:
+ self.action_mode = action_mode
+
+ @property
+ def order_id(self):
+ """Gets the order_id of this BatchAmendItem. # noqa: E501
+
+ The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field) # noqa: E501
+
+ :return: The order_id of this BatchAmendItem. # noqa: E501
+ :rtype: str
+ """
+ return self._order_id
+
+ @order_id.setter
+ def order_id(self, order_id):
+ """Sets the order_id of this BatchAmendItem.
+
+ The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field) # noqa: E501
+
+ :param order_id: The order_id of this BatchAmendItem. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501
+ raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501
+
+ self._order_id = order_id
+
+ @property
+ def currency_pair(self):
+ """Gets the currency_pair of this BatchAmendItem. # noqa: E501
+
+ Currency pair # noqa: E501
+
+ :return: The currency_pair of this BatchAmendItem. # noqa: E501
+ :rtype: str
+ """
+ return self._currency_pair
+
+ @currency_pair.setter
+ def currency_pair(self, currency_pair):
+ """Sets the currency_pair of this BatchAmendItem.
+
+ Currency pair # noqa: E501
+
+ :param currency_pair: The currency_pair of this BatchAmendItem. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501
+ raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501
+
+ self._currency_pair = currency_pair
+
+ @property
+ def account(self):
+ """Gets the account of this BatchAmendItem. # noqa: E501
+
+ Default spot, unified account and warehouse-by-store leverage account # noqa: E501
+
+ :return: The account of this BatchAmendItem. # noqa: E501
+ :rtype: str
+ """
+ return self._account
+
+ @account.setter
+ def account(self, account):
+ """Sets the account of this BatchAmendItem.
+
+ Default spot, unified account and warehouse-by-store leverage account # noqa: E501
+
+ :param account: The account of this BatchAmendItem. # noqa: E501
+ :type: str
+ """
+
+ self._account = account
+
+ @property
+ def amount(self):
+ """Gets the amount of this BatchAmendItem. # noqa: E501
+
+ Trading Quantity. Only one of `amount` or `price` can be specified # noqa: E501
+
+ :return: The amount of this BatchAmendItem. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this BatchAmendItem.
+
+ Trading Quantity. Only one of `amount` or `price` can be specified # noqa: E501
+
+ :param amount: The amount of this BatchAmendItem. # noqa: E501
+ :type: str
+ """
+
+ self._amount = amount
+
+ @property
+ def price(self):
+ """Gets the price of this BatchAmendItem. # noqa: E501
+
+ Trading Price. Only one of `amount` or `price` can be specified # noqa: E501
+
+ :return: The price of this BatchAmendItem. # noqa: E501
+ :rtype: str
+ """
+ return self._price
+
+ @price.setter
+ def price(self, price):
+ """Sets the price of this BatchAmendItem.
+
+ Trading Price. Only one of `amount` or `price` can be specified # noqa: E501
+
+ :param price: The price of this BatchAmendItem. # noqa: E501
+ :type: str
+ """
+
+ self._price = price
+
+ @property
+ def amend_text(self):
+ """Gets the amend_text of this BatchAmendItem. # noqa: E501
+
+ Custom info during order amendment # noqa: E501
+
+ :return: The amend_text of this BatchAmendItem. # noqa: E501
+ :rtype: str
+ """
+ return self._amend_text
+
+ @amend_text.setter
+ def amend_text(self, amend_text):
+ """Sets the amend_text of this BatchAmendItem.
+
+ Custom info during order amendment # noqa: E501
+
+ :param amend_text: The amend_text of this BatchAmendItem. # noqa: E501
+ :type: str
+ """
+ if (self.local_vars_configuration.client_side_validation and
+ amend_text is not None and len(amend_text) > 31):
+ raise ValueError("Invalid value for `amend_text`, length must be less than or equal to `31`") # noqa: E501
+
+ self._amend_text = amend_text
+
+ @property
+ def action_mode(self):
+ """Gets the action_mode of this BatchAmendItem. # noqa: E501
+
+ 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) # noqa: E501
+
+ :return: The action_mode of this BatchAmendItem. # noqa: E501
+ :rtype: str
+ """
+ return self._action_mode
+
+ @action_mode.setter
+ def action_mode(self, action_mode):
+ """Sets the action_mode of this BatchAmendItem.
+
+ 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) # noqa: E501
+
+ :param action_mode: The action_mode of this BatchAmendItem. # noqa: E501
+ :type: str
+ """
+
+ self._action_mode = action_mode
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, BatchAmendItem):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, BatchAmendItem):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/batch_amend_order_req.py b/gate_api/models/batch_amend_order_req.py
new file mode 100644
index 0000000..c357589
--- /dev/null
+++ b/gate_api/models/batch_amend_order_req.py
@@ -0,0 +1,235 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class BatchAmendOrderReq(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'order_id': 'int',
+ 'text': 'str',
+ 'size': 'int',
+ 'price': 'str',
+ 'amend_text': 'str'
+ }
+
+ attribute_map = {
+ 'order_id': 'order_id',
+ 'text': 'text',
+ 'size': 'size',
+ 'price': 'price',
+ 'amend_text': 'amend_text'
+ }
+
+ def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, int, str, str, Configuration) -> None
+ """BatchAmendOrderReq - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._order_id = None
+ self._text = None
+ self._size = None
+ self._price = None
+ self._amend_text = None
+ self.discriminator = None
+
+ if order_id is not None:
+ self.order_id = order_id
+ if text is not None:
+ self.text = text
+ if size is not None:
+ self.size = size
+ if price is not None:
+ self.price = price
+ if amend_text is not None:
+ self.amend_text = amend_text
+
+ @property
+ def order_id(self):
+ """Gets the order_id of this BatchAmendOrderReq. # noqa: E501
+
+ Order id, order_id and text must contain at least one # noqa: E501
+
+ :return: The order_id of this BatchAmendOrderReq. # noqa: E501
+ :rtype: int
+ """
+ return self._order_id
+
+ @order_id.setter
+ def order_id(self, order_id):
+ """Sets the order_id of this BatchAmendOrderReq.
+
+ Order id, order_id and text must contain at least one # noqa: E501
+
+ :param order_id: The order_id of this BatchAmendOrderReq. # noqa: E501
+ :type: int
+ """
+
+ self._order_id = order_id
+
+ @property
+ def text(self):
+ """Gets the text of this BatchAmendOrderReq. # noqa: E501
+
+ User-defined order text, at least one of order_id and text must be passed # noqa: E501
+
+ :return: The text of this BatchAmendOrderReq. # noqa: E501
+ :rtype: str
+ """
+ return self._text
+
+ @text.setter
+ def text(self, text):
+ """Sets the text of this BatchAmendOrderReq.
+
+ User-defined order text, at least one of order_id and text must be passed # noqa: E501
+
+ :param text: The text of this BatchAmendOrderReq. # noqa: E501
+ :type: str
+ """
+
+ self._text = text
+
+ @property
+ def size(self):
+ """Gets the size of this BatchAmendOrderReq. # noqa: E501
+
+ New order size, including filled size. - If less than or equal to the filled quantity, the order will be cancelled. - The new order side must be identical to the original one. - Close order size cannot be modified. - For reduce-only orders, increasing the size may cancel other reduce-only orders. - If the price is not modified, decreasing the size will not affect the depth queue, while increasing the size will place it at the end of the current price level. # noqa: E501
+
+ :return: The size of this BatchAmendOrderReq. # noqa: E501
+ :rtype: int
+ """
+ return self._size
+
+ @size.setter
+ def size(self, size):
+ """Sets the size of this BatchAmendOrderReq.
+
+ New order size, including filled size. - If less than or equal to the filled quantity, the order will be cancelled. - The new order side must be identical to the original one. - Close order size cannot be modified. - For reduce-only orders, increasing the size may cancel other reduce-only orders. - If the price is not modified, decreasing the size will not affect the depth queue, while increasing the size will place it at the end of the current price level. # noqa: E501
+
+ :param size: The size of this BatchAmendOrderReq. # noqa: E501
+ :type: int
+ """
+
+ self._size = size
+
+ @property
+ def price(self):
+ """Gets the price of this BatchAmendOrderReq. # noqa: E501
+
+ New order price # noqa: E501
+
+ :return: The price of this BatchAmendOrderReq. # noqa: E501
+ :rtype: str
+ """
+ return self._price
+
+ @price.setter
+ def price(self, price):
+ """Sets the price of this BatchAmendOrderReq.
+
+ New order price # noqa: E501
+
+ :param price: The price of this BatchAmendOrderReq. # noqa: E501
+ :type: str
+ """
+
+ self._price = price
+
+ @property
+ def amend_text(self):
+ """Gets the amend_text of this BatchAmendOrderReq. # noqa: E501
+
+ Custom info during order amendment # noqa: E501
+
+ :return: The amend_text of this BatchAmendOrderReq. # noqa: E501
+ :rtype: str
+ """
+ return self._amend_text
+
+ @amend_text.setter
+ def amend_text(self, amend_text):
+ """Sets the amend_text of this BatchAmendOrderReq.
+
+ Custom info during order amendment # noqa: E501
+
+ :param amend_text: The amend_text of this BatchAmendOrderReq. # noqa: E501
+ :type: str
+ """
+
+ self._amend_text = amend_text
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, BatchAmendOrderReq):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, BatchAmendOrderReq):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/batch_futures_order.py b/gate_api/models/batch_futures_order.py
index 49da53a..0448f1a 100644
--- a/gate_api/models/batch_futures_order.py
+++ b/gate_api/models/batch_futures_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -60,7 +60,7 @@ class BatchFuturesOrder(object):
'refu': 'int',
'auto_size': 'str',
'stp_act': 'str',
- 'stp_id': 'int',
+ 'stp_id': 'int'
}
attribute_map = {
@@ -91,41 +91,10 @@ class BatchFuturesOrder(object):
'refu': 'refu',
'auto_size': 'auto_size',
'stp_act': 'stp_act',
- 'stp_id': 'stp_id',
+ 'stp_id': 'stp_id'
}
- def __init__(
- self,
- succeeded=None,
- label=None,
- detail=None,
- id=None,
- user=None,
- create_time=None,
- finish_time=None,
- finish_as=None,
- status=None,
- contract=None,
- size=None,
- iceberg=None,
- price=None,
- close=False,
- is_close=None,
- reduce_only=False,
- is_reduce_only=None,
- is_liq=None,
- tif='gtc',
- left=None,
- fill_price=None,
- text=None,
- tkfr=None,
- mkfr=None,
- refu=None,
- auto_size=None,
- stp_act=None,
- stp_id=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, succeeded=None, label=None, detail=None, id=None, user=None, create_time=None, finish_time=None, finish_as=None, status=None, contract=None, size=None, iceberg=None, price=None, close=False, is_close=None, reduce_only=False, is_reduce_only=None, is_liq=None, tif='gtc', left=None, fill_price=None, text=None, tkfr=None, mkfr=None, refu=None, auto_size=None, stp_act=None, stp_id=None, local_vars_configuration=None): # noqa: E501
# type: (bool, str, str, int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, str, int, Configuration) -> None
"""BatchFuturesOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -223,7 +192,7 @@ def __init__(
def succeeded(self):
"""Gets the succeeded of this BatchFuturesOrder. # noqa: E501
- Whether the batch of orders succeeded # noqa: E501
+ Request execution result # noqa: E501
:return: The succeeded of this BatchFuturesOrder. # noqa: E501
:rtype: bool
@@ -234,7 +203,7 @@ def succeeded(self):
def succeeded(self, succeeded):
"""Sets the succeeded of this BatchFuturesOrder.
- Whether the batch of orders succeeded # noqa: E501
+ Request execution result # noqa: E501
:param succeeded: The succeeded of this BatchFuturesOrder. # noqa: E501
:type: bool
@@ -384,7 +353,7 @@ def finish_time(self, finish_time):
def finish_as(self):
"""Gets the finish_as of this BatchFuturesOrder. # noqa: E501
- 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 # noqa: E501
+ 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 # noqa: E501
:return: The finish_as of this BatchFuturesOrder. # noqa: E501
:rtype: str
@@ -395,27 +364,16 @@ def finish_as(self):
def finish_as(self, finish_as):
"""Sets the finish_as of this BatchFuturesOrder.
- 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 # noqa: E501
+ 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 # noqa: E501
:param finish_as: The finish_as of this BatchFuturesOrder. # noqa: E501
:type: str
"""
- allowed_values = [
- "filled",
- "cancelled",
- "liquidated",
- "ioc",
- "auto_deleveraged",
- "reduce_only",
- "position_closed",
- "reduce_out",
- "stp",
- ] # noqa: E501
+ allowed_values = ["filled", "cancelled", "liquidated", "ioc", "auto_deleveraged", "reduce_only", "position_closed", "reduce_out", "stp"] # noqa: E501
if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `finish_as` ({0}), must be one of {1}".format( # noqa: E501
- finish_as, allowed_values
- )
+ "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501
+ .format(finish_as, allowed_values)
)
self._finish_as = finish_as
@@ -424,7 +382,7 @@ def finish_as(self, finish_as):
def status(self):
"""Gets the status of this BatchFuturesOrder. # noqa: E501
- Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501
+ Order status - `open`: Pending - `finished`: Completed # noqa: E501
:return: The status of this BatchFuturesOrder. # noqa: E501
:rtype: str
@@ -435,7 +393,7 @@ def status(self):
def status(self, status):
"""Sets the status of this BatchFuturesOrder.
- Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501
+ Order status - `open`: Pending - `finished`: Completed # noqa: E501
:param status: The status of this BatchFuturesOrder. # noqa: E501
:type: str
@@ -443,7 +401,8 @@ def status(self, status):
allowed_values = ["open", "finished"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values) # noqa: E501
+ "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
+ .format(status, allowed_values)
)
self._status = status
@@ -475,7 +434,7 @@ def contract(self, contract):
def size(self):
"""Gets the size of this BatchFuturesOrder. # noqa: E501
- Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501
+ Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. # noqa: E501
:return: The size of this BatchFuturesOrder. # noqa: E501
:rtype: int
@@ -486,7 +445,7 @@ def size(self):
def size(self, size):
"""Sets the size of this BatchFuturesOrder.
- Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501
+ Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. # noqa: E501
:param size: The size of this BatchFuturesOrder. # noqa: E501
:type: int
@@ -498,7 +457,7 @@ def size(self, size):
def iceberg(self):
"""Gets the iceberg of this BatchFuturesOrder. # noqa: E501
- Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501
+ Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. # noqa: E501
:return: The iceberg of this BatchFuturesOrder. # noqa: E501
:rtype: int
@@ -509,7 +468,7 @@ def iceberg(self):
def iceberg(self, iceberg):
"""Sets the iceberg of this BatchFuturesOrder.
- Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501
+ Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. # noqa: E501
:param iceberg: The iceberg of this BatchFuturesOrder. # noqa: E501
:type: int
@@ -521,7 +480,7 @@ def iceberg(self, iceberg):
def price(self):
"""Gets the price of this BatchFuturesOrder. # noqa: E501
- Order price. 0 for market order with `tif` set as `ioc` # noqa: E501
+ Order price. Price of 0 with `tif` set to `ioc` represents a market order. # noqa: E501
:return: The price of this BatchFuturesOrder. # noqa: E501
:rtype: str
@@ -532,7 +491,7 @@ def price(self):
def price(self, price):
"""Sets the price of this BatchFuturesOrder.
- Order price. 0 for market order with `tif` set as `ioc` # noqa: E501
+ Order price. Price of 0 with `tif` set to `ioc` represents a market order. # noqa: E501
:param price: The price of this BatchFuturesOrder. # noqa: E501
:type: str
@@ -678,7 +637,8 @@ def tif(self, tif):
allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501
if self.local_vars_configuration.client_side_validation and tif not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `tif` ({0}), must be one of {1}".format(tif, allowed_values) # noqa: E501
+ "Invalid value for `tif` ({0}), must be one of {1}" # noqa: E501
+ .format(tif, allowed_values)
)
self._tif = tif
@@ -687,7 +647,7 @@ def tif(self, tif):
def left(self):
"""Gets the left of this BatchFuturesOrder. # noqa: E501
- Size left to be traded # noqa: E501
+ Unfilled quantity # noqa: E501
:return: The left of this BatchFuturesOrder. # noqa: E501
:rtype: int
@@ -698,7 +658,7 @@ def left(self):
def left(self, left):
"""Sets the left of this BatchFuturesOrder.
- Size left to be traded # noqa: E501
+ Unfilled quantity # noqa: E501
:param left: The left of this BatchFuturesOrder. # noqa: E501
:type: int
@@ -710,7 +670,7 @@ def left(self, left):
def fill_price(self):
"""Gets the fill_price of this BatchFuturesOrder. # noqa: E501
- Fill price of the order # noqa: E501
+ Fill price # noqa: E501
:return: The fill_price of this BatchFuturesOrder. # noqa: E501
:rtype: str
@@ -721,7 +681,7 @@ def fill_price(self):
def fill_price(self, fill_price):
"""Sets the fill_price of this BatchFuturesOrder.
- Fill price of the order # noqa: E501
+ Fill price # noqa: E501
:param fill_price: The fill_price of this BatchFuturesOrder. # noqa: E501
:type: str
@@ -802,7 +762,7 @@ def mkfr(self, mkfr):
def refu(self):
"""Gets the refu of this BatchFuturesOrder. # noqa: E501
- Reference user ID # noqa: E501
+ Referrer user ID # noqa: E501
:return: The refu of this BatchFuturesOrder. # noqa: E501
:rtype: int
@@ -813,7 +773,7 @@ def refu(self):
def refu(self, refu):
"""Sets the refu of this BatchFuturesOrder.
- Reference user ID # noqa: E501
+ Referrer user ID # noqa: E501
:param refu: The refu of this BatchFuturesOrder. # noqa: E501
:type: int
@@ -844,9 +804,8 @@ def auto_size(self, auto_size):
allowed_values = ["close_long", "close_short"] # noqa: E501
if self.local_vars_configuration.client_side_validation and auto_size not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `auto_size` ({0}), must be one of {1}".format( # noqa: E501
- auto_size, allowed_values
- )
+ "Invalid value for `auto_size` ({0}), must be one of {1}" # noqa: E501
+ .format(auto_size, allowed_values)
)
self._auto_size = auto_size
@@ -855,7 +814,7 @@ def auto_size(self, auto_size):
def stp_act(self):
"""Gets the stp_act of this BatchFuturesOrder. # noqa: E501
- 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 # noqa: E501
+ Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention 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 # noqa: E501
:return: The stp_act of this BatchFuturesOrder. # noqa: E501
:rtype: str
@@ -866,7 +825,7 @@ def stp_act(self):
def stp_act(self, stp_act):
"""Sets the stp_act of this BatchFuturesOrder.
- 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 # noqa: E501
+ Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention 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 # noqa: E501
:param stp_act: The stp_act of this BatchFuturesOrder. # noqa: E501
:type: str
@@ -874,7 +833,8 @@ def stp_act(self, stp_act):
allowed_values = ["co", "cn", "cb", "-"] # noqa: E501
if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `stp_act` ({0}), must be one of {1}".format(stp_act, allowed_values) # noqa: E501
+ "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501
+ .format(stp_act, allowed_values)
)
self._stp_act = stp_act
@@ -909,16 +869,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/batch_order.py b/gate_api/models/batch_order.py
index ed4897a..12d30e9 100644
--- a/gate_api/models/batch_order.py
+++ b/gate_api/models/batch_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -33,6 +33,8 @@ class BatchOrder(object):
and the value is json key in definition.
"""
openapi_types = {
+ 'order_id': 'str',
+ 'amend_text': 'str',
'text': 'str',
'succeeded': 'bool',
'label': 'str',
@@ -54,8 +56,10 @@ class BatchOrder(object):
'auto_borrow': 'bool',
'auto_repay': 'bool',
'left': 'str',
+ 'filled_amount': 'str',
'fill_price': 'str',
'filled_total': 'str',
+ 'avg_deal_price': 'str',
'fee': 'str',
'fee_currency': 'str',
'point_fee': 'str',
@@ -65,10 +69,12 @@ class BatchOrder(object):
'rebated_fee_currency': 'str',
'stp_id': 'int',
'stp_act': 'str',
- 'finish_as': 'str',
+ 'finish_as': 'str'
}
attribute_map = {
+ 'order_id': 'order_id',
+ 'amend_text': 'amend_text',
'text': 'text',
'succeeded': 'succeeded',
'label': 'label',
@@ -90,8 +96,10 @@ class BatchOrder(object):
'auto_borrow': 'auto_borrow',
'auto_repay': 'auto_repay',
'left': 'left',
+ 'filled_amount': 'filled_amount',
'fill_price': 'fill_price',
'filled_total': 'filled_total',
+ 'avg_deal_price': 'avg_deal_price',
'fee': 'fee',
'fee_currency': 'fee_currency',
'point_fee': 'point_fee',
@@ -101,52 +109,18 @@ class BatchOrder(object):
'rebated_fee_currency': 'rebated_fee_currency',
'stp_id': 'stp_id',
'stp_act': 'stp_act',
- 'finish_as': 'finish_as',
+ 'finish_as': 'finish_as'
}
- def __init__(
- self,
- text=None,
- succeeded=None,
- label=None,
- message=None,
- id=None,
- create_time=None,
- update_time=None,
- create_time_ms=None,
- update_time_ms=None,
- status=None,
- currency_pair=None,
- type='limit',
- account='spot',
- side=None,
- amount=None,
- price=None,
- time_in_force='gtc',
- iceberg=None,
- auto_borrow=None,
- auto_repay=None,
- left=None,
- fill_price=None,
- filled_total=None,
- fee=None,
- fee_currency=None,
- point_fee=None,
- gt_fee=None,
- gt_discount=None,
- rebated_fee=None,
- rebated_fee_currency=None,
- stp_id=None,
- stp_act=None,
- finish_as=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, bool, str, str, str, str, str, int, int, str, str, str, str, str, str, str, str, str, bool, bool, str, str, str, str, str, str, str, bool, str, str, int, str, str, Configuration) -> None
+ def __init__(self, order_id=None, amend_text=None, text=None, succeeded=None, label=None, message=None, id=None, create_time=None, update_time=None, create_time_ms=None, update_time_ms=None, status=None, currency_pair=None, type='limit', account='spot', side=None, amount=None, price=None, time_in_force='gtc', iceberg=None, auto_borrow=None, auto_repay=None, left=None, filled_amount=None, fill_price=None, filled_total=None, avg_deal_price=None, fee=None, fee_currency=None, point_fee=None, gt_fee=None, gt_discount=None, rebated_fee=None, rebated_fee_currency=None, stp_id=None, stp_act=None, finish_as=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, bool, str, str, str, str, str, int, int, str, str, str, str, str, str, str, str, str, bool, bool, str, str, str, str, str, str, str, str, str, bool, str, str, int, str, str, Configuration) -> None
"""BatchOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
+ self._order_id = None
+ self._amend_text = None
self._text = None
self._succeeded = None
self._label = None
@@ -168,8 +142,10 @@ def __init__(
self._auto_borrow = None
self._auto_repay = None
self._left = None
+ self._filled_amount = None
self._fill_price = None
self._filled_total = None
+ self._avg_deal_price = None
self._fee = None
self._fee_currency = None
self._point_fee = None
@@ -182,6 +158,10 @@ def __init__(
self._finish_as = None
self.discriminator = None
+ if order_id is not None:
+ self.order_id = order_id
+ if amend_text is not None:
+ self.amend_text = amend_text
if text is not None:
self.text = text
if succeeded is not None:
@@ -224,10 +204,14 @@ def __init__(
self.auto_repay = auto_repay
if left is not None:
self.left = left
+ if filled_amount is not None:
+ self.filled_amount = filled_amount
if fill_price is not None:
self.fill_price = fill_price
if filled_total is not None:
self.filled_total = filled_total
+ if avg_deal_price is not None:
+ self.avg_deal_price = avg_deal_price
if fee is not None:
self.fee = fee
if fee_currency is not None:
@@ -249,11 +233,57 @@ def __init__(
if finish_as is not None:
self.finish_as = finish_as
+ @property
+ def order_id(self):
+ """Gets the order_id of this BatchOrder. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The order_id of this BatchOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._order_id
+
+ @order_id.setter
+ def order_id(self, order_id):
+ """Sets the order_id of this BatchOrder.
+
+ Order ID # noqa: E501
+
+ :param order_id: The order_id of this BatchOrder. # noqa: E501
+ :type: str
+ """
+
+ self._order_id = order_id
+
+ @property
+ def amend_text(self):
+ """Gets the amend_text of this BatchOrder. # noqa: E501
+
+ The custom data that the user remarked when amending the order # noqa: E501
+
+ :return: The amend_text of this BatchOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._amend_text
+
+ @amend_text.setter
+ def amend_text(self, amend_text):
+ """Sets the amend_text of this BatchOrder.
+
+ The custom data that the user remarked when amending the order # noqa: E501
+
+ :param amend_text: The amend_text of this BatchOrder. # noqa: E501
+ :type: str
+ """
+
+ self._amend_text = amend_text
+
@property
def text(self):
"""Gets the text of this BatchOrder. # noqa: E501
- 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(.) # noqa: E501
+ Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501
:return: The text of this BatchOrder. # noqa: E501
:rtype: str
@@ -264,7 +294,7 @@ def text(self):
def text(self, text):
"""Sets the text of this BatchOrder.
- 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(.) # noqa: E501
+ Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501
:param text: The text of this BatchOrder. # noqa: E501
:type: str
@@ -276,7 +306,7 @@ def text(self, text):
def succeeded(self):
"""Gets the succeeded of this BatchOrder. # noqa: E501
- Whether the batch of orders succeeded # noqa: E501
+ Request execution result # noqa: E501
:return: The succeeded of this BatchOrder. # noqa: E501
:rtype: bool
@@ -287,7 +317,7 @@ def succeeded(self):
def succeeded(self, succeeded):
"""Sets the succeeded of this BatchOrder.
- Whether the batch of orders succeeded # noqa: E501
+ Request execution result # noqa: E501
:param succeeded: The succeeded of this BatchOrder. # noqa: E501
:type: bool
@@ -479,7 +509,8 @@ def status(self, status):
allowed_values = ["open", "closed", "cancelled"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values) # noqa: E501
+ "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
+ .format(status, allowed_values)
)
self._status = status
@@ -511,7 +542,7 @@ def currency_pair(self, currency_pair):
def type(self):
"""Gets the type of this BatchOrder. # noqa: E501
- Order Type - limit : Limit Order - market : Market Order # noqa: E501
+ Order Type - limit : Limit Order - market : Market Order # noqa: E501
:return: The type of this BatchOrder. # noqa: E501
:rtype: str
@@ -522,7 +553,7 @@ def type(self):
def type(self, type):
"""Sets the type of this BatchOrder.
- Order Type - limit : Limit Order - market : Market Order # noqa: E501
+ Order Type - limit : Limit Order - market : Market Order # noqa: E501
:param type: The type of this BatchOrder. # noqa: E501
:type: str
@@ -530,7 +561,8 @@ def type(self, type):
allowed_values = ["limit", "market"] # noqa: E501
if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `type` ({0}), must be one of {1}".format(type, allowed_values) # noqa: E501
+ "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
+ .format(type, allowed_values)
)
self._type = type
@@ -539,7 +571,7 @@ def type(self, type):
def account(self):
"""Gets the account of this BatchOrder. # noqa: E501
- Account type. spot - use spot account; margin - use margin account; cross_margin - use cross margin account # noqa: E501
+ Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501
:return: The account of this BatchOrder. # noqa: E501
:rtype: str
@@ -550,15 +582,16 @@ def account(self):
def account(self, account):
"""Sets the account of this BatchOrder.
- Account type. spot - use spot account; margin - use margin account; cross_margin - use cross margin account # noqa: E501
+ Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501
:param account: The account of this BatchOrder. # noqa: E501
:type: str
"""
- allowed_values = ["spot", "margin", "cross_margin"] # noqa: E501
+ allowed_values = ["spot", "margin", "cross_margin", "unified"] # noqa: E501
if self.local_vars_configuration.client_side_validation and account not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `account` ({0}), must be one of {1}".format(account, allowed_values) # noqa: E501
+ "Invalid value for `account` ({0}), must be one of {1}" # noqa: E501
+ .format(account, allowed_values)
)
self._account = account
@@ -567,7 +600,7 @@ def account(self, account):
def side(self):
"""Gets the side of this BatchOrder. # noqa: E501
- Order side # noqa: E501
+ Buy or sell order # noqa: E501
:return: The side of this BatchOrder. # noqa: E501
:rtype: str
@@ -578,7 +611,7 @@ def side(self):
def side(self, side):
"""Sets the side of this BatchOrder.
- Order side # noqa: E501
+ Buy or sell order # noqa: E501
:param side: The side of this BatchOrder. # noqa: E501
:type: str
@@ -586,7 +619,8 @@ def side(self, side):
allowed_values = ["buy", "sell"] # noqa: E501
if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `side` ({0}), must be one of {1}".format(side, allowed_values) # noqa: E501
+ "Invalid value for `side` ({0}), must be one of {1}" # noqa: E501
+ .format(side, allowed_values)
)
self._side = side
@@ -660,9 +694,8 @@ def time_in_force(self, time_in_force):
allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501
if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `time_in_force` ({0}), must be one of {1}".format( # noqa: E501
- time_in_force, allowed_values
- )
+ "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501
+ .format(time_in_force, allowed_values)
)
self._time_in_force = time_in_force
@@ -671,7 +704,7 @@ def time_in_force(self, time_in_force):
def iceberg(self):
"""Gets the iceberg of this BatchOrder. # noqa: E501
- Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501
+ Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported # noqa: E501
:return: The iceberg of this BatchOrder. # noqa: E501
:rtype: str
@@ -682,7 +715,7 @@ def iceberg(self):
def iceberg(self, iceberg):
"""Sets the iceberg of this BatchOrder.
- Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501
+ Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported # noqa: E501
:param iceberg: The iceberg of this BatchOrder. # noqa: E501
:type: str
@@ -694,7 +727,7 @@ def iceberg(self, iceberg):
def auto_borrow(self):
"""Gets the auto_borrow of this BatchOrder. # noqa: E501
- Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501
+ Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough # noqa: E501
:return: The auto_borrow of this BatchOrder. # noqa: E501
:rtype: bool
@@ -705,7 +738,7 @@ def auto_borrow(self):
def auto_borrow(self, auto_borrow):
"""Sets the auto_borrow of this BatchOrder.
- Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501
+ Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough # noqa: E501
:param auto_borrow: The auto_borrow of this BatchOrder. # noqa: E501
:type: bool
@@ -717,7 +750,7 @@ def auto_borrow(self, auto_borrow):
def auto_repay(self):
"""Gets the auto_repay of this BatchOrder. # noqa: E501
- 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. # noqa: E501
+ 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` can be both set to true in one order # noqa: E501
:return: The auto_repay of this BatchOrder. # noqa: E501
:rtype: bool
@@ -728,7 +761,7 @@ def auto_repay(self):
def auto_repay(self, auto_repay):
"""Sets the auto_repay of this BatchOrder.
- 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. # noqa: E501
+ 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` can be both set to true in one order # noqa: E501
:param auto_repay: The auto_repay of this BatchOrder. # noqa: E501
:type: bool
@@ -759,6 +792,29 @@ def left(self, left):
self._left = left
+ @property
+ def filled_amount(self):
+ """Gets the filled_amount of this BatchOrder. # noqa: E501
+
+ Amount filled # noqa: E501
+
+ :return: The filled_amount of this BatchOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._filled_amount
+
+ @filled_amount.setter
+ def filled_amount(self, filled_amount):
+ """Sets the filled_amount of this BatchOrder.
+
+ Amount filled # noqa: E501
+
+ :param filled_amount: The filled_amount of this BatchOrder. # noqa: E501
+ :type: str
+ """
+
+ self._filled_amount = filled_amount
+
@property
def fill_price(self):
"""Gets the fill_price of this BatchOrder. # noqa: E501
@@ -805,6 +861,29 @@ def filled_total(self, filled_total):
self._filled_total = filled_total
+ @property
+ def avg_deal_price(self):
+ """Gets the avg_deal_price of this BatchOrder. # noqa: E501
+
+ Average fill price # noqa: E501
+
+ :return: The avg_deal_price of this BatchOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._avg_deal_price
+
+ @avg_deal_price.setter
+ def avg_deal_price(self, avg_deal_price):
+ """Sets the avg_deal_price of this BatchOrder.
+
+ Average fill price # noqa: E501
+
+ :param avg_deal_price: The avg_deal_price of this BatchOrder. # noqa: E501
+ :type: str
+ """
+
+ self._avg_deal_price = avg_deal_price
+
@property
def fee(self):
"""Gets the fee of this BatchOrder. # noqa: E501
@@ -901,7 +980,7 @@ def gt_fee(self, gt_fee):
def gt_discount(self):
"""Gets the gt_discount of this BatchOrder. # noqa: E501
- Whether GT fee discount is used # noqa: E501
+ Whether GT fee deduction is enabled # noqa: E501
:return: The gt_discount of this BatchOrder. # noqa: E501
:rtype: bool
@@ -912,7 +991,7 @@ def gt_discount(self):
def gt_discount(self, gt_discount):
"""Sets the gt_discount of this BatchOrder.
- Whether GT fee discount is used # noqa: E501
+ Whether GT fee deduction is enabled # noqa: E501
:param gt_discount: The gt_discount of this BatchOrder. # noqa: E501
:type: bool
@@ -993,7 +1072,7 @@ def stp_id(self, stp_id):
def stp_act(self):
"""Gets the stp_act of this BatchOrder. # noqa: E501
- 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 # noqa: E501
+ 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, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501
:return: The stp_act of this BatchOrder. # noqa: E501
:rtype: str
@@ -1004,7 +1083,7 @@ def stp_act(self):
def stp_act(self, stp_act):
"""Sets the stp_act of this BatchOrder.
- 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 # noqa: E501
+ 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, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501
:param stp_act: The stp_act of this BatchOrder. # noqa: E501
:type: str
@@ -1012,7 +1091,8 @@ def stp_act(self, stp_act):
allowed_values = ["cn", "co", "cb", "-"] # noqa: E501
if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `stp_act` ({0}), must be one of {1}".format(stp_act, allowed_values) # noqa: E501
+ "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501
+ .format(stp_act, allowed_values)
)
self._stp_act = stp_act
@@ -1040,9 +1120,8 @@ def finish_as(self, finish_as):
allowed_values = ["open", "filled", "cancelled", "ioc", "stp"] # noqa: E501
if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `finish_as` ({0}), must be one of {1}".format( # noqa: E501
- finish_as, allowed_values
- )
+ "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501
+ .format(finish_as, allowed_values)
)
self._finish_as = finish_as
@@ -1054,16 +1133,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/borrow_currency_info.py b/gate_api/models/borrow_currency_info.py
new file mode 100644
index 0000000..4c6b514
--- /dev/null
+++ b/gate_api/models/borrow_currency_info.py
@@ -0,0 +1,235 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class BorrowCurrencyInfo(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'index_price': 'str',
+ 'left_repay_principal': 'str',
+ 'left_repay_interest': 'str',
+ 'left_repay_usdt': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'index_price': 'index_price',
+ 'left_repay_principal': 'left_repay_principal',
+ 'left_repay_interest': 'left_repay_interest',
+ 'left_repay_usdt': 'left_repay_usdt'
+ }
+
+ def __init__(self, currency=None, index_price=None, left_repay_principal=None, left_repay_interest=None, left_repay_usdt=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, Configuration) -> None
+ """BorrowCurrencyInfo - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._index_price = None
+ self._left_repay_principal = None
+ self._left_repay_interest = None
+ self._left_repay_usdt = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if index_price is not None:
+ self.index_price = index_price
+ if left_repay_principal is not None:
+ self.left_repay_principal = left_repay_principal
+ if left_repay_interest is not None:
+ self.left_repay_interest = left_repay_interest
+ if left_repay_usdt is not None:
+ self.left_repay_usdt = left_repay_usdt
+
+ @property
+ def currency(self):
+ """Gets the currency of this BorrowCurrencyInfo. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this BorrowCurrencyInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this BorrowCurrencyInfo.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this BorrowCurrencyInfo. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def index_price(self):
+ """Gets the index_price of this BorrowCurrencyInfo. # noqa: E501
+
+ Currency Index Price # noqa: E501
+
+ :return: The index_price of this BorrowCurrencyInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._index_price
+
+ @index_price.setter
+ def index_price(self, index_price):
+ """Sets the index_price of this BorrowCurrencyInfo.
+
+ Currency Index Price # noqa: E501
+
+ :param index_price: The index_price of this BorrowCurrencyInfo. # noqa: E501
+ :type: str
+ """
+
+ self._index_price = index_price
+
+ @property
+ def left_repay_principal(self):
+ """Gets the left_repay_principal of this BorrowCurrencyInfo. # noqa: E501
+
+ Outstanding principal # noqa: E501
+
+ :return: The left_repay_principal of this BorrowCurrencyInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._left_repay_principal
+
+ @left_repay_principal.setter
+ def left_repay_principal(self, left_repay_principal):
+ """Sets the left_repay_principal of this BorrowCurrencyInfo.
+
+ Outstanding principal # noqa: E501
+
+ :param left_repay_principal: The left_repay_principal of this BorrowCurrencyInfo. # noqa: E501
+ :type: str
+ """
+
+ self._left_repay_principal = left_repay_principal
+
+ @property
+ def left_repay_interest(self):
+ """Gets the left_repay_interest of this BorrowCurrencyInfo. # noqa: E501
+
+ Outstanding interest # noqa: E501
+
+ :return: The left_repay_interest of this BorrowCurrencyInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._left_repay_interest
+
+ @left_repay_interest.setter
+ def left_repay_interest(self, left_repay_interest):
+ """Sets the left_repay_interest of this BorrowCurrencyInfo.
+
+ Outstanding interest # noqa: E501
+
+ :param left_repay_interest: The left_repay_interest of this BorrowCurrencyInfo. # noqa: E501
+ :type: str
+ """
+
+ self._left_repay_interest = left_repay_interest
+
+ @property
+ def left_repay_usdt(self):
+ """Gets the left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501
+
+ Remaining total outstanding value converted to USDT # noqa: E501
+
+ :return: The left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._left_repay_usdt
+
+ @left_repay_usdt.setter
+ def left_repay_usdt(self, left_repay_usdt):
+ """Sets the left_repay_usdt of this BorrowCurrencyInfo.
+
+ Remaining total outstanding value converted to USDT # noqa: E501
+
+ :param left_repay_usdt: The left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501
+ :type: str
+ """
+
+ self._left_repay_usdt = left_repay_usdt
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, BorrowCurrencyInfo):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, BorrowCurrencyInfo):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/broker_commission.py b/gate_api/models/broker_commission.py
new file mode 100644
index 0000000..cc6e70a
--- /dev/null
+++ b/gate_api/models/broker_commission.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class BrokerCommission(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'total': 'int',
+ 'list': 'list[BrokerCommission1]'
+ }
+
+ attribute_map = {
+ 'total': 'total',
+ 'list': 'list'
+ }
+
+ def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, list[BrokerCommission1], Configuration) -> None
+ """BrokerCommission - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._total = None
+ self._list = None
+ self.discriminator = None
+
+ if total is not None:
+ self.total = total
+ if list is not None:
+ self.list = list
+
+ @property
+ def total(self):
+ """Gets the total of this BrokerCommission. # noqa: E501
+
+ Total # noqa: E501
+
+ :return: The total of this BrokerCommission. # noqa: E501
+ :rtype: int
+ """
+ return self._total
+
+ @total.setter
+ def total(self, total):
+ """Sets the total of this BrokerCommission.
+
+ Total # noqa: E501
+
+ :param total: The total of this BrokerCommission. # noqa: E501
+ :type: int
+ """
+
+ self._total = total
+
+ @property
+ def list(self):
+ """Gets the list of this BrokerCommission. # noqa: E501
+
+ List of commission history # noqa: E501
+
+ :return: The list of this BrokerCommission. # noqa: E501
+ :rtype: list[BrokerCommission1]
+ """
+ return self._list
+
+ @list.setter
+ def list(self, list):
+ """Sets the list of this BrokerCommission.
+
+ List of commission history # noqa: E501
+
+ :param list: The list of this BrokerCommission. # noqa: E501
+ :type: list[BrokerCommission1]
+ """
+
+ self._list = list
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, BrokerCommission):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, BrokerCommission):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/broker_commission1.py b/gate_api/models/broker_commission1.py
new file mode 100644
index 0000000..71474fc
--- /dev/null
+++ b/gate_api/models/broker_commission1.py
@@ -0,0 +1,401 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class BrokerCommission1(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'commission_time': 'int',
+ 'user_id': 'int',
+ 'group_name': 'str',
+ 'amount': 'str',
+ 'fee': 'str',
+ 'fee_asset': 'str',
+ 'rebate_fee': 'str',
+ 'source': 'str',
+ 'currency_pair': 'str',
+ 'sub_broker_info': 'BrokerCommissionSubBrokerInfo',
+ 'alpha_contract_addr': 'str'
+ }
+
+ attribute_map = {
+ 'commission_time': 'commission_time',
+ 'user_id': 'user_id',
+ 'group_name': 'group_name',
+ 'amount': 'amount',
+ 'fee': 'fee',
+ 'fee_asset': 'fee_asset',
+ 'rebate_fee': 'rebate_fee',
+ 'source': 'source',
+ 'currency_pair': 'currency_pair',
+ 'sub_broker_info': 'sub_broker_info',
+ 'alpha_contract_addr': 'alpha_contract_addr'
+ }
+
+ def __init__(self, commission_time=None, user_id=None, group_name=None, amount=None, fee=None, fee_asset=None, rebate_fee=None, source=None, currency_pair=None, sub_broker_info=None, alpha_contract_addr=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, int, str, str, str, str, str, str, str, BrokerCommissionSubBrokerInfo, str, Configuration) -> None
+ """BrokerCommission1 - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._commission_time = None
+ self._user_id = None
+ self._group_name = None
+ self._amount = None
+ self._fee = None
+ self._fee_asset = None
+ self._rebate_fee = None
+ self._source = None
+ self._currency_pair = None
+ self._sub_broker_info = None
+ self._alpha_contract_addr = None
+ self.discriminator = None
+
+ if commission_time is not None:
+ self.commission_time = commission_time
+ if user_id is not None:
+ self.user_id = user_id
+ if group_name is not None:
+ self.group_name = group_name
+ if amount is not None:
+ self.amount = amount
+ if fee is not None:
+ self.fee = fee
+ if fee_asset is not None:
+ self.fee_asset = fee_asset
+ if rebate_fee is not None:
+ self.rebate_fee = rebate_fee
+ if source is not None:
+ self.source = source
+ if currency_pair is not None:
+ self.currency_pair = currency_pair
+ if sub_broker_info is not None:
+ self.sub_broker_info = sub_broker_info
+ if alpha_contract_addr is not None:
+ self.alpha_contract_addr = alpha_contract_addr
+
+ @property
+ def commission_time(self):
+ """Gets the commission_time of this BrokerCommission1. # noqa: E501
+
+ Commission time (Unix timestamp in seconds) # noqa: E501
+
+ :return: The commission_time of this BrokerCommission1. # noqa: E501
+ :rtype: int
+ """
+ return self._commission_time
+
+ @commission_time.setter
+ def commission_time(self, commission_time):
+ """Sets the commission_time of this BrokerCommission1.
+
+ Commission time (Unix timestamp in seconds) # noqa: E501
+
+ :param commission_time: The commission_time of this BrokerCommission1. # noqa: E501
+ :type: int
+ """
+
+ self._commission_time = commission_time
+
+ @property
+ def user_id(self):
+ """Gets the user_id of this BrokerCommission1. # noqa: E501
+
+ User ID # noqa: E501
+
+ :return: The user_id of this BrokerCommission1. # noqa: E501
+ :rtype: int
+ """
+ return self._user_id
+
+ @user_id.setter
+ def user_id(self, user_id):
+ """Sets the user_id of this BrokerCommission1.
+
+ User ID # noqa: E501
+
+ :param user_id: The user_id of this BrokerCommission1. # noqa: E501
+ :type: int
+ """
+
+ self._user_id = user_id
+
+ @property
+ def group_name(self):
+ """Gets the group_name of this BrokerCommission1. # noqa: E501
+
+ Group name # noqa: E501
+
+ :return: The group_name of this BrokerCommission1. # noqa: E501
+ :rtype: str
+ """
+ return self._group_name
+
+ @group_name.setter
+ def group_name(self, group_name):
+ """Sets the group_name of this BrokerCommission1.
+
+ Group name # noqa: E501
+
+ :param group_name: The group_name of this BrokerCommission1. # noqa: E501
+ :type: str
+ """
+
+ self._group_name = group_name
+
+ @property
+ def amount(self):
+ """Gets the amount of this BrokerCommission1. # noqa: E501
+
+ The amount of commission rebates # noqa: E501
+
+ :return: The amount of this BrokerCommission1. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this BrokerCommission1.
+
+ The amount of commission rebates # noqa: E501
+
+ :param amount: The amount of this BrokerCommission1. # noqa: E501
+ :type: str
+ """
+
+ self._amount = amount
+
+ @property
+ def fee(self):
+ """Gets the fee of this BrokerCommission1. # noqa: E501
+
+ Fee # noqa: E501
+
+ :return: The fee of this BrokerCommission1. # noqa: E501
+ :rtype: str
+ """
+ return self._fee
+
+ @fee.setter
+ def fee(self, fee):
+ """Sets the fee of this BrokerCommission1.
+
+ Fee # noqa: E501
+
+ :param fee: The fee of this BrokerCommission1. # noqa: E501
+ :type: str
+ """
+
+ self._fee = fee
+
+ @property
+ def fee_asset(self):
+ """Gets the fee_asset of this BrokerCommission1. # noqa: E501
+
+ Fee currency # noqa: E501
+
+ :return: The fee_asset of this BrokerCommission1. # noqa: E501
+ :rtype: str
+ """
+ return self._fee_asset
+
+ @fee_asset.setter
+ def fee_asset(self, fee_asset):
+ """Sets the fee_asset of this BrokerCommission1.
+
+ Fee currency # noqa: E501
+
+ :param fee_asset: The fee_asset of this BrokerCommission1. # noqa: E501
+ :type: str
+ """
+
+ self._fee_asset = fee_asset
+
+ @property
+ def rebate_fee(self):
+ """Gets the rebate_fee of this BrokerCommission1. # noqa: E501
+
+ The income from rebates, converted to USDT # noqa: E501
+
+ :return: The rebate_fee of this BrokerCommission1. # noqa: E501
+ :rtype: str
+ """
+ return self._rebate_fee
+
+ @rebate_fee.setter
+ def rebate_fee(self, rebate_fee):
+ """Sets the rebate_fee of this BrokerCommission1.
+
+ The income from rebates, converted to USDT # noqa: E501
+
+ :param rebate_fee: The rebate_fee of this BrokerCommission1. # noqa: E501
+ :type: str
+ """
+
+ self._rebate_fee = rebate_fee
+
+ @property
+ def source(self):
+ """Gets the source of this BrokerCommission1. # noqa: E501
+
+ Commission transaction type: Spot, Futures, Options, Alpha # noqa: E501
+
+ :return: The source of this BrokerCommission1. # noqa: E501
+ :rtype: str
+ """
+ return self._source
+
+ @source.setter
+ def source(self, source):
+ """Sets the source of this BrokerCommission1.
+
+ Commission transaction type: Spot, Futures, Options, Alpha # noqa: E501
+
+ :param source: The source of this BrokerCommission1. # noqa: E501
+ :type: str
+ """
+
+ self._source = source
+
+ @property
+ def currency_pair(self):
+ """Gets the currency_pair of this BrokerCommission1. # noqa: E501
+
+ Currency pair # noqa: E501
+
+ :return: The currency_pair of this BrokerCommission1. # noqa: E501
+ :rtype: str
+ """
+ return self._currency_pair
+
+ @currency_pair.setter
+ def currency_pair(self, currency_pair):
+ """Sets the currency_pair of this BrokerCommission1.
+
+ Currency pair # noqa: E501
+
+ :param currency_pair: The currency_pair of this BrokerCommission1. # noqa: E501
+ :type: str
+ """
+
+ self._currency_pair = currency_pair
+
+ @property
+ def sub_broker_info(self):
+ """Gets the sub_broker_info of this BrokerCommission1. # noqa: E501
+
+
+ :return: The sub_broker_info of this BrokerCommission1. # noqa: E501
+ :rtype: BrokerCommissionSubBrokerInfo
+ """
+ return self._sub_broker_info
+
+ @sub_broker_info.setter
+ def sub_broker_info(self, sub_broker_info):
+ """Sets the sub_broker_info of this BrokerCommission1.
+
+
+ :param sub_broker_info: The sub_broker_info of this BrokerCommission1. # noqa: E501
+ :type: BrokerCommissionSubBrokerInfo
+ """
+
+ self._sub_broker_info = sub_broker_info
+
+ @property
+ def alpha_contract_addr(self):
+ """Gets the alpha_contract_addr of this BrokerCommission1. # noqa: E501
+
+ Alpha contract address # noqa: E501
+
+ :return: The alpha_contract_addr of this BrokerCommission1. # noqa: E501
+ :rtype: str
+ """
+ return self._alpha_contract_addr
+
+ @alpha_contract_addr.setter
+ def alpha_contract_addr(self, alpha_contract_addr):
+ """Sets the alpha_contract_addr of this BrokerCommission1.
+
+ Alpha contract address # noqa: E501
+
+ :param alpha_contract_addr: The alpha_contract_addr of this BrokerCommission1. # noqa: E501
+ :type: str
+ """
+
+ self._alpha_contract_addr = alpha_contract_addr
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, BrokerCommission1):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, BrokerCommission1):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/broker_commission_sub_broker_info.py b/gate_api/models/broker_commission_sub_broker_info.py
new file mode 100644
index 0000000..220166c
--- /dev/null
+++ b/gate_api/models/broker_commission_sub_broker_info.py
@@ -0,0 +1,207 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class BrokerCommissionSubBrokerInfo(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'user_id': 'int',
+ 'original_commission_rate': 'str',
+ 'relative_commission_rate': 'str',
+ 'commission_rate': 'str'
+ }
+
+ attribute_map = {
+ 'user_id': 'user_id',
+ 'original_commission_rate': 'original_commission_rate',
+ 'relative_commission_rate': 'relative_commission_rate',
+ 'commission_rate': 'commission_rate'
+ }
+
+ def __init__(self, user_id=None, original_commission_rate=None, relative_commission_rate=None, commission_rate=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, str, Configuration) -> None
+ """BrokerCommissionSubBrokerInfo - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._user_id = None
+ self._original_commission_rate = None
+ self._relative_commission_rate = None
+ self._commission_rate = None
+ self.discriminator = None
+
+ if user_id is not None:
+ self.user_id = user_id
+ if original_commission_rate is not None:
+ self.original_commission_rate = original_commission_rate
+ if relative_commission_rate is not None:
+ self.relative_commission_rate = relative_commission_rate
+ if commission_rate is not None:
+ self.commission_rate = commission_rate
+
+ @property
+ def user_id(self):
+ """Gets the user_id of this BrokerCommissionSubBrokerInfo. # noqa: E501
+
+ Sub-broker user ID # noqa: E501
+
+ :return: The user_id of this BrokerCommissionSubBrokerInfo. # noqa: E501
+ :rtype: int
+ """
+ return self._user_id
+
+ @user_id.setter
+ def user_id(self, user_id):
+ """Sets the user_id of this BrokerCommissionSubBrokerInfo.
+
+ Sub-broker user ID # noqa: E501
+
+ :param user_id: The user_id of this BrokerCommissionSubBrokerInfo. # noqa: E501
+ :type: int
+ """
+
+ self._user_id = user_id
+
+ @property
+ def original_commission_rate(self):
+ """Gets the original_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501
+
+ Sub-broker original commission rate # noqa: E501
+
+ :return: The original_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._original_commission_rate
+
+ @original_commission_rate.setter
+ def original_commission_rate(self, original_commission_rate):
+ """Sets the original_commission_rate of this BrokerCommissionSubBrokerInfo.
+
+ Sub-broker original commission rate # noqa: E501
+
+ :param original_commission_rate: The original_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501
+ :type: str
+ """
+
+ self._original_commission_rate = original_commission_rate
+
+ @property
+ def relative_commission_rate(self):
+ """Gets the relative_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501
+
+ Sub-broker relative commission rate # noqa: E501
+
+ :return: The relative_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._relative_commission_rate
+
+ @relative_commission_rate.setter
+ def relative_commission_rate(self, relative_commission_rate):
+ """Sets the relative_commission_rate of this BrokerCommissionSubBrokerInfo.
+
+ Sub-broker relative commission rate # noqa: E501
+
+ :param relative_commission_rate: The relative_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501
+ :type: str
+ """
+
+ self._relative_commission_rate = relative_commission_rate
+
+ @property
+ def commission_rate(self):
+ """Gets the commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501
+
+ Sub-broker actual commission rate # noqa: E501
+
+ :return: The commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._commission_rate
+
+ @commission_rate.setter
+ def commission_rate(self, commission_rate):
+ """Sets the commission_rate of this BrokerCommissionSubBrokerInfo.
+
+ Sub-broker actual commission rate # noqa: E501
+
+ :param commission_rate: The commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501
+ :type: str
+ """
+
+ self._commission_rate = commission_rate
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, BrokerCommissionSubBrokerInfo):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, BrokerCommissionSubBrokerInfo):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/broker_transaction.py b/gate_api/models/broker_transaction.py
new file mode 100644
index 0000000..0a85977
--- /dev/null
+++ b/gate_api/models/broker_transaction.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class BrokerTransaction(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'total': 'int',
+ 'list': 'list[BrokerTransaction1]'
+ }
+
+ attribute_map = {
+ 'total': 'total',
+ 'list': 'list'
+ }
+
+ def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, list[BrokerTransaction1], Configuration) -> None
+ """BrokerTransaction - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._total = None
+ self._list = None
+ self.discriminator = None
+
+ if total is not None:
+ self.total = total
+ if list is not None:
+ self.list = list
+
+ @property
+ def total(self):
+ """Gets the total of this BrokerTransaction. # noqa: E501
+
+ Total # noqa: E501
+
+ :return: The total of this BrokerTransaction. # noqa: E501
+ :rtype: int
+ """
+ return self._total
+
+ @total.setter
+ def total(self, total):
+ """Sets the total of this BrokerTransaction.
+
+ Total # noqa: E501
+
+ :param total: The total of this BrokerTransaction. # noqa: E501
+ :type: int
+ """
+
+ self._total = total
+
+ @property
+ def list(self):
+ """Gets the list of this BrokerTransaction. # noqa: E501
+
+ List of transaction history # noqa: E501
+
+ :return: The list of this BrokerTransaction. # noqa: E501
+ :rtype: list[BrokerTransaction1]
+ """
+ return self._list
+
+ @list.setter
+ def list(self, list):
+ """Sets the list of this BrokerTransaction.
+
+ List of transaction history # noqa: E501
+
+ :param list: The list of this BrokerTransaction. # noqa: E501
+ :type: list[BrokerTransaction1]
+ """
+
+ self._list = list
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, BrokerTransaction):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, BrokerTransaction):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/broker_transaction1.py b/gate_api/models/broker_transaction1.py
new file mode 100644
index 0000000..87a12d0
--- /dev/null
+++ b/gate_api/models/broker_transaction1.py
@@ -0,0 +1,373 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class BrokerTransaction1(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'transaction_time': 'int',
+ 'user_id': 'int',
+ 'group_name': 'str',
+ 'fee': 'str',
+ 'currency_pair': 'str',
+ 'amount': 'str',
+ 'fee_asset': 'str',
+ 'source': 'str',
+ 'sub_broker_info': 'BrokerCommissionSubBrokerInfo',
+ 'alpha_contract_addr': 'str'
+ }
+
+ attribute_map = {
+ 'transaction_time': 'transaction_time',
+ 'user_id': 'user_id',
+ 'group_name': 'group_name',
+ 'fee': 'fee',
+ 'currency_pair': 'currency_pair',
+ 'amount': 'amount',
+ 'fee_asset': 'fee_asset',
+ 'source': 'source',
+ 'sub_broker_info': 'sub_broker_info',
+ 'alpha_contract_addr': 'alpha_contract_addr'
+ }
+
+ def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=None, currency_pair=None, amount=None, fee_asset=None, source=None, sub_broker_info=None, alpha_contract_addr=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, int, str, str, str, str, str, str, BrokerCommissionSubBrokerInfo, str, Configuration) -> None
+ """BrokerTransaction1 - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._transaction_time = None
+ self._user_id = None
+ self._group_name = None
+ self._fee = None
+ self._currency_pair = None
+ self._amount = None
+ self._fee_asset = None
+ self._source = None
+ self._sub_broker_info = None
+ self._alpha_contract_addr = None
+ self.discriminator = None
+
+ if transaction_time is not None:
+ self.transaction_time = transaction_time
+ if user_id is not None:
+ self.user_id = user_id
+ if group_name is not None:
+ self.group_name = group_name
+ if fee is not None:
+ self.fee = fee
+ if currency_pair is not None:
+ self.currency_pair = currency_pair
+ if amount is not None:
+ self.amount = amount
+ if fee_asset is not None:
+ self.fee_asset = fee_asset
+ if source is not None:
+ self.source = source
+ if sub_broker_info is not None:
+ self.sub_broker_info = sub_broker_info
+ if alpha_contract_addr is not None:
+ self.alpha_contract_addr = alpha_contract_addr
+
+ @property
+ def transaction_time(self):
+ """Gets the transaction_time of this BrokerTransaction1. # noqa: E501
+
+ Transaction Time. (unix timestamp) # noqa: E501
+
+ :return: The transaction_time of this BrokerTransaction1. # noqa: E501
+ :rtype: int
+ """
+ return self._transaction_time
+
+ @transaction_time.setter
+ def transaction_time(self, transaction_time):
+ """Sets the transaction_time of this BrokerTransaction1.
+
+ Transaction Time. (unix timestamp) # noqa: E501
+
+ :param transaction_time: The transaction_time of this BrokerTransaction1. # noqa: E501
+ :type: int
+ """
+
+ self._transaction_time = transaction_time
+
+ @property
+ def user_id(self):
+ """Gets the user_id of this BrokerTransaction1. # noqa: E501
+
+ User ID # noqa: E501
+
+ :return: The user_id of this BrokerTransaction1. # noqa: E501
+ :rtype: int
+ """
+ return self._user_id
+
+ @user_id.setter
+ def user_id(self, user_id):
+ """Sets the user_id of this BrokerTransaction1.
+
+ User ID # noqa: E501
+
+ :param user_id: The user_id of this BrokerTransaction1. # noqa: E501
+ :type: int
+ """
+
+ self._user_id = user_id
+
+ @property
+ def group_name(self):
+ """Gets the group_name of this BrokerTransaction1. # noqa: E501
+
+ Group name # noqa: E501
+
+ :return: The group_name of this BrokerTransaction1. # noqa: E501
+ :rtype: str
+ """
+ return self._group_name
+
+ @group_name.setter
+ def group_name(self, group_name):
+ """Sets the group_name of this BrokerTransaction1.
+
+ Group name # noqa: E501
+
+ :param group_name: The group_name of this BrokerTransaction1. # noqa: E501
+ :type: str
+ """
+
+ self._group_name = group_name
+
+ @property
+ def fee(self):
+ """Gets the fee of this BrokerTransaction1. # noqa: E501
+
+ Fee amount (USDT) # noqa: E501
+
+ :return: The fee of this BrokerTransaction1. # noqa: E501
+ :rtype: str
+ """
+ return self._fee
+
+ @fee.setter
+ def fee(self, fee):
+ """Sets the fee of this BrokerTransaction1.
+
+ Fee amount (USDT) # noqa: E501
+
+ :param fee: The fee of this BrokerTransaction1. # noqa: E501
+ :type: str
+ """
+
+ self._fee = fee
+
+ @property
+ def currency_pair(self):
+ """Gets the currency_pair of this BrokerTransaction1. # noqa: E501
+
+ Currency pair # noqa: E501
+
+ :return: The currency_pair of this BrokerTransaction1. # noqa: E501
+ :rtype: str
+ """
+ return self._currency_pair
+
+ @currency_pair.setter
+ def currency_pair(self, currency_pair):
+ """Sets the currency_pair of this BrokerTransaction1.
+
+ Currency pair # noqa: E501
+
+ :param currency_pair: The currency_pair of this BrokerTransaction1. # noqa: E501
+ :type: str
+ """
+
+ self._currency_pair = currency_pair
+
+ @property
+ def amount(self):
+ """Gets the amount of this BrokerTransaction1. # noqa: E501
+
+ Transaction amount # noqa: E501
+
+ :return: The amount of this BrokerTransaction1. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this BrokerTransaction1.
+
+ Transaction amount # noqa: E501
+
+ :param amount: The amount of this BrokerTransaction1. # noqa: E501
+ :type: str
+ """
+
+ self._amount = amount
+
+ @property
+ def fee_asset(self):
+ """Gets the fee_asset of this BrokerTransaction1. # noqa: E501
+
+ Fee currency # noqa: E501
+
+ :return: The fee_asset of this BrokerTransaction1. # noqa: E501
+ :rtype: str
+ """
+ return self._fee_asset
+
+ @fee_asset.setter
+ def fee_asset(self, fee_asset):
+ """Sets the fee_asset of this BrokerTransaction1.
+
+ Fee currency # noqa: E501
+
+ :param fee_asset: The fee_asset of this BrokerTransaction1. # noqa: E501
+ :type: str
+ """
+
+ self._fee_asset = fee_asset
+
+ @property
+ def source(self):
+ """Gets the source of this BrokerTransaction1. # noqa: E501
+
+ Commission transaction type: Spot, Futures, Options, Alpha # noqa: E501
+
+ :return: The source of this BrokerTransaction1. # noqa: E501
+ :rtype: str
+ """
+ return self._source
+
+ @source.setter
+ def source(self, source):
+ """Sets the source of this BrokerTransaction1.
+
+ Commission transaction type: Spot, Futures, Options, Alpha # noqa: E501
+
+ :param source: The source of this BrokerTransaction1. # noqa: E501
+ :type: str
+ """
+
+ self._source = source
+
+ @property
+ def sub_broker_info(self):
+ """Gets the sub_broker_info of this BrokerTransaction1. # noqa: E501
+
+
+ :return: The sub_broker_info of this BrokerTransaction1. # noqa: E501
+ :rtype: BrokerCommissionSubBrokerInfo
+ """
+ return self._sub_broker_info
+
+ @sub_broker_info.setter
+ def sub_broker_info(self, sub_broker_info):
+ """Sets the sub_broker_info of this BrokerTransaction1.
+
+
+ :param sub_broker_info: The sub_broker_info of this BrokerTransaction1. # noqa: E501
+ :type: BrokerCommissionSubBrokerInfo
+ """
+
+ self._sub_broker_info = sub_broker_info
+
+ @property
+ def alpha_contract_addr(self):
+ """Gets the alpha_contract_addr of this BrokerTransaction1. # noqa: E501
+
+ Alpha contract address # noqa: E501
+
+ :return: The alpha_contract_addr of this BrokerTransaction1. # noqa: E501
+ :rtype: str
+ """
+ return self._alpha_contract_addr
+
+ @alpha_contract_addr.setter
+ def alpha_contract_addr(self, alpha_contract_addr):
+ """Sets the alpha_contract_addr of this BrokerTransaction1.
+
+ Alpha contract address # noqa: E501
+
+ :param alpha_contract_addr: The alpha_contract_addr of this BrokerTransaction1. # noqa: E501
+ :type: str
+ """
+
+ self._alpha_contract_addr = alpha_contract_addr
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, BrokerTransaction1):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, BrokerTransaction1):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/cancel_batch_order.py b/gate_api/models/cancel_batch_order.py
index 5d6a4ca..bfc7bd9 100644
--- a/gate_api/models/cancel_batch_order.py
+++ b/gate_api/models/cancel_batch_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,12 +32,22 @@ class CancelBatchOrder(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency_pair': 'str', 'id': 'str', 'account': 'str'}
-
- attribute_map = {'currency_pair': 'currency_pair', 'id': 'id', 'account': 'account'}
-
- def __init__(self, currency_pair=None, id=None, account=None, local_vars_configuration=None): # noqa: E501
- # type: (str, str, str, Configuration) -> None
+ openapi_types = {
+ 'currency_pair': 'str',
+ 'id': 'str',
+ 'account': 'str',
+ 'action_mode': 'str'
+ }
+
+ attribute_map = {
+ 'currency_pair': 'currency_pair',
+ 'id': 'id',
+ 'account': 'account',
+ 'action_mode': 'action_mode'
+ }
+
+ def __init__(self, currency_pair=None, id=None, account=None, action_mode=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, Configuration) -> None
"""CancelBatchOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -46,12 +56,15 @@ def __init__(self, currency_pair=None, id=None, account=None, local_vars_configu
self._currency_pair = None
self._id = None
self._account = None
+ self._action_mode = None
self.discriminator = None
self.currency_pair = currency_pair
self.id = id
if account is not None:
self.account = account
+ if action_mode is not None:
+ self.action_mode = action_mode
@property
def currency_pair(self):
@@ -107,7 +120,7 @@ def id(self, id):
def account(self):
"""Gets the account of this CancelBatchOrder. # noqa: E501
- If cancelled order is cross margin order or is portfolio margin account's API key, this field must be set and can only be `cross_margin`If cancelled order is cross margin order, this field must be set and can only be `cross_margin` # noqa: E501
+ If the canceled order is a unified account apikey, this field must be specified and set to `unified` # noqa: E501
:return: The account of this CancelBatchOrder. # noqa: E501
:rtype: str
@@ -118,7 +131,7 @@ def account(self):
def account(self, account):
"""Sets the account of this CancelBatchOrder.
- If cancelled order is cross margin order or is portfolio margin account's API key, this field must be set and can only be `cross_margin`If cancelled order is cross margin order, this field must be set and can only be `cross_margin` # noqa: E501
+ If the canceled order is a unified account apikey, this field must be specified and set to `unified` # noqa: E501
:param account: The account of this CancelBatchOrder. # noqa: E501
:type: str
@@ -126,6 +139,29 @@ def account(self, account):
self._account = account
+ @property
+ def action_mode(self):
+ """Gets the action_mode of this CancelBatchOrder. # noqa: E501
+
+ 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) # noqa: E501
+
+ :return: The action_mode of this CancelBatchOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._action_mode
+
+ @action_mode.setter
+ def action_mode(self, action_mode):
+ """Sets the action_mode of this CancelBatchOrder.
+
+ 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) # noqa: E501
+
+ :param action_mode: The action_mode of this CancelBatchOrder. # noqa: E501
+ :type: str
+ """
+
+ self._action_mode = action_mode
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -133,16 +169,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/cancel_order.py b/gate_api/models/cancel_order.py
deleted file mode 100644
index 175630a..0000000
--- a/gate_api/models/cancel_order.py
+++ /dev/null
@@ -1,171 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class CancelOrder(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {'currency_pair': 'str', 'id': 'str', 'account': 'str'}
-
- attribute_map = {'currency_pair': 'currency_pair', 'id': 'id', 'account': 'account'}
-
- def __init__(self, currency_pair=None, id=None, account=None, local_vars_configuration=None): # noqa: E501
- # type: (str, str, str, Configuration) -> None
- """CancelOrder - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._currency_pair = None
- self._id = None
- self._account = None
- self.discriminator = None
-
- self.currency_pair = currency_pair
- self.id = id
- if account is not None:
- self.account = account
-
- @property
- def currency_pair(self):
- """Gets the currency_pair of this CancelOrder. # noqa: E501
-
- Order currency pair # noqa: E501
-
- :return: The currency_pair of this CancelOrder. # noqa: E501
- :rtype: str
- """
- return self._currency_pair
-
- @currency_pair.setter
- def currency_pair(self, currency_pair):
- """Sets the currency_pair of this CancelOrder.
-
- Order currency pair # noqa: E501
-
- :param currency_pair: The currency_pair of this CancelOrder. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501
- raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501
-
- self._currency_pair = currency_pair
-
- @property
- def id(self):
- """Gets the id of this CancelOrder. # noqa: E501
-
- Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation # noqa: E501
-
- :return: The id of this CancelOrder. # noqa: E501
- :rtype: str
- """
- return self._id
-
- @id.setter
- def id(self, id):
- """Sets the id of this CancelOrder.
-
- Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation # noqa: E501
-
- :param id: The id of this CancelOrder. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
- raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
-
- self._id = id
-
- @property
- def account(self):
- """Gets the account of this CancelOrder. # noqa: E501
-
- If cancelled order is cross margin order or is portfolio margin account's API key, this field must be set and can only be `cross_margin`If cancelled order is cross margin order, this field must be set and can only be `cross_margin` # noqa: E501
-
- :return: The account of this CancelOrder. # noqa: E501
- :rtype: str
- """
- return self._account
-
- @account.setter
- def account(self, account):
- """Sets the account of this CancelOrder.
-
- If cancelled order is cross margin order or is portfolio margin account's API key, this field must be set and can only be `cross_margin`If cancelled order is cross margin order, this field must be set and can only be `cross_margin` # noqa: E501
-
- :param account: The account of this CancelOrder. # noqa: E501
- :type: str
- """
-
- self._account = account
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, CancelOrder):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, CancelOrder):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/cancel_order_result.py b/gate_api/models/cancel_order_result.py
index a349770..487486a 100644
--- a/gate_api/models/cancel_order_result.py
+++ b/gate_api/models/cancel_order_result.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -35,32 +35,25 @@ class CancelOrderResult(object):
openapi_types = {
'currency_pair': 'str',
'id': 'str',
+ 'text': 'str',
'succeeded': 'bool',
'label': 'str',
'message': 'str',
- 'account': 'str',
+ 'account': 'str'
}
attribute_map = {
'currency_pair': 'currency_pair',
'id': 'id',
+ 'text': 'text',
'succeeded': 'succeeded',
'label': 'label',
'message': 'message',
- 'account': 'account',
+ 'account': 'account'
}
- def __init__(
- self,
- currency_pair=None,
- id=None,
- succeeded=None,
- label=None,
- message=None,
- account=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, bool, str, str, str, Configuration) -> None
+ def __init__(self, currency_pair=None, id=None, text=None, succeeded=None, label=None, message=None, account=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, bool, str, str, str, Configuration) -> None
"""CancelOrderResult - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -68,6 +61,7 @@ def __init__(
self._currency_pair = None
self._id = None
+ self._text = None
self._succeeded = None
self._label = None
self._message = None
@@ -78,6 +72,8 @@ def __init__(
self.currency_pair = currency_pair
if id is not None:
self.id = id
+ if text is not None:
+ self.text = text
if succeeded is not None:
self.succeeded = succeeded
if label is not None:
@@ -133,6 +129,29 @@ def id(self, id):
self._id = id
+ @property
+ def text(self):
+ """Gets the text of this CancelOrderResult. # noqa: E501
+
+ Custom order information # noqa: E501
+
+ :return: The text of this CancelOrderResult. # noqa: E501
+ :rtype: str
+ """
+ return self._text
+
+ @text.setter
+ def text(self, text):
+ """Sets the text of this CancelOrderResult.
+
+ Custom order information # noqa: E501
+
+ :param text: The text of this CancelOrderResult. # noqa: E501
+ :type: str
+ """
+
+ self._text = text
+
@property
def succeeded(self):
"""Gets the succeeded of this CancelOrderResult. # noqa: E501
@@ -183,7 +202,7 @@ def label(self, label):
def message(self):
"""Gets the message of this CancelOrderResult. # noqa: E501
- Error message when failed to cancel the order; empty if succeeded # noqa: E501
+ Error description when cancellation fails, empty if successful # noqa: E501
:return: The message of this CancelOrderResult. # noqa: E501
:rtype: str
@@ -194,7 +213,7 @@ def message(self):
def message(self, message):
"""Sets the message of this CancelOrderResult.
- Error message when failed to cancel the order; empty if succeeded # noqa: E501
+ Error description when cancellation fails, empty if successful # noqa: E501
:param message: The message of this CancelOrderResult. # noqa: E501
:type: str
@@ -206,7 +225,7 @@ def message(self, message):
def account(self):
"""Gets the account of this CancelOrderResult. # noqa: E501
- Empty by default. If cancelled order is cross margin order, this field is set to `cross_margin` # noqa: E501
+ Default is empty (deprecated) # noqa: E501
:return: The account of this CancelOrderResult. # noqa: E501
:rtype: str
@@ -217,7 +236,7 @@ def account(self):
def account(self, account):
"""Sets the account of this CancelOrderResult.
- Empty by default. If cancelled order is cross margin order, this field is set to `cross_margin` # noqa: E501
+ Default is empty (deprecated) # noqa: E501
:param account: The account of this CancelOrderResult. # noqa: E501
:type: str
@@ -232,16 +251,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/collateral_adjust.py b/gate_api/models/collateral_adjust.py
new file mode 100644
index 0000000..919556a
--- /dev/null
+++ b/gate_api/models/collateral_adjust.py
@@ -0,0 +1,181 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class CollateralAdjust(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'order_id': 'int',
+ 'type': 'str',
+ 'collaterals': 'list[CollateralCurrency]'
+ }
+
+ attribute_map = {
+ 'order_id': 'order_id',
+ 'type': 'type',
+ 'collaterals': 'collaterals'
+ }
+
+ def __init__(self, order_id=None, type=None, collaterals=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, list[CollateralCurrency], Configuration) -> None
+ """CollateralAdjust - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._order_id = None
+ self._type = None
+ self._collaterals = None
+ self.discriminator = None
+
+ self.order_id = order_id
+ self.type = type
+ if collaterals is not None:
+ self.collaterals = collaterals
+
+ @property
+ def order_id(self):
+ """Gets the order_id of this CollateralAdjust. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The order_id of this CollateralAdjust. # noqa: E501
+ :rtype: int
+ """
+ return self._order_id
+
+ @order_id.setter
+ def order_id(self, order_id):
+ """Sets the order_id of this CollateralAdjust.
+
+ Order ID # noqa: E501
+
+ :param order_id: The order_id of this CollateralAdjust. # noqa: E501
+ :type: int
+ """
+ if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501
+ raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501
+
+ self._order_id = order_id
+
+ @property
+ def type(self):
+ """Gets the type of this CollateralAdjust. # noqa: E501
+
+ Operation type: append - add collateral, redeem - withdraw collateral # noqa: E501
+
+ :return: The type of this CollateralAdjust. # noqa: E501
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this CollateralAdjust.
+
+ Operation type: append - add collateral, redeem - withdraw collateral # noqa: E501
+
+ :param type: The type of this CollateralAdjust. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501
+ raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
+
+ self._type = type
+
+ @property
+ def collaterals(self):
+ """Gets the collaterals of this CollateralAdjust. # noqa: E501
+
+ Collateral currency list # noqa: E501
+
+ :return: The collaterals of this CollateralAdjust. # noqa: E501
+ :rtype: list[CollateralCurrency]
+ """
+ return self._collaterals
+
+ @collaterals.setter
+ def collaterals(self, collaterals):
+ """Sets the collaterals of this CollateralAdjust.
+
+ Collateral currency list # noqa: E501
+
+ :param collaterals: The collaterals of this CollateralAdjust. # noqa: E501
+ :type: list[CollateralCurrency]
+ """
+
+ self._collaterals = collaterals
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CollateralAdjust):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, CollateralAdjust):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/collateral_adjust_res.py b/gate_api/models/collateral_adjust_res.py
new file mode 100644
index 0000000..7cc0044
--- /dev/null
+++ b/gate_api/models/collateral_adjust_res.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class CollateralAdjustRes(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'order_id': 'int',
+ 'collateral_currencies': 'list[CollateralCurrencyRes]'
+ }
+
+ attribute_map = {
+ 'order_id': 'order_id',
+ 'collateral_currencies': 'collateral_currencies'
+ }
+
+ def __init__(self, order_id=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, list[CollateralCurrencyRes], Configuration) -> None
+ """CollateralAdjustRes - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._order_id = None
+ self._collateral_currencies = None
+ self.discriminator = None
+
+ if order_id is not None:
+ self.order_id = order_id
+ if collateral_currencies is not None:
+ self.collateral_currencies = collateral_currencies
+
+ @property
+ def order_id(self):
+ """Gets the order_id of this CollateralAdjustRes. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The order_id of this CollateralAdjustRes. # noqa: E501
+ :rtype: int
+ """
+ return self._order_id
+
+ @order_id.setter
+ def order_id(self, order_id):
+ """Sets the order_id of this CollateralAdjustRes.
+
+ Order ID # noqa: E501
+
+ :param order_id: The order_id of this CollateralAdjustRes. # noqa: E501
+ :type: int
+ """
+
+ self._order_id = order_id
+
+ @property
+ def collateral_currencies(self):
+ """Gets the collateral_currencies of this CollateralAdjustRes. # noqa: E501
+
+ Collateral currency information # noqa: E501
+
+ :return: The collateral_currencies of this CollateralAdjustRes. # noqa: E501
+ :rtype: list[CollateralCurrencyRes]
+ """
+ return self._collateral_currencies
+
+ @collateral_currencies.setter
+ def collateral_currencies(self, collateral_currencies):
+ """Sets the collateral_currencies of this CollateralAdjustRes.
+
+ Collateral currency information # noqa: E501
+
+ :param collateral_currencies: The collateral_currencies of this CollateralAdjustRes. # noqa: E501
+ :type: list[CollateralCurrencyRes]
+ """
+
+ self._collateral_currencies = collateral_currencies
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CollateralAdjustRes):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, CollateralAdjustRes):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/collateral_align.py b/gate_api/models/collateral_align.py
index 47c6a5f..3bc3192 100644
--- a/gate_api/models/collateral_align.py
+++ b/gate_api/models/collateral_align.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,18 +32,21 @@ class CollateralAlign(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'order_id': 'int', 'collateral_currency': 'str', 'collateral_amount': 'str', 'type': 'str'}
+ openapi_types = {
+ 'order_id': 'int',
+ 'collateral_currency': 'str',
+ 'collateral_amount': 'str',
+ 'type': 'str'
+ }
attribute_map = {
'order_id': 'order_id',
'collateral_currency': 'collateral_currency',
'collateral_amount': 'collateral_amount',
- 'type': 'type',
+ 'type': 'type'
}
- def __init__(
- self, order_id=None, collateral_currency=None, collateral_amount=None, type=None, local_vars_configuration=None
- ): # noqa: E501
+ def __init__(self, order_id=None, collateral_currency=None, collateral_amount=None, type=None, local_vars_configuration=None): # noqa: E501
# type: (int, str, str, str, Configuration) -> None
"""CollateralAlign - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -65,7 +68,7 @@ def __init__(
def order_id(self):
"""Gets the order_id of this CollateralAlign. # noqa: E501
- 订单id # noqa: E501
+ Order ID # noqa: E501
:return: The order_id of this CollateralAlign. # noqa: E501
:rtype: int
@@ -76,7 +79,7 @@ def order_id(self):
def order_id(self, order_id):
"""Sets the order_id of this CollateralAlign.
- 订单id # noqa: E501
+ Order ID # noqa: E501
:param order_id: The order_id of this CollateralAlign. # noqa: E501
:type: int
@@ -90,7 +93,7 @@ def order_id(self, order_id):
def collateral_currency(self):
"""Gets the collateral_currency of this CollateralAlign. # noqa: E501
- 质押币种 # noqa: E501
+ Collateral currency # noqa: E501
:return: The collateral_currency of this CollateralAlign. # noqa: E501
:rtype: str
@@ -101,7 +104,7 @@ def collateral_currency(self):
def collateral_currency(self, collateral_currency):
"""Sets the collateral_currency of this CollateralAlign.
- 质押币种 # noqa: E501
+ Collateral currency # noqa: E501
:param collateral_currency: The collateral_currency of this CollateralAlign. # noqa: E501
:type: str
@@ -115,7 +118,7 @@ def collateral_currency(self, collateral_currency):
def collateral_amount(self):
"""Gets the collateral_amount of this CollateralAlign. # noqa: E501
- 质押数量 # noqa: E501
+ Collateral amount # noqa: E501
:return: The collateral_amount of this CollateralAlign. # noqa: E501
:rtype: str
@@ -126,7 +129,7 @@ def collateral_amount(self):
def collateral_amount(self, collateral_amount):
"""Sets the collateral_amount of this CollateralAlign.
- 质押数量 # noqa: E501
+ Collateral amount # noqa: E501
:param collateral_amount: The collateral_amount of this CollateralAlign. # noqa: E501
:type: str
@@ -140,7 +143,7 @@ def collateral_amount(self, collateral_amount):
def type(self):
"""Gets the type of this CollateralAlign. # noqa: E501
- 操作类型, append - 补充 , redeem - 提取 # noqa: E501
+ Operation type: append - add collateral, redeem - withdraw collateral # noqa: E501
:return: The type of this CollateralAlign. # noqa: E501
:rtype: str
@@ -151,7 +154,7 @@ def type(self):
def type(self, type):
"""Sets the type of this CollateralAlign.
- 操作类型, append - 补充 , redeem - 提取 # noqa: E501
+ Operation type: append - add collateral, redeem - withdraw collateral # noqa: E501
:param type: The type of this CollateralAlign. # noqa: E501
:type: str
@@ -168,16 +171,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/collateral_currency.py b/gate_api/models/collateral_currency.py
new file mode 100644
index 0000000..08c6811
--- /dev/null
+++ b/gate_api/models/collateral_currency.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class CollateralCurrency(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'amount': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'amount': 'amount'
+ }
+
+ def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """CollateralCurrency - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._amount = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if amount is not None:
+ self.amount = amount
+
+ @property
+ def currency(self):
+ """Gets the currency of this CollateralCurrency. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this CollateralCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this CollateralCurrency.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this CollateralCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def amount(self):
+ """Gets the amount of this CollateralCurrency. # noqa: E501
+
+ Size # noqa: E501
+
+ :return: The amount of this CollateralCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this CollateralCurrency.
+
+ Size # noqa: E501
+
+ :param amount: The amount of this CollateralCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._amount = amount
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CollateralCurrency):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, CollateralCurrency):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/collateral_currency_info.py b/gate_api/models/collateral_currency_info.py
new file mode 100644
index 0000000..f555f62
--- /dev/null
+++ b/gate_api/models/collateral_currency_info.py
@@ -0,0 +1,207 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class CollateralCurrencyInfo(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'index_price': 'str',
+ 'left_collateral': 'str',
+ 'left_collateral_usdt': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'index_price': 'index_price',
+ 'left_collateral': 'left_collateral',
+ 'left_collateral_usdt': 'left_collateral_usdt'
+ }
+
+ def __init__(self, currency=None, index_price=None, left_collateral=None, left_collateral_usdt=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, Configuration) -> None
+ """CollateralCurrencyInfo - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._index_price = None
+ self._left_collateral = None
+ self._left_collateral_usdt = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if index_price is not None:
+ self.index_price = index_price
+ if left_collateral is not None:
+ self.left_collateral = left_collateral
+ if left_collateral_usdt is not None:
+ self.left_collateral_usdt = left_collateral_usdt
+
+ @property
+ def currency(self):
+ """Gets the currency of this CollateralCurrencyInfo. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this CollateralCurrencyInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this CollateralCurrencyInfo.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this CollateralCurrencyInfo. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def index_price(self):
+ """Gets the index_price of this CollateralCurrencyInfo. # noqa: E501
+
+ Currency Index Price # noqa: E501
+
+ :return: The index_price of this CollateralCurrencyInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._index_price
+
+ @index_price.setter
+ def index_price(self, index_price):
+ """Sets the index_price of this CollateralCurrencyInfo.
+
+ Currency Index Price # noqa: E501
+
+ :param index_price: The index_price of this CollateralCurrencyInfo. # noqa: E501
+ :type: str
+ """
+
+ self._index_price = index_price
+
+ @property
+ def left_collateral(self):
+ """Gets the left_collateral of this CollateralCurrencyInfo. # noqa: E501
+
+ Remaining collateral amount # noqa: E501
+
+ :return: The left_collateral of this CollateralCurrencyInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._left_collateral
+
+ @left_collateral.setter
+ def left_collateral(self, left_collateral):
+ """Sets the left_collateral of this CollateralCurrencyInfo.
+
+ Remaining collateral amount # noqa: E501
+
+ :param left_collateral: The left_collateral of this CollateralCurrencyInfo. # noqa: E501
+ :type: str
+ """
+
+ self._left_collateral = left_collateral
+
+ @property
+ def left_collateral_usdt(self):
+ """Gets the left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501
+
+ Remaining collateral value converted to USDT # noqa: E501
+
+ :return: The left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._left_collateral_usdt
+
+ @left_collateral_usdt.setter
+ def left_collateral_usdt(self, left_collateral_usdt):
+ """Sets the left_collateral_usdt of this CollateralCurrencyInfo.
+
+ Remaining collateral value converted to USDT # noqa: E501
+
+ :param left_collateral_usdt: The left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501
+ :type: str
+ """
+
+ self._left_collateral_usdt = left_collateral_usdt
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CollateralCurrencyInfo):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, CollateralCurrencyInfo):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/collateral_currency_res.py b/gate_api/models/collateral_currency_res.py
new file mode 100644
index 0000000..610a406
--- /dev/null
+++ b/gate_api/models/collateral_currency_res.py
@@ -0,0 +1,235 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class CollateralCurrencyRes(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'succeeded': 'bool',
+ 'label': 'str',
+ 'message': 'str',
+ 'currency': 'str',
+ 'amount': 'str'
+ }
+
+ attribute_map = {
+ 'succeeded': 'succeeded',
+ 'label': 'label',
+ 'message': 'message',
+ 'currency': 'currency',
+ 'amount': 'amount'
+ }
+
+ def __init__(self, succeeded=None, label=None, message=None, currency=None, amount=None, local_vars_configuration=None): # noqa: E501
+ # type: (bool, str, str, str, str, Configuration) -> None
+ """CollateralCurrencyRes - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._succeeded = None
+ self._label = None
+ self._message = None
+ self._currency = None
+ self._amount = None
+ self.discriminator = None
+
+ if succeeded is not None:
+ self.succeeded = succeeded
+ if label is not None:
+ self.label = label
+ if message is not None:
+ self.message = message
+ if currency is not None:
+ self.currency = currency
+ if amount is not None:
+ self.amount = amount
+
+ @property
+ def succeeded(self):
+ """Gets the succeeded of this CollateralCurrencyRes. # noqa: E501
+
+ Update success status # noqa: E501
+
+ :return: The succeeded of this CollateralCurrencyRes. # noqa: E501
+ :rtype: bool
+ """
+ return self._succeeded
+
+ @succeeded.setter
+ def succeeded(self, succeeded):
+ """Sets the succeeded of this CollateralCurrencyRes.
+
+ Update success status # noqa: E501
+
+ :param succeeded: The succeeded of this CollateralCurrencyRes. # noqa: E501
+ :type: bool
+ """
+
+ self._succeeded = succeeded
+
+ @property
+ def label(self):
+ """Gets the label of this CollateralCurrencyRes. # noqa: E501
+
+ Error identifier for failed operations; empty when successful # noqa: E501
+
+ :return: The label of this CollateralCurrencyRes. # noqa: E501
+ :rtype: str
+ """
+ return self._label
+
+ @label.setter
+ def label(self, label):
+ """Sets the label of this CollateralCurrencyRes.
+
+ Error identifier for failed operations; empty when successful # noqa: E501
+
+ :param label: The label of this CollateralCurrencyRes. # noqa: E501
+ :type: str
+ """
+
+ self._label = label
+
+ @property
+ def message(self):
+ """Gets the message of this CollateralCurrencyRes. # noqa: E501
+
+ Error description for failed operations; empty when successful # noqa: E501
+
+ :return: The message of this CollateralCurrencyRes. # noqa: E501
+ :rtype: str
+ """
+ return self._message
+
+ @message.setter
+ def message(self, message):
+ """Sets the message of this CollateralCurrencyRes.
+
+ Error description for failed operations; empty when successful # noqa: E501
+
+ :param message: The message of this CollateralCurrencyRes. # noqa: E501
+ :type: str
+ """
+
+ self._message = message
+
+ @property
+ def currency(self):
+ """Gets the currency of this CollateralCurrencyRes. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this CollateralCurrencyRes. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this CollateralCurrencyRes.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this CollateralCurrencyRes. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def amount(self):
+ """Gets the amount of this CollateralCurrencyRes. # noqa: E501
+
+ Successfully operated collateral quantity; 0 if operation fails # noqa: E501
+
+ :return: The amount of this CollateralCurrencyRes. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this CollateralCurrencyRes.
+
+ Successfully operated collateral quantity; 0 if operation fails # noqa: E501
+
+ :param amount: The amount of this CollateralCurrencyRes. # noqa: E501
+ :type: str
+ """
+
+ self._amount = amount
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CollateralCurrencyRes):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, CollateralCurrencyRes):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/collateral_current_rate.py b/gate_api/models/collateral_current_rate.py
new file mode 100644
index 0000000..5d00be0
--- /dev/null
+++ b/gate_api/models/collateral_current_rate.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class CollateralCurrentRate(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'current_rate': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'current_rate': 'current_rate'
+ }
+
+ def __init__(self, currency=None, current_rate=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """CollateralCurrentRate - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._current_rate = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if current_rate is not None:
+ self.current_rate = current_rate
+
+ @property
+ def currency(self):
+ """Gets the currency of this CollateralCurrentRate. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this CollateralCurrentRate. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this CollateralCurrentRate.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this CollateralCurrentRate. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def current_rate(self):
+ """Gets the current_rate of this CollateralCurrentRate. # noqa: E501
+
+ Currency current interest rate # noqa: E501
+
+ :return: The current_rate of this CollateralCurrentRate. # noqa: E501
+ :rtype: str
+ """
+ return self._current_rate
+
+ @current_rate.setter
+ def current_rate(self, current_rate):
+ """Sets the current_rate of this CollateralCurrentRate.
+
+ Currency current interest rate # noqa: E501
+
+ :param current_rate: The current_rate of this CollateralCurrentRate. # noqa: E501
+ :type: str
+ """
+
+ self._current_rate = current_rate
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CollateralCurrentRate):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, CollateralCurrentRate):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/collateral_fix_rate.py b/gate_api/models/collateral_fix_rate.py
new file mode 100644
index 0000000..0bdfb45
--- /dev/null
+++ b/gate_api/models/collateral_fix_rate.py
@@ -0,0 +1,207 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class CollateralFixRate(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'rate_7d': 'str',
+ 'rate_30d': 'str',
+ 'update_time': 'int'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'rate_7d': 'rate_7d',
+ 'rate_30d': 'rate_30d',
+ 'update_time': 'update_time'
+ }
+
+ def __init__(self, currency=None, rate_7d=None, rate_30d=None, update_time=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, int, Configuration) -> None
+ """CollateralFixRate - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._rate_7d = None
+ self._rate_30d = None
+ self._update_time = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if rate_7d is not None:
+ self.rate_7d = rate_7d
+ if rate_30d is not None:
+ self.rate_30d = rate_30d
+ if update_time is not None:
+ self.update_time = update_time
+
+ @property
+ def currency(self):
+ """Gets the currency of this CollateralFixRate. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this CollateralFixRate. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this CollateralFixRate.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this CollateralFixRate. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def rate_7d(self):
+ """Gets the rate_7d of this CollateralFixRate. # noqa: E501
+
+ Fixed interest rate for 7-day lending period # noqa: E501
+
+ :return: The rate_7d of this CollateralFixRate. # noqa: E501
+ :rtype: str
+ """
+ return self._rate_7d
+
+ @rate_7d.setter
+ def rate_7d(self, rate_7d):
+ """Sets the rate_7d of this CollateralFixRate.
+
+ Fixed interest rate for 7-day lending period # noqa: E501
+
+ :param rate_7d: The rate_7d of this CollateralFixRate. # noqa: E501
+ :type: str
+ """
+
+ self._rate_7d = rate_7d
+
+ @property
+ def rate_30d(self):
+ """Gets the rate_30d of this CollateralFixRate. # noqa: E501
+
+ Fixed interest rate for 30-day lending period # noqa: E501
+
+ :return: The rate_30d of this CollateralFixRate. # noqa: E501
+ :rtype: str
+ """
+ return self._rate_30d
+
+ @rate_30d.setter
+ def rate_30d(self, rate_30d):
+ """Sets the rate_30d of this CollateralFixRate.
+
+ Fixed interest rate for 30-day lending period # noqa: E501
+
+ :param rate_30d: The rate_30d of this CollateralFixRate. # noqa: E501
+ :type: str
+ """
+
+ self._rate_30d = rate_30d
+
+ @property
+ def update_time(self):
+ """Gets the update_time of this CollateralFixRate. # noqa: E501
+
+ Update time, timestamp in seconds # noqa: E501
+
+ :return: The update_time of this CollateralFixRate. # noqa: E501
+ :rtype: int
+ """
+ return self._update_time
+
+ @update_time.setter
+ def update_time(self, update_time):
+ """Sets the update_time of this CollateralFixRate.
+
+ Update time, timestamp in seconds # noqa: E501
+
+ :param update_time: The update_time of this CollateralFixRate. # noqa: E501
+ :type: int
+ """
+
+ self._update_time = update_time
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CollateralFixRate):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, CollateralFixRate):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/collateral_loan_currency.py b/gate_api/models/collateral_loan_currency.py
index b56ffb9..67b6713 100644
--- a/gate_api/models/collateral_loan_currency.py
+++ b/gate_api/models/collateral_loan_currency.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class CollateralLoanCurrency(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'loan_currency': 'str', 'collateral_currency': 'list[str]'}
+ openapi_types = {
+ 'loan_currency': 'str',
+ 'collateral_currency': 'list[str]'
+ }
- attribute_map = {'loan_currency': 'loan_currency', 'collateral_currency': 'collateral_currency'}
+ attribute_map = {
+ 'loan_currency': 'loan_currency',
+ 'collateral_currency': 'collateral_currency'
+ }
def __init__(self, loan_currency=None, collateral_currency=None, local_vars_configuration=None): # noqa: E501
# type: (str, list[str], Configuration) -> None
@@ -56,7 +62,7 @@ def __init__(self, loan_currency=None, collateral_currency=None, local_vars_conf
def loan_currency(self):
"""Gets the loan_currency of this CollateralLoanCurrency. # noqa: E501
- 借款币种 # noqa: E501
+ Borrowed currency # noqa: E501
:return: The loan_currency of this CollateralLoanCurrency. # noqa: E501
:rtype: str
@@ -67,7 +73,7 @@ def loan_currency(self):
def loan_currency(self, loan_currency):
"""Sets the loan_currency of this CollateralLoanCurrency.
- 借款币种 # noqa: E501
+ Borrowed currency # noqa: E501
:param loan_currency: The loan_currency of this CollateralLoanCurrency. # noqa: E501
:type: str
@@ -79,7 +85,7 @@ def loan_currency(self, loan_currency):
def collateral_currency(self):
"""Gets the collateral_currency of this CollateralLoanCurrency. # noqa: E501
- 支持的抵押币种列表 # noqa: E501
+ List of supported collateral currencies # noqa: E501
:return: The collateral_currency of this CollateralLoanCurrency. # noqa: E501
:rtype: list[str]
@@ -90,7 +96,7 @@ def collateral_currency(self):
def collateral_currency(self, collateral_currency):
"""Sets the collateral_currency of this CollateralLoanCurrency.
- 支持的抵押币种列表 # noqa: E501
+ List of supported collateral currencies # noqa: E501
:param collateral_currency: The collateral_currency of this CollateralLoanCurrency. # noqa: E501
:type: list[str]
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/collateral_ltv.py b/gate_api/models/collateral_ltv.py
new file mode 100644
index 0000000..34c8653
--- /dev/null
+++ b/gate_api/models/collateral_ltv.py
@@ -0,0 +1,179 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class CollateralLtv(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'init_ltv': 'str',
+ 'alert_ltv': 'str',
+ 'liquidate_ltv': 'str'
+ }
+
+ attribute_map = {
+ 'init_ltv': 'init_ltv',
+ 'alert_ltv': 'alert_ltv',
+ 'liquidate_ltv': 'liquidate_ltv'
+ }
+
+ def __init__(self, init_ltv=None, alert_ltv=None, liquidate_ltv=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, Configuration) -> None
+ """CollateralLtv - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._init_ltv = None
+ self._alert_ltv = None
+ self._liquidate_ltv = None
+ self.discriminator = None
+
+ if init_ltv is not None:
+ self.init_ltv = init_ltv
+ if alert_ltv is not None:
+ self.alert_ltv = alert_ltv
+ if liquidate_ltv is not None:
+ self.liquidate_ltv = liquidate_ltv
+
+ @property
+ def init_ltv(self):
+ """Gets the init_ltv of this CollateralLtv. # noqa: E501
+
+ Initial collateralization rate # noqa: E501
+
+ :return: The init_ltv of this CollateralLtv. # noqa: E501
+ :rtype: str
+ """
+ return self._init_ltv
+
+ @init_ltv.setter
+ def init_ltv(self, init_ltv):
+ """Sets the init_ltv of this CollateralLtv.
+
+ Initial collateralization rate # noqa: E501
+
+ :param init_ltv: The init_ltv of this CollateralLtv. # noqa: E501
+ :type: str
+ """
+
+ self._init_ltv = init_ltv
+
+ @property
+ def alert_ltv(self):
+ """Gets the alert_ltv of this CollateralLtv. # noqa: E501
+
+ Warning collateralization rate # noqa: E501
+
+ :return: The alert_ltv of this CollateralLtv. # noqa: E501
+ :rtype: str
+ """
+ return self._alert_ltv
+
+ @alert_ltv.setter
+ def alert_ltv(self, alert_ltv):
+ """Sets the alert_ltv of this CollateralLtv.
+
+ Warning collateralization rate # noqa: E501
+
+ :param alert_ltv: The alert_ltv of this CollateralLtv. # noqa: E501
+ :type: str
+ """
+
+ self._alert_ltv = alert_ltv
+
+ @property
+ def liquidate_ltv(self):
+ """Gets the liquidate_ltv of this CollateralLtv. # noqa: E501
+
+ Liquidation collateralization rate # noqa: E501
+
+ :return: The liquidate_ltv of this CollateralLtv. # noqa: E501
+ :rtype: str
+ """
+ return self._liquidate_ltv
+
+ @liquidate_ltv.setter
+ def liquidate_ltv(self, liquidate_ltv):
+ """Sets the liquidate_ltv of this CollateralLtv.
+
+ Liquidation collateralization rate # noqa: E501
+
+ :param liquidate_ltv: The liquidate_ltv of this CollateralLtv. # noqa: E501
+ :type: str
+ """
+
+ self._liquidate_ltv = liquidate_ltv
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CollateralLtv):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, CollateralLtv):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/collateral_order.py b/gate_api/models/collateral_order.py
index afc913e..f6cac73 100644
--- a/gate_api/models/collateral_order.py
+++ b/gate_api/models/collateral_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -48,7 +48,7 @@ class CollateralOrder(object):
'borrow_time': 'int',
'left_repay_total': 'str',
'left_repay_principal': 'str',
- 'left_repay_interest': 'str',
+ 'left_repay_interest': 'str'
}
attribute_map = {
@@ -67,29 +67,10 @@ class CollateralOrder(object):
'borrow_time': 'borrow_time',
'left_repay_total': 'left_repay_total',
'left_repay_principal': 'left_repay_principal',
- 'left_repay_interest': 'left_repay_interest',
+ 'left_repay_interest': 'left_repay_interest'
}
- def __init__(
- self,
- order_id=None,
- collateral_currency=None,
- collateral_amount=None,
- borrow_currency=None,
- borrow_amount=None,
- repaid_amount=None,
- repaid_principal=None,
- repaid_interest=None,
- init_ltv=None,
- current_ltv=None,
- liquidate_ltv=None,
- status=None,
- borrow_time=None,
- left_repay_total=None,
- left_repay_principal=None,
- left_repay_interest=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, order_id=None, collateral_currency=None, collateral_amount=None, borrow_currency=None, borrow_amount=None, repaid_amount=None, repaid_principal=None, repaid_interest=None, init_ltv=None, current_ltv=None, liquidate_ltv=None, status=None, borrow_time=None, left_repay_total=None, left_repay_principal=None, left_repay_interest=None, local_vars_configuration=None): # noqa: E501
# type: (int, str, str, str, str, str, str, str, str, str, str, str, int, str, str, str, Configuration) -> None
"""CollateralOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -151,7 +132,7 @@ def __init__(
def order_id(self):
"""Gets the order_id of this CollateralOrder. # noqa: E501
- 订单id # noqa: E501
+ Order ID # noqa: E501
:return: The order_id of this CollateralOrder. # noqa: E501
:rtype: int
@@ -162,7 +143,7 @@ def order_id(self):
def order_id(self, order_id):
"""Sets the order_id of this CollateralOrder.
- 订单id # noqa: E501
+ Order ID # noqa: E501
:param order_id: The order_id of this CollateralOrder. # noqa: E501
:type: int
@@ -174,7 +155,7 @@ def order_id(self, order_id):
def collateral_currency(self):
"""Gets the collateral_currency of this CollateralOrder. # noqa: E501
- 质押币种 # noqa: E501
+ Collateral currency # noqa: E501
:return: The collateral_currency of this CollateralOrder. # noqa: E501
:rtype: str
@@ -185,7 +166,7 @@ def collateral_currency(self):
def collateral_currency(self, collateral_currency):
"""Sets the collateral_currency of this CollateralOrder.
- 质押币种 # noqa: E501
+ Collateral currency # noqa: E501
:param collateral_currency: The collateral_currency of this CollateralOrder. # noqa: E501
:type: str
@@ -197,7 +178,7 @@ def collateral_currency(self, collateral_currency):
def collateral_amount(self):
"""Gets the collateral_amount of this CollateralOrder. # noqa: E501
- 质押数量 # noqa: E501
+ Collateral amount # noqa: E501
:return: The collateral_amount of this CollateralOrder. # noqa: E501
:rtype: str
@@ -208,7 +189,7 @@ def collateral_amount(self):
def collateral_amount(self, collateral_amount):
"""Sets the collateral_amount of this CollateralOrder.
- 质押数量 # noqa: E501
+ Collateral amount # noqa: E501
:param collateral_amount: The collateral_amount of this CollateralOrder. # noqa: E501
:type: str
@@ -220,7 +201,7 @@ def collateral_amount(self, collateral_amount):
def borrow_currency(self):
"""Gets the borrow_currency of this CollateralOrder. # noqa: E501
- 借款币种 # noqa: E501
+ Borrowed currency # noqa: E501
:return: The borrow_currency of this CollateralOrder. # noqa: E501
:rtype: str
@@ -231,7 +212,7 @@ def borrow_currency(self):
def borrow_currency(self, borrow_currency):
"""Sets the borrow_currency of this CollateralOrder.
- 借款币种 # noqa: E501
+ Borrowed currency # noqa: E501
:param borrow_currency: The borrow_currency of this CollateralOrder. # noqa: E501
:type: str
@@ -243,7 +224,7 @@ def borrow_currency(self, borrow_currency):
def borrow_amount(self):
"""Gets the borrow_amount of this CollateralOrder. # noqa: E501
- 借款数量 # noqa: E501
+ Borrowed amount # noqa: E501
:return: The borrow_amount of this CollateralOrder. # noqa: E501
:rtype: str
@@ -254,7 +235,7 @@ def borrow_amount(self):
def borrow_amount(self, borrow_amount):
"""Sets the borrow_amount of this CollateralOrder.
- 借款数量 # noqa: E501
+ Borrowed amount # noqa: E501
:param borrow_amount: The borrow_amount of this CollateralOrder. # noqa: E501
:type: str
@@ -266,7 +247,7 @@ def borrow_amount(self, borrow_amount):
def repaid_amount(self):
"""Gets the repaid_amount of this CollateralOrder. # noqa: E501
- 已还款数量 # noqa: E501
+ Repaid amount # noqa: E501
:return: The repaid_amount of this CollateralOrder. # noqa: E501
:rtype: str
@@ -277,7 +258,7 @@ def repaid_amount(self):
def repaid_amount(self, repaid_amount):
"""Sets the repaid_amount of this CollateralOrder.
- 已还款数量 # noqa: E501
+ Repaid amount # noqa: E501
:param repaid_amount: The repaid_amount of this CollateralOrder. # noqa: E501
:type: str
@@ -289,7 +270,7 @@ def repaid_amount(self, repaid_amount):
def repaid_principal(self):
"""Gets the repaid_principal of this CollateralOrder. # noqa: E501
- 已还本金 # noqa: E501
+ Repaid principal # noqa: E501
:return: The repaid_principal of this CollateralOrder. # noqa: E501
:rtype: str
@@ -300,7 +281,7 @@ def repaid_principal(self):
def repaid_principal(self, repaid_principal):
"""Sets the repaid_principal of this CollateralOrder.
- 已还本金 # noqa: E501
+ Repaid principal # noqa: E501
:param repaid_principal: The repaid_principal of this CollateralOrder. # noqa: E501
:type: str
@@ -312,7 +293,7 @@ def repaid_principal(self, repaid_principal):
def repaid_interest(self):
"""Gets the repaid_interest of this CollateralOrder. # noqa: E501
- 已还利息 # noqa: E501
+ Repaid interest # noqa: E501
:return: The repaid_interest of this CollateralOrder. # noqa: E501
:rtype: str
@@ -323,7 +304,7 @@ def repaid_interest(self):
def repaid_interest(self, repaid_interest):
"""Sets the repaid_interest of this CollateralOrder.
- 已还利息 # noqa: E501
+ Repaid interest # noqa: E501
:param repaid_interest: The repaid_interest of this CollateralOrder. # noqa: E501
:type: str
@@ -335,7 +316,7 @@ def repaid_interest(self, repaid_interest):
def init_ltv(self):
"""Gets the init_ltv of this CollateralOrder. # noqa: E501
- 初始质押率 # noqa: E501
+ Initial collateralization rate # noqa: E501
:return: The init_ltv of this CollateralOrder. # noqa: E501
:rtype: str
@@ -346,7 +327,7 @@ def init_ltv(self):
def init_ltv(self, init_ltv):
"""Sets the init_ltv of this CollateralOrder.
- 初始质押率 # noqa: E501
+ Initial collateralization rate # noqa: E501
:param init_ltv: The init_ltv of this CollateralOrder. # noqa: E501
:type: str
@@ -358,7 +339,7 @@ def init_ltv(self, init_ltv):
def current_ltv(self):
"""Gets the current_ltv of this CollateralOrder. # noqa: E501
- 当前质押率 # noqa: E501
+ Current collateralization rate # noqa: E501
:return: The current_ltv of this CollateralOrder. # noqa: E501
:rtype: str
@@ -369,7 +350,7 @@ def current_ltv(self):
def current_ltv(self, current_ltv):
"""Sets the current_ltv of this CollateralOrder.
- 当前质押率 # noqa: E501
+ Current collateralization rate # noqa: E501
:param current_ltv: The current_ltv of this CollateralOrder. # noqa: E501
:type: str
@@ -381,7 +362,7 @@ def current_ltv(self, current_ltv):
def liquidate_ltv(self):
"""Gets the liquidate_ltv of this CollateralOrder. # noqa: E501
- 平仓质押率 # noqa: E501
+ Liquidation collateralization rate # noqa: E501
:return: The liquidate_ltv of this CollateralOrder. # noqa: E501
:rtype: str
@@ -392,7 +373,7 @@ def liquidate_ltv(self):
def liquidate_ltv(self, liquidate_ltv):
"""Sets the liquidate_ltv of this CollateralOrder.
- 平仓质押率 # noqa: E501
+ Liquidation collateralization rate # noqa: E501
:param liquidate_ltv: The liquidate_ltv of this CollateralOrder. # noqa: E501
:type: str
@@ -404,7 +385,7 @@ def liquidate_ltv(self, liquidate_ltv):
def status(self):
"""Gets the status of this CollateralOrder. # noqa: E501
- 订单状态: - initial: 下单初始状态 - collateral_deducted: 扣除质押物成功 - collateral_returning: 放款失败-待退回质押物 - lent: 放款成功 - repaying: 还款中 - liquidating: 平仓中 - finished: 已完成 - closed_liquidated: 已结束-平仓还款结束 # noqa: E501
+ Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed # noqa: E501
:return: The status of this CollateralOrder. # noqa: E501
:rtype: str
@@ -415,7 +396,7 @@ def status(self):
def status(self, status):
"""Sets the status of this CollateralOrder.
- 订单状态: - initial: 下单初始状态 - collateral_deducted: 扣除质押物成功 - collateral_returning: 放款失败-待退回质押物 - lent: 放款成功 - repaying: 还款中 - liquidating: 平仓中 - finished: 已完成 - closed_liquidated: 已结束-平仓还款结束 # noqa: E501
+ Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed # noqa: E501
:param status: The status of this CollateralOrder. # noqa: E501
:type: str
@@ -427,7 +408,7 @@ def status(self, status):
def borrow_time(self):
"""Gets the borrow_time of this CollateralOrder. # noqa: E501
- 借款时间,时间戳,单位秒 # noqa: E501
+ Borrowing time, timestamp in seconds # noqa: E501
:return: The borrow_time of this CollateralOrder. # noqa: E501
:rtype: int
@@ -438,7 +419,7 @@ def borrow_time(self):
def borrow_time(self, borrow_time):
"""Sets the borrow_time of this CollateralOrder.
- 借款时间,时间戳,单位秒 # noqa: E501
+ Borrowing time, timestamp in seconds # noqa: E501
:param borrow_time: The borrow_time of this CollateralOrder. # noqa: E501
:type: int
@@ -450,7 +431,7 @@ def borrow_time(self, borrow_time):
def left_repay_total(self):
"""Gets the left_repay_total of this CollateralOrder. # noqa: E501
- 待还本息(待还本金+待还利息) # noqa: E501
+ Outstanding principal and interest (outstanding principal + outstanding interest) # noqa: E501
:return: The left_repay_total of this CollateralOrder. # noqa: E501
:rtype: str
@@ -461,7 +442,7 @@ def left_repay_total(self):
def left_repay_total(self, left_repay_total):
"""Sets the left_repay_total of this CollateralOrder.
- 待还本息(待还本金+待还利息) # noqa: E501
+ Outstanding principal and interest (outstanding principal + outstanding interest) # noqa: E501
:param left_repay_total: The left_repay_total of this CollateralOrder. # noqa: E501
:type: str
@@ -473,7 +454,7 @@ def left_repay_total(self, left_repay_total):
def left_repay_principal(self):
"""Gets the left_repay_principal of this CollateralOrder. # noqa: E501
- 待还本金 # noqa: E501
+ Outstanding principal # noqa: E501
:return: The left_repay_principal of this CollateralOrder. # noqa: E501
:rtype: str
@@ -484,7 +465,7 @@ def left_repay_principal(self):
def left_repay_principal(self, left_repay_principal):
"""Sets the left_repay_principal of this CollateralOrder.
- 待还本金 # noqa: E501
+ Outstanding principal # noqa: E501
:param left_repay_principal: The left_repay_principal of this CollateralOrder. # noqa: E501
:type: str
@@ -496,7 +477,7 @@ def left_repay_principal(self, left_repay_principal):
def left_repay_interest(self):
"""Gets the left_repay_interest of this CollateralOrder. # noqa: E501
- 待还利息 # noqa: E501
+ Outstanding interest # noqa: E501
:return: The left_repay_interest of this CollateralOrder. # noqa: E501
:rtype: str
@@ -507,7 +488,7 @@ def left_repay_interest(self):
def left_repay_interest(self, left_repay_interest):
"""Sets the left_repay_interest of this CollateralOrder.
- 待还利息 # noqa: E501
+ Outstanding interest # noqa: E501
:param left_repay_interest: The left_repay_interest of this CollateralOrder. # noqa: E501
:type: str
@@ -522,16 +503,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/collateral_record.py b/gate_api/models/collateral_record.py
index 0c530de..b5eeb09 100644
--- a/gate_api/models/collateral_record.py
+++ b/gate_api/models/collateral_record.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -42,7 +42,7 @@ class CollateralRecord(object):
'after_collateral': 'str',
'before_ltv': 'str',
'after_ltv': 'str',
- 'operate_time': 'int',
+ 'operate_time': 'int'
}
attribute_map = {
@@ -55,23 +55,10 @@ class CollateralRecord(object):
'after_collateral': 'after_collateral',
'before_ltv': 'before_ltv',
'after_ltv': 'after_ltv',
- 'operate_time': 'operate_time',
+ 'operate_time': 'operate_time'
}
- def __init__(
- self,
- order_id=None,
- record_id=None,
- borrow_currency=None,
- borrow_amount=None,
- collateral_currency=None,
- before_collateral=None,
- after_collateral=None,
- before_ltv=None,
- after_ltv=None,
- operate_time=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, order_id=None, record_id=None, borrow_currency=None, borrow_amount=None, collateral_currency=None, before_collateral=None, after_collateral=None, before_ltv=None, after_ltv=None, operate_time=None, local_vars_configuration=None): # noqa: E501
# type: (int, int, str, str, str, str, str, str, str, int, Configuration) -> None
"""CollateralRecord - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -115,7 +102,7 @@ def __init__(
def order_id(self):
"""Gets the order_id of this CollateralRecord. # noqa: E501
- 订单id # noqa: E501
+ Order ID # noqa: E501
:return: The order_id of this CollateralRecord. # noqa: E501
:rtype: int
@@ -126,7 +113,7 @@ def order_id(self):
def order_id(self, order_id):
"""Sets the order_id of this CollateralRecord.
- 订单id # noqa: E501
+ Order ID # noqa: E501
:param order_id: The order_id of this CollateralRecord. # noqa: E501
:type: int
@@ -138,7 +125,7 @@ def order_id(self, order_id):
def record_id(self):
"""Gets the record_id of this CollateralRecord. # noqa: E501
- 质押物记录 id # noqa: E501
+ Collateral record ID # noqa: E501
:return: The record_id of this CollateralRecord. # noqa: E501
:rtype: int
@@ -149,7 +136,7 @@ def record_id(self):
def record_id(self, record_id):
"""Sets the record_id of this CollateralRecord.
- 质押物记录 id # noqa: E501
+ Collateral record ID # noqa: E501
:param record_id: The record_id of this CollateralRecord. # noqa: E501
:type: int
@@ -161,7 +148,7 @@ def record_id(self, record_id):
def borrow_currency(self):
"""Gets the borrow_currency of this CollateralRecord. # noqa: E501
- 借款币种 # noqa: E501
+ Borrowed currency # noqa: E501
:return: The borrow_currency of this CollateralRecord. # noqa: E501
:rtype: str
@@ -172,7 +159,7 @@ def borrow_currency(self):
def borrow_currency(self, borrow_currency):
"""Sets the borrow_currency of this CollateralRecord.
- 借款币种 # noqa: E501
+ Borrowed currency # noqa: E501
:param borrow_currency: The borrow_currency of this CollateralRecord. # noqa: E501
:type: str
@@ -184,7 +171,7 @@ def borrow_currency(self, borrow_currency):
def borrow_amount(self):
"""Gets the borrow_amount of this CollateralRecord. # noqa: E501
- 借款数量 # noqa: E501
+ Borrowed amount # noqa: E501
:return: The borrow_amount of this CollateralRecord. # noqa: E501
:rtype: str
@@ -195,7 +182,7 @@ def borrow_amount(self):
def borrow_amount(self, borrow_amount):
"""Sets the borrow_amount of this CollateralRecord.
- 借款数量 # noqa: E501
+ Borrowed amount # noqa: E501
:param borrow_amount: The borrow_amount of this CollateralRecord. # noqa: E501
:type: str
@@ -207,7 +194,7 @@ def borrow_amount(self, borrow_amount):
def collateral_currency(self):
"""Gets the collateral_currency of this CollateralRecord. # noqa: E501
- 质押币种 # noqa: E501
+ Collateral currency # noqa: E501
:return: The collateral_currency of this CollateralRecord. # noqa: E501
:rtype: str
@@ -218,7 +205,7 @@ def collateral_currency(self):
def collateral_currency(self, collateral_currency):
"""Sets the collateral_currency of this CollateralRecord.
- 质押币种 # noqa: E501
+ Collateral currency # noqa: E501
:param collateral_currency: The collateral_currency of this CollateralRecord. # noqa: E501
:type: str
@@ -230,7 +217,7 @@ def collateral_currency(self, collateral_currency):
def before_collateral(self):
"""Gets the before_collateral of this CollateralRecord. # noqa: E501
- 调整前质押数量 # noqa: E501
+ Collateral amount before adjustment # noqa: E501
:return: The before_collateral of this CollateralRecord. # noqa: E501
:rtype: str
@@ -241,7 +228,7 @@ def before_collateral(self):
def before_collateral(self, before_collateral):
"""Sets the before_collateral of this CollateralRecord.
- 调整前质押数量 # noqa: E501
+ Collateral amount before adjustment # noqa: E501
:param before_collateral: The before_collateral of this CollateralRecord. # noqa: E501
:type: str
@@ -253,7 +240,7 @@ def before_collateral(self, before_collateral):
def after_collateral(self):
"""Gets the after_collateral of this CollateralRecord. # noqa: E501
- 调整后质押数量 # noqa: E501
+ Collateral amount after adjustment # noqa: E501
:return: The after_collateral of this CollateralRecord. # noqa: E501
:rtype: str
@@ -264,7 +251,7 @@ def after_collateral(self):
def after_collateral(self, after_collateral):
"""Sets the after_collateral of this CollateralRecord.
- 调整后质押数量 # noqa: E501
+ Collateral amount after adjustment # noqa: E501
:param after_collateral: The after_collateral of this CollateralRecord. # noqa: E501
:type: str
@@ -276,7 +263,7 @@ def after_collateral(self, after_collateral):
def before_ltv(self):
"""Gets the before_ltv of this CollateralRecord. # noqa: E501
- 调整前质押率 # noqa: E501
+ Collateral ratio before adjustment # noqa: E501
:return: The before_ltv of this CollateralRecord. # noqa: E501
:rtype: str
@@ -287,7 +274,7 @@ def before_ltv(self):
def before_ltv(self, before_ltv):
"""Sets the before_ltv of this CollateralRecord.
- 调整前质押率 # noqa: E501
+ Collateral ratio before adjustment # noqa: E501
:param before_ltv: The before_ltv of this CollateralRecord. # noqa: E501
:type: str
@@ -299,7 +286,7 @@ def before_ltv(self, before_ltv):
def after_ltv(self):
"""Gets the after_ltv of this CollateralRecord. # noqa: E501
- 调整后质押率 # noqa: E501
+ Collateral ratio after adjustment # noqa: E501
:return: The after_ltv of this CollateralRecord. # noqa: E501
:rtype: str
@@ -310,7 +297,7 @@ def after_ltv(self):
def after_ltv(self, after_ltv):
"""Sets the after_ltv of this CollateralRecord.
- 调整后质押率 # noqa: E501
+ Collateral ratio after adjustment # noqa: E501
:param after_ltv: The after_ltv of this CollateralRecord. # noqa: E501
:type: str
@@ -322,7 +309,7 @@ def after_ltv(self, after_ltv):
def operate_time(self):
"""Gets the operate_time of this CollateralRecord. # noqa: E501
- 操作时间,时间戳,单位秒 # noqa: E501
+ Operation time, timestamp in seconds # noqa: E501
:return: The operate_time of this CollateralRecord. # noqa: E501
:rtype: int
@@ -333,7 +320,7 @@ def operate_time(self):
def operate_time(self, operate_time):
"""Sets the operate_time of this CollateralRecord.
- 操作时间,时间戳,单位秒 # noqa: E501
+ Operation time, timestamp in seconds # noqa: E501
:param operate_time: The operate_time of this CollateralRecord. # noqa: E501
:type: int
@@ -348,16 +335,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/contract.py b/gate_api/models/contract.py
index ebd2f2c..557f6ce 100644
--- a/gate_api/models/contract.py
+++ b/gate_api/models/contract.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -68,6 +68,11 @@ class Contract(object):
'enable_bonus': 'bool',
'enable_credit': 'bool',
'create_time': 'float',
+ 'funding_cap_ratio': 'str',
+ 'status': 'str',
+ 'launch_time': 'int',
+ 'delisting_time': 'int',
+ 'delisted_time': 'int'
}
attribute_map = {
@@ -106,48 +111,15 @@ class Contract(object):
'enable_bonus': 'enable_bonus',
'enable_credit': 'enable_credit',
'create_time': 'create_time',
+ 'funding_cap_ratio': 'funding_cap_ratio',
+ 'status': 'status',
+ 'launch_time': 'launch_time',
+ 'delisting_time': 'delisting_time',
+ 'delisted_time': 'delisted_time'
}
- def __init__(
- self,
- name=None,
- type=None,
- quanto_multiplier=None,
- leverage_min=None,
- leverage_max=None,
- maintenance_rate=None,
- mark_type=None,
- mark_price=None,
- index_price=None,
- last_price=None,
- maker_fee_rate=None,
- taker_fee_rate=None,
- order_price_round=None,
- mark_price_round=None,
- funding_rate=None,
- funding_interval=None,
- funding_next_apply=None,
- risk_limit_base=None,
- risk_limit_step=None,
- risk_limit_max=None,
- order_size_min=None,
- order_size_max=None,
- order_price_deviate=None,
- ref_discount_rate=None,
- ref_rebate_rate=None,
- orderbook_id=None,
- trade_id=None,
- trade_size=None,
- position_size=None,
- config_change_time=None,
- in_delisting=None,
- orders_limit=None,
- enable_bonus=None,
- enable_credit=None,
- create_time=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, float, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, bool, bool, float, Configuration) -> None
+ def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=None, leverage_max=None, maintenance_rate=None, mark_type=None, mark_price=None, index_price=None, last_price=None, maker_fee_rate=None, taker_fee_rate=None, order_price_round=None, mark_price_round=None, funding_rate=None, funding_interval=None, funding_next_apply=None, risk_limit_base=None, risk_limit_step=None, risk_limit_max=None, order_size_min=None, order_size_max=None, order_price_deviate=None, ref_discount_rate=None, ref_rebate_rate=None, orderbook_id=None, trade_id=None, trade_size=None, position_size=None, config_change_time=None, in_delisting=None, orders_limit=None, enable_bonus=None, enable_credit=None, create_time=None, funding_cap_ratio=None, status=None, launch_time=None, delisting_time=None, delisted_time=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, float, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, bool, bool, float, str, str, int, int, int, Configuration) -> None
"""Contract - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -188,6 +160,11 @@ def __init__(
self._enable_bonus = None
self._enable_credit = None
self._create_time = None
+ self._funding_cap_ratio = None
+ self._status = None
+ self._launch_time = None
+ self._delisting_time = None
+ self._delisted_time = None
self.discriminator = None
if name is not None:
@@ -260,6 +237,16 @@ def __init__(
self.enable_credit = enable_credit
if create_time is not None:
self.create_time = create_time
+ if funding_cap_ratio is not None:
+ self.funding_cap_ratio = funding_cap_ratio
+ if status is not None:
+ self.status = status
+ if launch_time is not None:
+ self.launch_time = launch_time
+ if delisting_time is not None:
+ self.delisting_time = delisting_time
+ if delisted_time is not None:
+ self.delisted_time = delisted_time
@property
def name(self):
@@ -288,7 +275,7 @@ def name(self, name):
def type(self):
"""Gets the type of this Contract. # noqa: E501
- Futures contract type # noqa: E501
+ Contract type: inverse - inverse contract, direct - direct contract # noqa: E501
:return: The type of this Contract. # noqa: E501
:rtype: str
@@ -299,7 +286,7 @@ def type(self):
def type(self, type):
"""Sets the type of this Contract.
- Futures contract type # noqa: E501
+ Contract type: inverse - inverse contract, direct - direct contract # noqa: E501
:param type: The type of this Contract. # noqa: E501
:type: str
@@ -307,7 +294,8 @@ def type(self, type):
allowed_values = ["inverse", "direct"] # noqa: E501
if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `type` ({0}), must be one of {1}".format(type, allowed_values) # noqa: E501
+ "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
+ .format(type, allowed_values)
)
self._type = type
@@ -408,7 +396,7 @@ def maintenance_rate(self, maintenance_rate):
def mark_type(self):
"""Gets the mark_type of this Contract. # noqa: E501
- Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501
+ Mark price type: internal - internal trading price, index - external index price # noqa: E501
:return: The mark_type of this Contract. # noqa: E501
:rtype: str
@@ -419,7 +407,7 @@ def mark_type(self):
def mark_type(self, mark_type):
"""Sets the mark_type of this Contract.
- Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501
+ Mark price type: internal - internal trading price, index - external index price # noqa: E501
:param mark_type: The mark_type of this Contract. # noqa: E501
:type: str
@@ -427,9 +415,8 @@ def mark_type(self, mark_type):
allowed_values = ["internal", "index"] # noqa: E501
if self.local_vars_configuration.client_side_validation and mark_type not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `mark_type` ({0}), must be one of {1}".format( # noqa: E501
- mark_type, allowed_values
- )
+ "Invalid value for `mark_type` ({0}), must be one of {1}" # noqa: E501
+ .format(mark_type, allowed_values)
)
self._mark_type = mark_type
@@ -507,7 +494,7 @@ def last_price(self, last_price):
def maker_fee_rate(self):
"""Gets the maker_fee_rate of this Contract. # noqa: E501
- Maker fee rate, where negative means rebate # noqa: E501
+ Maker fee rate, negative values indicate rebates # noqa: E501
:return: The maker_fee_rate of this Contract. # noqa: E501
:rtype: str
@@ -518,7 +505,7 @@ def maker_fee_rate(self):
def maker_fee_rate(self, maker_fee_rate):
"""Sets the maker_fee_rate of this Contract.
- Maker fee rate, where negative means rebate # noqa: E501
+ Maker fee rate, negative values indicate rebates # noqa: E501
:param maker_fee_rate: The maker_fee_rate of this Contract. # noqa: E501
:type: str
@@ -668,7 +655,7 @@ def funding_next_apply(self, funding_next_apply):
def risk_limit_base(self):
"""Gets the risk_limit_base of this Contract. # noqa: E501
- Risk limit base # noqa: E501
+ Base risk limit (deprecated) # noqa: E501
:return: The risk_limit_base of this Contract. # noqa: E501
:rtype: str
@@ -679,7 +666,7 @@ def risk_limit_base(self):
def risk_limit_base(self, risk_limit_base):
"""Sets the risk_limit_base of this Contract.
- Risk limit base # noqa: E501
+ Base risk limit (deprecated) # noqa: E501
:param risk_limit_base: The risk_limit_base of this Contract. # noqa: E501
:type: str
@@ -691,7 +678,7 @@ def risk_limit_base(self, risk_limit_base):
def risk_limit_step(self):
"""Gets the risk_limit_step of this Contract. # noqa: E501
- Step of adjusting risk limit # noqa: E501
+ Risk limit adjustment step (deprecated) # noqa: E501
:return: The risk_limit_step of this Contract. # noqa: E501
:rtype: str
@@ -702,7 +689,7 @@ def risk_limit_step(self):
def risk_limit_step(self, risk_limit_step):
"""Sets the risk_limit_step of this Contract.
- Step of adjusting risk limit # noqa: E501
+ Risk limit adjustment step (deprecated) # noqa: E501
:param risk_limit_step: The risk_limit_step of this Contract. # noqa: E501
:type: str
@@ -714,7 +701,7 @@ def risk_limit_step(self, risk_limit_step):
def risk_limit_max(self):
"""Gets the risk_limit_max of this Contract. # noqa: E501
- Maximum risk limit the contract allowed # noqa: E501
+ Maximum risk limit allowed by the contract (deprecated). It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits # noqa: E501
:return: The risk_limit_max of this Contract. # noqa: E501
:rtype: str
@@ -725,7 +712,7 @@ def risk_limit_max(self):
def risk_limit_max(self, risk_limit_max):
"""Sets the risk_limit_max of this Contract.
- Maximum risk limit the contract allowed # noqa: E501
+ Maximum risk limit allowed by the contract (deprecated). It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits # noqa: E501
:param risk_limit_max: The risk_limit_max of this Contract. # noqa: E501
:type: str
@@ -737,7 +724,7 @@ def risk_limit_max(self, risk_limit_max):
def order_size_min(self):
"""Gets the order_size_min of this Contract. # noqa: E501
- Minimum order size the contract allowed # noqa: E501
+ Minimum order size allowed by the contract # noqa: E501
:return: The order_size_min of this Contract. # noqa: E501
:rtype: int
@@ -748,7 +735,7 @@ def order_size_min(self):
def order_size_min(self, order_size_min):
"""Sets the order_size_min of this Contract.
- Minimum order size the contract allowed # noqa: E501
+ Minimum order size allowed by the contract # noqa: E501
:param order_size_min: The order_size_min of this Contract. # noqa: E501
:type: int
@@ -760,7 +747,7 @@ def order_size_min(self, order_size_min):
def order_size_max(self):
"""Gets the order_size_max of this Contract. # noqa: E501
- Maximum order size the contract allowed # noqa: E501
+ Maximum order size allowed by the contract # noqa: E501
:return: The order_size_max of this Contract. # noqa: E501
:rtype: int
@@ -771,7 +758,7 @@ def order_size_max(self):
def order_size_max(self, order_size_max):
"""Sets the order_size_max of this Contract.
- Maximum order size the contract allowed # noqa: E501
+ Maximum order size allowed by the contract # noqa: E501
:param order_size_max: The order_size_max of this Contract. # noqa: E501
:type: int
@@ -783,7 +770,7 @@ def order_size_max(self, order_size_max):
def order_price_deviate(self):
"""Gets the order_price_deviate of this Contract. # noqa: E501
- deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501
+ Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501
:return: The order_price_deviate of this Contract. # noqa: E501
:rtype: str
@@ -794,7 +781,7 @@ def order_price_deviate(self):
def order_price_deviate(self, order_price_deviate):
"""Sets the order_price_deviate of this Contract.
- deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501
+ Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501
:param order_price_deviate: The order_price_deviate of this Contract. # noqa: E501
:type: str
@@ -806,7 +793,7 @@ def order_price_deviate(self, order_price_deviate):
def ref_discount_rate(self):
"""Gets the ref_discount_rate of this Contract. # noqa: E501
- Referral fee rate discount # noqa: E501
+ Trading fee discount for referred users # noqa: E501
:return: The ref_discount_rate of this Contract. # noqa: E501
:rtype: str
@@ -817,7 +804,7 @@ def ref_discount_rate(self):
def ref_discount_rate(self, ref_discount_rate):
"""Sets the ref_discount_rate of this Contract.
- Referral fee rate discount # noqa: E501
+ Trading fee discount for referred users # noqa: E501
:param ref_discount_rate: The ref_discount_rate of this Contract. # noqa: E501
:type: str
@@ -829,7 +816,7 @@ def ref_discount_rate(self, ref_discount_rate):
def ref_rebate_rate(self):
"""Gets the ref_rebate_rate of this Contract. # noqa: E501
- Referrer commission rate # noqa: E501
+ Commission rate for referrers # noqa: E501
:return: The ref_rebate_rate of this Contract. # noqa: E501
:rtype: str
@@ -840,7 +827,7 @@ def ref_rebate_rate(self):
def ref_rebate_rate(self, ref_rebate_rate):
"""Sets the ref_rebate_rate of this Contract.
- Referrer commission rate # noqa: E501
+ Commission rate for referrers # noqa: E501
:param ref_rebate_rate: The ref_rebate_rate of this Contract. # noqa: E501
:type: str
@@ -852,7 +839,7 @@ def ref_rebate_rate(self, ref_rebate_rate):
def orderbook_id(self):
"""Gets the orderbook_id of this Contract. # noqa: E501
- Current orderbook ID # noqa: E501
+ Orderbook update ID # noqa: E501
:return: The orderbook_id of this Contract. # noqa: E501
:rtype: int
@@ -863,7 +850,7 @@ def orderbook_id(self):
def orderbook_id(self, orderbook_id):
"""Sets the orderbook_id of this Contract.
- Current orderbook ID # noqa: E501
+ Orderbook update ID # noqa: E501
:param orderbook_id: The orderbook_id of this Contract. # noqa: E501
:type: int
@@ -898,7 +885,7 @@ def trade_id(self, trade_id):
def trade_size(self):
"""Gets the trade_size of this Contract. # noqa: E501
- Historical accumulated trade size # noqa: E501
+ Historical cumulative trading volume # noqa: E501
:return: The trade_size of this Contract. # noqa: E501
:rtype: int
@@ -909,7 +896,7 @@ def trade_size(self):
def trade_size(self, trade_size):
"""Sets the trade_size of this Contract.
- Historical accumulated trade size # noqa: E501
+ Historical cumulative trading volume # noqa: E501
:param trade_size: The trade_size of this Contract. # noqa: E501
:type: int
@@ -944,7 +931,7 @@ def position_size(self, position_size):
def config_change_time(self):
"""Gets the config_change_time of this Contract. # noqa: E501
- Last changed time of configuration # noqa: E501
+ Last configuration update time # noqa: E501
:return: The config_change_time of this Contract. # noqa: E501
:rtype: float
@@ -955,7 +942,7 @@ def config_change_time(self):
def config_change_time(self, config_change_time):
"""Sets the config_change_time of this Contract.
- Last changed time of configuration # noqa: E501
+ Last configuration update time # noqa: E501
:param config_change_time: The config_change_time of this Contract. # noqa: E501
:type: float
@@ -967,7 +954,7 @@ def config_change_time(self, config_change_time):
def in_delisting(self):
"""Gets the in_delisting of this Contract. # noqa: E501
- Contract is delisting # noqa: E501
+ `in_delisting=true` and position_size>0 indicates the contract is in delisting transition period `in_delisting=true` and position_size=0 indicates the contract is delisted # noqa: E501
:return: The in_delisting of this Contract. # noqa: E501
:rtype: bool
@@ -978,7 +965,7 @@ def in_delisting(self):
def in_delisting(self, in_delisting):
"""Sets the in_delisting of this Contract.
- Contract is delisting # noqa: E501
+ `in_delisting=true` and position_size>0 indicates the contract is in delisting transition period `in_delisting=true` and position_size=0 indicates the contract is delisted # noqa: E501
:param in_delisting: The in_delisting of this Contract. # noqa: E501
:type: bool
@@ -990,7 +977,7 @@ def in_delisting(self, in_delisting):
def orders_limit(self):
"""Gets the orders_limit of this Contract. # noqa: E501
- Maximum number of open orders # noqa: E501
+ Maximum number of pending orders # noqa: E501
:return: The orders_limit of this Contract. # noqa: E501
:rtype: int
@@ -1001,7 +988,7 @@ def orders_limit(self):
def orders_limit(self, orders_limit):
"""Sets the orders_limit of this Contract.
- Maximum number of open orders # noqa: E501
+ Maximum number of pending orders # noqa: E501
:param orders_limit: The orders_limit of this Contract. # noqa: E501
:type: int
@@ -1013,7 +1000,7 @@ def orders_limit(self, orders_limit):
def enable_bonus(self):
"""Gets the enable_bonus of this Contract. # noqa: E501
- Whether bouns is enabled # noqa: E501
+ Whether bonus is enabled # noqa: E501
:return: The enable_bonus of this Contract. # noqa: E501
:rtype: bool
@@ -1024,7 +1011,7 @@ def enable_bonus(self):
def enable_bonus(self, enable_bonus):
"""Sets the enable_bonus of this Contract.
- Whether bouns is enabled # noqa: E501
+ Whether bonus is enabled # noqa: E501
:param enable_bonus: The enable_bonus of this Contract. # noqa: E501
:type: bool
@@ -1078,6 +1065,121 @@ def create_time(self, create_time):
self._create_time = create_time
+ @property
+ def funding_cap_ratio(self):
+ """Gets the funding_cap_ratio of this Contract. # noqa: E501
+
+ The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio # noqa: E501
+
+ :return: The funding_cap_ratio of this Contract. # noqa: E501
+ :rtype: str
+ """
+ return self._funding_cap_ratio
+
+ @funding_cap_ratio.setter
+ def funding_cap_ratio(self, funding_cap_ratio):
+ """Sets the funding_cap_ratio of this Contract.
+
+ The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio # noqa: E501
+
+ :param funding_cap_ratio: The funding_cap_ratio of this Contract. # noqa: E501
+ :type: str
+ """
+
+ self._funding_cap_ratio = funding_cap_ratio
+
+ @property
+ def status(self):
+ """Gets the status of this Contract. # noqa: E501
+
+ Contract status types include: prelaunch (pre-launch), trading (active), delisting (delisting), delisted (delisted), circuit_breaker (circuit breaker) # noqa: E501
+
+ :return: The status of this Contract. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this Contract.
+
+ Contract status types include: prelaunch (pre-launch), trading (active), delisting (delisting), delisted (delisted), circuit_breaker (circuit breaker) # noqa: E501
+
+ :param status: The status of this Contract. # noqa: E501
+ :type: str
+ """
+
+ self._status = status
+
+ @property
+ def launch_time(self):
+ """Gets the launch_time of this Contract. # noqa: E501
+
+ Contract expiry timestamp # noqa: E501
+
+ :return: The launch_time of this Contract. # noqa: E501
+ :rtype: int
+ """
+ return self._launch_time
+
+ @launch_time.setter
+ def launch_time(self, launch_time):
+ """Sets the launch_time of this Contract.
+
+ Contract expiry timestamp # noqa: E501
+
+ :param launch_time: The launch_time of this Contract. # noqa: E501
+ :type: int
+ """
+
+ self._launch_time = launch_time
+
+ @property
+ def delisting_time(self):
+ """Gets the delisting_time of this Contract. # noqa: E501
+
+ Timestamp when contract enters reduce-only state # noqa: E501
+
+ :return: The delisting_time of this Contract. # noqa: E501
+ :rtype: int
+ """
+ return self._delisting_time
+
+ @delisting_time.setter
+ def delisting_time(self, delisting_time):
+ """Sets the delisting_time of this Contract.
+
+ Timestamp when contract enters reduce-only state # noqa: E501
+
+ :param delisting_time: The delisting_time of this Contract. # noqa: E501
+ :type: int
+ """
+
+ self._delisting_time = delisting_time
+
+ @property
+ def delisted_time(self):
+ """Gets the delisted_time of this Contract. # noqa: E501
+
+ Contract delisting time # noqa: E501
+
+ :return: The delisted_time of this Contract. # noqa: E501
+ :rtype: int
+ """
+ return self._delisted_time
+
+ @delisted_time.setter
+ def delisted_time(self, delisted_time):
+ """Sets the delisted_time of this Contract.
+
+ Contract delisting time # noqa: E501
+
+ :param delisted_time: The delisted_time of this Contract. # noqa: E501
+ :type: int
+ """
+
+ self._delisted_time = delisted_time
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -1085,16 +1187,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/contract_stat.py b/gate_api/models/contract_stat.py
index c145b2b..cac370c 100644
--- a/gate_api/models/contract_stat.py
+++ b/gate_api/models/contract_stat.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -46,6 +46,7 @@ class ContractStat(object):
'open_interest_usd': 'float',
'top_lsr_account': 'float',
'top_lsr_size': 'float',
+ 'mark_price': 'float'
}
attribute_map = {
@@ -62,26 +63,11 @@ class ContractStat(object):
'open_interest_usd': 'open_interest_usd',
'top_lsr_account': 'top_lsr_account',
'top_lsr_size': 'top_lsr_size',
+ 'mark_price': 'mark_price'
}
- def __init__(
- self,
- time=None,
- lsr_taker=None,
- lsr_account=None,
- long_liq_size=None,
- long_liq_amount=None,
- long_liq_usd=None,
- short_liq_size=None,
- short_liq_amount=None,
- short_liq_usd=None,
- open_interest=None,
- open_interest_usd=None,
- top_lsr_account=None,
- top_lsr_size=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, float, float, int, float, float, int, float, float, int, float, float, float, Configuration) -> None
+ def __init__(self, time=None, lsr_taker=None, lsr_account=None, long_liq_size=None, long_liq_amount=None, long_liq_usd=None, short_liq_size=None, short_liq_amount=None, short_liq_usd=None, open_interest=None, open_interest_usd=None, top_lsr_account=None, top_lsr_size=None, mark_price=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, float, float, int, float, float, int, float, float, int, float, float, float, float, Configuration) -> None
"""ContractStat - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -100,6 +86,7 @@ def __init__(
self._open_interest_usd = None
self._top_lsr_account = None
self._top_lsr_size = None
+ self._mark_price = None
self.discriminator = None
if time is not None:
@@ -128,6 +115,8 @@ def __init__(
self.top_lsr_account = top_lsr_account
if top_lsr_size is not None:
self.top_lsr_size = top_lsr_size
+ if mark_price is not None:
+ self.mark_price = mark_price
@property
def time(self):
@@ -156,7 +145,7 @@ def time(self, time):
def lsr_taker(self):
"""Gets the lsr_taker of this ContractStat. # noqa: E501
- Long/short account number ratio # noqa: E501
+ Long/short taker ratio # noqa: E501
:return: The lsr_taker of this ContractStat. # noqa: E501
:rtype: float
@@ -167,7 +156,7 @@ def lsr_taker(self):
def lsr_taker(self, lsr_taker):
"""Sets the lsr_taker of this ContractStat.
- Long/short account number ratio # noqa: E501
+ Long/short taker ratio # noqa: E501
:param lsr_taker: The lsr_taker of this ContractStat. # noqa: E501
:type: float
@@ -179,7 +168,7 @@ def lsr_taker(self, lsr_taker):
def lsr_account(self):
"""Gets the lsr_account of this ContractStat. # noqa: E501
- Long/short taker size ratio # noqa: E501
+ Long/short position user ratio # noqa: E501
:return: The lsr_account of this ContractStat. # noqa: E501
:rtype: float
@@ -190,7 +179,7 @@ def lsr_account(self):
def lsr_account(self, lsr_account):
"""Sets the lsr_account of this ContractStat.
- Long/short taker size ratio # noqa: E501
+ Long/short position user ratio # noqa: E501
:param lsr_account: The lsr_account of this ContractStat. # noqa: E501
:type: float
@@ -202,7 +191,7 @@ def lsr_account(self, lsr_account):
def long_liq_size(self):
"""Gets the long_liq_size of this ContractStat. # noqa: E501
- Long liquidation size # noqa: E501
+ Long liquidation size (contracts) # noqa: E501
:return: The long_liq_size of this ContractStat. # noqa: E501
:rtype: int
@@ -213,7 +202,7 @@ def long_liq_size(self):
def long_liq_size(self, long_liq_size):
"""Sets the long_liq_size of this ContractStat.
- Long liquidation size # noqa: E501
+ Long liquidation size (contracts) # noqa: E501
:param long_liq_size: The long_liq_size of this ContractStat. # noqa: E501
:type: int
@@ -225,7 +214,7 @@ def long_liq_size(self, long_liq_size):
def long_liq_amount(self):
"""Gets the long_liq_amount of this ContractStat. # noqa: E501
- Long liquidation amount(base currency) # noqa: E501
+ Long liquidation amount (base currency) # noqa: E501
:return: The long_liq_amount of this ContractStat. # noqa: E501
:rtype: float
@@ -236,7 +225,7 @@ def long_liq_amount(self):
def long_liq_amount(self, long_liq_amount):
"""Sets the long_liq_amount of this ContractStat.
- Long liquidation amount(base currency) # noqa: E501
+ Long liquidation amount (base currency) # noqa: E501
:param long_liq_amount: The long_liq_amount of this ContractStat. # noqa: E501
:type: float
@@ -248,7 +237,7 @@ def long_liq_amount(self, long_liq_amount):
def long_liq_usd(self):
"""Gets the long_liq_usd of this ContractStat. # noqa: E501
- Long liquidation volume(quote currency) # noqa: E501
+ Long liquidation volume (quote currency) # noqa: E501
:return: The long_liq_usd of this ContractStat. # noqa: E501
:rtype: float
@@ -259,7 +248,7 @@ def long_liq_usd(self):
def long_liq_usd(self, long_liq_usd):
"""Sets the long_liq_usd of this ContractStat.
- Long liquidation volume(quote currency) # noqa: E501
+ Long liquidation volume (quote currency) # noqa: E501
:param long_liq_usd: The long_liq_usd of this ContractStat. # noqa: E501
:type: float
@@ -271,7 +260,7 @@ def long_liq_usd(self, long_liq_usd):
def short_liq_size(self):
"""Gets the short_liq_size of this ContractStat. # noqa: E501
- Short liquidation size # noqa: E501
+ Short liquidation size (contracts) # noqa: E501
:return: The short_liq_size of this ContractStat. # noqa: E501
:rtype: int
@@ -282,7 +271,7 @@ def short_liq_size(self):
def short_liq_size(self, short_liq_size):
"""Sets the short_liq_size of this ContractStat.
- Short liquidation size # noqa: E501
+ Short liquidation size (contracts) # noqa: E501
:param short_liq_size: The short_liq_size of this ContractStat. # noqa: E501
:type: int
@@ -294,7 +283,7 @@ def short_liq_size(self, short_liq_size):
def short_liq_amount(self):
"""Gets the short_liq_amount of this ContractStat. # noqa: E501
- Short liquidation amount(base currency) # noqa: E501
+ Short liquidation amount (base currency) # noqa: E501
:return: The short_liq_amount of this ContractStat. # noqa: E501
:rtype: float
@@ -305,7 +294,7 @@ def short_liq_amount(self):
def short_liq_amount(self, short_liq_amount):
"""Sets the short_liq_amount of this ContractStat.
- Short liquidation amount(base currency) # noqa: E501
+ Short liquidation amount (base currency) # noqa: E501
:param short_liq_amount: The short_liq_amount of this ContractStat. # noqa: E501
:type: float
@@ -317,7 +306,7 @@ def short_liq_amount(self, short_liq_amount):
def short_liq_usd(self):
"""Gets the short_liq_usd of this ContractStat. # noqa: E501
- Short liquidation volume(quote currency) # noqa: E501
+ Short liquidation volume (quote currency) # noqa: E501
:return: The short_liq_usd of this ContractStat. # noqa: E501
:rtype: float
@@ -328,7 +317,7 @@ def short_liq_usd(self):
def short_liq_usd(self, short_liq_usd):
"""Sets the short_liq_usd of this ContractStat.
- Short liquidation volume(quote currency) # noqa: E501
+ Short liquidation volume (quote currency) # noqa: E501
:param short_liq_usd: The short_liq_usd of this ContractStat. # noqa: E501
:type: float
@@ -340,7 +329,7 @@ def short_liq_usd(self, short_liq_usd):
def open_interest(self):
"""Gets the open_interest of this ContractStat. # noqa: E501
- Open interest size # noqa: E501
+ Total open interest size (contracts) # noqa: E501
:return: The open_interest of this ContractStat. # noqa: E501
:rtype: int
@@ -351,7 +340,7 @@ def open_interest(self):
def open_interest(self, open_interest):
"""Sets the open_interest of this ContractStat.
- Open interest size # noqa: E501
+ Total open interest size (contracts) # noqa: E501
:param open_interest: The open_interest of this ContractStat. # noqa: E501
:type: int
@@ -363,7 +352,7 @@ def open_interest(self, open_interest):
def open_interest_usd(self):
"""Gets the open_interest_usd of this ContractStat. # noqa: E501
- Open interest volume(quote currency) # noqa: E501
+ Total open interest volume (quote currency) # noqa: E501
:return: The open_interest_usd of this ContractStat. # noqa: E501
:rtype: float
@@ -374,7 +363,7 @@ def open_interest_usd(self):
def open_interest_usd(self, open_interest_usd):
"""Sets the open_interest_usd of this ContractStat.
- Open interest volume(quote currency) # noqa: E501
+ Total open interest volume (quote currency) # noqa: E501
:param open_interest_usd: The open_interest_usd of this ContractStat. # noqa: E501
:type: float
@@ -428,6 +417,29 @@ def top_lsr_size(self, top_lsr_size):
self._top_lsr_size = top_lsr_size
+ @property
+ def mark_price(self):
+ """Gets the mark_price of this ContractStat. # noqa: E501
+
+ Mark price # noqa: E501
+
+ :return: The mark_price of this ContractStat. # noqa: E501
+ :rtype: float
+ """
+ return self._mark_price
+
+ @mark_price.setter
+ def mark_price(self, mark_price):
+ """Sets the mark_price of this ContractStat.
+
+ Mark price # noqa: E501
+
+ :param mark_price: The mark_price of this ContractStat. # noqa: E501
+ :type: float
+ """
+
+ self._mark_price = mark_price
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -435,16 +447,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/convert_small_balance.py b/gate_api/models/convert_small_balance.py
new file mode 100644
index 0000000..dc47f37
--- /dev/null
+++ b/gate_api/models/convert_small_balance.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class ConvertSmallBalance(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'list[str]',
+ 'is_all': 'bool'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'is_all': 'is_all'
+ }
+
+ def __init__(self, currency=None, is_all=None, local_vars_configuration=None): # noqa: E501
+ # type: (list[str], bool, Configuration) -> None
+ """ConvertSmallBalance - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._is_all = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if is_all is not None:
+ self.is_all = is_all
+
+ @property
+ def currency(self):
+ """Gets the currency of this ConvertSmallBalance. # noqa: E501
+
+ Currency to be converted # noqa: E501
+
+ :return: The currency of this ConvertSmallBalance. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this ConvertSmallBalance.
+
+ Currency to be converted # noqa: E501
+
+ :param currency: The currency of this ConvertSmallBalance. # noqa: E501
+ :type: list[str]
+ """
+
+ self._currency = currency
+
+ @property
+ def is_all(self):
+ """Gets the is_all of this ConvertSmallBalance. # noqa: E501
+
+ Whether to convert all # noqa: E501
+
+ :return: The is_all of this ConvertSmallBalance. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_all
+
+ @is_all.setter
+ def is_all(self, is_all):
+ """Sets the is_all of this ConvertSmallBalance.
+
+ Whether to convert all # noqa: E501
+
+ :param is_all: The is_all of this ConvertSmallBalance. # noqa: E501
+ :type: bool
+ """
+
+ self._is_all = is_all
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ConvertSmallBalance):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, ConvertSmallBalance):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/countdown_cancel_all_futures_task.py b/gate_api/models/countdown_cancel_all_futures_task.py
index 9e20717..c927a3a 100644
--- a/gate_api/models/countdown_cancel_all_futures_task.py
+++ b/gate_api/models/countdown_cancel_all_futures_task.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class CountdownCancelAllFuturesTask(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'timeout': 'int', 'contract': 'str'}
+ openapi_types = {
+ 'timeout': 'int',
+ 'contract': 'str'
+ }
- attribute_map = {'timeout': 'timeout', 'contract': 'contract'}
+ attribute_map = {
+ 'timeout': 'timeout',
+ 'contract': 'contract'
+ }
def __init__(self, timeout=None, contract=None, local_vars_configuration=None): # noqa: E501
# type: (int, str, Configuration) -> None
@@ -55,7 +61,7 @@ def __init__(self, timeout=None, contract=None, local_vars_configuration=None):
def timeout(self):
"""Gets the timeout of this CountdownCancelAllFuturesTask. # noqa: E501
- Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501
+ Countdown time in seconds At least 5 seconds, 0 means cancel countdown # noqa: E501
:return: The timeout of this CountdownCancelAllFuturesTask. # noqa: E501
:rtype: int
@@ -66,7 +72,7 @@ def timeout(self):
def timeout(self, timeout):
"""Sets the timeout of this CountdownCancelAllFuturesTask.
- Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501
+ Countdown time in seconds At least 5 seconds, 0 means cancel countdown # noqa: E501
:param timeout: The timeout of this CountdownCancelAllFuturesTask. # noqa: E501
:type: int
@@ -106,16 +112,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/countdown_cancel_all_options_task.py b/gate_api/models/countdown_cancel_all_options_task.py
new file mode 100644
index 0000000..b221659
--- /dev/null
+++ b/gate_api/models/countdown_cancel_all_options_task.py
@@ -0,0 +1,180 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class CountdownCancelAllOptionsTask(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'timeout': 'int',
+ 'contract': 'str',
+ 'underlying': 'str'
+ }
+
+ attribute_map = {
+ 'timeout': 'timeout',
+ 'contract': 'contract',
+ 'underlying': 'underlying'
+ }
+
+ def __init__(self, timeout=None, contract=None, underlying=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, Configuration) -> None
+ """CountdownCancelAllOptionsTask - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._timeout = None
+ self._contract = None
+ self._underlying = None
+ self.discriminator = None
+
+ self.timeout = timeout
+ if contract is not None:
+ self.contract = contract
+ if underlying is not None:
+ self.underlying = underlying
+
+ @property
+ def timeout(self):
+ """Gets the timeout of this CountdownCancelAllOptionsTask. # noqa: E501
+
+ Countdown time in seconds At least 5 seconds, 0 means cancel countdown # noqa: E501
+
+ :return: The timeout of this CountdownCancelAllOptionsTask. # noqa: E501
+ :rtype: int
+ """
+ return self._timeout
+
+ @timeout.setter
+ def timeout(self, timeout):
+ """Sets the timeout of this CountdownCancelAllOptionsTask.
+
+ Countdown time in seconds At least 5 seconds, 0 means cancel countdown # noqa: E501
+
+ :param timeout: The timeout of this CountdownCancelAllOptionsTask. # noqa: E501
+ :type: int
+ """
+ if self.local_vars_configuration.client_side_validation and timeout is None: # noqa: E501
+ raise ValueError("Invalid value for `timeout`, must not be `None`") # noqa: E501
+
+ self._timeout = timeout
+
+ @property
+ def contract(self):
+ """Gets the contract of this CountdownCancelAllOptionsTask. # noqa: E501
+
+ Options contract name # noqa: E501
+
+ :return: The contract of this CountdownCancelAllOptionsTask. # noqa: E501
+ :rtype: str
+ """
+ return self._contract
+
+ @contract.setter
+ def contract(self, contract):
+ """Sets the contract of this CountdownCancelAllOptionsTask.
+
+ Options contract name # noqa: E501
+
+ :param contract: The contract of this CountdownCancelAllOptionsTask. # noqa: E501
+ :type: str
+ """
+
+ self._contract = contract
+
+ @property
+ def underlying(self):
+ """Gets the underlying of this CountdownCancelAllOptionsTask. # noqa: E501
+
+ Underlying # noqa: E501
+
+ :return: The underlying of this CountdownCancelAllOptionsTask. # noqa: E501
+ :rtype: str
+ """
+ return self._underlying
+
+ @underlying.setter
+ def underlying(self, underlying):
+ """Sets the underlying of this CountdownCancelAllOptionsTask.
+
+ Underlying # noqa: E501
+
+ :param underlying: The underlying of this CountdownCancelAllOptionsTask. # noqa: E501
+ :type: str
+ """
+
+ self._underlying = underlying
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CountdownCancelAllOptionsTask):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, CountdownCancelAllOptionsTask):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/countdown_cancel_all_spot_task.py b/gate_api/models/countdown_cancel_all_spot_task.py
index 6764904..2761477 100644
--- a/gate_api/models/countdown_cancel_all_spot_task.py
+++ b/gate_api/models/countdown_cancel_all_spot_task.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class CountdownCancelAllSpotTask(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'timeout': 'int', 'currency_pair': 'str'}
+ openapi_types = {
+ 'timeout': 'int',
+ 'currency_pair': 'str'
+ }
- attribute_map = {'timeout': 'timeout', 'currency_pair': 'currency_pair'}
+ attribute_map = {
+ 'timeout': 'timeout',
+ 'currency_pair': 'currency_pair'
+ }
def __init__(self, timeout=None, currency_pair=None, local_vars_configuration=None): # noqa: E501
# type: (int, str, Configuration) -> None
@@ -55,7 +61,7 @@ def __init__(self, timeout=None, currency_pair=None, local_vars_configuration=No
def timeout(self):
"""Gets the timeout of this CountdownCancelAllSpotTask. # noqa: E501
- Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501
+ Countdown time in seconds At least 5 seconds, 0 means cancel countdown # noqa: E501
:return: The timeout of this CountdownCancelAllSpotTask. # noqa: E501
:rtype: int
@@ -66,7 +72,7 @@ def timeout(self):
def timeout(self, timeout):
"""Sets the timeout of this CountdownCancelAllSpotTask.
- Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501
+ Countdown time in seconds At least 5 seconds, 0 means cancel countdown # noqa: E501
:param timeout: The timeout of this CountdownCancelAllSpotTask. # noqa: E501
:type: int
@@ -106,16 +112,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/create_collateral_order.py b/gate_api/models/create_collateral_order.py
index a5066a7..f570586 100644
--- a/gate_api/models/create_collateral_order.py
+++ b/gate_api/models/create_collateral_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -36,24 +36,17 @@ class CreateCollateralOrder(object):
'collateral_amount': 'str',
'collateral_currency': 'str',
'borrow_amount': 'str',
- 'borrow_currency': 'str',
+ 'borrow_currency': 'str'
}
attribute_map = {
'collateral_amount': 'collateral_amount',
'collateral_currency': 'collateral_currency',
'borrow_amount': 'borrow_amount',
- 'borrow_currency': 'borrow_currency',
+ 'borrow_currency': 'borrow_currency'
}
- def __init__(
- self,
- collateral_amount=None,
- collateral_currency=None,
- borrow_amount=None,
- borrow_currency=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, collateral_amount=None, collateral_currency=None, borrow_amount=None, borrow_currency=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, Configuration) -> None
"""CreateCollateralOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -75,7 +68,7 @@ def __init__(
def collateral_amount(self):
"""Gets the collateral_amount of this CreateCollateralOrder. # noqa: E501
- 质押数量 # noqa: E501
+ Collateral amount # noqa: E501
:return: The collateral_amount of this CreateCollateralOrder. # noqa: E501
:rtype: str
@@ -86,7 +79,7 @@ def collateral_amount(self):
def collateral_amount(self, collateral_amount):
"""Sets the collateral_amount of this CreateCollateralOrder.
- 质押数量 # noqa: E501
+ Collateral amount # noqa: E501
:param collateral_amount: The collateral_amount of this CreateCollateralOrder. # noqa: E501
:type: str
@@ -100,7 +93,7 @@ def collateral_amount(self, collateral_amount):
def collateral_currency(self):
"""Gets the collateral_currency of this CreateCollateralOrder. # noqa: E501
- 质押币种 # noqa: E501
+ Collateral currency # noqa: E501
:return: The collateral_currency of this CreateCollateralOrder. # noqa: E501
:rtype: str
@@ -111,7 +104,7 @@ def collateral_currency(self):
def collateral_currency(self, collateral_currency):
"""Sets the collateral_currency of this CreateCollateralOrder.
- 质押币种 # noqa: E501
+ Collateral currency # noqa: E501
:param collateral_currency: The collateral_currency of this CreateCollateralOrder. # noqa: E501
:type: str
@@ -125,7 +118,7 @@ def collateral_currency(self, collateral_currency):
def borrow_amount(self):
"""Gets the borrow_amount of this CreateCollateralOrder. # noqa: E501
- 借款数量 # noqa: E501
+ Borrowed amount # noqa: E501
:return: The borrow_amount of this CreateCollateralOrder. # noqa: E501
:rtype: str
@@ -136,7 +129,7 @@ def borrow_amount(self):
def borrow_amount(self, borrow_amount):
"""Sets the borrow_amount of this CreateCollateralOrder.
- 借款数量 # noqa: E501
+ Borrowed amount # noqa: E501
:param borrow_amount: The borrow_amount of this CreateCollateralOrder. # noqa: E501
:type: str
@@ -150,7 +143,7 @@ def borrow_amount(self, borrow_amount):
def borrow_currency(self):
"""Gets the borrow_currency of this CreateCollateralOrder. # noqa: E501
- 借款币种 # noqa: E501
+ Borrowed currency # noqa: E501
:return: The borrow_currency of this CreateCollateralOrder. # noqa: E501
:rtype: str
@@ -161,7 +154,7 @@ def borrow_currency(self):
def borrow_currency(self, borrow_currency):
"""Sets the borrow_currency of this CreateCollateralOrder.
- 借款币种 # noqa: E501
+ Borrowed currency # noqa: E501
:param borrow_currency: The borrow_currency of this CreateCollateralOrder. # noqa: E501
:type: str
@@ -178,16 +171,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/create_multi_collateral_order.py b/gate_api/models/create_multi_collateral_order.py
new file mode 100644
index 0000000..b3cc035
--- /dev/null
+++ b/gate_api/models/create_multi_collateral_order.py
@@ -0,0 +1,349 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class CreateMultiCollateralOrder(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'order_id': 'str',
+ 'order_type': 'str',
+ 'fixed_type': 'str',
+ 'fixed_rate': 'str',
+ 'auto_renew': 'bool',
+ 'auto_repay': 'bool',
+ 'borrow_currency': 'str',
+ 'borrow_amount': 'str',
+ 'collateral_currencies': 'list[CollateralCurrency]'
+ }
+
+ attribute_map = {
+ 'order_id': 'order_id',
+ 'order_type': 'order_type',
+ 'fixed_type': 'fixed_type',
+ 'fixed_rate': 'fixed_rate',
+ 'auto_renew': 'auto_renew',
+ 'auto_repay': 'auto_repay',
+ 'borrow_currency': 'borrow_currency',
+ 'borrow_amount': 'borrow_amount',
+ 'collateral_currencies': 'collateral_currencies'
+ }
+
+ def __init__(self, order_id=None, order_type=None, fixed_type=None, fixed_rate=None, auto_renew=None, auto_repay=None, borrow_currency=None, borrow_amount=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, bool, bool, str, str, list[CollateralCurrency], Configuration) -> None
+ """CreateMultiCollateralOrder - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._order_id = None
+ self._order_type = None
+ self._fixed_type = None
+ self._fixed_rate = None
+ self._auto_renew = None
+ self._auto_repay = None
+ self._borrow_currency = None
+ self._borrow_amount = None
+ self._collateral_currencies = None
+ self.discriminator = None
+
+ if order_id is not None:
+ self.order_id = order_id
+ if order_type is not None:
+ self.order_type = order_type
+ if fixed_type is not None:
+ self.fixed_type = fixed_type
+ if fixed_rate is not None:
+ self.fixed_rate = fixed_rate
+ if auto_renew is not None:
+ self.auto_renew = auto_renew
+ if auto_repay is not None:
+ self.auto_repay = auto_repay
+ self.borrow_currency = borrow_currency
+ self.borrow_amount = borrow_amount
+ if collateral_currencies is not None:
+ self.collateral_currencies = collateral_currencies
+
+ @property
+ def order_id(self):
+ """Gets the order_id of this CreateMultiCollateralOrder. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The order_id of this CreateMultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._order_id
+
+ @order_id.setter
+ def order_id(self, order_id):
+ """Sets the order_id of this CreateMultiCollateralOrder.
+
+ Order ID # noqa: E501
+
+ :param order_id: The order_id of this CreateMultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+
+ self._order_id = order_id
+
+ @property
+ def order_type(self):
+ """Gets the order_type of this CreateMultiCollateralOrder. # noqa: E501
+
+ current - current rate, fixed - fixed rate, defaults to current if not specified # noqa: E501
+
+ :return: The order_type of this CreateMultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._order_type
+
+ @order_type.setter
+ def order_type(self, order_type):
+ """Sets the order_type of this CreateMultiCollateralOrder.
+
+ current - current rate, fixed - fixed rate, defaults to current if not specified # noqa: E501
+
+ :param order_type: The order_type of this CreateMultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+
+ self._order_type = order_type
+
+ @property
+ def fixed_type(self):
+ """Gets the fixed_type of this CreateMultiCollateralOrder. # noqa: E501
+
+ Fixed interest rate lending period: 7d - 7 days, 30d - 30 days. Required for fixed rate # noqa: E501
+
+ :return: The fixed_type of this CreateMultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._fixed_type
+
+ @fixed_type.setter
+ def fixed_type(self, fixed_type):
+ """Sets the fixed_type of this CreateMultiCollateralOrder.
+
+ Fixed interest rate lending period: 7d - 7 days, 30d - 30 days. Required for fixed rate # noqa: E501
+
+ :param fixed_type: The fixed_type of this CreateMultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+
+ self._fixed_type = fixed_type
+
+ @property
+ def fixed_rate(self):
+ """Gets the fixed_rate of this CreateMultiCollateralOrder. # noqa: E501
+
+ Fixed interest rate, required for fixed rate # noqa: E501
+
+ :return: The fixed_rate of this CreateMultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._fixed_rate
+
+ @fixed_rate.setter
+ def fixed_rate(self, fixed_rate):
+ """Sets the fixed_rate of this CreateMultiCollateralOrder.
+
+ Fixed interest rate, required for fixed rate # noqa: E501
+
+ :param fixed_rate: The fixed_rate of this CreateMultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+
+ self._fixed_rate = fixed_rate
+
+ @property
+ def auto_renew(self):
+ """Gets the auto_renew of this CreateMultiCollateralOrder. # noqa: E501
+
+ Fixed interest rate, auto-renewal # noqa: E501
+
+ :return: The auto_renew of this CreateMultiCollateralOrder. # noqa: E501
+ :rtype: bool
+ """
+ return self._auto_renew
+
+ @auto_renew.setter
+ def auto_renew(self, auto_renew):
+ """Sets the auto_renew of this CreateMultiCollateralOrder.
+
+ Fixed interest rate, auto-renewal # noqa: E501
+
+ :param auto_renew: The auto_renew of this CreateMultiCollateralOrder. # noqa: E501
+ :type: bool
+ """
+
+ self._auto_renew = auto_renew
+
+ @property
+ def auto_repay(self):
+ """Gets the auto_repay of this CreateMultiCollateralOrder. # noqa: E501
+
+ Fixed interest rate, auto-repayment # noqa: E501
+
+ :return: The auto_repay of this CreateMultiCollateralOrder. # noqa: E501
+ :rtype: bool
+ """
+ return self._auto_repay
+
+ @auto_repay.setter
+ def auto_repay(self, auto_repay):
+ """Sets the auto_repay of this CreateMultiCollateralOrder.
+
+ Fixed interest rate, auto-repayment # noqa: E501
+
+ :param auto_repay: The auto_repay of this CreateMultiCollateralOrder. # noqa: E501
+ :type: bool
+ """
+
+ self._auto_repay = auto_repay
+
+ @property
+ def borrow_currency(self):
+ """Gets the borrow_currency of this CreateMultiCollateralOrder. # noqa: E501
+
+ Borrowed currency # noqa: E501
+
+ :return: The borrow_currency of this CreateMultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._borrow_currency
+
+ @borrow_currency.setter
+ def borrow_currency(self, borrow_currency):
+ """Sets the borrow_currency of this CreateMultiCollateralOrder.
+
+ Borrowed currency # noqa: E501
+
+ :param borrow_currency: The borrow_currency of this CreateMultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and borrow_currency is None: # noqa: E501
+ raise ValueError("Invalid value for `borrow_currency`, must not be `None`") # noqa: E501
+
+ self._borrow_currency = borrow_currency
+
+ @property
+ def borrow_amount(self):
+ """Gets the borrow_amount of this CreateMultiCollateralOrder. # noqa: E501
+
+ Borrowed amount # noqa: E501
+
+ :return: The borrow_amount of this CreateMultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._borrow_amount
+
+ @borrow_amount.setter
+ def borrow_amount(self, borrow_amount):
+ """Sets the borrow_amount of this CreateMultiCollateralOrder.
+
+ Borrowed amount # noqa: E501
+
+ :param borrow_amount: The borrow_amount of this CreateMultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and borrow_amount is None: # noqa: E501
+ raise ValueError("Invalid value for `borrow_amount`, must not be `None`") # noqa: E501
+
+ self._borrow_amount = borrow_amount
+
+ @property
+ def collateral_currencies(self):
+ """Gets the collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501
+
+ Collateral currency and amount # noqa: E501
+
+ :return: The collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501
+ :rtype: list[CollateralCurrency]
+ """
+ return self._collateral_currencies
+
+ @collateral_currencies.setter
+ def collateral_currencies(self, collateral_currencies):
+ """Sets the collateral_currencies of this CreateMultiCollateralOrder.
+
+ Collateral currency and amount # noqa: E501
+
+ :param collateral_currencies: The collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501
+ :type: list[CollateralCurrency]
+ """
+
+ self._collateral_currencies = collateral_currencies
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CreateMultiCollateralOrder):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, CreateMultiCollateralOrder):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/create_portfolio_spot_order.py b/gate_api/models/create_portfolio_spot_order.py
deleted file mode 100644
index a645f49..0000000
--- a/gate_api/models/create_portfolio_spot_order.py
+++ /dev/null
@@ -1,469 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class CreatePortfolioSpotOrder(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'text': 'str',
- 'amend_text': 'str',
- 'currency_pair': 'str',
- 'type': 'str',
- 'side': 'str',
- 'amount': 'str',
- 'price': 'str',
- 'time_in_force': 'str',
- 'iceberg': 'str',
- 'auto_borrow': 'bool',
- 'auto_repay': 'bool',
- 'stp_act': 'str',
- }
-
- attribute_map = {
- 'text': 'text',
- 'amend_text': 'amend_text',
- 'currency_pair': 'currency_pair',
- 'type': 'type',
- 'side': 'side',
- 'amount': 'amount',
- 'price': 'price',
- 'time_in_force': 'time_in_force',
- 'iceberg': 'iceberg',
- 'auto_borrow': 'auto_borrow',
- 'auto_repay': 'auto_repay',
- 'stp_act': 'stp_act',
- }
-
- def __init__(
- self,
- text=None,
- amend_text=None,
- currency_pair=None,
- type='limit',
- side=None,
- amount=None,
- price=None,
- time_in_force='gtc',
- iceberg=None,
- auto_borrow=None,
- auto_repay=None,
- stp_act=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, str, str, bool, bool, str, Configuration) -> None
- """CreatePortfolioSpotOrder - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._text = None
- self._amend_text = None
- self._currency_pair = None
- self._type = None
- self._side = None
- self._amount = None
- self._price = None
- self._time_in_force = None
- self._iceberg = None
- self._auto_borrow = None
- self._auto_repay = None
- self._stp_act = None
- self.discriminator = None
-
- if text is not None:
- self.text = text
- if amend_text is not None:
- self.amend_text = amend_text
- self.currency_pair = currency_pair
- if type is not None:
- self.type = type
- self.side = side
- self.amount = amount
- if price is not None:
- self.price = price
- if time_in_force is not None:
- self.time_in_force = time_in_force
- if iceberg is not None:
- self.iceberg = iceberg
- if auto_borrow is not None:
- self.auto_borrow = auto_borrow
- if auto_repay is not None:
- self.auto_repay = auto_repay
- if stp_act is not None:
- self.stp_act = stp_act
-
- @property
- def text(self):
- """Gets the text of this CreatePortfolioSpotOrder. # noqa: E501
-
- 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(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501
-
- :return: The text of this CreatePortfolioSpotOrder. # noqa: E501
- :rtype: str
- """
- return self._text
-
- @text.setter
- def text(self, text):
- """Sets the text of this CreatePortfolioSpotOrder.
-
- 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(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501
-
- :param text: The text of this CreatePortfolioSpotOrder. # noqa: E501
- :type: str
- """
-
- self._text = text
-
- @property
- def amend_text(self):
- """Gets the amend_text of this CreatePortfolioSpotOrder. # noqa: E501
-
- The custom data that the user remarked when amending the order # noqa: E501
-
- :return: The amend_text of this CreatePortfolioSpotOrder. # noqa: E501
- :rtype: str
- """
- return self._amend_text
-
- @amend_text.setter
- def amend_text(self, amend_text):
- """Sets the amend_text of this CreatePortfolioSpotOrder.
-
- The custom data that the user remarked when amending the order # noqa: E501
-
- :param amend_text: The amend_text of this CreatePortfolioSpotOrder. # noqa: E501
- :type: str
- """
-
- self._amend_text = amend_text
-
- @property
- def currency_pair(self):
- """Gets the currency_pair of this CreatePortfolioSpotOrder. # noqa: E501
-
- Currency pair # noqa: E501
-
- :return: The currency_pair of this CreatePortfolioSpotOrder. # noqa: E501
- :rtype: str
- """
- return self._currency_pair
-
- @currency_pair.setter
- def currency_pair(self, currency_pair):
- """Sets the currency_pair of this CreatePortfolioSpotOrder.
-
- Currency pair # noqa: E501
-
- :param currency_pair: The currency_pair of this CreatePortfolioSpotOrder. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501
- raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501
-
- self._currency_pair = currency_pair
-
- @property
- def type(self):
- """Gets the type of this CreatePortfolioSpotOrder. # noqa: E501
-
- Order Type - limit : Limit Order - market : Market Order # noqa: E501
-
- :return: The type of this CreatePortfolioSpotOrder. # noqa: E501
- :rtype: str
- """
- return self._type
-
- @type.setter
- def type(self, type):
- """Sets the type of this CreatePortfolioSpotOrder.
-
- Order Type - limit : Limit Order - market : Market Order # noqa: E501
-
- :param type: The type of this CreatePortfolioSpotOrder. # noqa: E501
- :type: str
- """
- allowed_values = ["limit", "market"] # noqa: E501
- if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
- raise ValueError(
- "Invalid value for `type` ({0}), must be one of {1}".format(type, allowed_values) # noqa: E501
- )
-
- self._type = type
-
- @property
- def side(self):
- """Gets the side of this CreatePortfolioSpotOrder. # noqa: E501
-
- Order side # noqa: E501
-
- :return: The side of this CreatePortfolioSpotOrder. # noqa: E501
- :rtype: str
- """
- return self._side
-
- @side.setter
- def side(self, side):
- """Sets the side of this CreatePortfolioSpotOrder.
-
- Order side # noqa: E501
-
- :param side: The side of this CreatePortfolioSpotOrder. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501
- raise ValueError("Invalid value for `side`, must not be `None`") # noqa: E501
- allowed_values = ["buy", "sell"] # noqa: E501
- if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501
- raise ValueError(
- "Invalid value for `side` ({0}), must be one of {1}".format(side, allowed_values) # noqa: E501
- )
-
- self._side = side
-
- @property
- def amount(self):
- """Gets the amount of this CreatePortfolioSpotOrder. # noqa: E501
-
- When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501
-
- :return: The amount of this CreatePortfolioSpotOrder. # noqa: E501
- :rtype: str
- """
- return self._amount
-
- @amount.setter
- def amount(self, amount):
- """Sets the amount of this CreatePortfolioSpotOrder.
-
- When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501
-
- :param amount: The amount of this CreatePortfolioSpotOrder. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501
- raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501
-
- self._amount = amount
-
- @property
- def price(self):
- """Gets the price of this CreatePortfolioSpotOrder. # noqa: E501
-
- Price can't be empty when `type`= `limit` # noqa: E501
-
- :return: The price of this CreatePortfolioSpotOrder. # noqa: E501
- :rtype: str
- """
- return self._price
-
- @price.setter
- def price(self, price):
- """Sets the price of this CreatePortfolioSpotOrder.
-
- Price can't be empty when `type`= `limit` # noqa: E501
-
- :param price: The price of this CreatePortfolioSpotOrder. # noqa: E501
- :type: str
- """
-
- self._price = price
-
- @property
- def time_in_force(self):
- """Gets the time_in_force of this CreatePortfolioSpotOrder. # noqa: E501
-
- Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501
-
- :return: The time_in_force of this CreatePortfolioSpotOrder. # noqa: E501
- :rtype: str
- """
- return self._time_in_force
-
- @time_in_force.setter
- def time_in_force(self, time_in_force):
- """Sets the time_in_force of this CreatePortfolioSpotOrder.
-
- Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501
-
- :param time_in_force: The time_in_force of this CreatePortfolioSpotOrder. # noqa: E501
- :type: str
- """
- allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501
- if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501
- raise ValueError(
- "Invalid value for `time_in_force` ({0}), must be one of {1}".format( # noqa: E501
- time_in_force, allowed_values
- )
- )
-
- self._time_in_force = time_in_force
-
- @property
- def iceberg(self):
- """Gets the iceberg of this CreatePortfolioSpotOrder. # noqa: E501
-
- Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501
-
- :return: The iceberg of this CreatePortfolioSpotOrder. # noqa: E501
- :rtype: str
- """
- return self._iceberg
-
- @iceberg.setter
- def iceberg(self, iceberg):
- """Sets the iceberg of this CreatePortfolioSpotOrder.
-
- Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501
-
- :param iceberg: The iceberg of this CreatePortfolioSpotOrder. # noqa: E501
- :type: str
- """
-
- self._iceberg = iceberg
-
- @property
- def auto_borrow(self):
- """Gets the auto_borrow of this CreatePortfolioSpotOrder. # noqa: E501
-
- When engaging in margin trading, if the account balance is insufficient, the system will automatically borrow the remaining amount to cover the deficit. # noqa: E501
-
- :return: The auto_borrow of this CreatePortfolioSpotOrder. # noqa: E501
- :rtype: bool
- """
- return self._auto_borrow
-
- @auto_borrow.setter
- def auto_borrow(self, auto_borrow):
- """Sets the auto_borrow of this CreatePortfolioSpotOrder.
-
- When engaging in margin trading, if the account balance is insufficient, the system will automatically borrow the remaining amount to cover the deficit. # noqa: E501
-
- :param auto_borrow: The auto_borrow of this CreatePortfolioSpotOrder. # noqa: E501
- :type: bool
- """
-
- self._auto_borrow = auto_borrow
-
- @property
- def auto_repay(self):
- """Gets the auto_repay of this CreatePortfolioSpotOrder. # noqa: E501
-
- Enable or disable automatic repayment for automatic borrow loan. Default is disabled. Note that: `auto_borrow` and `auto_repay` cannot be both set to true in one order. # noqa: E501
-
- :return: The auto_repay of this CreatePortfolioSpotOrder. # noqa: E501
- :rtype: bool
- """
- return self._auto_repay
-
- @auto_repay.setter
- def auto_repay(self, auto_repay):
- """Sets the auto_repay of this CreatePortfolioSpotOrder.
-
- Enable or disable automatic repayment for automatic borrow loan. Default is disabled. Note that: `auto_borrow` and `auto_repay` cannot be both set to true in one order. # noqa: E501
-
- :param auto_repay: The auto_repay of this CreatePortfolioSpotOrder. # noqa: E501
- :type: bool
- """
-
- self._auto_repay = auto_repay
-
- @property
- def stp_act(self):
- """Gets the stp_act of this CreatePortfolioSpotOrder. # noqa: E501
-
- 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 # noqa: E501
-
- :return: The stp_act of this CreatePortfolioSpotOrder. # noqa: E501
- :rtype: str
- """
- return self._stp_act
-
- @stp_act.setter
- def stp_act(self, stp_act):
- """Sets the stp_act of this CreatePortfolioSpotOrder.
-
- 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 # noqa: E501
-
- :param stp_act: The stp_act of this CreatePortfolioSpotOrder. # noqa: E501
- :type: str
- """
- allowed_values = ["cn", "co", "cb", "-"] # noqa: E501
- if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501
- raise ValueError(
- "Invalid value for `stp_act` ({0}), must be one of {1}".format(stp_act, allowed_values) # noqa: E501
- )
-
- self._stp_act = stp_act
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, CreatePortfolioSpotOrder):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, CreatePortfolioSpotOrder):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/create_uni_lend.py b/gate_api/models/create_uni_lend.py
index 96df236..ea40615 100644
--- a/gate_api/models/create_uni_lend.py
+++ b/gate_api/models/create_uni_lend.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,13 +32,21 @@ class CreateUniLend(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'amount': 'str', 'type': 'str', 'min_rate': 'str'}
-
- attribute_map = {'currency': 'currency', 'amount': 'amount', 'type': 'type', 'min_rate': 'min_rate'}
-
- def __init__(
- self, currency=None, amount=None, type=None, min_rate=None, local_vars_configuration=None
- ): # noqa: E501
+ openapi_types = {
+ 'currency': 'str',
+ 'amount': 'str',
+ 'type': 'str',
+ 'min_rate': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'amount': 'amount',
+ 'type': 'type',
+ 'min_rate': 'min_rate'
+ }
+
+ def __init__(self, currency=None, amount=None, type=None, min_rate=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, Configuration) -> None
"""CreateUniLend - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -86,7 +94,7 @@ def currency(self, currency):
def amount(self):
"""Gets the amount of this CreateUniLend. # noqa: E501
- The amount of currency could be lent # noqa: E501
+ Amount to deposit into lending pool # noqa: E501
:return: The amount of this CreateUniLend. # noqa: E501
:rtype: str
@@ -97,7 +105,7 @@ def amount(self):
def amount(self, amount):
"""Sets the amount of this CreateUniLend.
- The amount of currency could be lent # noqa: E501
+ Amount to deposit into lending pool # noqa: E501
:param amount: The amount of this CreateUniLend. # noqa: E501
:type: str
@@ -111,7 +119,7 @@ def amount(self, amount):
def type(self):
"""Gets the type of this CreateUniLend. # noqa: E501
- type: lend - lend, redeem - redeem # noqa: E501
+ Operation type: lend - Lend, redeem - Redeem # noqa: E501
:return: The type of this CreateUniLend. # noqa: E501
:rtype: str
@@ -122,7 +130,7 @@ def type(self):
def type(self, type):
"""Sets the type of this CreateUniLend.
- type: lend - lend, redeem - redeem # noqa: E501
+ Operation type: lend - Lend, redeem - Redeem # noqa: E501
:param type: The type of this CreateUniLend. # noqa: E501
:type: str
@@ -132,7 +140,8 @@ def type(self, type):
allowed_values = ["lend", "redeem"] # noqa: E501
if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `type` ({0}), must be one of {1}".format(type, allowed_values) # noqa: E501
+ "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
+ .format(type, allowed_values)
)
self._type = type
@@ -141,7 +150,7 @@ def type(self, type):
def min_rate(self):
"""Gets the min_rate of this CreateUniLend. # noqa: E501
- The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. # noqa: E501
+ Minimum interest rate. If set too high, lending may fail and no interest will be earned. Required for lending operations. # noqa: E501
:return: The min_rate of this CreateUniLend. # noqa: E501
:rtype: str
@@ -152,7 +161,7 @@ def min_rate(self):
def min_rate(self, min_rate):
"""Sets the min_rate of this CreateUniLend.
- The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. # noqa: E501
+ Minimum interest rate. If set too high, lending may fail and no interest will be earned. Required for lending operations. # noqa: E501
:param min_rate: The min_rate of this CreateUniLend. # noqa: E501
:type: str
@@ -167,16 +176,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/create_uni_loan.py b/gate_api/models/create_uni_loan.py
index e9b7eeb..708db4a 100644
--- a/gate_api/models/create_uni_loan.py
+++ b/gate_api/models/create_uni_loan.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,19 +32,23 @@ class CreateUniLoan(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'type': 'str', 'amount': 'str', 'repaid_all': 'bool', 'currency_pair': 'str'}
+ openapi_types = {
+ 'currency': 'str',
+ 'type': 'str',
+ 'amount': 'str',
+ 'repaid_all': 'bool',
+ 'currency_pair': 'str'
+ }
attribute_map = {
'currency': 'currency',
'type': 'type',
'amount': 'amount',
'repaid_all': 'repaid_all',
- 'currency_pair': 'currency_pair',
+ 'currency_pair': 'currency_pair'
}
- def __init__(
- self, currency=None, type=None, amount=None, repaid_all=None, currency_pair=None, local_vars_configuration=None
- ): # noqa: E501
+ def __init__(self, currency=None, type=None, amount=None, repaid_all=None, currency_pair=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, bool, str, Configuration) -> None
"""CreateUniLoan - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -94,7 +98,7 @@ def currency(self, currency):
def type(self):
"""Gets the type of this CreateUniLoan. # noqa: E501
- type: borrow - borrow, repay - repay # noqa: E501
+ Type: `borrow` - borrow, `repay` - repay # noqa: E501
:return: The type of this CreateUniLoan. # noqa: E501
:rtype: str
@@ -105,7 +109,7 @@ def type(self):
def type(self, type):
"""Sets the type of this CreateUniLoan.
- type: borrow - borrow, repay - repay # noqa: E501
+ Type: `borrow` - borrow, `repay` - repay # noqa: E501
:param type: The type of this CreateUniLoan. # noqa: E501
:type: str
@@ -115,7 +119,8 @@ def type(self, type):
allowed_values = ["borrow", "repay"] # noqa: E501
if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `type` ({0}), must be one of {1}".format(type, allowed_values) # noqa: E501
+ "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
+ .format(type, allowed_values)
)
self._type = type
@@ -124,7 +129,7 @@ def type(self, type):
def amount(self):
"""Gets the amount of this CreateUniLoan. # noqa: E501
- The amount of lending or repaying # noqa: E501
+ Borrow or repayment amount # noqa: E501
:return: The amount of this CreateUniLoan. # noqa: E501
:rtype: str
@@ -135,7 +140,7 @@ def amount(self):
def amount(self, amount):
"""Sets the amount of this CreateUniLoan.
- The amount of lending or repaying # noqa: E501
+ Borrow or repayment amount # noqa: E501
:param amount: The amount of this CreateUniLoan. # noqa: E501
:type: str
@@ -149,7 +154,7 @@ def amount(self, amount):
def repaid_all(self):
"""Gets the repaid_all of this CreateUniLoan. # noqa: E501
- Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. # noqa: E501
+ Full repayment. For repayment operations only. When `true`, overrides `amount` and repays the full amount # noqa: E501
:return: The repaid_all of this CreateUniLoan. # noqa: E501
:rtype: bool
@@ -160,7 +165,7 @@ def repaid_all(self):
def repaid_all(self, repaid_all):
"""Sets the repaid_all of this CreateUniLoan.
- Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. # noqa: E501
+ Full repayment. For repayment operations only. When `true`, overrides `amount` and repays the full amount # noqa: E501
:param repaid_all: The repaid_all of this CreateUniLoan. # noqa: E501
:type: bool
@@ -200,16 +205,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/cross_margin_account.py b/gate_api/models/cross_margin_account.py
deleted file mode 100644
index a4f66d4..0000000
--- a/gate_api/models/cross_margin_account.py
+++ /dev/null
@@ -1,587 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class CrossMarginAccount(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'user_id': 'int',
- 'refresh_time': 'int',
- 'locked': 'bool',
- 'balances': 'dict(str, CrossMarginBalance)',
- 'total': 'str',
- 'borrowed': 'str',
- 'interest': 'str',
- 'risk': 'str',
- 'total_initial_margin': 'str',
- 'total_margin_balance': 'str',
- 'total_maintenance_margin': 'str',
- 'total_initial_margin_rate': 'str',
- 'total_maintenance_margin_rate': 'str',
- 'total_available_margin': 'str',
- 'portfolio_margin_total': 'str',
- 'portfolio_margin_total_liab': 'str',
- 'portfolio_margin_total_equity': 'str',
- }
-
- attribute_map = {
- 'user_id': 'user_id',
- 'refresh_time': 'refresh_time',
- 'locked': 'locked',
- 'balances': 'balances',
- 'total': 'total',
- 'borrowed': 'borrowed',
- 'interest': 'interest',
- 'risk': 'risk',
- 'total_initial_margin': 'total_initial_margin',
- 'total_margin_balance': 'total_margin_balance',
- 'total_maintenance_margin': 'total_maintenance_margin',
- 'total_initial_margin_rate': 'total_initial_margin_rate',
- 'total_maintenance_margin_rate': 'total_maintenance_margin_rate',
- 'total_available_margin': 'total_available_margin',
- 'portfolio_margin_total': 'portfolio_margin_total',
- 'portfolio_margin_total_liab': 'portfolio_margin_total_liab',
- 'portfolio_margin_total_equity': 'portfolio_margin_total_equity',
- }
-
- def __init__(
- self,
- user_id=None,
- refresh_time=None,
- locked=None,
- balances=None,
- total=None,
- borrowed=None,
- interest=None,
- risk=None,
- total_initial_margin=None,
- total_margin_balance=None,
- total_maintenance_margin=None,
- total_initial_margin_rate=None,
- total_maintenance_margin_rate=None,
- total_available_margin=None,
- portfolio_margin_total=None,
- portfolio_margin_total_liab=None,
- portfolio_margin_total_equity=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, int, bool, dict(str, CrossMarginBalance), str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None
- """CrossMarginAccount - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._user_id = None
- self._refresh_time = None
- self._locked = None
- self._balances = None
- self._total = None
- self._borrowed = None
- self._interest = None
- self._risk = None
- self._total_initial_margin = None
- self._total_margin_balance = None
- self._total_maintenance_margin = None
- self._total_initial_margin_rate = None
- self._total_maintenance_margin_rate = None
- self._total_available_margin = None
- self._portfolio_margin_total = None
- self._portfolio_margin_total_liab = None
- self._portfolio_margin_total_equity = None
- self.discriminator = None
-
- if user_id is not None:
- self.user_id = user_id
- if refresh_time is not None:
- self.refresh_time = refresh_time
- if locked is not None:
- self.locked = locked
- if balances is not None:
- self.balances = balances
- if total is not None:
- self.total = total
- if borrowed is not None:
- self.borrowed = borrowed
- if interest is not None:
- self.interest = interest
- if risk is not None:
- self.risk = risk
- if total_initial_margin is not None:
- self.total_initial_margin = total_initial_margin
- if total_margin_balance is not None:
- self.total_margin_balance = total_margin_balance
- if total_maintenance_margin is not None:
- self.total_maintenance_margin = total_maintenance_margin
- if total_initial_margin_rate is not None:
- self.total_initial_margin_rate = total_initial_margin_rate
- if total_maintenance_margin_rate is not None:
- self.total_maintenance_margin_rate = total_maintenance_margin_rate
- if total_available_margin is not None:
- self.total_available_margin = total_available_margin
- if portfolio_margin_total is not None:
- self.portfolio_margin_total = portfolio_margin_total
- if portfolio_margin_total_liab is not None:
- self.portfolio_margin_total_liab = portfolio_margin_total_liab
- if portfolio_margin_total_equity is not None:
- self.portfolio_margin_total_equity = portfolio_margin_total_equity
-
- @property
- def user_id(self):
- """Gets the user_id of this CrossMarginAccount. # noqa: E501
-
- User ID # noqa: E501
-
- :return: The user_id of this CrossMarginAccount. # noqa: E501
- :rtype: int
- """
- return self._user_id
-
- @user_id.setter
- def user_id(self, user_id):
- """Sets the user_id of this CrossMarginAccount.
-
- User ID # noqa: E501
-
- :param user_id: The user_id of this CrossMarginAccount. # noqa: E501
- :type: int
- """
-
- self._user_id = user_id
-
- @property
- def refresh_time(self):
- """Gets the refresh_time of this CrossMarginAccount. # noqa: E501
-
- Time of the most recent refresh # noqa: E501
-
- :return: The refresh_time of this CrossMarginAccount. # noqa: E501
- :rtype: int
- """
- return self._refresh_time
-
- @refresh_time.setter
- def refresh_time(self, refresh_time):
- """Sets the refresh_time of this CrossMarginAccount.
-
- Time of the most recent refresh # noqa: E501
-
- :param refresh_time: The refresh_time of this CrossMarginAccount. # noqa: E501
- :type: int
- """
-
- self._refresh_time = refresh_time
-
- @property
- def locked(self):
- """Gets the locked of this CrossMarginAccount. # noqa: E501
-
- Whether account is locked # noqa: E501
-
- :return: The locked of this CrossMarginAccount. # noqa: E501
- :rtype: bool
- """
- return self._locked
-
- @locked.setter
- def locked(self, locked):
- """Sets the locked of this CrossMarginAccount.
-
- Whether account is locked # noqa: E501
-
- :param locked: The locked of this CrossMarginAccount. # noqa: E501
- :type: bool
- """
-
- self._locked = locked
-
- @property
- def balances(self):
- """Gets the balances of this CrossMarginAccount. # noqa: E501
-
-
- :return: The balances of this CrossMarginAccount. # noqa: E501
- :rtype: dict(str, CrossMarginBalance)
- """
- return self._balances
-
- @balances.setter
- def balances(self, balances):
- """Sets the balances of this CrossMarginAccount.
-
-
- :param balances: The balances of this CrossMarginAccount. # noqa: E501
- :type: dict(str, CrossMarginBalance)
- """
-
- self._balances = balances
-
- @property
- def total(self):
- """Gets the total of this CrossMarginAccount. # noqa: E501
-
- Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` # noqa: E501
-
- :return: The total of this CrossMarginAccount. # noqa: E501
- :rtype: str
- """
- return self._total
-
- @total.setter
- def total(self, total):
- """Sets the total of this CrossMarginAccount.
-
- Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` # noqa: E501
-
- :param total: The total of this CrossMarginAccount. # noqa: E501
- :type: str
- """
-
- self._total = total
-
- @property
- def borrowed(self):
- """Gets the borrowed of this CrossMarginAccount. # noqa: E501
-
- Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` # noqa: E501
-
- :return: The borrowed of this CrossMarginAccount. # noqa: E501
- :rtype: str
- """
- return self._borrowed
-
- @borrowed.setter
- def borrowed(self, borrowed):
- """Sets the borrowed of this CrossMarginAccount.
-
- Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` # noqa: E501
-
- :param borrowed: The borrowed of this CrossMarginAccount. # noqa: E501
- :type: str
- """
-
- self._borrowed = borrowed
-
- @property
- def interest(self):
- """Gets the interest of this CrossMarginAccount. # noqa: E501
-
- Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501
-
- :return: The interest of this CrossMarginAccount. # noqa: E501
- :rtype: str
- """
- return self._interest
-
- @interest.setter
- def interest(self, interest):
- """Sets the interest of this CrossMarginAccount.
-
- Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501
-
- :param interest: The interest of this CrossMarginAccount. # noqa: E501
- :type: str
- """
-
- self._interest = interest
-
- @property
- def risk(self):
- """Gets the risk of this CrossMarginAccount. # noqa: E501
-
- Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501
-
- :return: The risk of this CrossMarginAccount. # noqa: E501
- :rtype: str
- """
- return self._risk
-
- @risk.setter
- def risk(self, risk):
- """Sets the risk of this CrossMarginAccount.
-
- Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501
-
- :param risk: The risk of this CrossMarginAccount. # noqa: E501
- :type: str
- """
-
- self._risk = risk
-
- @property
- def total_initial_margin(self):
- """Gets the total_initial_margin of this CrossMarginAccount. # noqa: E501
-
- Total initial margin # noqa: E501
-
- :return: The total_initial_margin of this CrossMarginAccount. # noqa: E501
- :rtype: str
- """
- return self._total_initial_margin
-
- @total_initial_margin.setter
- def total_initial_margin(self, total_initial_margin):
- """Sets the total_initial_margin of this CrossMarginAccount.
-
- Total initial margin # noqa: E501
-
- :param total_initial_margin: The total_initial_margin of this CrossMarginAccount. # noqa: E501
- :type: str
- """
-
- self._total_initial_margin = total_initial_margin
-
- @property
- def total_margin_balance(self):
- """Gets the total_margin_balance of this CrossMarginAccount. # noqa: E501
-
- Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) # noqa: E501
-
- :return: The total_margin_balance of this CrossMarginAccount. # noqa: E501
- :rtype: str
- """
- return self._total_margin_balance
-
- @total_margin_balance.setter
- def total_margin_balance(self, total_margin_balance):
- """Sets the total_margin_balance of this CrossMarginAccount.
-
- Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) # noqa: E501
-
- :param total_margin_balance: The total_margin_balance of this CrossMarginAccount. # noqa: E501
- :type: str
- """
-
- self._total_margin_balance = total_margin_balance
-
- @property
- def total_maintenance_margin(self):
- """Gets the total_maintenance_margin of this CrossMarginAccount. # noqa: E501
-
- Total maintenance margin # noqa: E501
-
- :return: The total_maintenance_margin of this CrossMarginAccount. # noqa: E501
- :rtype: str
- """
- return self._total_maintenance_margin
-
- @total_maintenance_margin.setter
- def total_maintenance_margin(self, total_maintenance_margin):
- """Sets the total_maintenance_margin of this CrossMarginAccount.
-
- Total maintenance margin # noqa: E501
-
- :param total_maintenance_margin: The total_maintenance_margin of this CrossMarginAccount. # noqa: E501
- :type: str
- """
-
- self._total_maintenance_margin = total_maintenance_margin
-
- @property
- def total_initial_margin_rate(self):
- """Gets the total_initial_margin_rate of this CrossMarginAccount. # noqa: E501
-
- Total initial margin rate # noqa: E501
-
- :return: The total_initial_margin_rate of this CrossMarginAccount. # noqa: E501
- :rtype: str
- """
- return self._total_initial_margin_rate
-
- @total_initial_margin_rate.setter
- def total_initial_margin_rate(self, total_initial_margin_rate):
- """Sets the total_initial_margin_rate of this CrossMarginAccount.
-
- Total initial margin rate # noqa: E501
-
- :param total_initial_margin_rate: The total_initial_margin_rate of this CrossMarginAccount. # noqa: E501
- :type: str
- """
-
- self._total_initial_margin_rate = total_initial_margin_rate
-
- @property
- def total_maintenance_margin_rate(self):
- """Gets the total_maintenance_margin_rate of this CrossMarginAccount. # noqa: E501
-
- Total maintenance margin rate # noqa: E501
-
- :return: The total_maintenance_margin_rate of this CrossMarginAccount. # noqa: E501
- :rtype: str
- """
- return self._total_maintenance_margin_rate
-
- @total_maintenance_margin_rate.setter
- def total_maintenance_margin_rate(self, total_maintenance_margin_rate):
- """Sets the total_maintenance_margin_rate of this CrossMarginAccount.
-
- Total maintenance margin rate # noqa: E501
-
- :param total_maintenance_margin_rate: The total_maintenance_margin_rate of this CrossMarginAccount. # noqa: E501
- :type: str
- """
-
- self._total_maintenance_margin_rate = total_maintenance_margin_rate
-
- @property
- def total_available_margin(self):
- """Gets the total_available_margin of this CrossMarginAccount. # noqa: E501
-
- Total available margin # noqa: E501
-
- :return: The total_available_margin of this CrossMarginAccount. # noqa: E501
- :rtype: str
- """
- return self._total_available_margin
-
- @total_available_margin.setter
- def total_available_margin(self, total_available_margin):
- """Sets the total_available_margin of this CrossMarginAccount.
-
- Total available margin # noqa: E501
-
- :param total_available_margin: The total_available_margin of this CrossMarginAccount. # noqa: E501
- :type: str
- """
-
- self._total_available_margin = total_available_margin
-
- @property
- def portfolio_margin_total(self):
- """Gets the portfolio_margin_total of this CrossMarginAccount. # noqa: E501
-
- Total amount of the portfolio margin account # noqa: E501
-
- :return: The portfolio_margin_total of this CrossMarginAccount. # noqa: E501
- :rtype: str
- """
- return self._portfolio_margin_total
-
- @portfolio_margin_total.setter
- def portfolio_margin_total(self, portfolio_margin_total):
- """Sets the portfolio_margin_total of this CrossMarginAccount.
-
- Total amount of the portfolio margin account # noqa: E501
-
- :param portfolio_margin_total: The portfolio_margin_total of this CrossMarginAccount. # noqa: E501
- :type: str
- """
-
- self._portfolio_margin_total = portfolio_margin_total
-
- @property
- def portfolio_margin_total_liab(self):
- """Gets the portfolio_margin_total_liab of this CrossMarginAccount. # noqa: E501
-
- Total liabilities of the portfolio margin account # noqa: E501
-
- :return: The portfolio_margin_total_liab of this CrossMarginAccount. # noqa: E501
- :rtype: str
- """
- return self._portfolio_margin_total_liab
-
- @portfolio_margin_total_liab.setter
- def portfolio_margin_total_liab(self, portfolio_margin_total_liab):
- """Sets the portfolio_margin_total_liab of this CrossMarginAccount.
-
- Total liabilities of the portfolio margin account # noqa: E501
-
- :param portfolio_margin_total_liab: The portfolio_margin_total_liab of this CrossMarginAccount. # noqa: E501
- :type: str
- """
-
- self._portfolio_margin_total_liab = portfolio_margin_total_liab
-
- @property
- def portfolio_margin_total_equity(self):
- """Gets the portfolio_margin_total_equity of this CrossMarginAccount. # noqa: E501
-
- Total equity of the portfolio margin account # noqa: E501
-
- :return: The portfolio_margin_total_equity of this CrossMarginAccount. # noqa: E501
- :rtype: str
- """
- return self._portfolio_margin_total_equity
-
- @portfolio_margin_total_equity.setter
- def portfolio_margin_total_equity(self, portfolio_margin_total_equity):
- """Sets the portfolio_margin_total_equity of this CrossMarginAccount.
-
- Total equity of the portfolio margin account # noqa: E501
-
- :param portfolio_margin_total_equity: The portfolio_margin_total_equity of this CrossMarginAccount. # noqa: E501
- :type: str
- """
-
- self._portfolio_margin_total_equity = portfolio_margin_total_equity
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, CrossMarginAccount):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, CrossMarginAccount):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/cross_margin_account_book.py b/gate_api/models/cross_margin_account_book.py
deleted file mode 100644
index 7879cf2..0000000
--- a/gate_api/models/cross_margin_account_book.py
+++ /dev/null
@@ -1,256 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class CrossMarginAccountBook(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {'id': 'str', 'time': 'int', 'currency': 'str', 'change': 'str', 'balance': 'str', 'type': 'str'}
-
- attribute_map = {
- 'id': 'id',
- 'time': 'time',
- 'currency': 'currency',
- 'change': 'change',
- 'balance': 'balance',
- 'type': 'type',
- }
-
- def __init__(
- self, id=None, time=None, currency=None, change=None, balance=None, type=None, local_vars_configuration=None
- ): # noqa: E501
- # type: (str, int, str, str, str, str, Configuration) -> None
- """CrossMarginAccountBook - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._id = None
- self._time = None
- self._currency = None
- self._change = None
- self._balance = None
- self._type = None
- self.discriminator = None
-
- if id is not None:
- self.id = id
- if time is not None:
- self.time = time
- if currency is not None:
- self.currency = currency
- if change is not None:
- self.change = change
- if balance is not None:
- self.balance = balance
- if type is not None:
- self.type = type
-
- @property
- def id(self):
- """Gets the id of this CrossMarginAccountBook. # noqa: E501
-
- Balance change record ID # noqa: E501
-
- :return: The id of this CrossMarginAccountBook. # noqa: E501
- :rtype: str
- """
- return self._id
-
- @id.setter
- def id(self, id):
- """Sets the id of this CrossMarginAccountBook.
-
- Balance change record ID # noqa: E501
-
- :param id: The id of this CrossMarginAccountBook. # noqa: E501
- :type: str
- """
-
- self._id = id
-
- @property
- def time(self):
- """Gets the time of this CrossMarginAccountBook. # noqa: E501
-
- The timestamp of the change (in milliseconds) # noqa: E501
-
- :return: The time of this CrossMarginAccountBook. # noqa: E501
- :rtype: int
- """
- return self._time
-
- @time.setter
- def time(self, time):
- """Sets the time of this CrossMarginAccountBook.
-
- The timestamp of the change (in milliseconds) # noqa: E501
-
- :param time: The time of this CrossMarginAccountBook. # noqa: E501
- :type: int
- """
-
- self._time = time
-
- @property
- def currency(self):
- """Gets the currency of this CrossMarginAccountBook. # noqa: E501
-
- Currency changed # noqa: E501
-
- :return: The currency of this CrossMarginAccountBook. # noqa: E501
- :rtype: str
- """
- return self._currency
-
- @currency.setter
- def currency(self, currency):
- """Sets the currency of this CrossMarginAccountBook.
-
- Currency changed # noqa: E501
-
- :param currency: The currency of this CrossMarginAccountBook. # noqa: E501
- :type: str
- """
-
- self._currency = currency
-
- @property
- def change(self):
- """Gets the change of this CrossMarginAccountBook. # noqa: E501
-
- Amount changed. Positive value means transferring in, while negative out # noqa: E501
-
- :return: The change of this CrossMarginAccountBook. # noqa: E501
- :rtype: str
- """
- return self._change
-
- @change.setter
- def change(self, change):
- """Sets the change of this CrossMarginAccountBook.
-
- Amount changed. Positive value means transferring in, while negative out # noqa: E501
-
- :param change: The change of this CrossMarginAccountBook. # noqa: E501
- :type: str
- """
-
- self._change = change
-
- @property
- def balance(self):
- """Gets the balance of this CrossMarginAccountBook. # noqa: E501
-
- Balance after change # noqa: E501
-
- :return: The balance of this CrossMarginAccountBook. # noqa: E501
- :rtype: str
- """
- return self._balance
-
- @balance.setter
- def balance(self, balance):
- """Sets the balance of this CrossMarginAccountBook.
-
- Balance after change # noqa: E501
-
- :param balance: The balance of this CrossMarginAccountBook. # noqa: E501
- :type: str
- """
-
- self._balance = balance
-
- @property
- def type(self):
- """Gets the type of this CrossMarginAccountBook. # noqa: E501
-
- Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501
-
- :return: The type of this CrossMarginAccountBook. # noqa: E501
- :rtype: str
- """
- return self._type
-
- @type.setter
- def type(self, type):
- """Sets the type of this CrossMarginAccountBook.
-
- Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501
-
- :param type: The type of this CrossMarginAccountBook. # noqa: E501
- :type: str
- """
-
- self._type = type
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, CrossMarginAccountBook):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, CrossMarginAccountBook):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/cross_margin_balance.py b/gate_api/models/cross_margin_balance.py
index a7f8208..6b9d284 100644
--- a/gate_api/models/cross_margin_balance.py
+++ b/gate_api/models/cross_margin_balance.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -36,40 +36,18 @@ class CrossMarginBalance(object):
'available': 'str',
'freeze': 'str',
'borrowed': 'str',
- 'interest': 'str',
- 'negative_liab': 'str',
- 'futures_pos_liab': 'str',
- 'equity': 'str',
- 'total_freeze': 'str',
- 'total_liab': 'str',
+ 'interest': 'str'
}
attribute_map = {
'available': 'available',
'freeze': 'freeze',
'borrowed': 'borrowed',
- 'interest': 'interest',
- 'negative_liab': 'negative_liab',
- 'futures_pos_liab': 'futures_pos_liab',
- 'equity': 'equity',
- 'total_freeze': 'total_freeze',
- 'total_liab': 'total_liab',
+ 'interest': 'interest'
}
- def __init__(
- self,
- available=None,
- freeze=None,
- borrowed=None,
- interest=None,
- negative_liab=None,
- futures_pos_liab=None,
- equity=None,
- total_freeze=None,
- total_liab=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, str, str, Configuration) -> None
+ def __init__(self, available=None, freeze=None, borrowed=None, interest=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, Configuration) -> None
"""CrossMarginBalance - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -79,11 +57,6 @@ def __init__(
self._freeze = None
self._borrowed = None
self._interest = None
- self._negative_liab = None
- self._futures_pos_liab = None
- self._equity = None
- self._total_freeze = None
- self._total_liab = None
self.discriminator = None
if available is not None:
@@ -94,22 +67,12 @@ def __init__(
self.borrowed = borrowed
if interest is not None:
self.interest = interest
- if negative_liab is not None:
- self.negative_liab = negative_liab
- if futures_pos_liab is not None:
- self.futures_pos_liab = futures_pos_liab
- if equity is not None:
- self.equity = equity
- if total_freeze is not None:
- self.total_freeze = total_freeze
- if total_liab is not None:
- self.total_liab = total_liab
@property
def available(self):
"""Gets the available of this CrossMarginBalance. # noqa: E501
- Available amount # noqa: E501
+ Available balance # noqa: E501
:return: The available of this CrossMarginBalance. # noqa: E501
:rtype: str
@@ -120,7 +83,7 @@ def available(self):
def available(self, available):
"""Sets the available of this CrossMarginBalance.
- Available amount # noqa: E501
+ Available balance # noqa: E501
:param available: The available of this CrossMarginBalance. # noqa: E501
:type: str
@@ -132,7 +95,7 @@ def available(self, available):
def freeze(self):
"""Gets the freeze of this CrossMarginBalance. # noqa: E501
- Locked amount # noqa: E501
+ Locked balance # noqa: E501
:return: The freeze of this CrossMarginBalance. # noqa: E501
:rtype: str
@@ -143,7 +106,7 @@ def freeze(self):
def freeze(self, freeze):
"""Sets the freeze of this CrossMarginBalance.
- Locked amount # noqa: E501
+ Locked balance # noqa: E501
:param freeze: The freeze of this CrossMarginBalance. # noqa: E501
:type: str
@@ -155,7 +118,7 @@ def freeze(self, freeze):
def borrowed(self):
"""Gets the borrowed of this CrossMarginBalance. # noqa: E501
- Borrowed amount # noqa: E501
+ Borrowed balance # noqa: E501
:return: The borrowed of this CrossMarginBalance. # noqa: E501
:rtype: str
@@ -166,7 +129,7 @@ def borrowed(self):
def borrowed(self, borrowed):
"""Sets the borrowed of this CrossMarginBalance.
- Borrowed amount # noqa: E501
+ Borrowed balance # noqa: E501
:param borrowed: The borrowed of this CrossMarginBalance. # noqa: E501
:type: str
@@ -178,7 +141,7 @@ def borrowed(self, borrowed):
def interest(self):
"""Gets the interest of this CrossMarginBalance. # noqa: E501
- Unpaid interests # noqa: E501
+ Unpaid interest # noqa: E501
:return: The interest of this CrossMarginBalance. # noqa: E501
:rtype: str
@@ -189,7 +152,7 @@ def interest(self):
def interest(self, interest):
"""Sets the interest of this CrossMarginBalance.
- Unpaid interests # noqa: E501
+ Unpaid interest # noqa: E501
:param interest: The interest of this CrossMarginBalance. # noqa: E501
:type: str
@@ -197,121 +160,6 @@ def interest(self, interest):
self._interest = interest
- @property
- def negative_liab(self):
- """Gets the negative_liab of this CrossMarginBalance. # noqa: E501
-
- Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] # noqa: E501
-
- :return: The negative_liab of this CrossMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._negative_liab
-
- @negative_liab.setter
- def negative_liab(self, negative_liab):
- """Sets the negative_liab of this CrossMarginBalance.
-
- Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] # noqa: E501
-
- :param negative_liab: The negative_liab of this CrossMarginBalance. # noqa: E501
- :type: str
- """
-
- self._negative_liab = negative_liab
-
- @property
- def futures_pos_liab(self):
- """Gets the futures_pos_liab of this CrossMarginBalance. # noqa: E501
-
- Borrowing to Open Positions in Futures # noqa: E501
-
- :return: The futures_pos_liab of this CrossMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._futures_pos_liab
-
- @futures_pos_liab.setter
- def futures_pos_liab(self, futures_pos_liab):
- """Sets the futures_pos_liab of this CrossMarginBalance.
-
- Borrowing to Open Positions in Futures # noqa: E501
-
- :param futures_pos_liab: The futures_pos_liab of this CrossMarginBalance. # noqa: E501
- :type: str
- """
-
- self._futures_pos_liab = futures_pos_liab
-
- @property
- def equity(self):
- """Gets the equity of this CrossMarginBalance. # noqa: E501
-
- Equity. Formula: available + freeze - borrowed + futures account's total + unrealized_pnl # noqa: E501
-
- :return: The equity of this CrossMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._equity
-
- @equity.setter
- def equity(self, equity):
- """Sets the equity of this CrossMarginBalance.
-
- Equity. Formula: available + freeze - borrowed + futures account's total + unrealized_pnl # noqa: E501
-
- :param equity: The equity of this CrossMarginBalance. # noqa: E501
- :type: str
- """
-
- self._equity = equity
-
- @property
- def total_freeze(self):
- """Gets the total_freeze of this CrossMarginBalance. # noqa: E501
-
- Total freeze. Formula: freeze + position_initial_margin + order_margin # noqa: E501
-
- :return: The total_freeze of this CrossMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._total_freeze
-
- @total_freeze.setter
- def total_freeze(self, total_freeze):
- """Sets the total_freeze of this CrossMarginBalance.
-
- Total freeze. Formula: freeze + position_initial_margin + order_margin # noqa: E501
-
- :param total_freeze: The total_freeze of this CrossMarginBalance. # noqa: E501
- :type: str
- """
-
- self._total_freeze = total_freeze
-
- @property
- def total_liab(self):
- """Gets the total_liab of this CrossMarginBalance. # noqa: E501
-
- Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab # noqa: E501
-
- :return: The total_liab of this CrossMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._total_liab
-
- @total_liab.setter
- def total_liab(self, total_liab):
- """Sets the total_liab of this CrossMarginBalance.
-
- Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab # noqa: E501
-
- :param total_liab: The total_liab of this CrossMarginBalance. # noqa: E501
- :type: str
- """
-
- self._total_liab = total_liab
-
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -319,16 +167,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/cross_margin_balance1.py b/gate_api/models/cross_margin_balance1.py
deleted file mode 100644
index 48470eb..0000000
--- a/gate_api/models/cross_margin_balance1.py
+++ /dev/null
@@ -1,197 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class CrossMarginBalance1(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {'available': 'str', 'freeze': 'str', 'borrowed': 'str', 'interest': 'str'}
-
- attribute_map = {'available': 'available', 'freeze': 'freeze', 'borrowed': 'borrowed', 'interest': 'interest'}
-
- def __init__(
- self, available=None, freeze=None, borrowed=None, interest=None, local_vars_configuration=None
- ): # noqa: E501
- # type: (str, str, str, str, Configuration) -> None
- """CrossMarginBalance1 - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._available = None
- self._freeze = None
- self._borrowed = None
- self._interest = None
- self.discriminator = None
-
- if available is not None:
- self.available = available
- if freeze is not None:
- self.freeze = freeze
- if borrowed is not None:
- self.borrowed = borrowed
- if interest is not None:
- self.interest = interest
-
- @property
- def available(self):
- """Gets the available of this CrossMarginBalance1. # noqa: E501
-
- Available amount # noqa: E501
-
- :return: The available of this CrossMarginBalance1. # noqa: E501
- :rtype: str
- """
- return self._available
-
- @available.setter
- def available(self, available):
- """Sets the available of this CrossMarginBalance1.
-
- Available amount # noqa: E501
-
- :param available: The available of this CrossMarginBalance1. # noqa: E501
- :type: str
- """
-
- self._available = available
-
- @property
- def freeze(self):
- """Gets the freeze of this CrossMarginBalance1. # noqa: E501
-
- Locked amount # noqa: E501
-
- :return: The freeze of this CrossMarginBalance1. # noqa: E501
- :rtype: str
- """
- return self._freeze
-
- @freeze.setter
- def freeze(self, freeze):
- """Sets the freeze of this CrossMarginBalance1.
-
- Locked amount # noqa: E501
-
- :param freeze: The freeze of this CrossMarginBalance1. # noqa: E501
- :type: str
- """
-
- self._freeze = freeze
-
- @property
- def borrowed(self):
- """Gets the borrowed of this CrossMarginBalance1. # noqa: E501
-
- Borrowed amount # noqa: E501
-
- :return: The borrowed of this CrossMarginBalance1. # noqa: E501
- :rtype: str
- """
- return self._borrowed
-
- @borrowed.setter
- def borrowed(self, borrowed):
- """Sets the borrowed of this CrossMarginBalance1.
-
- Borrowed amount # noqa: E501
-
- :param borrowed: The borrowed of this CrossMarginBalance1. # noqa: E501
- :type: str
- """
-
- self._borrowed = borrowed
-
- @property
- def interest(self):
- """Gets the interest of this CrossMarginBalance1. # noqa: E501
-
- Unpaid interests # noqa: E501
-
- :return: The interest of this CrossMarginBalance1. # noqa: E501
- :rtype: str
- """
- return self._interest
-
- @interest.setter
- def interest(self, interest):
- """Sets the interest of this CrossMarginBalance1.
-
- Unpaid interests # noqa: E501
-
- :param interest: The interest of this CrossMarginBalance1. # noqa: E501
- :type: str
- """
-
- self._interest = interest
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, CrossMarginBalance1):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, CrossMarginBalance1):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/cross_margin_currency.py b/gate_api/models/cross_margin_currency.py
deleted file mode 100644
index 87d05de..0000000
--- a/gate_api/models/cross_margin_currency.py
+++ /dev/null
@@ -1,357 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class CrossMarginCurrency(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'name': 'str',
- 'rate': 'str',
- 'prec': 'str',
- 'discount': 'str',
- 'min_borrow_amount': 'str',
- 'user_max_borrow_amount': 'str',
- 'total_max_borrow_amount': 'str',
- 'price': 'str',
- 'status': 'int',
- }
-
- attribute_map = {
- 'name': 'name',
- 'rate': 'rate',
- 'prec': 'prec',
- 'discount': 'discount',
- 'min_borrow_amount': 'min_borrow_amount',
- 'user_max_borrow_amount': 'user_max_borrow_amount',
- 'total_max_borrow_amount': 'total_max_borrow_amount',
- 'price': 'price',
- 'status': 'status',
- }
-
- def __init__(
- self,
- name=None,
- rate=None,
- prec=None,
- discount=None,
- min_borrow_amount=None,
- user_max_borrow_amount=None,
- total_max_borrow_amount=None,
- price=None,
- status=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, str, int, Configuration) -> None
- """CrossMarginCurrency - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._name = None
- self._rate = None
- self._prec = None
- self._discount = None
- self._min_borrow_amount = None
- self._user_max_borrow_amount = None
- self._total_max_borrow_amount = None
- self._price = None
- self._status = None
- self.discriminator = None
-
- if name is not None:
- self.name = name
- if rate is not None:
- self.rate = rate
- if prec is not None:
- self.prec = prec
- if discount is not None:
- self.discount = discount
- if min_borrow_amount is not None:
- self.min_borrow_amount = min_borrow_amount
- if user_max_borrow_amount is not None:
- self.user_max_borrow_amount = user_max_borrow_amount
- if total_max_borrow_amount is not None:
- self.total_max_borrow_amount = total_max_borrow_amount
- if price is not None:
- self.price = price
- if status is not None:
- self.status = status
-
- @property
- def name(self):
- """Gets the name of this CrossMarginCurrency. # noqa: E501
-
- Currency name # noqa: E501
-
- :return: The name of this CrossMarginCurrency. # noqa: E501
- :rtype: str
- """
- return self._name
-
- @name.setter
- def name(self, name):
- """Sets the name of this CrossMarginCurrency.
-
- Currency name # noqa: E501
-
- :param name: The name of this CrossMarginCurrency. # noqa: E501
- :type: str
- """
-
- self._name = name
-
- @property
- def rate(self):
- """Gets the rate of this CrossMarginCurrency. # noqa: E501
-
- Minimum lending rate (hourly rate) # noqa: E501
-
- :return: The rate of this CrossMarginCurrency. # noqa: E501
- :rtype: str
- """
- return self._rate
-
- @rate.setter
- def rate(self, rate):
- """Sets the rate of this CrossMarginCurrency.
-
- Minimum lending rate (hourly rate) # noqa: E501
-
- :param rate: The rate of this CrossMarginCurrency. # noqa: E501
- :type: str
- """
-
- self._rate = rate
-
- @property
- def prec(self):
- """Gets the prec of this CrossMarginCurrency. # noqa: E501
-
- Currency precision # noqa: E501
-
- :return: The prec of this CrossMarginCurrency. # noqa: E501
- :rtype: str
- """
- return self._prec
-
- @prec.setter
- def prec(self, prec):
- """Sets the prec of this CrossMarginCurrency.
-
- Currency precision # noqa: E501
-
- :param prec: The prec of this CrossMarginCurrency. # noqa: E501
- :type: str
- """
-
- self._prec = prec
-
- @property
- def discount(self):
- """Gets the discount of this CrossMarginCurrency. # noqa: E501
-
- Currency value discount, which is used in total value calculation # noqa: E501
-
- :return: The discount of this CrossMarginCurrency. # noqa: E501
- :rtype: str
- """
- return self._discount
-
- @discount.setter
- def discount(self, discount):
- """Sets the discount of this CrossMarginCurrency.
-
- Currency value discount, which is used in total value calculation # noqa: E501
-
- :param discount: The discount of this CrossMarginCurrency. # noqa: E501
- :type: str
- """
-
- self._discount = discount
-
- @property
- def min_borrow_amount(self):
- """Gets the min_borrow_amount of this CrossMarginCurrency. # noqa: E501
-
- Minimum currency borrow amount. Unit is currency itself # noqa: E501
-
- :return: The min_borrow_amount of this CrossMarginCurrency. # noqa: E501
- :rtype: str
- """
- return self._min_borrow_amount
-
- @min_borrow_amount.setter
- def min_borrow_amount(self, min_borrow_amount):
- """Sets the min_borrow_amount of this CrossMarginCurrency.
-
- Minimum currency borrow amount. Unit is currency itself # noqa: E501
-
- :param min_borrow_amount: The min_borrow_amount of this CrossMarginCurrency. # noqa: E501
- :type: str
- """
-
- self._min_borrow_amount = min_borrow_amount
-
- @property
- def user_max_borrow_amount(self):
- """Gets the user_max_borrow_amount of this CrossMarginCurrency. # noqa: E501
-
- Maximum borrow value allowed per user, in USDT # noqa: E501
-
- :return: The user_max_borrow_amount of this CrossMarginCurrency. # noqa: E501
- :rtype: str
- """
- return self._user_max_borrow_amount
-
- @user_max_borrow_amount.setter
- def user_max_borrow_amount(self, user_max_borrow_amount):
- """Sets the user_max_borrow_amount of this CrossMarginCurrency.
-
- Maximum borrow value allowed per user, in USDT # noqa: E501
-
- :param user_max_borrow_amount: The user_max_borrow_amount of this CrossMarginCurrency. # noqa: E501
- :type: str
- """
-
- self._user_max_borrow_amount = user_max_borrow_amount
-
- @property
- def total_max_borrow_amount(self):
- """Gets the total_max_borrow_amount of this CrossMarginCurrency. # noqa: E501
-
- Maximum borrow value allowed for this currency, in USDT # noqa: E501
-
- :return: The total_max_borrow_amount of this CrossMarginCurrency. # noqa: E501
- :rtype: str
- """
- return self._total_max_borrow_amount
-
- @total_max_borrow_amount.setter
- def total_max_borrow_amount(self, total_max_borrow_amount):
- """Sets the total_max_borrow_amount of this CrossMarginCurrency.
-
- Maximum borrow value allowed for this currency, in USDT # noqa: E501
-
- :param total_max_borrow_amount: The total_max_borrow_amount of this CrossMarginCurrency. # noqa: E501
- :type: str
- """
-
- self._total_max_borrow_amount = total_max_borrow_amount
-
- @property
- def price(self):
- """Gets the price of this CrossMarginCurrency. # noqa: E501
-
- Price change between this currency and USDT # noqa: E501
-
- :return: The price of this CrossMarginCurrency. # noqa: E501
- :rtype: str
- """
- return self._price
-
- @price.setter
- def price(self, price):
- """Sets the price of this CrossMarginCurrency.
-
- Price change between this currency and USDT # noqa: E501
-
- :param price: The price of this CrossMarginCurrency. # noqa: E501
- :type: str
- """
-
- self._price = price
-
- @property
- def status(self):
- """Gets the status of this CrossMarginCurrency. # noqa: E501
-
- status - `0` : disable - `1` : enable # noqa: E501
-
- :return: The status of this CrossMarginCurrency. # noqa: E501
- :rtype: int
- """
- return self._status
-
- @status.setter
- def status(self, status):
- """Sets the status of this CrossMarginCurrency.
-
- status - `0` : disable - `1` : enable # noqa: E501
-
- :param status: The status of this CrossMarginCurrency. # noqa: E501
- :type: int
- """
-
- self._status = status
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, CrossMarginCurrency):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, CrossMarginCurrency):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/cross_margin_loan.py b/gate_api/models/cross_margin_loan.py
index f7bf0c1..b085e67 100644
--- a/gate_api/models/cross_margin_loan.py
+++ b/gate_api/models/cross_margin_loan.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -42,7 +42,7 @@ class CrossMarginLoan(object):
'status': 'int',
'repaid': 'str',
'repaid_interest': 'str',
- 'unpaid_interest': 'str',
+ 'unpaid_interest': 'str'
}
attribute_map = {
@@ -55,23 +55,10 @@ class CrossMarginLoan(object):
'status': 'status',
'repaid': 'repaid',
'repaid_interest': 'repaid_interest',
- 'unpaid_interest': 'unpaid_interest',
+ 'unpaid_interest': 'unpaid_interest'
}
- def __init__(
- self,
- id=None,
- create_time=None,
- update_time=None,
- currency=None,
- amount=None,
- text=None,
- status=None,
- repaid=None,
- repaid_interest=None,
- unpaid_interest=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, id=None, create_time=None, update_time=None, currency=None, amount=None, text=None, status=None, repaid=None, repaid_interest=None, unpaid_interest=None, local_vars_configuration=None): # noqa: E501
# type: (str, int, int, str, str, str, int, str, str, str, Configuration) -> None
"""CrossMarginLoan - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -274,7 +261,8 @@ def status(self, status):
allowed_values = [1, 2, 3] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values) # noqa: E501
+ "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
+ .format(status, allowed_values)
)
self._status = status
@@ -329,7 +317,7 @@ def repaid_interest(self, repaid_interest):
def unpaid_interest(self):
"""Gets the unpaid_interest of this CrossMarginLoan. # noqa: E501
- Outstanding interest yet to be paid # noqa: E501
+ Unpaid interest # noqa: E501
:return: The unpaid_interest of this CrossMarginLoan. # noqa: E501
:rtype: str
@@ -340,7 +328,7 @@ def unpaid_interest(self):
def unpaid_interest(self, unpaid_interest):
"""Sets the unpaid_interest of this CrossMarginLoan.
- Outstanding interest yet to be paid # noqa: E501
+ Unpaid interest # noqa: E501
:param unpaid_interest: The unpaid_interest of this CrossMarginLoan. # noqa: E501
:type: str
@@ -355,16 +343,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/cross_margin_repayment.py b/gate_api/models/cross_margin_repayment.py
index ea26ea0..6e71d54 100644
--- a/gate_api/models/cross_margin_repayment.py
+++ b/gate_api/models/cross_margin_repayment.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -39,7 +39,7 @@ class CrossMarginRepayment(object):
'currency': 'str',
'principal': 'str',
'interest': 'str',
- 'repayment_type': 'str',
+ 'repayment_type': 'str'
}
attribute_map = {
@@ -49,20 +49,10 @@ class CrossMarginRepayment(object):
'currency': 'currency',
'principal': 'principal',
'interest': 'interest',
- 'repayment_type': 'repayment_type',
+ 'repayment_type': 'repayment_type'
}
- def __init__(
- self,
- id=None,
- create_time=None,
- loan_id=None,
- currency=None,
- principal=None,
- interest=None,
- repayment_type=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, id=None, create_time=None, loan_id=None, currency=None, principal=None, interest=None, repayment_type=None, local_vars_configuration=None): # noqa: E501
# type: (str, int, str, str, str, str, str, Configuration) -> None
"""CrossMarginRepayment - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -235,7 +225,7 @@ def interest(self, interest):
def repayment_type(self):
"""Gets the repayment_type of this CrossMarginRepayment. # noqa: E501
- 还款类型 , none - 无还款类型, manual_repay - 手动还款 , auto_repay - 自动还款, cancel_auto_repay - 撤单后自动还款 # noqa: E501
+ Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment after cancellation # noqa: E501
:return: The repayment_type of this CrossMarginRepayment. # noqa: E501
:rtype: str
@@ -246,7 +236,7 @@ def repayment_type(self):
def repayment_type(self, repayment_type):
"""Sets the repayment_type of this CrossMarginRepayment.
- 还款类型 , none - 无还款类型, manual_repay - 手动还款 , auto_repay - 自动还款, cancel_auto_repay - 撤单后自动还款 # noqa: E501
+ Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment after cancellation # noqa: E501
:param repayment_type: The repayment_type of this CrossMarginRepayment. # noqa: E501
:type: str
@@ -261,16 +251,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/currency.py b/gate_api/models/currency.py
index 08c699c..14789cf 100644
--- a/gate_api/models/currency.py
+++ b/gate_api/models/currency.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -34,6 +34,7 @@ class Currency(object):
"""
openapi_types = {
'currency': 'str',
+ 'name': 'str',
'delisted': 'bool',
'withdraw_disabled': 'bool',
'withdraw_delayed': 'bool',
@@ -41,10 +42,12 @@ class Currency(object):
'trade_disabled': 'bool',
'fixed_rate': 'str',
'chain': 'str',
+ 'chains': 'list[SpotCurrencyChain]'
}
attribute_map = {
'currency': 'currency',
+ 'name': 'name',
'delisted': 'delisted',
'withdraw_disabled': 'withdraw_disabled',
'withdraw_delayed': 'withdraw_delayed',
@@ -52,27 +55,18 @@ class Currency(object):
'trade_disabled': 'trade_disabled',
'fixed_rate': 'fixed_rate',
'chain': 'chain',
+ 'chains': 'chains'
}
- def __init__(
- self,
- currency=None,
- delisted=None,
- withdraw_disabled=None,
- withdraw_delayed=None,
- deposit_disabled=None,
- trade_disabled=None,
- fixed_rate=None,
- chain=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, bool, bool, bool, bool, bool, str, str, Configuration) -> None
+ def __init__(self, currency=None, name=None, delisted=None, withdraw_disabled=None, withdraw_delayed=None, deposit_disabled=None, trade_disabled=None, fixed_rate=None, chain=None, chains=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, bool, bool, bool, bool, bool, str, str, list[SpotCurrencyChain], Configuration) -> None
"""Currency - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._currency = None
+ self._name = None
self._delisted = None
self._withdraw_disabled = None
self._withdraw_delayed = None
@@ -80,10 +74,13 @@ def __init__(
self._trade_disabled = None
self._fixed_rate = None
self._chain = None
+ self._chains = None
self.discriminator = None
if currency is not None:
self.currency = currency
+ if name is not None:
+ self.name = name
if delisted is not None:
self.delisted = delisted
if withdraw_disabled is not None:
@@ -98,12 +95,14 @@ def __init__(
self.fixed_rate = fixed_rate
if chain is not None:
self.chain = chain
+ if chains is not None:
+ self.chains = chains
@property
def currency(self):
"""Gets the currency of this Currency. # noqa: E501
- Currency name # noqa: E501
+ Currency symbol # noqa: E501
:return: The currency of this Currency. # noqa: E501
:rtype: str
@@ -114,7 +113,7 @@ def currency(self):
def currency(self, currency):
"""Sets the currency of this Currency.
- Currency name # noqa: E501
+ Currency symbol # noqa: E501
:param currency: The currency of this Currency. # noqa: E501
:type: str
@@ -122,6 +121,29 @@ def currency(self, currency):
self._currency = currency
+ @property
+ def name(self):
+ """Gets the name of this Currency. # noqa: E501
+
+ Currency name # noqa: E501
+
+ :return: The name of this Currency. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this Currency.
+
+ Currency name # noqa: E501
+
+ :param name: The name of this Currency. # noqa: E501
+ :type: str
+ """
+
+ self._name = name
+
@property
def delisted(self):
"""Gets the delisted of this Currency. # noqa: E501
@@ -149,7 +171,7 @@ def delisted(self, delisted):
def withdraw_disabled(self):
"""Gets the withdraw_disabled of this Currency. # noqa: E501
- Whether currency's withdrawal is disabled # noqa: E501
+ Whether currency's withdrawal is disabled (deprecated) # noqa: E501
:return: The withdraw_disabled of this Currency. # noqa: E501
:rtype: bool
@@ -160,7 +182,7 @@ def withdraw_disabled(self):
def withdraw_disabled(self, withdraw_disabled):
"""Sets the withdraw_disabled of this Currency.
- Whether currency's withdrawal is disabled # noqa: E501
+ Whether currency's withdrawal is disabled (deprecated) # noqa: E501
:param withdraw_disabled: The withdraw_disabled of this Currency. # noqa: E501
:type: bool
@@ -172,7 +194,7 @@ def withdraw_disabled(self, withdraw_disabled):
def withdraw_delayed(self):
"""Gets the withdraw_delayed of this Currency. # noqa: E501
- Whether currency's withdrawal is delayed # noqa: E501
+ Whether currency's withdrawal is delayed (deprecated) # noqa: E501
:return: The withdraw_delayed of this Currency. # noqa: E501
:rtype: bool
@@ -183,7 +205,7 @@ def withdraw_delayed(self):
def withdraw_delayed(self, withdraw_delayed):
"""Sets the withdraw_delayed of this Currency.
- Whether currency's withdrawal is delayed # noqa: E501
+ Whether currency's withdrawal is delayed (deprecated) # noqa: E501
:param withdraw_delayed: The withdraw_delayed of this Currency. # noqa: E501
:type: bool
@@ -195,7 +217,7 @@ def withdraw_delayed(self, withdraw_delayed):
def deposit_disabled(self):
"""Gets the deposit_disabled of this Currency. # noqa: E501
- Whether currency's deposit is disabled # noqa: E501
+ Whether currency's deposit is disabled (deprecated) # noqa: E501
:return: The deposit_disabled of this Currency. # noqa: E501
:rtype: bool
@@ -206,7 +228,7 @@ def deposit_disabled(self):
def deposit_disabled(self, deposit_disabled):
"""Sets the deposit_disabled of this Currency.
- Whether currency's deposit is disabled # noqa: E501
+ Whether currency's deposit is disabled (deprecated) # noqa: E501
:param deposit_disabled: The deposit_disabled of this Currency. # noqa: E501
:type: bool
@@ -264,7 +286,7 @@ def fixed_rate(self, fixed_rate):
def chain(self):
"""Gets the chain of this Currency. # noqa: E501
- Chain of currency # noqa: E501
+ The main chain corresponding to the coin # noqa: E501
:return: The chain of this Currency. # noqa: E501
:rtype: str
@@ -275,7 +297,7 @@ def chain(self):
def chain(self, chain):
"""Sets the chain of this Currency.
- Chain of currency # noqa: E501
+ The main chain corresponding to the coin # noqa: E501
:param chain: The chain of this Currency. # noqa: E501
:type: str
@@ -283,6 +305,29 @@ def chain(self, chain):
self._chain = chain
+ @property
+ def chains(self):
+ """Gets the chains of this Currency. # noqa: E501
+
+ All links corresponding to coins # noqa: E501
+
+ :return: The chains of this Currency. # noqa: E501
+ :rtype: list[SpotCurrencyChain]
+ """
+ return self._chains
+
+ @chains.setter
+ def chains(self, chains):
+ """Sets the chains of this Currency.
+
+ All links corresponding to coins # noqa: E501
+
+ :param chains: The chains of this Currency. # noqa: E501
+ :type: list[SpotCurrencyChain]
+ """
+
+ self._chains = chains
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -290,16 +335,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/currency_chain.py b/gate_api/models/currency_chain.py
index 996cf75..5feb14f 100644
--- a/gate_api/models/currency_chain.py
+++ b/gate_api/models/currency_chain.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -40,6 +40,7 @@ class CurrencyChain(object):
'is_disabled': 'int',
'is_deposit_disabled': 'int',
'is_withdraw_disabled': 'int',
+ 'decimal': 'str'
}
attribute_map = {
@@ -50,20 +51,11 @@ class CurrencyChain(object):
'is_disabled': 'is_disabled',
'is_deposit_disabled': 'is_deposit_disabled',
'is_withdraw_disabled': 'is_withdraw_disabled',
+ 'decimal': 'decimal'
}
- def __init__(
- self,
- chain=None,
- name_cn=None,
- name_en=None,
- contract_address=None,
- is_disabled=None,
- is_deposit_disabled=None,
- is_withdraw_disabled=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, int, int, int, Configuration) -> None
+ def __init__(self, chain=None, name_cn=None, name_en=None, contract_address=None, is_disabled=None, is_deposit_disabled=None, is_withdraw_disabled=None, decimal=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, int, int, int, str, Configuration) -> None
"""CurrencyChain - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -76,6 +68,7 @@ def __init__(
self._is_disabled = None
self._is_deposit_disabled = None
self._is_withdraw_disabled = None
+ self._decimal = None
self.discriminator = None
if chain is not None:
@@ -92,6 +85,8 @@ def __init__(
self.is_deposit_disabled = is_deposit_disabled
if is_withdraw_disabled is not None:
self.is_withdraw_disabled = is_withdraw_disabled
+ if decimal is not None:
+ self.decimal = decimal
@property
def chain(self):
@@ -166,7 +161,7 @@ def name_en(self, name_en):
def contract_address(self):
"""Gets the contract_address of this CurrencyChain. # noqa: E501
- 币种智能合约地址,如果没有地址则为空字串 # noqa: E501
+ Smart contract address for the currency; if no address is available, it will be an empty string # noqa: E501
:return: The contract_address of this CurrencyChain. # noqa: E501
:rtype: str
@@ -177,7 +172,7 @@ def contract_address(self):
def contract_address(self, contract_address):
"""Sets the contract_address of this CurrencyChain.
- 币种智能合约地址,如果没有地址则为空字串 # noqa: E501
+ Smart contract address for the currency; if no address is available, it will be an empty string # noqa: E501
:param contract_address: The contract_address of this CurrencyChain. # noqa: E501
:type: str
@@ -212,7 +207,7 @@ def is_disabled(self, is_disabled):
def is_deposit_disabled(self):
"""Gets the is_deposit_disabled of this CurrencyChain. # noqa: E501
- Is deposit disabled. 0 means not # noqa: E501
+ Is deposit disabled. 0 means not disabled # noqa: E501
:return: The is_deposit_disabled of this CurrencyChain. # noqa: E501
:rtype: int
@@ -223,7 +218,7 @@ def is_deposit_disabled(self):
def is_deposit_disabled(self, is_deposit_disabled):
"""Sets the is_deposit_disabled of this CurrencyChain.
- Is deposit disabled. 0 means not # noqa: E501
+ Is deposit disabled. 0 means not disabled # noqa: E501
:param is_deposit_disabled: The is_deposit_disabled of this CurrencyChain. # noqa: E501
:type: int
@@ -235,7 +230,7 @@ def is_deposit_disabled(self, is_deposit_disabled):
def is_withdraw_disabled(self):
"""Gets the is_withdraw_disabled of this CurrencyChain. # noqa: E501
- Is withdrawal disabled. 0 means not # noqa: E501
+ Is withdrawal disabled. 0 means not disabled # noqa: E501
:return: The is_withdraw_disabled of this CurrencyChain. # noqa: E501
:rtype: int
@@ -246,7 +241,7 @@ def is_withdraw_disabled(self):
def is_withdraw_disabled(self, is_withdraw_disabled):
"""Sets the is_withdraw_disabled of this CurrencyChain.
- Is withdrawal disabled. 0 means not # noqa: E501
+ Is withdrawal disabled. 0 means not disabled # noqa: E501
:param is_withdraw_disabled: The is_withdraw_disabled of this CurrencyChain. # noqa: E501
:type: int
@@ -254,6 +249,29 @@ def is_withdraw_disabled(self, is_withdraw_disabled):
self._is_withdraw_disabled = is_withdraw_disabled
+ @property
+ def decimal(self):
+ """Gets the decimal of this CurrencyChain. # noqa: E501
+
+ Withdrawal precision # noqa: E501
+
+ :return: The decimal of this CurrencyChain. # noqa: E501
+ :rtype: str
+ """
+ return self._decimal
+
+ @decimal.setter
+ def decimal(self, decimal):
+ """Sets the decimal of this CurrencyChain.
+
+ Withdrawal precision # noqa: E501
+
+ :param decimal: The decimal of this CurrencyChain. # noqa: E501
+ :type: str
+ """
+
+ self._decimal = decimal
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -261,16 +279,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/currency_pair.py b/gate_api/models/currency_pair.py
index 09c8aed..26e7959 100644
--- a/gate_api/models/currency_pair.py
+++ b/gate_api/models/currency_pair.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -35,47 +35,49 @@ class CurrencyPair(object):
openapi_types = {
'id': 'str',
'base': 'str',
+ 'base_name': 'str',
'quote': 'str',
+ 'quote_name': 'str',
'fee': 'str',
'min_base_amount': 'str',
'min_quote_amount': 'str',
+ 'max_base_amount': 'str',
+ 'max_quote_amount': 'str',
'amount_precision': 'int',
'precision': 'int',
'trade_status': 'str',
'sell_start': 'int',
'buy_start': 'int',
+ 'delisting_time': 'int',
+ 'type': 'str',
+ 'trade_url': 'str',
+ 'st_tag': 'bool'
}
attribute_map = {
'id': 'id',
'base': 'base',
+ 'base_name': 'base_name',
'quote': 'quote',
+ 'quote_name': 'quote_name',
'fee': 'fee',
'min_base_amount': 'min_base_amount',
'min_quote_amount': 'min_quote_amount',
+ 'max_base_amount': 'max_base_amount',
+ 'max_quote_amount': 'max_quote_amount',
'amount_precision': 'amount_precision',
'precision': 'precision',
'trade_status': 'trade_status',
'sell_start': 'sell_start',
'buy_start': 'buy_start',
+ 'delisting_time': 'delisting_time',
+ 'type': 'type',
+ 'trade_url': 'trade_url',
+ 'st_tag': 'st_tag'
}
- def __init__(
- self,
- id=None,
- base=None,
- quote=None,
- fee=None,
- min_base_amount=None,
- min_quote_amount=None,
- amount_precision=None,
- precision=None,
- trade_status=None,
- sell_start=None,
- buy_start=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, int, int, str, int, int, Configuration) -> None
+ def __init__(self, id=None, base=None, base_name=None, quote=None, quote_name=None, fee=None, min_base_amount=None, min_quote_amount=None, max_base_amount=None, max_quote_amount=None, amount_precision=None, precision=None, trade_status=None, sell_start=None, buy_start=None, delisting_time=None, type=None, trade_url=None, st_tag=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, str, str, int, int, str, int, int, int, str, str, bool, Configuration) -> None
"""CurrencyPair - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -83,29 +85,45 @@ def __init__(
self._id = None
self._base = None
+ self._base_name = None
self._quote = None
+ self._quote_name = None
self._fee = None
self._min_base_amount = None
self._min_quote_amount = None
+ self._max_base_amount = None
+ self._max_quote_amount = None
self._amount_precision = None
self._precision = None
self._trade_status = None
self._sell_start = None
self._buy_start = None
+ self._delisting_time = None
+ self._type = None
+ self._trade_url = None
+ self._st_tag = None
self.discriminator = None
if id is not None:
self.id = id
if base is not None:
self.base = base
+ if base_name is not None:
+ self.base_name = base_name
if quote is not None:
self.quote = quote
+ if quote_name is not None:
+ self.quote_name = quote_name
if fee is not None:
self.fee = fee
if min_base_amount is not None:
self.min_base_amount = min_base_amount
if min_quote_amount is not None:
self.min_quote_amount = min_quote_amount
+ if max_base_amount is not None:
+ self.max_base_amount = max_base_amount
+ if max_quote_amount is not None:
+ self.max_quote_amount = max_quote_amount
if amount_precision is not None:
self.amount_precision = amount_precision
if precision is not None:
@@ -116,6 +134,14 @@ def __init__(
self.sell_start = sell_start
if buy_start is not None:
self.buy_start = buy_start
+ if delisting_time is not None:
+ self.delisting_time = delisting_time
+ if type is not None:
+ self.type = type
+ if trade_url is not None:
+ self.trade_url = trade_url
+ if st_tag is not None:
+ self.st_tag = st_tag
@property
def id(self):
@@ -163,6 +189,29 @@ def base(self, base):
self._base = base
+ @property
+ def base_name(self):
+ """Gets the base_name of this CurrencyPair. # noqa: E501
+
+ Base currency name # noqa: E501
+
+ :return: The base_name of this CurrencyPair. # noqa: E501
+ :rtype: str
+ """
+ return self._base_name
+
+ @base_name.setter
+ def base_name(self, base_name):
+ """Sets the base_name of this CurrencyPair.
+
+ Base currency name # noqa: E501
+
+ :param base_name: The base_name of this CurrencyPair. # noqa: E501
+ :type: str
+ """
+
+ self._base_name = base_name
+
@property
def quote(self):
"""Gets the quote of this CurrencyPair. # noqa: E501
@@ -186,11 +235,34 @@ def quote(self, quote):
self._quote = quote
+ @property
+ def quote_name(self):
+ """Gets the quote_name of this CurrencyPair. # noqa: E501
+
+ Quote currency name # noqa: E501
+
+ :return: The quote_name of this CurrencyPair. # noqa: E501
+ :rtype: str
+ """
+ return self._quote_name
+
+ @quote_name.setter
+ def quote_name(self, quote_name):
+ """Sets the quote_name of this CurrencyPair.
+
+ Quote currency name # noqa: E501
+
+ :param quote_name: The quote_name of this CurrencyPair. # noqa: E501
+ :type: str
+ """
+
+ self._quote_name = quote_name
+
@property
def fee(self):
"""Gets the fee of this CurrencyPair. # noqa: E501
- Trading fee # noqa: E501
+ Trading fee rate # noqa: E501
:return: The fee of this CurrencyPair. # noqa: E501
:rtype: str
@@ -201,7 +273,7 @@ def fee(self):
def fee(self, fee):
"""Sets the fee of this CurrencyPair.
- Trading fee # noqa: E501
+ Trading fee rate # noqa: E501
:param fee: The fee of this CurrencyPair. # noqa: E501
:type: str
@@ -255,6 +327,52 @@ def min_quote_amount(self, min_quote_amount):
self._min_quote_amount = min_quote_amount
+ @property
+ def max_base_amount(self):
+ """Gets the max_base_amount of this CurrencyPair. # noqa: E501
+
+ Maximum amount of base currency to trade, `null` means no limit # noqa: E501
+
+ :return: The max_base_amount of this CurrencyPair. # noqa: E501
+ :rtype: str
+ """
+ return self._max_base_amount
+
+ @max_base_amount.setter
+ def max_base_amount(self, max_base_amount):
+ """Sets the max_base_amount of this CurrencyPair.
+
+ Maximum amount of base currency to trade, `null` means no limit # noqa: E501
+
+ :param max_base_amount: The max_base_amount of this CurrencyPair. # noqa: E501
+ :type: str
+ """
+
+ self._max_base_amount = max_base_amount
+
+ @property
+ def max_quote_amount(self):
+ """Gets the max_quote_amount of this CurrencyPair. # noqa: E501
+
+ Maximum amount of quote currency to trade, `null` means no limit # noqa: E501
+
+ :return: The max_quote_amount of this CurrencyPair. # noqa: E501
+ :rtype: str
+ """
+ return self._max_quote_amount
+
+ @max_quote_amount.setter
+ def max_quote_amount(self, max_quote_amount):
+ """Sets the max_quote_amount of this CurrencyPair.
+
+ Maximum amount of quote currency to trade, `null` means no limit # noqa: E501
+
+ :param max_quote_amount: The max_quote_amount of this CurrencyPair. # noqa: E501
+ :type: str
+ """
+
+ self._max_quote_amount = max_quote_amount
+
@property
def amount_precision(self):
"""Gets the amount_precision of this CurrencyPair. # noqa: E501
@@ -305,7 +423,7 @@ def precision(self, precision):
def trade_status(self):
"""Gets the trade_status of this CurrencyPair. # noqa: E501
- How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: can be bought or sold # noqa: E501
+ Trading status - untradable: cannot be traded - buyable: can be bought - sellable: can be sold - tradable: can be bought and sold # noqa: E501
:return: The trade_status of this CurrencyPair. # noqa: E501
:rtype: str
@@ -316,7 +434,7 @@ def trade_status(self):
def trade_status(self, trade_status):
"""Sets the trade_status of this CurrencyPair.
- How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: can be bought or sold # noqa: E501
+ Trading status - untradable: cannot be traded - buyable: can be bought - sellable: can be sold - tradable: can be bought and sold # noqa: E501
:param trade_status: The trade_status of this CurrencyPair. # noqa: E501
:type: str
@@ -324,9 +442,8 @@ def trade_status(self, trade_status):
allowed_values = ["untradable", "buyable", "sellable", "tradable"] # noqa: E501
if self.local_vars_configuration.client_side_validation and trade_status not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `trade_status` ({0}), must be one of {1}".format( # noqa: E501
- trade_status, allowed_values
- )
+ "Invalid value for `trade_status` ({0}), must be one of {1}" # noqa: E501
+ .format(trade_status, allowed_values)
)
self._trade_status = trade_status
@@ -377,6 +494,98 @@ def buy_start(self, buy_start):
self._buy_start = buy_start
+ @property
+ def delisting_time(self):
+ """Gets the delisting_time of this CurrencyPair. # noqa: E501
+
+ Expected time to remove the shelves, Unix timestamp in seconds # noqa: E501
+
+ :return: The delisting_time of this CurrencyPair. # noqa: E501
+ :rtype: int
+ """
+ return self._delisting_time
+
+ @delisting_time.setter
+ def delisting_time(self, delisting_time):
+ """Sets the delisting_time of this CurrencyPair.
+
+ Expected time to remove the shelves, Unix timestamp in seconds # noqa: E501
+
+ :param delisting_time: The delisting_time of this CurrencyPair. # noqa: E501
+ :type: int
+ """
+
+ self._delisting_time = delisting_time
+
+ @property
+ def type(self):
+ """Gets the type of this CurrencyPair. # noqa: E501
+
+ Trading pair type, normal: normal, premarket: pre-market # noqa: E501
+
+ :return: The type of this CurrencyPair. # noqa: E501
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this CurrencyPair.
+
+ Trading pair type, normal: normal, premarket: pre-market # noqa: E501
+
+ :param type: The type of this CurrencyPair. # noqa: E501
+ :type: str
+ """
+
+ self._type = type
+
+ @property
+ def trade_url(self):
+ """Gets the trade_url of this CurrencyPair. # noqa: E501
+
+ Transaction link # noqa: E501
+
+ :return: The trade_url of this CurrencyPair. # noqa: E501
+ :rtype: str
+ """
+ return self._trade_url
+
+ @trade_url.setter
+ def trade_url(self, trade_url):
+ """Sets the trade_url of this CurrencyPair.
+
+ Transaction link # noqa: E501
+
+ :param trade_url: The trade_url of this CurrencyPair. # noqa: E501
+ :type: str
+ """
+
+ self._trade_url = trade_url
+
+ @property
+ def st_tag(self):
+ """Gets the st_tag of this CurrencyPair. # noqa: E501
+
+ Whether the trading pair is in ST risk assessment, false - No, true - Yes # noqa: E501
+
+ :return: The st_tag of this CurrencyPair. # noqa: E501
+ :rtype: bool
+ """
+ return self._st_tag
+
+ @st_tag.setter
+ def st_tag(self, st_tag):
+ """Sets the st_tag of this CurrencyPair.
+
+ Whether the trading pair is in ST risk assessment, false - No, true - Yes # noqa: E501
+
+ :param st_tag: The st_tag of this CurrencyPair. # noqa: E501
+ :type: bool
+ """
+
+ self._st_tag = st_tag
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -384,16 +593,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/currency_quota.py b/gate_api/models/currency_quota.py
new file mode 100644
index 0000000..3ebee02
--- /dev/null
+++ b/gate_api/models/currency_quota.py
@@ -0,0 +1,235 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class CurrencyQuota(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'index_price': 'str',
+ 'min_quota': 'str',
+ 'left_quota': 'str',
+ 'left_quote_usdt': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'index_price': 'index_price',
+ 'min_quota': 'min_quota',
+ 'left_quota': 'left_quota',
+ 'left_quote_usdt': 'left_quote_usdt'
+ }
+
+ def __init__(self, currency=None, index_price=None, min_quota=None, left_quota=None, left_quote_usdt=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, Configuration) -> None
+ """CurrencyQuota - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._index_price = None
+ self._min_quota = None
+ self._left_quota = None
+ self._left_quote_usdt = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if index_price is not None:
+ self.index_price = index_price
+ if min_quota is not None:
+ self.min_quota = min_quota
+ if left_quota is not None:
+ self.left_quota = left_quota
+ if left_quote_usdt is not None:
+ self.left_quote_usdt = left_quote_usdt
+
+ @property
+ def currency(self):
+ """Gets the currency of this CurrencyQuota. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this CurrencyQuota. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this CurrencyQuota.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this CurrencyQuota. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def index_price(self):
+ """Gets the index_price of this CurrencyQuota. # noqa: E501
+
+ Currency Index Price # noqa: E501
+
+ :return: The index_price of this CurrencyQuota. # noqa: E501
+ :rtype: str
+ """
+ return self._index_price
+
+ @index_price.setter
+ def index_price(self, index_price):
+ """Sets the index_price of this CurrencyQuota.
+
+ Currency Index Price # noqa: E501
+
+ :param index_price: The index_price of this CurrencyQuota. # noqa: E501
+ :type: str
+ """
+
+ self._index_price = index_price
+
+ @property
+ def min_quota(self):
+ """Gets the min_quota of this CurrencyQuota. # noqa: E501
+
+ Minimum borrowing/collateral limit for the currency # noqa: E501
+
+ :return: The min_quota of this CurrencyQuota. # noqa: E501
+ :rtype: str
+ """
+ return self._min_quota
+
+ @min_quota.setter
+ def min_quota(self, min_quota):
+ """Sets the min_quota of this CurrencyQuota.
+
+ Minimum borrowing/collateral limit for the currency # noqa: E501
+
+ :param min_quota: The min_quota of this CurrencyQuota. # noqa: E501
+ :type: str
+ """
+
+ self._min_quota = min_quota
+
+ @property
+ def left_quota(self):
+ """Gets the left_quota of this CurrencyQuota. # noqa: E501
+
+ Remaining borrowing/collateral quota for the currency # noqa: E501
+
+ :return: The left_quota of this CurrencyQuota. # noqa: E501
+ :rtype: str
+ """
+ return self._left_quota
+
+ @left_quota.setter
+ def left_quota(self, left_quota):
+ """Sets the left_quota of this CurrencyQuota.
+
+ Remaining borrowing/collateral quota for the currency # noqa: E501
+
+ :param left_quota: The left_quota of this CurrencyQuota. # noqa: E501
+ :type: str
+ """
+
+ self._left_quota = left_quota
+
+ @property
+ def left_quote_usdt(self):
+ """Gets the left_quote_usdt of this CurrencyQuota. # noqa: E501
+
+ Remaining currency limit converted to USDT # noqa: E501
+
+ :return: The left_quote_usdt of this CurrencyQuota. # noqa: E501
+ :rtype: str
+ """
+ return self._left_quote_usdt
+
+ @left_quote_usdt.setter
+ def left_quote_usdt(self, left_quote_usdt):
+ """Sets the left_quote_usdt of this CurrencyQuota.
+
+ Remaining currency limit converted to USDT # noqa: E501
+
+ :param left_quote_usdt: The left_quote_usdt of this CurrencyQuota. # noqa: E501
+ :type: str
+ """
+
+ self._left_quote_usdt = left_quote_usdt
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CurrencyQuota):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, CurrencyQuota):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/portfolio_mode.py b/gate_api/models/debit_fee.py
similarity index 50%
rename from gate_api/models/portfolio_mode.py
rename to gate_api/models/debit_fee.py
index 68c047f..d563fe2 100644
--- a/gate_api/models/portfolio_mode.py
+++ b/gate_api/models/debit_fee.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@
from gate_api.configuration import Configuration
-class PortfolioMode(object):
+class DebitFee(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -32,67 +32,44 @@ class PortfolioMode(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'mode': 'str', 'enabled': 'bool'}
+ openapi_types = {
+ 'enabled': 'bool'
+ }
- attribute_map = {'mode': 'mode', 'enabled': 'enabled'}
+ attribute_map = {
+ 'enabled': 'enabled'
+ }
- def __init__(self, mode=None, enabled=None, local_vars_configuration=None): # noqa: E501
- # type: (str, bool, Configuration) -> None
- """PortfolioMode - a model defined in OpenAPI""" # noqa: E501
+ def __init__(self, enabled=None, local_vars_configuration=None): # noqa: E501
+ # type: (bool, Configuration) -> None
+ """DebitFee - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
- self._mode = None
self._enabled = None
self.discriminator = None
- self.mode = mode
self.enabled = enabled
- @property
- def mode(self):
- """Gets the mode of this PortfolioMode. # noqa: E501
-
- 保证金模式 - cross_margin : 现货全仓保证金 # noqa: E501
-
- :return: The mode of this PortfolioMode. # noqa: E501
- :rtype: str
- """
- return self._mode
-
- @mode.setter
- def mode(self, mode):
- """Sets the mode of this PortfolioMode.
-
- 保证金模式 - cross_margin : 现货全仓保证金 # noqa: E501
-
- :param mode: The mode of this PortfolioMode. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and mode is None: # noqa: E501
- raise ValueError("Invalid value for `mode`, must not be `None`") # noqa: E501
-
- self._mode = mode
-
@property
def enabled(self):
- """Gets the enabled of this PortfolioMode. # noqa: E501
+ """Gets the enabled of this DebitFee. # noqa: E501
- 是否启用 # noqa: E501
+ Whether GT fee deduction is enabled # noqa: E501
- :return: The enabled of this PortfolioMode. # noqa: E501
+ :return: The enabled of this DebitFee. # noqa: E501
:rtype: bool
"""
return self._enabled
@enabled.setter
def enabled(self, enabled):
- """Sets the enabled of this PortfolioMode.
+ """Sets the enabled of this DebitFee.
- 是否启用 # noqa: E501
+ Whether GT fee deduction is enabled # noqa: E501
- :param enabled: The enabled of this PortfolioMode. # noqa: E501
+ :param enabled: The enabled of this DebitFee. # noqa: E501
:type: bool
"""
if self.local_vars_configuration.client_side_validation and enabled is None: # noqa: E501
@@ -107,16 +84,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
@@ -132,14 +111,14 @@ def __repr__(self):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, PortfolioMode):
+ if not isinstance(other, DebitFee):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, PortfolioMode):
+ if not isinstance(other, DebitFee):
return True
return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/delivery_candlestick.py b/gate_api/models/delivery_candlestick.py
index d8d39dd..83355ce 100644
--- a/gate_api/models/delivery_candlestick.py
+++ b/gate_api/models/delivery_candlestick.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,23 @@ class DeliveryCandlestick(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'t': 'float', 'v': 'int', 'c': 'str', 'h': 'str', 'l': 'str', 'o': 'str'}
-
- attribute_map = {'t': 't', 'v': 'v', 'c': 'c', 'h': 'h', 'l': 'l', 'o': 'o'}
+ openapi_types = {
+ 't': 'float',
+ 'v': 'int',
+ 'c': 'str',
+ 'h': 'str',
+ 'l': 'str',
+ 'o': 'str'
+ }
+
+ attribute_map = {
+ 't': 't',
+ 'v': 'v',
+ 'c': 'c',
+ 'h': 'h',
+ 'l': 'l',
+ 'o': 'o'
+ }
def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, local_vars_configuration=None): # noqa: E501
# type: (float, int, str, str, str, str, Configuration) -> None
@@ -209,16 +223,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/delivery_contract.py b/gate_api/models/delivery_contract.py
index 648e4d6..57b228c 100644
--- a/gate_api/models/delivery_contract.py
+++ b/gate_api/models/delivery_contract.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -70,7 +70,7 @@ class DeliveryContract(object):
'position_size': 'int',
'config_change_time': 'float',
'in_delisting': 'bool',
- 'orders_limit': 'int',
+ 'orders_limit': 'int'
}
attribute_map = {
@@ -111,51 +111,10 @@ class DeliveryContract(object):
'position_size': 'position_size',
'config_change_time': 'config_change_time',
'in_delisting': 'in_delisting',
- 'orders_limit': 'orders_limit',
+ 'orders_limit': 'orders_limit'
}
- def __init__(
- self,
- name=None,
- underlying=None,
- cycle=None,
- type=None,
- quanto_multiplier=None,
- leverage_min=None,
- leverage_max=None,
- maintenance_rate=None,
- mark_type=None,
- mark_price=None,
- index_price=None,
- last_price=None,
- maker_fee_rate=None,
- taker_fee_rate=None,
- order_price_round=None,
- mark_price_round=None,
- basis_rate=None,
- basis_value=None,
- basis_impact_value=None,
- settle_price=None,
- settle_price_interval=None,
- settle_price_duration=None,
- expire_time=None,
- risk_limit_base=None,
- risk_limit_step=None,
- risk_limit_max=None,
- order_size_min=None,
- order_size_max=None,
- order_price_deviate=None,
- ref_discount_rate=None,
- ref_rebate_rate=None,
- orderbook_id=None,
- trade_id=None,
- trade_size=None,
- position_size=None,
- config_change_time=None,
- in_delisting=None,
- orders_limit=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, name=None, underlying=None, cycle=None, type=None, quanto_multiplier=None, leverage_min=None, leverage_max=None, maintenance_rate=None, mark_type=None, mark_price=None, index_price=None, last_price=None, maker_fee_rate=None, taker_fee_rate=None, order_price_round=None, mark_price_round=None, basis_rate=None, basis_value=None, basis_impact_value=None, settle_price=None, settle_price_interval=None, settle_price_duration=None, expire_time=None, risk_limit_base=None, risk_limit_step=None, risk_limit_max=None, order_size_min=None, order_size_max=None, order_price_deviate=None, ref_discount_rate=None, ref_rebate_rate=None, orderbook_id=None, trade_id=None, trade_size=None, position_size=None, config_change_time=None, in_delisting=None, orders_limit=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, int, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, Configuration) -> None
"""DeliveryContract - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -348,7 +307,8 @@ def cycle(self, cycle):
allowed_values = ["WEEKLY", "BI-WEEKLY", "QUARTERLY", "BI-QUARTERLY"] # noqa: E501
if self.local_vars_configuration.client_side_validation and cycle not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `cycle` ({0}), must be one of {1}".format(cycle, allowed_values) # noqa: E501
+ "Invalid value for `cycle` ({0}), must be one of {1}" # noqa: E501
+ .format(cycle, allowed_values)
)
self._cycle = cycle
@@ -357,7 +317,7 @@ def cycle(self, cycle):
def type(self):
"""Gets the type of this DeliveryContract. # noqa: E501
- Futures contract type # noqa: E501
+ Contract type: inverse - inverse contract, direct - direct contract # noqa: E501
:return: The type of this DeliveryContract. # noqa: E501
:rtype: str
@@ -368,7 +328,7 @@ def type(self):
def type(self, type):
"""Sets the type of this DeliveryContract.
- Futures contract type # noqa: E501
+ Contract type: inverse - inverse contract, direct - direct contract # noqa: E501
:param type: The type of this DeliveryContract. # noqa: E501
:type: str
@@ -376,7 +336,8 @@ def type(self, type):
allowed_values = ["inverse", "direct"] # noqa: E501
if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `type` ({0}), must be one of {1}".format(type, allowed_values) # noqa: E501
+ "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
+ .format(type, allowed_values)
)
self._type = type
@@ -477,7 +438,7 @@ def maintenance_rate(self, maintenance_rate):
def mark_type(self):
"""Gets the mark_type of this DeliveryContract. # noqa: E501
- Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501
+ Mark price type: internal - internal trading price, index - external index price # noqa: E501
:return: The mark_type of this DeliveryContract. # noqa: E501
:rtype: str
@@ -488,7 +449,7 @@ def mark_type(self):
def mark_type(self, mark_type):
"""Sets the mark_type of this DeliveryContract.
- Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501
+ Mark price type: internal - internal trading price, index - external index price # noqa: E501
:param mark_type: The mark_type of this DeliveryContract. # noqa: E501
:type: str
@@ -496,9 +457,8 @@ def mark_type(self, mark_type):
allowed_values = ["internal", "index"] # noqa: E501
if self.local_vars_configuration.client_side_validation and mark_type not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `mark_type` ({0}), must be one of {1}".format( # noqa: E501
- mark_type, allowed_values
- )
+ "Invalid value for `mark_type` ({0}), must be one of {1}" # noqa: E501
+ .format(mark_type, allowed_values)
)
self._mark_type = mark_type
@@ -576,7 +536,7 @@ def last_price(self, last_price):
def maker_fee_rate(self):
"""Gets the maker_fee_rate of this DeliveryContract. # noqa: E501
- Maker fee rate, where negative means rebate # noqa: E501
+ Maker fee rate, negative values indicate rebates # noqa: E501
:return: The maker_fee_rate of this DeliveryContract. # noqa: E501
:rtype: str
@@ -587,7 +547,7 @@ def maker_fee_rate(self):
def maker_fee_rate(self, maker_fee_rate):
"""Sets the maker_fee_rate of this DeliveryContract.
- Maker fee rate, where negative means rebate # noqa: E501
+ Maker fee rate, negative values indicate rebates # noqa: E501
:param maker_fee_rate: The maker_fee_rate of this DeliveryContract. # noqa: E501
:type: str
@@ -898,7 +858,7 @@ def risk_limit_max(self, risk_limit_max):
def order_size_min(self):
"""Gets the order_size_min of this DeliveryContract. # noqa: E501
- Minimum order size the contract allowed # noqa: E501
+ Minimum order size allowed by the contract # noqa: E501
:return: The order_size_min of this DeliveryContract. # noqa: E501
:rtype: int
@@ -909,7 +869,7 @@ def order_size_min(self):
def order_size_min(self, order_size_min):
"""Sets the order_size_min of this DeliveryContract.
- Minimum order size the contract allowed # noqa: E501
+ Minimum order size allowed by the contract # noqa: E501
:param order_size_min: The order_size_min of this DeliveryContract. # noqa: E501
:type: int
@@ -921,7 +881,7 @@ def order_size_min(self, order_size_min):
def order_size_max(self):
"""Gets the order_size_max of this DeliveryContract. # noqa: E501
- Maximum order size the contract allowed # noqa: E501
+ Maximum order size allowed by the contract # noqa: E501
:return: The order_size_max of this DeliveryContract. # noqa: E501
:rtype: int
@@ -932,7 +892,7 @@ def order_size_max(self):
def order_size_max(self, order_size_max):
"""Sets the order_size_max of this DeliveryContract.
- Maximum order size the contract allowed # noqa: E501
+ Maximum order size allowed by the contract # noqa: E501
:param order_size_max: The order_size_max of this DeliveryContract. # noqa: E501
:type: int
@@ -944,7 +904,7 @@ def order_size_max(self, order_size_max):
def order_price_deviate(self):
"""Gets the order_price_deviate of this DeliveryContract. # noqa: E501
- deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501
+ Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501
:return: The order_price_deviate of this DeliveryContract. # noqa: E501
:rtype: str
@@ -955,7 +915,7 @@ def order_price_deviate(self):
def order_price_deviate(self, order_price_deviate):
"""Sets the order_price_deviate of this DeliveryContract.
- deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501
+ Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501
:param order_price_deviate: The order_price_deviate of this DeliveryContract. # noqa: E501
:type: str
@@ -967,7 +927,7 @@ def order_price_deviate(self, order_price_deviate):
def ref_discount_rate(self):
"""Gets the ref_discount_rate of this DeliveryContract. # noqa: E501
- Referral fee rate discount # noqa: E501
+ Trading fee discount for referred users # noqa: E501
:return: The ref_discount_rate of this DeliveryContract. # noqa: E501
:rtype: str
@@ -978,7 +938,7 @@ def ref_discount_rate(self):
def ref_discount_rate(self, ref_discount_rate):
"""Sets the ref_discount_rate of this DeliveryContract.
- Referral fee rate discount # noqa: E501
+ Trading fee discount for referred users # noqa: E501
:param ref_discount_rate: The ref_discount_rate of this DeliveryContract. # noqa: E501
:type: str
@@ -990,7 +950,7 @@ def ref_discount_rate(self, ref_discount_rate):
def ref_rebate_rate(self):
"""Gets the ref_rebate_rate of this DeliveryContract. # noqa: E501
- Referrer commission rate # noqa: E501
+ Commission rate for referrers # noqa: E501
:return: The ref_rebate_rate of this DeliveryContract. # noqa: E501
:rtype: str
@@ -1001,7 +961,7 @@ def ref_rebate_rate(self):
def ref_rebate_rate(self, ref_rebate_rate):
"""Sets the ref_rebate_rate of this DeliveryContract.
- Referrer commission rate # noqa: E501
+ Commission rate for referrers # noqa: E501
:param ref_rebate_rate: The ref_rebate_rate of this DeliveryContract. # noqa: E501
:type: str
@@ -1013,7 +973,7 @@ def ref_rebate_rate(self, ref_rebate_rate):
def orderbook_id(self):
"""Gets the orderbook_id of this DeliveryContract. # noqa: E501
- Current orderbook ID # noqa: E501
+ Orderbook update ID # noqa: E501
:return: The orderbook_id of this DeliveryContract. # noqa: E501
:rtype: int
@@ -1024,7 +984,7 @@ def orderbook_id(self):
def orderbook_id(self, orderbook_id):
"""Sets the orderbook_id of this DeliveryContract.
- Current orderbook ID # noqa: E501
+ Orderbook update ID # noqa: E501
:param orderbook_id: The orderbook_id of this DeliveryContract. # noqa: E501
:type: int
@@ -1059,7 +1019,7 @@ def trade_id(self, trade_id):
def trade_size(self):
"""Gets the trade_size of this DeliveryContract. # noqa: E501
- Historical accumulated trade size # noqa: E501
+ Historical cumulative trading volume # noqa: E501
:return: The trade_size of this DeliveryContract. # noqa: E501
:rtype: int
@@ -1070,7 +1030,7 @@ def trade_size(self):
def trade_size(self, trade_size):
"""Sets the trade_size of this DeliveryContract.
- Historical accumulated trade size # noqa: E501
+ Historical cumulative trading volume # noqa: E501
:param trade_size: The trade_size of this DeliveryContract. # noqa: E501
:type: int
@@ -1105,7 +1065,7 @@ def position_size(self, position_size):
def config_change_time(self):
"""Gets the config_change_time of this DeliveryContract. # noqa: E501
- Last changed time of configuration # noqa: E501
+ Last configuration update time # noqa: E501
:return: The config_change_time of this DeliveryContract. # noqa: E501
:rtype: float
@@ -1116,7 +1076,7 @@ def config_change_time(self):
def config_change_time(self, config_change_time):
"""Sets the config_change_time of this DeliveryContract.
- Last changed time of configuration # noqa: E501
+ Last configuration update time # noqa: E501
:param config_change_time: The config_change_time of this DeliveryContract. # noqa: E501
:type: float
@@ -1151,7 +1111,7 @@ def in_delisting(self, in_delisting):
def orders_limit(self):
"""Gets the orders_limit of this DeliveryContract. # noqa: E501
- Maximum number of open orders # noqa: E501
+ Maximum number of pending orders # noqa: E501
:return: The orders_limit of this DeliveryContract. # noqa: E501
:rtype: int
@@ -1162,7 +1122,7 @@ def orders_limit(self):
def orders_limit(self, orders_limit):
"""Sets the orders_limit of this DeliveryContract.
- Maximum number of open orders # noqa: E501
+ Maximum number of pending orders # noqa: E501
:param orders_limit: The orders_limit of this DeliveryContract. # noqa: E501
:type: int
@@ -1177,16 +1137,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/delivery_settlement.py b/gate_api/models/delivery_settlement.py
index 78b09d1..1985a9b 100644
--- a/gate_api/models/delivery_settlement.py
+++ b/gate_api/models/delivery_settlement.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -41,7 +41,7 @@ class DeliverySettlement(object):
'entry_price': 'str',
'settle_price': 'str',
'profit': 'str',
- 'fee': 'str',
+ 'fee': 'str'
}
attribute_map = {
@@ -53,22 +53,10 @@ class DeliverySettlement(object):
'entry_price': 'entry_price',
'settle_price': 'settle_price',
'profit': 'profit',
- 'fee': 'fee',
+ 'fee': 'fee'
}
- def __init__(
- self,
- time=None,
- contract=None,
- leverage=None,
- size=None,
- margin=None,
- entry_price=None,
- settle_price=None,
- profit=None,
- fee=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, time=None, contract=None, leverage=None, size=None, margin=None, entry_price=None, settle_price=None, profit=None, fee=None, local_vars_configuration=None): # noqa: E501
# type: (int, str, str, int, str, str, str, str, str, Configuration) -> None
"""DeliverySettlement - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -319,16 +307,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/delivery_ticker.py b/gate_api/models/delivery_ticker.py
new file mode 100644
index 0000000..9cf1203
--- /dev/null
+++ b/gate_api/models/delivery_ticker.py
@@ -0,0 +1,739 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class DeliveryTicker(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'contract': 'str',
+ 'last': 'str',
+ 'change_percentage': 'str',
+ 'total_size': 'str',
+ 'low_24h': 'str',
+ 'high_24h': 'str',
+ 'volume_24h': 'str',
+ 'volume_24h_btc': 'str',
+ 'volume_24h_usd': 'str',
+ 'volume_24h_base': 'str',
+ 'volume_24h_quote': 'str',
+ 'volume_24h_settle': 'str',
+ 'mark_price': 'str',
+ 'funding_rate': 'str',
+ 'funding_rate_indicative': 'str',
+ 'index_price': 'str',
+ 'quanto_base_rate': 'str',
+ 'basis_rate': 'str',
+ 'basis_value': 'str',
+ 'lowest_ask': 'str',
+ 'lowest_size': 'str',
+ 'highest_bid': 'str',
+ 'highest_size': 'str'
+ }
+
+ attribute_map = {
+ 'contract': 'contract',
+ 'last': 'last',
+ 'change_percentage': 'change_percentage',
+ 'total_size': 'total_size',
+ 'low_24h': 'low_24h',
+ 'high_24h': 'high_24h',
+ 'volume_24h': 'volume_24h',
+ 'volume_24h_btc': 'volume_24h_btc',
+ 'volume_24h_usd': 'volume_24h_usd',
+ 'volume_24h_base': 'volume_24h_base',
+ 'volume_24h_quote': 'volume_24h_quote',
+ 'volume_24h_settle': 'volume_24h_settle',
+ 'mark_price': 'mark_price',
+ 'funding_rate': 'funding_rate',
+ 'funding_rate_indicative': 'funding_rate_indicative',
+ 'index_price': 'index_price',
+ 'quanto_base_rate': 'quanto_base_rate',
+ 'basis_rate': 'basis_rate',
+ 'basis_value': 'basis_value',
+ 'lowest_ask': 'lowest_ask',
+ 'lowest_size': 'lowest_size',
+ 'highest_bid': 'highest_bid',
+ 'highest_size': 'highest_size'
+ }
+
+ def __init__(self, contract=None, last=None, change_percentage=None, total_size=None, low_24h=None, high_24h=None, volume_24h=None, volume_24h_btc=None, volume_24h_usd=None, volume_24h_base=None, volume_24h_quote=None, volume_24h_settle=None, mark_price=None, funding_rate=None, funding_rate_indicative=None, index_price=None, quanto_base_rate=None, basis_rate=None, basis_value=None, lowest_ask=None, lowest_size=None, highest_bid=None, highest_size=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None
+ """DeliveryTicker - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._contract = None
+ self._last = None
+ self._change_percentage = None
+ self._total_size = None
+ self._low_24h = None
+ self._high_24h = None
+ self._volume_24h = None
+ self._volume_24h_btc = None
+ self._volume_24h_usd = None
+ self._volume_24h_base = None
+ self._volume_24h_quote = None
+ self._volume_24h_settle = None
+ self._mark_price = None
+ self._funding_rate = None
+ self._funding_rate_indicative = None
+ self._index_price = None
+ self._quanto_base_rate = None
+ self._basis_rate = None
+ self._basis_value = None
+ self._lowest_ask = None
+ self._lowest_size = None
+ self._highest_bid = None
+ self._highest_size = None
+ self.discriminator = None
+
+ if contract is not None:
+ self.contract = contract
+ if last is not None:
+ self.last = last
+ if change_percentage is not None:
+ self.change_percentage = change_percentage
+ if total_size is not None:
+ self.total_size = total_size
+ if low_24h is not None:
+ self.low_24h = low_24h
+ if high_24h is not None:
+ self.high_24h = high_24h
+ if volume_24h is not None:
+ self.volume_24h = volume_24h
+ if volume_24h_btc is not None:
+ self.volume_24h_btc = volume_24h_btc
+ if volume_24h_usd is not None:
+ self.volume_24h_usd = volume_24h_usd
+ if volume_24h_base is not None:
+ self.volume_24h_base = volume_24h_base
+ if volume_24h_quote is not None:
+ self.volume_24h_quote = volume_24h_quote
+ if volume_24h_settle is not None:
+ self.volume_24h_settle = volume_24h_settle
+ if mark_price is not None:
+ self.mark_price = mark_price
+ if funding_rate is not None:
+ self.funding_rate = funding_rate
+ if funding_rate_indicative is not None:
+ self.funding_rate_indicative = funding_rate_indicative
+ if index_price is not None:
+ self.index_price = index_price
+ if quanto_base_rate is not None:
+ self.quanto_base_rate = quanto_base_rate
+ if basis_rate is not None:
+ self.basis_rate = basis_rate
+ if basis_value is not None:
+ self.basis_value = basis_value
+ if lowest_ask is not None:
+ self.lowest_ask = lowest_ask
+ if lowest_size is not None:
+ self.lowest_size = lowest_size
+ if highest_bid is not None:
+ self.highest_bid = highest_bid
+ if highest_size is not None:
+ self.highest_size = highest_size
+
+ @property
+ def contract(self):
+ """Gets the contract of this DeliveryTicker. # noqa: E501
+
+ Futures contract # noqa: E501
+
+ :return: The contract of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._contract
+
+ @contract.setter
+ def contract(self, contract):
+ """Sets the contract of this DeliveryTicker.
+
+ Futures contract # noqa: E501
+
+ :param contract: The contract of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._contract = contract
+
+ @property
+ def last(self):
+ """Gets the last of this DeliveryTicker. # noqa: E501
+
+ Last trading price # noqa: E501
+
+ :return: The last of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._last
+
+ @last.setter
+ def last(self, last):
+ """Sets the last of this DeliveryTicker.
+
+ Last trading price # noqa: E501
+
+ :param last: The last of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._last = last
+
+ @property
+ def change_percentage(self):
+ """Gets the change_percentage of this DeliveryTicker. # noqa: E501
+
+ Price change percentage. Negative values indicate price decrease, e.g. -7.45 # noqa: E501
+
+ :return: The change_percentage of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._change_percentage
+
+ @change_percentage.setter
+ def change_percentage(self, change_percentage):
+ """Sets the change_percentage of this DeliveryTicker.
+
+ Price change percentage. Negative values indicate price decrease, e.g. -7.45 # noqa: E501
+
+ :param change_percentage: The change_percentage of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._change_percentage = change_percentage
+
+ @property
+ def total_size(self):
+ """Gets the total_size of this DeliveryTicker. # noqa: E501
+
+ Contract total size # noqa: E501
+
+ :return: The total_size of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._total_size
+
+ @total_size.setter
+ def total_size(self, total_size):
+ """Sets the total_size of this DeliveryTicker.
+
+ Contract total size # noqa: E501
+
+ :param total_size: The total_size of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._total_size = total_size
+
+ @property
+ def low_24h(self):
+ """Gets the low_24h of this DeliveryTicker. # noqa: E501
+
+ 24-hour lowest price # noqa: E501
+
+ :return: The low_24h of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._low_24h
+
+ @low_24h.setter
+ def low_24h(self, low_24h):
+ """Sets the low_24h of this DeliveryTicker.
+
+ 24-hour lowest price # noqa: E501
+
+ :param low_24h: The low_24h of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._low_24h = low_24h
+
+ @property
+ def high_24h(self):
+ """Gets the high_24h of this DeliveryTicker. # noqa: E501
+
+ 24-hour highest price # noqa: E501
+
+ :return: The high_24h of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._high_24h
+
+ @high_24h.setter
+ def high_24h(self, high_24h):
+ """Sets the high_24h of this DeliveryTicker.
+
+ 24-hour highest price # noqa: E501
+
+ :param high_24h: The high_24h of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._high_24h = high_24h
+
+ @property
+ def volume_24h(self):
+ """Gets the volume_24h of this DeliveryTicker. # noqa: E501
+
+ 24-hour trading volume # noqa: E501
+
+ :return: The volume_24h of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._volume_24h
+
+ @volume_24h.setter
+ def volume_24h(self, volume_24h):
+ """Sets the volume_24h of this DeliveryTicker.
+
+ 24-hour trading volume # noqa: E501
+
+ :param volume_24h: The volume_24h of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._volume_24h = volume_24h
+
+ @property
+ def volume_24h_btc(self):
+ """Gets the volume_24h_btc of this DeliveryTicker. # noqa: E501
+
+ 24-hour trading volume in BTC (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501
+
+ :return: The volume_24h_btc of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._volume_24h_btc
+
+ @volume_24h_btc.setter
+ def volume_24h_btc(self, volume_24h_btc):
+ """Sets the volume_24h_btc of this DeliveryTicker.
+
+ 24-hour trading volume in BTC (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501
+
+ :param volume_24h_btc: The volume_24h_btc of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._volume_24h_btc = volume_24h_btc
+
+ @property
+ def volume_24h_usd(self):
+ """Gets the volume_24h_usd of this DeliveryTicker. # noqa: E501
+
+ 24-hour trading volume in USD (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501
+
+ :return: The volume_24h_usd of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._volume_24h_usd
+
+ @volume_24h_usd.setter
+ def volume_24h_usd(self, volume_24h_usd):
+ """Sets the volume_24h_usd of this DeliveryTicker.
+
+ 24-hour trading volume in USD (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501
+
+ :param volume_24h_usd: The volume_24h_usd of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._volume_24h_usd = volume_24h_usd
+
+ @property
+ def volume_24h_base(self):
+ """Gets the volume_24h_base of this DeliveryTicker. # noqa: E501
+
+ 24-hour trading volume in base currency # noqa: E501
+
+ :return: The volume_24h_base of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._volume_24h_base
+
+ @volume_24h_base.setter
+ def volume_24h_base(self, volume_24h_base):
+ """Sets the volume_24h_base of this DeliveryTicker.
+
+ 24-hour trading volume in base currency # noqa: E501
+
+ :param volume_24h_base: The volume_24h_base of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._volume_24h_base = volume_24h_base
+
+ @property
+ def volume_24h_quote(self):
+ """Gets the volume_24h_quote of this DeliveryTicker. # noqa: E501
+
+ 24-hour trading volume in quote currency # noqa: E501
+
+ :return: The volume_24h_quote of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._volume_24h_quote
+
+ @volume_24h_quote.setter
+ def volume_24h_quote(self, volume_24h_quote):
+ """Sets the volume_24h_quote of this DeliveryTicker.
+
+ 24-hour trading volume in quote currency # noqa: E501
+
+ :param volume_24h_quote: The volume_24h_quote of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._volume_24h_quote = volume_24h_quote
+
+ @property
+ def volume_24h_settle(self):
+ """Gets the volume_24h_settle of this DeliveryTicker. # noqa: E501
+
+ 24-hour trading volume in settle currency # noqa: E501
+
+ :return: The volume_24h_settle of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._volume_24h_settle
+
+ @volume_24h_settle.setter
+ def volume_24h_settle(self, volume_24h_settle):
+ """Sets the volume_24h_settle of this DeliveryTicker.
+
+ 24-hour trading volume in settle currency # noqa: E501
+
+ :param volume_24h_settle: The volume_24h_settle of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._volume_24h_settle = volume_24h_settle
+
+ @property
+ def mark_price(self):
+ """Gets the mark_price of this DeliveryTicker. # noqa: E501
+
+ Recent mark price # noqa: E501
+
+ :return: The mark_price of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._mark_price
+
+ @mark_price.setter
+ def mark_price(self, mark_price):
+ """Sets the mark_price of this DeliveryTicker.
+
+ Recent mark price # noqa: E501
+
+ :param mark_price: The mark_price of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._mark_price = mark_price
+
+ @property
+ def funding_rate(self):
+ """Gets the funding_rate of this DeliveryTicker. # noqa: E501
+
+ Funding rate # noqa: E501
+
+ :return: The funding_rate of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._funding_rate
+
+ @funding_rate.setter
+ def funding_rate(self, funding_rate):
+ """Sets the funding_rate of this DeliveryTicker.
+
+ Funding rate # noqa: E501
+
+ :param funding_rate: The funding_rate of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._funding_rate = funding_rate
+
+ @property
+ def funding_rate_indicative(self):
+ """Gets the funding_rate_indicative of this DeliveryTicker. # noqa: E501
+
+ Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501
+
+ :return: The funding_rate_indicative of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._funding_rate_indicative
+
+ @funding_rate_indicative.setter
+ def funding_rate_indicative(self, funding_rate_indicative):
+ """Sets the funding_rate_indicative of this DeliveryTicker.
+
+ Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501
+
+ :param funding_rate_indicative: The funding_rate_indicative of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._funding_rate_indicative = funding_rate_indicative
+
+ @property
+ def index_price(self):
+ """Gets the index_price of this DeliveryTicker. # noqa: E501
+
+ Index price # noqa: E501
+
+ :return: The index_price of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._index_price
+
+ @index_price.setter
+ def index_price(self, index_price):
+ """Sets the index_price of this DeliveryTicker.
+
+ Index price # noqa: E501
+
+ :param index_price: The index_price of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._index_price = index_price
+
+ @property
+ def quanto_base_rate(self):
+ """Gets the quanto_base_rate of this DeliveryTicker. # noqa: E501
+
+ Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types # noqa: E501
+
+ :return: The quanto_base_rate of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._quanto_base_rate
+
+ @quanto_base_rate.setter
+ def quanto_base_rate(self, quanto_base_rate):
+ """Sets the quanto_base_rate of this DeliveryTicker.
+
+ Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types # noqa: E501
+
+ :param quanto_base_rate: The quanto_base_rate of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._quanto_base_rate = quanto_base_rate
+
+ @property
+ def basis_rate(self):
+ """Gets the basis_rate of this DeliveryTicker. # noqa: E501
+
+ Basis rate # noqa: E501
+
+ :return: The basis_rate of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._basis_rate
+
+ @basis_rate.setter
+ def basis_rate(self, basis_rate):
+ """Sets the basis_rate of this DeliveryTicker.
+
+ Basis rate # noqa: E501
+
+ :param basis_rate: The basis_rate of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._basis_rate = basis_rate
+
+ @property
+ def basis_value(self):
+ """Gets the basis_value of this DeliveryTicker. # noqa: E501
+
+ Basis value # noqa: E501
+
+ :return: The basis_value of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._basis_value
+
+ @basis_value.setter
+ def basis_value(self, basis_value):
+ """Sets the basis_value of this DeliveryTicker.
+
+ Basis value # noqa: E501
+
+ :param basis_value: The basis_value of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._basis_value = basis_value
+
+ @property
+ def lowest_ask(self):
+ """Gets the lowest_ask of this DeliveryTicker. # noqa: E501
+
+ Recent lowest ask # noqa: E501
+
+ :return: The lowest_ask of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._lowest_ask
+
+ @lowest_ask.setter
+ def lowest_ask(self, lowest_ask):
+ """Sets the lowest_ask of this DeliveryTicker.
+
+ Recent lowest ask # noqa: E501
+
+ :param lowest_ask: The lowest_ask of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._lowest_ask = lowest_ask
+
+ @property
+ def lowest_size(self):
+ """Gets the lowest_size of this DeliveryTicker. # noqa: E501
+
+ The latest seller's lowest price order quantity # noqa: E501
+
+ :return: The lowest_size of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._lowest_size
+
+ @lowest_size.setter
+ def lowest_size(self, lowest_size):
+ """Sets the lowest_size of this DeliveryTicker.
+
+ The latest seller's lowest price order quantity # noqa: E501
+
+ :param lowest_size: The lowest_size of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._lowest_size = lowest_size
+
+ @property
+ def highest_bid(self):
+ """Gets the highest_bid of this DeliveryTicker. # noqa: E501
+
+ Recent highest bid # noqa: E501
+
+ :return: The highest_bid of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._highest_bid
+
+ @highest_bid.setter
+ def highest_bid(self, highest_bid):
+ """Sets the highest_bid of this DeliveryTicker.
+
+ Recent highest bid # noqa: E501
+
+ :param highest_bid: The highest_bid of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._highest_bid = highest_bid
+
+ @property
+ def highest_size(self):
+ """Gets the highest_size of this DeliveryTicker. # noqa: E501
+
+ The latest buyer's highest price order volume # noqa: E501
+
+ :return: The highest_size of this DeliveryTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._highest_size
+
+ @highest_size.setter
+ def highest_size(self, highest_size):
+ """Sets the highest_size of this DeliveryTicker.
+
+ The latest buyer's highest price order volume # noqa: E501
+
+ :param highest_size: The highest_size of this DeliveryTicker. # noqa: E501
+ :type: str
+ """
+
+ self._highest_size = highest_size
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, DeliveryTicker):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, DeliveryTicker):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/deposit_address.py b/gate_api/models/deposit_address.py
index 4768b75..01a55df 100644
--- a/gate_api/models/deposit_address.py
+++ b/gate_api/models/deposit_address.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,13 +32,19 @@ class DepositAddress(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'address': 'str', 'multichain_addresses': 'list[MultiChainAddressItem]'}
-
- attribute_map = {'currency': 'currency', 'address': 'address', 'multichain_addresses': 'multichain_addresses'}
-
- def __init__(
- self, currency=None, address=None, multichain_addresses=None, local_vars_configuration=None
- ): # noqa: E501
+ openapi_types = {
+ 'currency': 'str',
+ 'address': 'str',
+ 'multichain_addresses': 'list[MultiChainAddressItem]'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'address': 'address',
+ 'multichain_addresses': 'multichain_addresses'
+ }
+
+ def __init__(self, currency=None, address=None, multichain_addresses=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, list[MultiChainAddressItem], Configuration) -> None
"""DepositAddress - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -133,16 +139,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/deposit_record.py b/gate_api/models/deposit_record.py
new file mode 100644
index 0000000..509aa32
--- /dev/null
+++ b/gate_api/models/deposit_record.py
@@ -0,0 +1,378 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class DepositRecord(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'str',
+ 'txid': 'str',
+ 'withdraw_order_id': 'str',
+ 'timestamp': 'str',
+ 'amount': 'str',
+ 'currency': 'str',
+ 'address': 'str',
+ 'memo': 'str',
+ 'status': 'str',
+ 'chain': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'txid': 'txid',
+ 'withdraw_order_id': 'withdraw_order_id',
+ 'timestamp': 'timestamp',
+ 'amount': 'amount',
+ 'currency': 'currency',
+ 'address': 'address',
+ 'memo': 'memo',
+ 'status': 'status',
+ 'chain': 'chain'
+ }
+
+ def __init__(self, id=None, txid=None, withdraw_order_id=None, timestamp=None, amount=None, currency=None, address=None, memo=None, status=None, chain=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None
+ """DepositRecord - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._id = None
+ self._txid = None
+ self._withdraw_order_id = None
+ self._timestamp = None
+ self._amount = None
+ self._currency = None
+ self._address = None
+ self._memo = None
+ self._status = None
+ self._chain = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if txid is not None:
+ self.txid = txid
+ if withdraw_order_id is not None:
+ self.withdraw_order_id = withdraw_order_id
+ if timestamp is not None:
+ self.timestamp = timestamp
+ self.amount = amount
+ self.currency = currency
+ if address is not None:
+ self.address = address
+ if memo is not None:
+ self.memo = memo
+ if status is not None:
+ self.status = status
+ self.chain = chain
+
+ @property
+ def id(self):
+ """Gets the id of this DepositRecord. # noqa: E501
+
+ Record ID # noqa: E501
+
+ :return: The id of this DepositRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this DepositRecord.
+
+ Record ID # noqa: E501
+
+ :param id: The id of this DepositRecord. # noqa: E501
+ :type: str
+ """
+
+ self._id = id
+
+ @property
+ def txid(self):
+ """Gets the txid of this DepositRecord. # noqa: E501
+
+ Hash record of the withdrawal # noqa: E501
+
+ :return: The txid of this DepositRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._txid
+
+ @txid.setter
+ def txid(self, txid):
+ """Sets the txid of this DepositRecord.
+
+ Hash record of the withdrawal # noqa: E501
+
+ :param txid: The txid of this DepositRecord. # noqa: E501
+ :type: str
+ """
+
+ self._txid = txid
+
+ @property
+ def withdraw_order_id(self):
+ """Gets the withdraw_order_id of this DepositRecord. # noqa: E501
+
+ Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501
+
+ :return: The withdraw_order_id of this DepositRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._withdraw_order_id
+
+ @withdraw_order_id.setter
+ def withdraw_order_id(self, withdraw_order_id):
+ """Sets the withdraw_order_id of this DepositRecord.
+
+ Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501
+
+ :param withdraw_order_id: The withdraw_order_id of this DepositRecord. # noqa: E501
+ :type: str
+ """
+
+ self._withdraw_order_id = withdraw_order_id
+
+ @property
+ def timestamp(self):
+ """Gets the timestamp of this DepositRecord. # noqa: E501
+
+ Operation time # noqa: E501
+
+ :return: The timestamp of this DepositRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._timestamp
+
+ @timestamp.setter
+ def timestamp(self, timestamp):
+ """Sets the timestamp of this DepositRecord.
+
+ Operation time # noqa: E501
+
+ :param timestamp: The timestamp of this DepositRecord. # noqa: E501
+ :type: str
+ """
+
+ self._timestamp = timestamp
+
+ @property
+ def amount(self):
+ """Gets the amount of this DepositRecord. # noqa: E501
+
+ Token amount # noqa: E501
+
+ :return: The amount of this DepositRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this DepositRecord.
+
+ Token amount # noqa: E501
+
+ :param amount: The amount of this DepositRecord. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501
+ raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501
+
+ self._amount = amount
+
+ @property
+ def currency(self):
+ """Gets the currency of this DepositRecord. # noqa: E501
+
+ Currency name # noqa: E501
+
+ :return: The currency of this DepositRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this DepositRecord.
+
+ Currency name # noqa: E501
+
+ :param currency: The currency of this DepositRecord. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501
+ raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501
+
+ self._currency = currency
+
+ @property
+ def address(self):
+ """Gets the address of this DepositRecord. # noqa: E501
+
+ Withdrawal address. Required for withdrawals # noqa: E501
+
+ :return: The address of this DepositRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._address
+
+ @address.setter
+ def address(self, address):
+ """Sets the address of this DepositRecord.
+
+ Withdrawal address. Required for withdrawals # noqa: E501
+
+ :param address: The address of this DepositRecord. # noqa: E501
+ :type: str
+ """
+
+ self._address = address
+
+ @property
+ def memo(self):
+ """Gets the memo of this DepositRecord. # noqa: E501
+
+ Additional remarks with regards to the withdrawal # noqa: E501
+
+ :return: The memo of this DepositRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._memo
+
+ @memo.setter
+ def memo(self, memo):
+ """Sets the memo of this DepositRecord.
+
+ Additional remarks with regards to the withdrawal # noqa: E501
+
+ :param memo: The memo of this DepositRecord. # noqa: E501
+ :type: str
+ """
+
+ self._memo = memo
+
+ @property
+ def status(self):
+ """Gets the status of this DepositRecord. # noqa: E501
+
+ Trading Status - REVIEW: Recharge review (compliance review) - PEND: Processing - DONE: Waiting for funds to be unlocked - INVALID: Invalid data - TRACK: Track the number of confirmations, waiting to add funds to the user (spot) - BLOCKED: Rejected Recharge - DEP_CREDITED: Recharge to account, withdrawal is not unlocked # noqa: E501
+
+ :return: The status of this DepositRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this DepositRecord.
+
+ Trading Status - REVIEW: Recharge review (compliance review) - PEND: Processing - DONE: Waiting for funds to be unlocked - INVALID: Invalid data - TRACK: Track the number of confirmations, waiting to add funds to the user (spot) - BLOCKED: Rejected Recharge - DEP_CREDITED: Recharge to account, withdrawal is not unlocked # noqa: E501
+
+ :param status: The status of this DepositRecord. # noqa: E501
+ :type: str
+ """
+
+ self._status = status
+
+ @property
+ def chain(self):
+ """Gets the chain of this DepositRecord. # noqa: E501
+
+ Name of the chain used in withdrawals # noqa: E501
+
+ :return: The chain of this DepositRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._chain
+
+ @chain.setter
+ def chain(self, chain):
+ """Sets the chain of this DepositRecord.
+
+ Name of the chain used in withdrawals # noqa: E501
+
+ :param chain: The chain of this DepositRecord. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and chain is None: # noqa: E501
+ raise ValueError("Invalid value for `chain`, must not be `None`") # noqa: E501
+
+ self._chain = chain
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, DepositRecord):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, DepositRecord):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/dual_get_orders.py b/gate_api/models/dual_get_orders.py
new file mode 100644
index 0000000..3734353
--- /dev/null
+++ b/gate_api/models/dual_get_orders.py
@@ -0,0 +1,571 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class DualGetOrders(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'int',
+ 'plan_id': 'int',
+ 'copies': 'str',
+ 'invest_amount': 'str',
+ 'settlement_amount': 'str',
+ 'create_time': 'int',
+ 'complete_time': 'int',
+ 'status': 'str',
+ 'invest_currency': 'str',
+ 'exercise_currency': 'str',
+ 'exercise_price': 'str',
+ 'settlement_price': 'str',
+ 'settlement_currency': 'str',
+ 'apy_display': 'str',
+ 'apy_settlement': 'str',
+ 'delivery_time': 'int',
+ 'text': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'plan_id': 'plan_id',
+ 'copies': 'copies',
+ 'invest_amount': 'invest_amount',
+ 'settlement_amount': 'settlement_amount',
+ 'create_time': 'create_time',
+ 'complete_time': 'complete_time',
+ 'status': 'status',
+ 'invest_currency': 'invest_currency',
+ 'exercise_currency': 'exercise_currency',
+ 'exercise_price': 'exercise_price',
+ 'settlement_price': 'settlement_price',
+ 'settlement_currency': 'settlement_currency',
+ 'apy_display': 'apy_display',
+ 'apy_settlement': 'apy_settlement',
+ 'delivery_time': 'delivery_time',
+ 'text': 'text'
+ }
+
+ def __init__(self, id=None, plan_id=None, copies=None, invest_amount=None, settlement_amount=None, create_time=None, complete_time=None, status=None, invest_currency=None, exercise_currency=None, exercise_price=None, settlement_price=None, settlement_currency=None, apy_display=None, apy_settlement=None, delivery_time=None, text=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, int, str, str, str, int, int, str, str, str, str, str, str, str, str, int, str, Configuration) -> None
+ """DualGetOrders - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._id = None
+ self._plan_id = None
+ self._copies = None
+ self._invest_amount = None
+ self._settlement_amount = None
+ self._create_time = None
+ self._complete_time = None
+ self._status = None
+ self._invest_currency = None
+ self._exercise_currency = None
+ self._exercise_price = None
+ self._settlement_price = None
+ self._settlement_currency = None
+ self._apy_display = None
+ self._apy_settlement = None
+ self._delivery_time = None
+ self._text = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if plan_id is not None:
+ self.plan_id = plan_id
+ if copies is not None:
+ self.copies = copies
+ if invest_amount is not None:
+ self.invest_amount = invest_amount
+ if settlement_amount is not None:
+ self.settlement_amount = settlement_amount
+ if create_time is not None:
+ self.create_time = create_time
+ if complete_time is not None:
+ self.complete_time = complete_time
+ if status is not None:
+ self.status = status
+ if invest_currency is not None:
+ self.invest_currency = invest_currency
+ if exercise_currency is not None:
+ self.exercise_currency = exercise_currency
+ if exercise_price is not None:
+ self.exercise_price = exercise_price
+ if settlement_price is not None:
+ self.settlement_price = settlement_price
+ if settlement_currency is not None:
+ self.settlement_currency = settlement_currency
+ if apy_display is not None:
+ self.apy_display = apy_display
+ if apy_settlement is not None:
+ self.apy_settlement = apy_settlement
+ if delivery_time is not None:
+ self.delivery_time = delivery_time
+ if text is not None:
+ self.text = text
+
+ @property
+ def id(self):
+ """Gets the id of this DualGetOrders. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The id of this DualGetOrders. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this DualGetOrders.
+
+ Order ID # noqa: E501
+
+ :param id: The id of this DualGetOrders. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ @property
+ def plan_id(self):
+ """Gets the plan_id of this DualGetOrders. # noqa: E501
+
+ Product ID # noqa: E501
+
+ :return: The plan_id of this DualGetOrders. # noqa: E501
+ :rtype: int
+ """
+ return self._plan_id
+
+ @plan_id.setter
+ def plan_id(self, plan_id):
+ """Sets the plan_id of this DualGetOrders.
+
+ Product ID # noqa: E501
+
+ :param plan_id: The plan_id of this DualGetOrders. # noqa: E501
+ :type: int
+ """
+
+ self._plan_id = plan_id
+
+ @property
+ def copies(self):
+ """Gets the copies of this DualGetOrders. # noqa: E501
+
+ Units # noqa: E501
+
+ :return: The copies of this DualGetOrders. # noqa: E501
+ :rtype: str
+ """
+ return self._copies
+
+ @copies.setter
+ def copies(self, copies):
+ """Sets the copies of this DualGetOrders.
+
+ Units # noqa: E501
+
+ :param copies: The copies of this DualGetOrders. # noqa: E501
+ :type: str
+ """
+
+ self._copies = copies
+
+ @property
+ def invest_amount(self):
+ """Gets the invest_amount of this DualGetOrders. # noqa: E501
+
+ Investment Quantity # noqa: E501
+
+ :return: The invest_amount of this DualGetOrders. # noqa: E501
+ :rtype: str
+ """
+ return self._invest_amount
+
+ @invest_amount.setter
+ def invest_amount(self, invest_amount):
+ """Sets the invest_amount of this DualGetOrders.
+
+ Investment Quantity # noqa: E501
+
+ :param invest_amount: The invest_amount of this DualGetOrders. # noqa: E501
+ :type: str
+ """
+
+ self._invest_amount = invest_amount
+
+ @property
+ def settlement_amount(self):
+ """Gets the settlement_amount of this DualGetOrders. # noqa: E501
+
+ Settlement Quantity # noqa: E501
+
+ :return: The settlement_amount of this DualGetOrders. # noqa: E501
+ :rtype: str
+ """
+ return self._settlement_amount
+
+ @settlement_amount.setter
+ def settlement_amount(self, settlement_amount):
+ """Sets the settlement_amount of this DualGetOrders.
+
+ Settlement Quantity # noqa: E501
+
+ :param settlement_amount: The settlement_amount of this DualGetOrders. # noqa: E501
+ :type: str
+ """
+
+ self._settlement_amount = settlement_amount
+
+ @property
+ def create_time(self):
+ """Gets the create_time of this DualGetOrders. # noqa: E501
+
+ Created time # noqa: E501
+
+ :return: The create_time of this DualGetOrders. # noqa: E501
+ :rtype: int
+ """
+ return self._create_time
+
+ @create_time.setter
+ def create_time(self, create_time):
+ """Sets the create_time of this DualGetOrders.
+
+ Created time # noqa: E501
+
+ :param create_time: The create_time of this DualGetOrders. # noqa: E501
+ :type: int
+ """
+
+ self._create_time = create_time
+
+ @property
+ def complete_time(self):
+ """Gets the complete_time of this DualGetOrders. # noqa: E501
+
+ Completed Time # noqa: E501
+
+ :return: The complete_time of this DualGetOrders. # noqa: E501
+ :rtype: int
+ """
+ return self._complete_time
+
+ @complete_time.setter
+ def complete_time(self, complete_time):
+ """Sets the complete_time of this DualGetOrders.
+
+ Completed Time # noqa: E501
+
+ :param complete_time: The complete_time of this DualGetOrders. # noqa: E501
+ :type: int
+ """
+
+ self._complete_time = complete_time
+
+ @property
+ def status(self):
+ """Gets the status of this DualGetOrders. # noqa: E501
+
+ Status: `INIT`-Created `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-Settlement Processing `CANCELED`-Canceled `FAILED`-Failed # noqa: E501
+
+ :return: The status of this DualGetOrders. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this DualGetOrders.
+
+ Status: `INIT`-Created `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-Settlement Processing `CANCELED`-Canceled `FAILED`-Failed # noqa: E501
+
+ :param status: The status of this DualGetOrders. # noqa: E501
+ :type: str
+ """
+
+ self._status = status
+
+ @property
+ def invest_currency(self):
+ """Gets the invest_currency of this DualGetOrders. # noqa: E501
+
+ Investment Token # noqa: E501
+
+ :return: The invest_currency of this DualGetOrders. # noqa: E501
+ :rtype: str
+ """
+ return self._invest_currency
+
+ @invest_currency.setter
+ def invest_currency(self, invest_currency):
+ """Sets the invest_currency of this DualGetOrders.
+
+ Investment Token # noqa: E501
+
+ :param invest_currency: The invest_currency of this DualGetOrders. # noqa: E501
+ :type: str
+ """
+
+ self._invest_currency = invest_currency
+
+ @property
+ def exercise_currency(self):
+ """Gets the exercise_currency of this DualGetOrders. # noqa: E501
+
+ Strike Token # noqa: E501
+
+ :return: The exercise_currency of this DualGetOrders. # noqa: E501
+ :rtype: str
+ """
+ return self._exercise_currency
+
+ @exercise_currency.setter
+ def exercise_currency(self, exercise_currency):
+ """Sets the exercise_currency of this DualGetOrders.
+
+ Strike Token # noqa: E501
+
+ :param exercise_currency: The exercise_currency of this DualGetOrders. # noqa: E501
+ :type: str
+ """
+
+ self._exercise_currency = exercise_currency
+
+ @property
+ def exercise_price(self):
+ """Gets the exercise_price of this DualGetOrders. # noqa: E501
+
+ Strike price # noqa: E501
+
+ :return: The exercise_price of this DualGetOrders. # noqa: E501
+ :rtype: str
+ """
+ return self._exercise_price
+
+ @exercise_price.setter
+ def exercise_price(self, exercise_price):
+ """Sets the exercise_price of this DualGetOrders.
+
+ Strike price # noqa: E501
+
+ :param exercise_price: The exercise_price of this DualGetOrders. # noqa: E501
+ :type: str
+ """
+
+ self._exercise_price = exercise_price
+
+ @property
+ def settlement_price(self):
+ """Gets the settlement_price of this DualGetOrders. # noqa: E501
+
+ Settlement price # noqa: E501
+
+ :return: The settlement_price of this DualGetOrders. # noqa: E501
+ :rtype: str
+ """
+ return self._settlement_price
+
+ @settlement_price.setter
+ def settlement_price(self, settlement_price):
+ """Sets the settlement_price of this DualGetOrders.
+
+ Settlement price # noqa: E501
+
+ :param settlement_price: The settlement_price of this DualGetOrders. # noqa: E501
+ :type: str
+ """
+
+ self._settlement_price = settlement_price
+
+ @property
+ def settlement_currency(self):
+ """Gets the settlement_currency of this DualGetOrders. # noqa: E501
+
+ Settlement currency # noqa: E501
+
+ :return: The settlement_currency of this DualGetOrders. # noqa: E501
+ :rtype: str
+ """
+ return self._settlement_currency
+
+ @settlement_currency.setter
+ def settlement_currency(self, settlement_currency):
+ """Sets the settlement_currency of this DualGetOrders.
+
+ Settlement currency # noqa: E501
+
+ :param settlement_currency: The settlement_currency of this DualGetOrders. # noqa: E501
+ :type: str
+ """
+
+ self._settlement_currency = settlement_currency
+
+ @property
+ def apy_display(self):
+ """Gets the apy_display of this DualGetOrders. # noqa: E501
+
+ Annual Yield # noqa: E501
+
+ :return: The apy_display of this DualGetOrders. # noqa: E501
+ :rtype: str
+ """
+ return self._apy_display
+
+ @apy_display.setter
+ def apy_display(self, apy_display):
+ """Sets the apy_display of this DualGetOrders.
+
+ Annual Yield # noqa: E501
+
+ :param apy_display: The apy_display of this DualGetOrders. # noqa: E501
+ :type: str
+ """
+
+ self._apy_display = apy_display
+
+ @property
+ def apy_settlement(self):
+ """Gets the apy_settlement of this DualGetOrders. # noqa: E501
+
+ Settlement Annual Yield # noqa: E501
+
+ :return: The apy_settlement of this DualGetOrders. # noqa: E501
+ :rtype: str
+ """
+ return self._apy_settlement
+
+ @apy_settlement.setter
+ def apy_settlement(self, apy_settlement):
+ """Sets the apy_settlement of this DualGetOrders.
+
+ Settlement Annual Yield # noqa: E501
+
+ :param apy_settlement: The apy_settlement of this DualGetOrders. # noqa: E501
+ :type: str
+ """
+
+ self._apy_settlement = apy_settlement
+
+ @property
+ def delivery_time(self):
+ """Gets the delivery_time of this DualGetOrders. # noqa: E501
+
+ Settlement time # noqa: E501
+
+ :return: The delivery_time of this DualGetOrders. # noqa: E501
+ :rtype: int
+ """
+ return self._delivery_time
+
+ @delivery_time.setter
+ def delivery_time(self, delivery_time):
+ """Sets the delivery_time of this DualGetOrders.
+
+ Settlement time # noqa: E501
+
+ :param delivery_time: The delivery_time of this DualGetOrders. # noqa: E501
+ :type: int
+ """
+
+ self._delivery_time = delivery_time
+
+ @property
+ def text(self):
+ """Gets the text of this DualGetOrders. # noqa: E501
+
+ Custom order information # noqa: E501
+
+ :return: The text of this DualGetOrders. # noqa: E501
+ :rtype: str
+ """
+ return self._text
+
+ @text.setter
+ def text(self, text):
+ """Sets the text of this DualGetOrders.
+
+ Custom order information # noqa: E501
+
+ :param text: The text of this DualGetOrders. # noqa: E501
+ :type: str
+ """
+
+ self._text = text
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, DualGetOrders):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, DualGetOrders):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/dual_get_plans.py b/gate_api/models/dual_get_plans.py
new file mode 100644
index 0000000..90808a3
--- /dev/null
+++ b/gate_api/models/dual_get_plans.py
@@ -0,0 +1,459 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class DualGetPlans(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'int',
+ 'instrument_name': 'str',
+ 'invest_currency': 'str',
+ 'exercise_currency': 'str',
+ 'exercise_price': 'float',
+ 'delivery_time': 'int',
+ 'min_copies': 'int',
+ 'max_copies': 'int',
+ 'per_value': 'str',
+ 'apy_display': 'str',
+ 'start_time': 'int',
+ 'end_time': 'int',
+ 'status': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'instrument_name': 'instrument_name',
+ 'invest_currency': 'invest_currency',
+ 'exercise_currency': 'exercise_currency',
+ 'exercise_price': 'exercise_price',
+ 'delivery_time': 'delivery_time',
+ 'min_copies': 'min_copies',
+ 'max_copies': 'max_copies',
+ 'per_value': 'per_value',
+ 'apy_display': 'apy_display',
+ 'start_time': 'start_time',
+ 'end_time': 'end_time',
+ 'status': 'status'
+ }
+
+ def __init__(self, id=None, instrument_name=None, invest_currency=None, exercise_currency=None, exercise_price=None, delivery_time=None, min_copies=None, max_copies=None, per_value=None, apy_display=None, start_time=None, end_time=None, status=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, str, float, int, int, int, str, str, int, int, str, Configuration) -> None
+ """DualGetPlans - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._id = None
+ self._instrument_name = None
+ self._invest_currency = None
+ self._exercise_currency = None
+ self._exercise_price = None
+ self._delivery_time = None
+ self._min_copies = None
+ self._max_copies = None
+ self._per_value = None
+ self._apy_display = None
+ self._start_time = None
+ self._end_time = None
+ self._status = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if instrument_name is not None:
+ self.instrument_name = instrument_name
+ if invest_currency is not None:
+ self.invest_currency = invest_currency
+ if exercise_currency is not None:
+ self.exercise_currency = exercise_currency
+ if exercise_price is not None:
+ self.exercise_price = exercise_price
+ if delivery_time is not None:
+ self.delivery_time = delivery_time
+ if min_copies is not None:
+ self.min_copies = min_copies
+ if max_copies is not None:
+ self.max_copies = max_copies
+ if per_value is not None:
+ self.per_value = per_value
+ if apy_display is not None:
+ self.apy_display = apy_display
+ if start_time is not None:
+ self.start_time = start_time
+ if end_time is not None:
+ self.end_time = end_time
+ if status is not None:
+ self.status = status
+
+ @property
+ def id(self):
+ """Gets the id of this DualGetPlans. # noqa: E501
+
+ Product ID # noqa: E501
+
+ :return: The id of this DualGetPlans. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this DualGetPlans.
+
+ Product ID # noqa: E501
+
+ :param id: The id of this DualGetPlans. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ @property
+ def instrument_name(self):
+ """Gets the instrument_name of this DualGetPlans. # noqa: E501
+
+ Product Name # noqa: E501
+
+ :return: The instrument_name of this DualGetPlans. # noqa: E501
+ :rtype: str
+ """
+ return self._instrument_name
+
+ @instrument_name.setter
+ def instrument_name(self, instrument_name):
+ """Sets the instrument_name of this DualGetPlans.
+
+ Product Name # noqa: E501
+
+ :param instrument_name: The instrument_name of this DualGetPlans. # noqa: E501
+ :type: str
+ """
+
+ self._instrument_name = instrument_name
+
+ @property
+ def invest_currency(self):
+ """Gets the invest_currency of this DualGetPlans. # noqa: E501
+
+ Investment Token # noqa: E501
+
+ :return: The invest_currency of this DualGetPlans. # noqa: E501
+ :rtype: str
+ """
+ return self._invest_currency
+
+ @invest_currency.setter
+ def invest_currency(self, invest_currency):
+ """Sets the invest_currency of this DualGetPlans.
+
+ Investment Token # noqa: E501
+
+ :param invest_currency: The invest_currency of this DualGetPlans. # noqa: E501
+ :type: str
+ """
+
+ self._invest_currency = invest_currency
+
+ @property
+ def exercise_currency(self):
+ """Gets the exercise_currency of this DualGetPlans. # noqa: E501
+
+ Strike Token # noqa: E501
+
+ :return: The exercise_currency of this DualGetPlans. # noqa: E501
+ :rtype: str
+ """
+ return self._exercise_currency
+
+ @exercise_currency.setter
+ def exercise_currency(self, exercise_currency):
+ """Sets the exercise_currency of this DualGetPlans.
+
+ Strike Token # noqa: E501
+
+ :param exercise_currency: The exercise_currency of this DualGetPlans. # noqa: E501
+ :type: str
+ """
+
+ self._exercise_currency = exercise_currency
+
+ @property
+ def exercise_price(self):
+ """Gets the exercise_price of this DualGetPlans. # noqa: E501
+
+ Strike price # noqa: E501
+
+ :return: The exercise_price of this DualGetPlans. # noqa: E501
+ :rtype: float
+ """
+ return self._exercise_price
+
+ @exercise_price.setter
+ def exercise_price(self, exercise_price):
+ """Sets the exercise_price of this DualGetPlans.
+
+ Strike price # noqa: E501
+
+ :param exercise_price: The exercise_price of this DualGetPlans. # noqa: E501
+ :type: float
+ """
+
+ self._exercise_price = exercise_price
+
+ @property
+ def delivery_time(self):
+ """Gets the delivery_time of this DualGetPlans. # noqa: E501
+
+ Settlement time # noqa: E501
+
+ :return: The delivery_time of this DualGetPlans. # noqa: E501
+ :rtype: int
+ """
+ return self._delivery_time
+
+ @delivery_time.setter
+ def delivery_time(self, delivery_time):
+ """Sets the delivery_time of this DualGetPlans.
+
+ Settlement time # noqa: E501
+
+ :param delivery_time: The delivery_time of this DualGetPlans. # noqa: E501
+ :type: int
+ """
+
+ self._delivery_time = delivery_time
+
+ @property
+ def min_copies(self):
+ """Gets the min_copies of this DualGetPlans. # noqa: E501
+
+ Minimum Units # noqa: E501
+
+ :return: The min_copies of this DualGetPlans. # noqa: E501
+ :rtype: int
+ """
+ return self._min_copies
+
+ @min_copies.setter
+ def min_copies(self, min_copies):
+ """Sets the min_copies of this DualGetPlans.
+
+ Minimum Units # noqa: E501
+
+ :param min_copies: The min_copies of this DualGetPlans. # noqa: E501
+ :type: int
+ """
+
+ self._min_copies = min_copies
+
+ @property
+ def max_copies(self):
+ """Gets the max_copies of this DualGetPlans. # noqa: E501
+
+ Maximum Units # noqa: E501
+
+ :return: The max_copies of this DualGetPlans. # noqa: E501
+ :rtype: int
+ """
+ return self._max_copies
+
+ @max_copies.setter
+ def max_copies(self, max_copies):
+ """Sets the max_copies of this DualGetPlans.
+
+ Maximum Units # noqa: E501
+
+ :param max_copies: The max_copies of this DualGetPlans. # noqa: E501
+ :type: int
+ """
+
+ self._max_copies = max_copies
+
+ @property
+ def per_value(self):
+ """Gets the per_value of this DualGetPlans. # noqa: E501
+
+ Value Per Unit # noqa: E501
+
+ :return: The per_value of this DualGetPlans. # noqa: E501
+ :rtype: str
+ """
+ return self._per_value
+
+ @per_value.setter
+ def per_value(self, per_value):
+ """Sets the per_value of this DualGetPlans.
+
+ Value Per Unit # noqa: E501
+
+ :param per_value: The per_value of this DualGetPlans. # noqa: E501
+ :type: str
+ """
+
+ self._per_value = per_value
+
+ @property
+ def apy_display(self):
+ """Gets the apy_display of this DualGetPlans. # noqa: E501
+
+ Annual Yield # noqa: E501
+
+ :return: The apy_display of this DualGetPlans. # noqa: E501
+ :rtype: str
+ """
+ return self._apy_display
+
+ @apy_display.setter
+ def apy_display(self, apy_display):
+ """Sets the apy_display of this DualGetPlans.
+
+ Annual Yield # noqa: E501
+
+ :param apy_display: The apy_display of this DualGetPlans. # noqa: E501
+ :type: str
+ """
+
+ self._apy_display = apy_display
+
+ @property
+ def start_time(self):
+ """Gets the start_time of this DualGetPlans. # noqa: E501
+
+ Start Time # noqa: E501
+
+ :return: The start_time of this DualGetPlans. # noqa: E501
+ :rtype: int
+ """
+ return self._start_time
+
+ @start_time.setter
+ def start_time(self, start_time):
+ """Sets the start_time of this DualGetPlans.
+
+ Start Time # noqa: E501
+
+ :param start_time: The start_time of this DualGetPlans. # noqa: E501
+ :type: int
+ """
+
+ self._start_time = start_time
+
+ @property
+ def end_time(self):
+ """Gets the end_time of this DualGetPlans. # noqa: E501
+
+ End time # noqa: E501
+
+ :return: The end_time of this DualGetPlans. # noqa: E501
+ :rtype: int
+ """
+ return self._end_time
+
+ @end_time.setter
+ def end_time(self, end_time):
+ """Sets the end_time of this DualGetPlans.
+
+ End time # noqa: E501
+
+ :param end_time: The end_time of this DualGetPlans. # noqa: E501
+ :type: int
+ """
+
+ self._end_time = end_time
+
+ @property
+ def status(self):
+ """Gets the status of this DualGetPlans. # noqa: E501
+
+ Status: `NOTSTARTED`-Not Started `ONGOING`-In Progress `ENDED`-Ended # noqa: E501
+
+ :return: The status of this DualGetPlans. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this DualGetPlans.
+
+ Status: `NOTSTARTED`-Not Started `ONGOING`-In Progress `ENDED`-Ended # noqa: E501
+
+ :param status: The status of this DualGetPlans. # noqa: E501
+ :type: str
+ """
+
+ self._status = status
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, DualGetPlans):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, DualGetPlans):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/eth2_rate_list.py b/gate_api/models/eth2_rate_list.py
new file mode 100644
index 0000000..c714e00
--- /dev/null
+++ b/gate_api/models/eth2_rate_list.py
@@ -0,0 +1,179 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class Eth2RateList(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'date_time': 'int',
+ 'date': 'str',
+ 'rate': 'str'
+ }
+
+ attribute_map = {
+ 'date_time': 'date_time',
+ 'date': 'date',
+ 'rate': 'rate'
+ }
+
+ def __init__(self, date_time=None, date=None, rate=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, Configuration) -> None
+ """Eth2RateList - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._date_time = None
+ self._date = None
+ self._rate = None
+ self.discriminator = None
+
+ if date_time is not None:
+ self.date_time = date_time
+ if date is not None:
+ self.date = date
+ if rate is not None:
+ self.rate = rate
+
+ @property
+ def date_time(self):
+ """Gets the date_time of this Eth2RateList. # noqa: E501
+
+ Date Timestamp # noqa: E501
+
+ :return: The date_time of this Eth2RateList. # noqa: E501
+ :rtype: int
+ """
+ return self._date_time
+
+ @date_time.setter
+ def date_time(self, date_time):
+ """Sets the date_time of this Eth2RateList.
+
+ Date Timestamp # noqa: E501
+
+ :param date_time: The date_time of this Eth2RateList. # noqa: E501
+ :type: int
+ """
+
+ self._date_time = date_time
+
+ @property
+ def date(self):
+ """Gets the date of this Eth2RateList. # noqa: E501
+
+ Date # noqa: E501
+
+ :return: The date of this Eth2RateList. # noqa: E501
+ :rtype: str
+ """
+ return self._date
+
+ @date.setter
+ def date(self, date):
+ """Sets the date of this Eth2RateList.
+
+ Date # noqa: E501
+
+ :param date: The date of this Eth2RateList. # noqa: E501
+ :type: str
+ """
+
+ self._date = date
+
+ @property
+ def rate(self):
+ """Gets the rate of this Eth2RateList. # noqa: E501
+
+ Percentage Rate # noqa: E501
+
+ :return: The rate of this Eth2RateList. # noqa: E501
+ :rtype: str
+ """
+ return self._rate
+
+ @rate.setter
+ def rate(self, rate):
+ """Sets the rate of this Eth2RateList.
+
+ Percentage Rate # noqa: E501
+
+ :param rate: The rate of this Eth2RateList. # noqa: E501
+ :type: str
+ """
+
+ self._rate = rate
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Eth2RateList):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, Eth2RateList):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/eth2_swap.py b/gate_api/models/eth2_swap.py
new file mode 100644
index 0000000..ac51063
--- /dev/null
+++ b/gate_api/models/eth2_swap.py
@@ -0,0 +1,153 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class Eth2Swap(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'side': 'str',
+ 'amount': 'str'
+ }
+
+ attribute_map = {
+ 'side': 'side',
+ 'amount': 'amount'
+ }
+
+ def __init__(self, side=None, amount=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """Eth2Swap - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._side = None
+ self._amount = None
+ self.discriminator = None
+
+ self.side = side
+ self.amount = amount
+
+ @property
+ def side(self):
+ """Gets the side of this Eth2Swap. # noqa: E501
+
+ 1-Forward Swap (ETH -> ETH2), 2-Reverse Swap (ETH2 -> ETH) # noqa: E501
+
+ :return: The side of this Eth2Swap. # noqa: E501
+ :rtype: str
+ """
+ return self._side
+
+ @side.setter
+ def side(self, side):
+ """Sets the side of this Eth2Swap.
+
+ 1-Forward Swap (ETH -> ETH2), 2-Reverse Swap (ETH2 -> ETH) # noqa: E501
+
+ :param side: The side of this Eth2Swap. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501
+ raise ValueError("Invalid value for `side`, must not be `None`") # noqa: E501
+
+ self._side = side
+
+ @property
+ def amount(self):
+ """Gets the amount of this Eth2Swap. # noqa: E501
+
+ Swap Amount # noqa: E501
+
+ :return: The amount of this Eth2Swap. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this Eth2Swap.
+
+ Swap Amount # noqa: E501
+
+ :param amount: The amount of this Eth2Swap. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501
+ raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501
+
+ self._amount = amount
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Eth2Swap):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, Eth2Swap):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/find_coin.py b/gate_api/models/find_coin.py
new file mode 100644
index 0000000..a73037a
--- /dev/null
+++ b/gate_api/models/find_coin.py
@@ -0,0 +1,123 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class FindCoin(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'cointype': 'str'
+ }
+
+ attribute_map = {
+ 'cointype': 'cointype'
+ }
+
+ def __init__(self, cointype=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, Configuration) -> None
+ """FindCoin - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._cointype = None
+ self.discriminator = None
+
+ if cointype is not None:
+ self.cointype = cointype
+
+ @property
+ def cointype(self):
+ """Gets the cointype of this FindCoin. # noqa: E501
+
+ Currency type: swap - voucher; lock - locked position; debt - US Treasury bond. # noqa: E501
+
+ :return: The cointype of this FindCoin. # noqa: E501
+ :rtype: str
+ """
+ return self._cointype
+
+ @cointype.setter
+ def cointype(self, cointype):
+ """Sets the cointype of this FindCoin.
+
+ Currency type: swap - voucher; lock - locked position; debt - US Treasury bond. # noqa: E501
+
+ :param cointype: The cointype of this FindCoin. # noqa: E501
+ :type: str
+ """
+
+ self._cointype = cointype
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, FindCoin):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, FindCoin):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/flash_swap_currency.py b/gate_api/models/flash_swap_currency.py
deleted file mode 100644
index 50707a5..0000000
--- a/gate_api/models/flash_swap_currency.py
+++ /dev/null
@@ -1,202 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class FlashSwapCurrency(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {'currency': 'str', 'min_amount': 'str', 'max_amount': 'str', 'swappable': 'list[str]'}
-
- attribute_map = {
- 'currency': 'currency',
- 'min_amount': 'min_amount',
- 'max_amount': 'max_amount',
- 'swappable': 'swappable',
- }
-
- def __init__(
- self, currency=None, min_amount=None, max_amount=None, swappable=None, local_vars_configuration=None
- ): # noqa: E501
- # type: (str, str, str, list[str], Configuration) -> None
- """FlashSwapCurrency - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._currency = None
- self._min_amount = None
- self._max_amount = None
- self._swappable = None
- self.discriminator = None
-
- if currency is not None:
- self.currency = currency
- if min_amount is not None:
- self.min_amount = min_amount
- if max_amount is not None:
- self.max_amount = max_amount
- if swappable is not None:
- self.swappable = swappable
-
- @property
- def currency(self):
- """Gets the currency of this FlashSwapCurrency. # noqa: E501
-
- Currency name # noqa: E501
-
- :return: The currency of this FlashSwapCurrency. # noqa: E501
- :rtype: str
- """
- return self._currency
-
- @currency.setter
- def currency(self, currency):
- """Sets the currency of this FlashSwapCurrency.
-
- Currency name # noqa: E501
-
- :param currency: The currency of this FlashSwapCurrency. # noqa: E501
- :type: str
- """
-
- self._currency = currency
-
- @property
- def min_amount(self):
- """Gets the min_amount of this FlashSwapCurrency. # noqa: E501
-
- Minimum amount required in flash swap # noqa: E501
-
- :return: The min_amount of this FlashSwapCurrency. # noqa: E501
- :rtype: str
- """
- return self._min_amount
-
- @min_amount.setter
- def min_amount(self, min_amount):
- """Sets the min_amount of this FlashSwapCurrency.
-
- Minimum amount required in flash swap # noqa: E501
-
- :param min_amount: The min_amount of this FlashSwapCurrency. # noqa: E501
- :type: str
- """
-
- self._min_amount = min_amount
-
- @property
- def max_amount(self):
- """Gets the max_amount of this FlashSwapCurrency. # noqa: E501
-
- Maximum amount allowed in flash swap # noqa: E501
-
- :return: The max_amount of this FlashSwapCurrency. # noqa: E501
- :rtype: str
- """
- return self._max_amount
-
- @max_amount.setter
- def max_amount(self, max_amount):
- """Sets the max_amount of this FlashSwapCurrency.
-
- Maximum amount allowed in flash swap # noqa: E501
-
- :param max_amount: The max_amount of this FlashSwapCurrency. # noqa: E501
- :type: str
- """
-
- self._max_amount = max_amount
-
- @property
- def swappable(self):
- """Gets the swappable of this FlashSwapCurrency. # noqa: E501
-
- Currencies which can be swapped to from this currency # noqa: E501
-
- :return: The swappable of this FlashSwapCurrency. # noqa: E501
- :rtype: list[str]
- """
- return self._swappable
-
- @swappable.setter
- def swappable(self, swappable):
- """Sets the swappable of this FlashSwapCurrency.
-
- Currencies which can be swapped to from this currency # noqa: E501
-
- :param swappable: The swappable of this FlashSwapCurrency. # noqa: E501
- :type: list[str]
- """
-
- self._swappable = swappable
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, FlashSwapCurrency):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, FlashSwapCurrency):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/flash_swap_currency_pair.py b/gate_api/models/flash_swap_currency_pair.py
index 6600fe3..5a9ed86 100644
--- a/gate_api/models/flash_swap_currency_pair.py
+++ b/gate_api/models/flash_swap_currency_pair.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -39,7 +39,7 @@ class FlashSwapCurrencyPair(object):
'sell_min_amount': 'str',
'sell_max_amount': 'str',
'buy_min_amount': 'str',
- 'buy_max_amount': 'str',
+ 'buy_max_amount': 'str'
}
attribute_map = {
@@ -49,20 +49,10 @@ class FlashSwapCurrencyPair(object):
'sell_min_amount': 'sell_min_amount',
'sell_max_amount': 'sell_max_amount',
'buy_min_amount': 'buy_min_amount',
- 'buy_max_amount': 'buy_max_amount',
+ 'buy_max_amount': 'buy_max_amount'
}
- def __init__(
- self,
- currency_pair=None,
- sell_currency=None,
- buy_currency=None,
- sell_min_amount=None,
- sell_max_amount=None,
- buy_min_amount=None,
- buy_max_amount=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, currency_pair=None, sell_currency=None, buy_currency=None, sell_min_amount=None, sell_max_amount=None, buy_min_amount=None, buy_max_amount=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, str, str, str, Configuration) -> None
"""FlashSwapCurrencyPair - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -97,7 +87,7 @@ def __init__(
def currency_pair(self):
"""Gets the currency_pair of this FlashSwapCurrencyPair. # noqa: E501
- The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). # noqa: E501
+ Currency pair, `BTC_USDT` represents selling `BTC` and buying `USDT` # noqa: E501
:return: The currency_pair of this FlashSwapCurrencyPair. # noqa: E501
:rtype: str
@@ -108,7 +98,7 @@ def currency_pair(self):
def currency_pair(self, currency_pair):
"""Sets the currency_pair of this FlashSwapCurrencyPair.
- The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). # noqa: E501
+ Currency pair, `BTC_USDT` represents selling `BTC` and buying `USDT` # noqa: E501
:param currency_pair: The currency_pair of this FlashSwapCurrencyPair. # noqa: E501
:type: str
@@ -120,7 +110,7 @@ def currency_pair(self, currency_pair):
def sell_currency(self):
"""Gets the sell_currency of this FlashSwapCurrencyPair. # noqa: E501
- The currency to be sold # noqa: E501
+ Currency to sell # noqa: E501
:return: The sell_currency of this FlashSwapCurrencyPair. # noqa: E501
:rtype: str
@@ -131,7 +121,7 @@ def sell_currency(self):
def sell_currency(self, sell_currency):
"""Sets the sell_currency of this FlashSwapCurrencyPair.
- The currency to be sold # noqa: E501
+ Currency to sell # noqa: E501
:param sell_currency: The sell_currency of this FlashSwapCurrencyPair. # noqa: E501
:type: str
@@ -143,7 +133,7 @@ def sell_currency(self, sell_currency):
def buy_currency(self):
"""Gets the buy_currency of this FlashSwapCurrencyPair. # noqa: E501
- The currency to be bought # noqa: E501
+ Currency to buy # noqa: E501
:return: The buy_currency of this FlashSwapCurrencyPair. # noqa: E501
:rtype: str
@@ -154,7 +144,7 @@ def buy_currency(self):
def buy_currency(self, buy_currency):
"""Sets the buy_currency of this FlashSwapCurrencyPair.
- The currency to be bought # noqa: E501
+ Currency to buy # noqa: E501
:param buy_currency: The buy_currency of this FlashSwapCurrencyPair. # noqa: E501
:type: str
@@ -166,7 +156,7 @@ def buy_currency(self, buy_currency):
def sell_min_amount(self):
"""Gets the sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501
- The minimum quantity required for selling # noqa: E501
+ Minimum sell quantity # noqa: E501
:return: The sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501
:rtype: str
@@ -177,7 +167,7 @@ def sell_min_amount(self):
def sell_min_amount(self, sell_min_amount):
"""Sets the sell_min_amount of this FlashSwapCurrencyPair.
- The minimum quantity required for selling # noqa: E501
+ Minimum sell quantity # noqa: E501
:param sell_min_amount: The sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501
:type: str
@@ -189,7 +179,7 @@ def sell_min_amount(self, sell_min_amount):
def sell_max_amount(self):
"""Gets the sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501
- The maximum quantity allowed for selling # noqa: E501
+ Maximum sell quantity # noqa: E501
:return: The sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501
:rtype: str
@@ -200,7 +190,7 @@ def sell_max_amount(self):
def sell_max_amount(self, sell_max_amount):
"""Sets the sell_max_amount of this FlashSwapCurrencyPair.
- The maximum quantity allowed for selling # noqa: E501
+ Maximum sell quantity # noqa: E501
:param sell_max_amount: The sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501
:type: str
@@ -212,7 +202,7 @@ def sell_max_amount(self, sell_max_amount):
def buy_min_amount(self):
"""Gets the buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501
- The minimum quantity required for buying # noqa: E501
+ Minimum buy quantity # noqa: E501
:return: The buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501
:rtype: str
@@ -223,7 +213,7 @@ def buy_min_amount(self):
def buy_min_amount(self, buy_min_amount):
"""Sets the buy_min_amount of this FlashSwapCurrencyPair.
- The minimum quantity required for buying # noqa: E501
+ Minimum buy quantity # noqa: E501
:param buy_min_amount: The buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501
:type: str
@@ -235,7 +225,7 @@ def buy_min_amount(self, buy_min_amount):
def buy_max_amount(self):
"""Gets the buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501
- The maximum quantity allowed for buying # noqa: E501
+ Maximum buy quantity # noqa: E501
:return: The buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501
:rtype: str
@@ -246,7 +236,7 @@ def buy_max_amount(self):
def buy_max_amount(self, buy_max_amount):
"""Sets the buy_max_amount of this FlashSwapCurrencyPair.
- The maximum quantity allowed for buying # noqa: E501
+ Maximum buy quantity # noqa: E501
:param buy_max_amount: The buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501
:type: str
@@ -261,16 +251,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/flash_swap_order.py b/gate_api/models/flash_swap_order.py
index 74b4091..2be7592 100644
--- a/gate_api/models/flash_swap_order.py
+++ b/gate_api/models/flash_swap_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -41,7 +41,7 @@ class FlashSwapOrder(object):
'buy_currency': 'str',
'buy_amount': 'str',
'price': 'str',
- 'status': 'int',
+ 'status': 'int'
}
attribute_map = {
@@ -53,22 +53,10 @@ class FlashSwapOrder(object):
'buy_currency': 'buy_currency',
'buy_amount': 'buy_amount',
'price': 'price',
- 'status': 'status',
+ 'status': 'status'
}
- def __init__(
- self,
- id=None,
- create_time=None,
- user_id=None,
- sell_currency=None,
- sell_amount=None,
- buy_currency=None,
- buy_amount=None,
- price=None,
- status=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, id=None, create_time=None, user_id=None, sell_currency=None, sell_amount=None, buy_currency=None, buy_amount=None, price=None, status=None, local_vars_configuration=None): # noqa: E501
# type: (int, int, int, str, str, str, str, str, int, Configuration) -> None
"""FlashSwapOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -319,16 +307,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/flash_swap_order_preview.py b/gate_api/models/flash_swap_order_preview.py
index 565786a..d137d5a 100644
--- a/gate_api/models/flash_swap_order_preview.py
+++ b/gate_api/models/flash_swap_order_preview.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -38,7 +38,7 @@ class FlashSwapOrderPreview(object):
'sell_amount': 'str',
'buy_currency': 'str',
'buy_amount': 'str',
- 'price': 'str',
+ 'price': 'str'
}
attribute_map = {
@@ -47,19 +47,10 @@ class FlashSwapOrderPreview(object):
'sell_amount': 'sell_amount',
'buy_currency': 'buy_currency',
'buy_amount': 'buy_amount',
- 'price': 'price',
+ 'price': 'price'
}
- def __init__(
- self,
- preview_id=None,
- sell_currency=None,
- sell_amount=None,
- buy_currency=None,
- buy_amount=None,
- price=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, preview_id=None, sell_currency=None, sell_amount=None, buy_currency=None, buy_amount=None, price=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, str, str, Configuration) -> None
"""FlashSwapOrderPreview - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -114,7 +105,7 @@ def preview_id(self, preview_id):
def sell_currency(self):
"""Gets the sell_currency of this FlashSwapOrderPreview. # noqa: E501
- Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501
+ Name of the sold asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain # noqa: E501
:return: The sell_currency of this FlashSwapOrderPreview. # noqa: E501
:rtype: str
@@ -125,7 +116,7 @@ def sell_currency(self):
def sell_currency(self, sell_currency):
"""Sets the sell_currency of this FlashSwapOrderPreview.
- Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501
+ Name of the sold asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain # noqa: E501
:param sell_currency: The sell_currency of this FlashSwapOrderPreview. # noqa: E501
:type: str
@@ -160,7 +151,7 @@ def sell_amount(self, sell_amount):
def buy_currency(self):
"""Gets the buy_currency of this FlashSwapOrderPreview. # noqa: E501
- Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501
+ Name of the purchased asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain # noqa: E501
:return: The buy_currency of this FlashSwapOrderPreview. # noqa: E501
:rtype: str
@@ -171,7 +162,7 @@ def buy_currency(self):
def buy_currency(self, buy_currency):
"""Sets the buy_currency of this FlashSwapOrderPreview.
- Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501
+ Name of the purchased asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain # noqa: E501
:param buy_currency: The buy_currency of this FlashSwapOrderPreview. # noqa: E501
:type: str
@@ -232,16 +223,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/flash_swap_order_request.py b/gate_api/models/flash_swap_order_request.py
index 474878b..d89b46b 100644
--- a/gate_api/models/flash_swap_order_request.py
+++ b/gate_api/models/flash_swap_order_request.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -37,7 +37,7 @@ class FlashSwapOrderRequest(object):
'sell_currency': 'str',
'sell_amount': 'str',
'buy_currency': 'str',
- 'buy_amount': 'str',
+ 'buy_amount': 'str'
}
attribute_map = {
@@ -45,18 +45,10 @@ class FlashSwapOrderRequest(object):
'sell_currency': 'sell_currency',
'sell_amount': 'sell_amount',
'buy_currency': 'buy_currency',
- 'buy_amount': 'buy_amount',
+ 'buy_amount': 'buy_amount'
}
- def __init__(
- self,
- preview_id=None,
- sell_currency=None,
- sell_amount=None,
- buy_currency=None,
- buy_amount=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, preview_id=None, sell_currency=None, sell_amount=None, buy_currency=None, buy_amount=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, str, Configuration) -> None
"""FlashSwapOrderRequest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -105,7 +97,7 @@ def preview_id(self, preview_id):
def sell_currency(self):
"""Gets the sell_currency of this FlashSwapOrderRequest. # noqa: E501
- 卖出的资产名称, 根据接口`查询支持闪兑的所有交易对列表 GET /flash_swap/currency_pairs`获取 # noqa: E501
+ Name of the asset to be sold, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap # noqa: E501
:return: The sell_currency of this FlashSwapOrderRequest. # noqa: E501
:rtype: str
@@ -116,7 +108,7 @@ def sell_currency(self):
def sell_currency(self, sell_currency):
"""Sets the sell_currency of this FlashSwapOrderRequest.
- 卖出的资产名称, 根据接口`查询支持闪兑的所有交易对列表 GET /flash_swap/currency_pairs`获取 # noqa: E501
+ Name of the asset to be sold, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap # noqa: E501
:param sell_currency: The sell_currency of this FlashSwapOrderRequest. # noqa: E501
:type: str
@@ -155,7 +147,7 @@ def sell_amount(self, sell_amount):
def buy_currency(self):
"""Gets the buy_currency of this FlashSwapOrderRequest. # noqa: E501
- 买入的资产名称, 根据接口`查询支持闪兑的所有交易对列表 GET /flash_swap/currency_pairs`获取 # noqa: E501
+ Name of the asset to be bought, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap # noqa: E501
:return: The buy_currency of this FlashSwapOrderRequest. # noqa: E501
:rtype: str
@@ -166,7 +158,7 @@ def buy_currency(self):
def buy_currency(self, buy_currency):
"""Sets the buy_currency of this FlashSwapOrderRequest.
- 买入的资产名称, 根据接口`查询支持闪兑的所有交易对列表 GET /flash_swap/currency_pairs`获取 # noqa: E501
+ Name of the asset to be bought, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap # noqa: E501
:param buy_currency: The buy_currency of this FlashSwapOrderRequest. # noqa: E501
:type: str
@@ -208,16 +200,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/flash_swap_preview_request.py b/gate_api/models/flash_swap_preview_request.py
index f00c422..3cfe1d1 100644
--- a/gate_api/models/flash_swap_preview_request.py
+++ b/gate_api/models/flash_swap_preview_request.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,18 +32,21 @@ class FlashSwapPreviewRequest(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'sell_currency': 'str', 'sell_amount': 'str', 'buy_currency': 'str', 'buy_amount': 'str'}
+ openapi_types = {
+ 'sell_currency': 'str',
+ 'sell_amount': 'str',
+ 'buy_currency': 'str',
+ 'buy_amount': 'str'
+ }
attribute_map = {
'sell_currency': 'sell_currency',
'sell_amount': 'sell_amount',
'buy_currency': 'buy_currency',
- 'buy_amount': 'buy_amount',
+ 'buy_amount': 'buy_amount'
}
- def __init__(
- self, sell_currency=None, sell_amount=None, buy_currency=None, buy_amount=None, local_vars_configuration=None
- ): # noqa: E501
+ def __init__(self, sell_currency=None, sell_amount=None, buy_currency=None, buy_amount=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, Configuration) -> None
"""FlashSwapPreviewRequest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -67,7 +70,7 @@ def __init__(
def sell_currency(self):
"""Gets the sell_currency of this FlashSwapPreviewRequest. # noqa: E501
- 卖出的资产名称, 根据接口`查询支持闪兑的所有交易对列表 GET /flash_swap/currency_pairs`获取 # noqa: E501
+ The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs # noqa: E501
:return: The sell_currency of this FlashSwapPreviewRequest. # noqa: E501
:rtype: str
@@ -78,7 +81,7 @@ def sell_currency(self):
def sell_currency(self, sell_currency):
"""Sets the sell_currency of this FlashSwapPreviewRequest.
- 卖出的资产名称, 根据接口`查询支持闪兑的所有交易对列表 GET /flash_swap/currency_pairs`获取 # noqa: E501
+ The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs # noqa: E501
:param sell_currency: The sell_currency of this FlashSwapPreviewRequest. # noqa: E501
:type: str
@@ -115,7 +118,7 @@ def sell_amount(self, sell_amount):
def buy_currency(self):
"""Gets the buy_currency of this FlashSwapPreviewRequest. # noqa: E501
- 买入的资产名称, 根据接口`查询支持闪兑的所有交易对列表 GET /flash_swap/currency_pairs`获取 # noqa: E501
+ The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs # noqa: E501
:return: The buy_currency of this FlashSwapPreviewRequest. # noqa: E501
:rtype: str
@@ -126,7 +129,7 @@ def buy_currency(self):
def buy_currency(self, buy_currency):
"""Sets the buy_currency of this FlashSwapPreviewRequest.
- 买入的资产名称, 根据接口`查询支持闪兑的所有交易对列表 GET /flash_swap/currency_pairs`获取 # noqa: E501
+ The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs # noqa: E501
:param buy_currency: The buy_currency of this FlashSwapPreviewRequest. # noqa: E501
:type: str
@@ -166,16 +169,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/funding_account.py b/gate_api/models/funding_account.py
index bd4fa7b..9ba5a0f 100644
--- a/gate_api/models/funding_account.py
+++ b/gate_api/models/funding_account.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,19 +32,23 @@ class FundingAccount(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'available': 'str', 'locked': 'str', 'lent': 'str', 'total_lent': 'str'}
+ openapi_types = {
+ 'currency': 'str',
+ 'available': 'str',
+ 'locked': 'str',
+ 'lent': 'str',
+ 'total_lent': 'str'
+ }
attribute_map = {
'currency': 'currency',
'available': 'available',
'locked': 'locked',
'lent': 'lent',
- 'total_lent': 'total_lent',
+ 'total_lent': 'total_lent'
}
- def __init__(
- self, currency=None, available=None, locked=None, lent=None, total_lent=None, local_vars_configuration=None
- ): # noqa: E501
+ def __init__(self, currency=None, available=None, locked=None, lent=None, total_lent=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, str, Configuration) -> None
"""FundingAccount - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -191,16 +195,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/funding_book_item.py b/gate_api/models/funding_book_item.py
deleted file mode 100644
index 16bd369..0000000
--- a/gate_api/models/funding_book_item.py
+++ /dev/null
@@ -1,169 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class FundingBookItem(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {'rate': 'str', 'amount': 'str', 'days': 'int'}
-
- attribute_map = {'rate': 'rate', 'amount': 'amount', 'days': 'days'}
-
- def __init__(self, rate=None, amount=None, days=None, local_vars_configuration=None): # noqa: E501
- # type: (str, str, int, Configuration) -> None
- """FundingBookItem - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._rate = None
- self._amount = None
- self._days = None
- self.discriminator = None
-
- if rate is not None:
- self.rate = rate
- if amount is not None:
- self.amount = amount
- if days is not None:
- self.days = days
-
- @property
- def rate(self):
- """Gets the rate of this FundingBookItem. # noqa: E501
-
- Loan rate (daily rate) # noqa: E501
-
- :return: The rate of this FundingBookItem. # noqa: E501
- :rtype: str
- """
- return self._rate
-
- @rate.setter
- def rate(self, rate):
- """Sets the rate of this FundingBookItem.
-
- Loan rate (daily rate) # noqa: E501
-
- :param rate: The rate of this FundingBookItem. # noqa: E501
- :type: str
- """
-
- self._rate = rate
-
- @property
- def amount(self):
- """Gets the amount of this FundingBookItem. # noqa: E501
-
- Borrowable amount # noqa: E501
-
- :return: The amount of this FundingBookItem. # noqa: E501
- :rtype: str
- """
- return self._amount
-
- @amount.setter
- def amount(self, amount):
- """Sets the amount of this FundingBookItem.
-
- Borrowable amount # noqa: E501
-
- :param amount: The amount of this FundingBookItem. # noqa: E501
- :type: str
- """
-
- self._amount = amount
-
- @property
- def days(self):
- """Gets the days of this FundingBookItem. # noqa: E501
-
- The number of days till the loan repayment's dateline # noqa: E501
-
- :return: The days of this FundingBookItem. # noqa: E501
- :rtype: int
- """
- return self._days
-
- @days.setter
- def days(self, days):
- """Sets the days of this FundingBookItem.
-
- The number of days till the loan repayment's dateline # noqa: E501
-
- :param days: The days of this FundingBookItem. # noqa: E501
- :type: int
- """
-
- self._days = days
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, FundingBookItem):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, FundingBookItem):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/funding_rate_record.py b/gate_api/models/funding_rate_record.py
index 3658aaa..cf06b1c 100644
--- a/gate_api/models/funding_rate_record.py
+++ b/gate_api/models/funding_rate_record.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class FundingRateRecord(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'t': 'int', 'r': 'str'}
+ openapi_types = {
+ 't': 'int',
+ 'r': 'str'
+ }
- attribute_map = {'t': 't', 'r': 'r'}
+ attribute_map = {
+ 't': 't',
+ 'r': 'r'
+ }
def __init__(self, t=None, r=None, local_vars_configuration=None): # noqa: E501
# type: (int, str, Configuration) -> None
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/future_cancel_order_result.py b/gate_api/models/future_cancel_order_result.py
new file mode 100644
index 0000000..7f7ccd4
--- /dev/null
+++ b/gate_api/models/future_cancel_order_result.py
@@ -0,0 +1,207 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class FutureCancelOrderResult(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'str',
+ 'user_id': 'int',
+ 'succeeded': 'bool',
+ 'message': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'user_id': 'user_id',
+ 'succeeded': 'succeeded',
+ 'message': 'message'
+ }
+
+ def __init__(self, id=None, user_id=None, succeeded=None, message=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, int, bool, str, Configuration) -> None
+ """FutureCancelOrderResult - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._id = None
+ self._user_id = None
+ self._succeeded = None
+ self._message = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if user_id is not None:
+ self.user_id = user_id
+ if succeeded is not None:
+ self.succeeded = succeeded
+ if message is not None:
+ self.message = message
+
+ @property
+ def id(self):
+ """Gets the id of this FutureCancelOrderResult. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The id of this FutureCancelOrderResult. # noqa: E501
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this FutureCancelOrderResult.
+
+ Order ID # noqa: E501
+
+ :param id: The id of this FutureCancelOrderResult. # noqa: E501
+ :type: str
+ """
+
+ self._id = id
+
+ @property
+ def user_id(self):
+ """Gets the user_id of this FutureCancelOrderResult. # noqa: E501
+
+ User ID # noqa: E501
+
+ :return: The user_id of this FutureCancelOrderResult. # noqa: E501
+ :rtype: int
+ """
+ return self._user_id
+
+ @user_id.setter
+ def user_id(self, user_id):
+ """Sets the user_id of this FutureCancelOrderResult.
+
+ User ID # noqa: E501
+
+ :param user_id: The user_id of this FutureCancelOrderResult. # noqa: E501
+ :type: int
+ """
+
+ self._user_id = user_id
+
+ @property
+ def succeeded(self):
+ """Gets the succeeded of this FutureCancelOrderResult. # noqa: E501
+
+ Whether cancellation succeeded # noqa: E501
+
+ :return: The succeeded of this FutureCancelOrderResult. # noqa: E501
+ :rtype: bool
+ """
+ return self._succeeded
+
+ @succeeded.setter
+ def succeeded(self, succeeded):
+ """Sets the succeeded of this FutureCancelOrderResult.
+
+ Whether cancellation succeeded # noqa: E501
+
+ :param succeeded: The succeeded of this FutureCancelOrderResult. # noqa: E501
+ :type: bool
+ """
+
+ self._succeeded = succeeded
+
+ @property
+ def message(self):
+ """Gets the message of this FutureCancelOrderResult. # noqa: E501
+
+ Error description when cancellation fails, empty if successful # noqa: E501
+
+ :return: The message of this FutureCancelOrderResult. # noqa: E501
+ :rtype: str
+ """
+ return self._message
+
+ @message.setter
+ def message(self, message):
+ """Sets the message of this FutureCancelOrderResult.
+
+ Error description when cancellation fails, empty if successful # noqa: E501
+
+ :param message: The message of this FutureCancelOrderResult. # noqa: E501
+ :type: str
+ """
+
+ self._message = message
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, FutureCancelOrderResult):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, FutureCancelOrderResult):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/futures_account.py b/gate_api/models/futures_account.py
index 9a1a0a2..6855e9f 100644
--- a/gate_api/models/futures_account.py
+++ b/gate_api/models/futures_account.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -41,11 +41,25 @@ class FuturesAccount(object):
'point': 'str',
'currency': 'str',
'in_dual_mode': 'bool',
+ 'position_mode': 'str',
'enable_credit': 'bool',
'position_initial_margin': 'str',
'maintenance_margin': 'str',
'bonus': 'str',
- 'history': 'FuturesAccountHistory',
+ 'enable_evolved_classic': 'bool',
+ 'cross_order_margin': 'str',
+ 'cross_initial_margin': 'str',
+ 'cross_maintenance_margin': 'str',
+ 'cross_unrealised_pnl': 'str',
+ 'cross_available': 'str',
+ 'cross_margin_balance': 'str',
+ 'cross_mmr': 'str',
+ 'cross_imr': 'str',
+ 'isolated_position_margin': 'str',
+ 'enable_new_dual_mode': 'bool',
+ 'margin_mode': 'int',
+ 'enable_tiered_mm': 'bool',
+ 'history': 'FuturesAccountHistory'
}
attribute_map = {
@@ -57,31 +71,29 @@ class FuturesAccount(object):
'point': 'point',
'currency': 'currency',
'in_dual_mode': 'in_dual_mode',
+ 'position_mode': 'position_mode',
'enable_credit': 'enable_credit',
'position_initial_margin': 'position_initial_margin',
'maintenance_margin': 'maintenance_margin',
'bonus': 'bonus',
- 'history': 'history',
+ 'enable_evolved_classic': 'enable_evolved_classic',
+ 'cross_order_margin': 'cross_order_margin',
+ 'cross_initial_margin': 'cross_initial_margin',
+ 'cross_maintenance_margin': 'cross_maintenance_margin',
+ 'cross_unrealised_pnl': 'cross_unrealised_pnl',
+ 'cross_available': 'cross_available',
+ 'cross_margin_balance': 'cross_margin_balance',
+ 'cross_mmr': 'cross_mmr',
+ 'cross_imr': 'cross_imr',
+ 'isolated_position_margin': 'isolated_position_margin',
+ 'enable_new_dual_mode': 'enable_new_dual_mode',
+ 'margin_mode': 'margin_mode',
+ 'enable_tiered_mm': 'enable_tiered_mm',
+ 'history': 'history'
}
- def __init__(
- self,
- total=None,
- unrealised_pnl=None,
- position_margin=None,
- order_margin=None,
- available=None,
- point=None,
- currency=None,
- in_dual_mode=None,
- enable_credit=None,
- position_initial_margin=None,
- maintenance_margin=None,
- bonus=None,
- history=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, bool, bool, str, str, str, FuturesAccountHistory, Configuration) -> None
+ def __init__(self, total=None, unrealised_pnl=None, position_margin=None, order_margin=None, available=None, point=None, currency=None, in_dual_mode=None, position_mode=None, enable_credit=None, position_initial_margin=None, maintenance_margin=None, bonus=None, enable_evolved_classic=None, cross_order_margin=None, cross_initial_margin=None, cross_maintenance_margin=None, cross_unrealised_pnl=None, cross_available=None, cross_margin_balance=None, cross_mmr=None, cross_imr=None, isolated_position_margin=None, enable_new_dual_mode=None, margin_mode=None, enable_tiered_mm=None, history=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, bool, str, bool, str, str, str, bool, str, str, str, str, str, str, str, str, str, bool, int, bool, FuturesAccountHistory, Configuration) -> None
"""FuturesAccount - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -95,10 +107,24 @@ def __init__(
self._point = None
self._currency = None
self._in_dual_mode = None
+ self._position_mode = None
self._enable_credit = None
self._position_initial_margin = None
self._maintenance_margin = None
self._bonus = None
+ self._enable_evolved_classic = None
+ self._cross_order_margin = None
+ self._cross_initial_margin = None
+ self._cross_maintenance_margin = None
+ self._cross_unrealised_pnl = None
+ self._cross_available = None
+ self._cross_margin_balance = None
+ self._cross_mmr = None
+ self._cross_imr = None
+ self._isolated_position_margin = None
+ self._enable_new_dual_mode = None
+ self._margin_mode = None
+ self._enable_tiered_mm = None
self._history = None
self.discriminator = None
@@ -118,6 +144,8 @@ def __init__(
self.currency = currency
if in_dual_mode is not None:
self.in_dual_mode = in_dual_mode
+ if position_mode is not None:
+ self.position_mode = position_mode
if enable_credit is not None:
self.enable_credit = enable_credit
if position_initial_margin is not None:
@@ -126,6 +154,32 @@ def __init__(
self.maintenance_margin = maintenance_margin
if bonus is not None:
self.bonus = bonus
+ if enable_evolved_classic is not None:
+ self.enable_evolved_classic = enable_evolved_classic
+ if cross_order_margin is not None:
+ self.cross_order_margin = cross_order_margin
+ if cross_initial_margin is not None:
+ self.cross_initial_margin = cross_initial_margin
+ if cross_maintenance_margin is not None:
+ self.cross_maintenance_margin = cross_maintenance_margin
+ if cross_unrealised_pnl is not None:
+ self.cross_unrealised_pnl = cross_unrealised_pnl
+ if cross_available is not None:
+ self.cross_available = cross_available
+ if cross_margin_balance is not None:
+ self.cross_margin_balance = cross_margin_balance
+ if cross_mmr is not None:
+ self.cross_mmr = cross_mmr
+ if cross_imr is not None:
+ self.cross_imr = cross_imr
+ if isolated_position_margin is not None:
+ self.isolated_position_margin = isolated_position_margin
+ if enable_new_dual_mode is not None:
+ self.enable_new_dual_mode = enable_new_dual_mode
+ if margin_mode is not None:
+ self.margin_mode = margin_mode
+ if enable_tiered_mm is not None:
+ self.enable_tiered_mm = enable_tiered_mm
if history is not None:
self.history = history
@@ -225,7 +279,7 @@ def order_margin(self, order_margin):
def available(self):
"""Gets the available of this FuturesAccount. # noqa: E501
- The available balance for transferring or trading(including bonus. Bonus can't be be withdrawn. The transfer amount needs to deduct the bonus) # noqa: E501
+ Available balance for transferring or trading (including bonus. Bonus cannot be withdrawn, so transfer amount needs to deduct bonus) # noqa: E501
:return: The available of this FuturesAccount. # noqa: E501
:rtype: str
@@ -236,7 +290,7 @@ def available(self):
def available(self, available):
"""Sets the available of this FuturesAccount.
- The available balance for transferring or trading(including bonus. Bonus can't be be withdrawn. The transfer amount needs to deduct the bonus) # noqa: E501
+ Available balance for transferring or trading (including bonus. Bonus cannot be withdrawn, so transfer amount needs to deduct bonus) # noqa: E501
:param available: The available of this FuturesAccount. # noqa: E501
:type: str
@@ -248,7 +302,7 @@ def available(self, available):
def point(self):
"""Gets the point of this FuturesAccount. # noqa: E501
- POINT amount # noqa: E501
+ Point card amount # noqa: E501
:return: The point of this FuturesAccount. # noqa: E501
:rtype: str
@@ -259,7 +313,7 @@ def point(self):
def point(self, point):
"""Sets the point of this FuturesAccount.
- POINT amount # noqa: E501
+ Point card amount # noqa: E501
:param point: The point of this FuturesAccount. # noqa: E501
:type: str
@@ -271,7 +325,7 @@ def point(self, point):
def currency(self):
"""Gets the currency of this FuturesAccount. # noqa: E501
- Settle currency # noqa: E501
+ Settlement currency # noqa: E501
:return: The currency of this FuturesAccount. # noqa: E501
:rtype: str
@@ -282,7 +336,7 @@ def currency(self):
def currency(self, currency):
"""Sets the currency of this FuturesAccount.
- Settle currency # noqa: E501
+ Settlement currency # noqa: E501
:param currency: The currency of this FuturesAccount. # noqa: E501
:type: str
@@ -313,6 +367,29 @@ def in_dual_mode(self, in_dual_mode):
self._in_dual_mode = in_dual_mode
+ @property
+ def position_mode(self):
+ """Gets the position_mode of this FuturesAccount. # noqa: E501
+
+ Position mode: single - one-way, dual - dual-side, split - sub-positions (in_dual_mode is deprecated) # noqa: E501
+
+ :return: The position_mode of this FuturesAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._position_mode
+
+ @position_mode.setter
+ def position_mode(self, position_mode):
+ """Sets the position_mode of this FuturesAccount.
+
+ Position mode: single - one-way, dual - dual-side, split - sub-positions (in_dual_mode is deprecated) # noqa: E501
+
+ :param position_mode: The position_mode of this FuturesAccount. # noqa: E501
+ :type: str
+ """
+
+ self._position_mode = position_mode
+
@property
def enable_credit(self):
"""Gets the enable_credit of this FuturesAccount. # noqa: E501
@@ -340,7 +417,7 @@ def enable_credit(self, enable_credit):
def position_initial_margin(self):
"""Gets the position_initial_margin of this FuturesAccount. # noqa: E501
- Initial margin position, applicable to the portfolio margin account model # noqa: E501
+ Initial margin occupied by positions, applicable to unified account mode # noqa: E501
:return: The position_initial_margin of this FuturesAccount. # noqa: E501
:rtype: str
@@ -351,7 +428,7 @@ def position_initial_margin(self):
def position_initial_margin(self, position_initial_margin):
"""Sets the position_initial_margin of this FuturesAccount.
- Initial margin position, applicable to the portfolio margin account model # noqa: E501
+ Initial margin occupied by positions, applicable to unified account mode # noqa: E501
:param position_initial_margin: The position_initial_margin of this FuturesAccount. # noqa: E501
:type: str
@@ -363,7 +440,7 @@ def position_initial_margin(self, position_initial_margin):
def maintenance_margin(self):
"""Gets the maintenance_margin of this FuturesAccount. # noqa: E501
- Maintenance margin position, applicable to the portfolio margin account model # noqa: E501
+ Maintenance margin occupied by positions, applicable to new classic account margin mode and unified account mode # noqa: E501
:return: The maintenance_margin of this FuturesAccount. # noqa: E501
:rtype: str
@@ -374,7 +451,7 @@ def maintenance_margin(self):
def maintenance_margin(self, maintenance_margin):
"""Sets the maintenance_margin of this FuturesAccount.
- Maintenance margin position, applicable to the portfolio margin account model # noqa: E501
+ Maintenance margin occupied by positions, applicable to new classic account margin mode and unified account mode # noqa: E501
:param maintenance_margin: The maintenance_margin of this FuturesAccount. # noqa: E501
:type: str
@@ -386,7 +463,7 @@ def maintenance_margin(self, maintenance_margin):
def bonus(self):
"""Gets the bonus of this FuturesAccount. # noqa: E501
- Perpetual Contract Bonus # noqa: E501
+ Bonus # noqa: E501
:return: The bonus of this FuturesAccount. # noqa: E501
:rtype: str
@@ -397,7 +474,7 @@ def bonus(self):
def bonus(self, bonus):
"""Sets the bonus of this FuturesAccount.
- Perpetual Contract Bonus # noqa: E501
+ Bonus # noqa: E501
:param bonus: The bonus of this FuturesAccount. # noqa: E501
:type: str
@@ -405,6 +482,305 @@ def bonus(self, bonus):
self._bonus = bonus
+ @property
+ def enable_evolved_classic(self):
+ """Gets the enable_evolved_classic of this FuturesAccount. # noqa: E501
+
+ Classic account margin mode, true-new mode, false-old mode # noqa: E501
+
+ :return: The enable_evolved_classic of this FuturesAccount. # noqa: E501
+ :rtype: bool
+ """
+ return self._enable_evolved_classic
+
+ @enable_evolved_classic.setter
+ def enable_evolved_classic(self, enable_evolved_classic):
+ """Sets the enable_evolved_classic of this FuturesAccount.
+
+ Classic account margin mode, true-new mode, false-old mode # noqa: E501
+
+ :param enable_evolved_classic: The enable_evolved_classic of this FuturesAccount. # noqa: E501
+ :type: bool
+ """
+
+ self._enable_evolved_classic = enable_evolved_classic
+
+ @property
+ def cross_order_margin(self):
+ """Gets the cross_order_margin of this FuturesAccount. # noqa: E501
+
+ Cross margin order margin, applicable to new classic account margin mode # noqa: E501
+
+ :return: The cross_order_margin of this FuturesAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._cross_order_margin
+
+ @cross_order_margin.setter
+ def cross_order_margin(self, cross_order_margin):
+ """Sets the cross_order_margin of this FuturesAccount.
+
+ Cross margin order margin, applicable to new classic account margin mode # noqa: E501
+
+ :param cross_order_margin: The cross_order_margin of this FuturesAccount. # noqa: E501
+ :type: str
+ """
+
+ self._cross_order_margin = cross_order_margin
+
+ @property
+ def cross_initial_margin(self):
+ """Gets the cross_initial_margin of this FuturesAccount. # noqa: E501
+
+ Cross margin initial margin, applicable to new classic account margin mode # noqa: E501
+
+ :return: The cross_initial_margin of this FuturesAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._cross_initial_margin
+
+ @cross_initial_margin.setter
+ def cross_initial_margin(self, cross_initial_margin):
+ """Sets the cross_initial_margin of this FuturesAccount.
+
+ Cross margin initial margin, applicable to new classic account margin mode # noqa: E501
+
+ :param cross_initial_margin: The cross_initial_margin of this FuturesAccount. # noqa: E501
+ :type: str
+ """
+
+ self._cross_initial_margin = cross_initial_margin
+
+ @property
+ def cross_maintenance_margin(self):
+ """Gets the cross_maintenance_margin of this FuturesAccount. # noqa: E501
+
+ Cross margin maintenance margin, applicable to new classic account margin mode # noqa: E501
+
+ :return: The cross_maintenance_margin of this FuturesAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._cross_maintenance_margin
+
+ @cross_maintenance_margin.setter
+ def cross_maintenance_margin(self, cross_maintenance_margin):
+ """Sets the cross_maintenance_margin of this FuturesAccount.
+
+ Cross margin maintenance margin, applicable to new classic account margin mode # noqa: E501
+
+ :param cross_maintenance_margin: The cross_maintenance_margin of this FuturesAccount. # noqa: E501
+ :type: str
+ """
+
+ self._cross_maintenance_margin = cross_maintenance_margin
+
+ @property
+ def cross_unrealised_pnl(self):
+ """Gets the cross_unrealised_pnl of this FuturesAccount. # noqa: E501
+
+ Cross margin unrealized P&L, applicable to new classic account margin mode # noqa: E501
+
+ :return: The cross_unrealised_pnl of this FuturesAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._cross_unrealised_pnl
+
+ @cross_unrealised_pnl.setter
+ def cross_unrealised_pnl(self, cross_unrealised_pnl):
+ """Sets the cross_unrealised_pnl of this FuturesAccount.
+
+ Cross margin unrealized P&L, applicable to new classic account margin mode # noqa: E501
+
+ :param cross_unrealised_pnl: The cross_unrealised_pnl of this FuturesAccount. # noqa: E501
+ :type: str
+ """
+
+ self._cross_unrealised_pnl = cross_unrealised_pnl
+
+ @property
+ def cross_available(self):
+ """Gets the cross_available of this FuturesAccount. # noqa: E501
+
+ Cross margin available balance, applicable to new classic account margin mode # noqa: E501
+
+ :return: The cross_available of this FuturesAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._cross_available
+
+ @cross_available.setter
+ def cross_available(self, cross_available):
+ """Sets the cross_available of this FuturesAccount.
+
+ Cross margin available balance, applicable to new classic account margin mode # noqa: E501
+
+ :param cross_available: The cross_available of this FuturesAccount. # noqa: E501
+ :type: str
+ """
+
+ self._cross_available = cross_available
+
+ @property
+ def cross_margin_balance(self):
+ """Gets the cross_margin_balance of this FuturesAccount. # noqa: E501
+
+ Cross margin balance, applicable to new classic account margin mode # noqa: E501
+
+ :return: The cross_margin_balance of this FuturesAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._cross_margin_balance
+
+ @cross_margin_balance.setter
+ def cross_margin_balance(self, cross_margin_balance):
+ """Sets the cross_margin_balance of this FuturesAccount.
+
+ Cross margin balance, applicable to new classic account margin mode # noqa: E501
+
+ :param cross_margin_balance: The cross_margin_balance of this FuturesAccount. # noqa: E501
+ :type: str
+ """
+
+ self._cross_margin_balance = cross_margin_balance
+
+ @property
+ def cross_mmr(self):
+ """Gets the cross_mmr of this FuturesAccount. # noqa: E501
+
+ Cross margin maintenance margin rate, applicable to new classic account margin mode # noqa: E501
+
+ :return: The cross_mmr of this FuturesAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._cross_mmr
+
+ @cross_mmr.setter
+ def cross_mmr(self, cross_mmr):
+ """Sets the cross_mmr of this FuturesAccount.
+
+ Cross margin maintenance margin rate, applicable to new classic account margin mode # noqa: E501
+
+ :param cross_mmr: The cross_mmr of this FuturesAccount. # noqa: E501
+ :type: str
+ """
+
+ self._cross_mmr = cross_mmr
+
+ @property
+ def cross_imr(self):
+ """Gets the cross_imr of this FuturesAccount. # noqa: E501
+
+ Cross margin initial margin rate, applicable to new classic account margin mode # noqa: E501
+
+ :return: The cross_imr of this FuturesAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._cross_imr
+
+ @cross_imr.setter
+ def cross_imr(self, cross_imr):
+ """Sets the cross_imr of this FuturesAccount.
+
+ Cross margin initial margin rate, applicable to new classic account margin mode # noqa: E501
+
+ :param cross_imr: The cross_imr of this FuturesAccount. # noqa: E501
+ :type: str
+ """
+
+ self._cross_imr = cross_imr
+
+ @property
+ def isolated_position_margin(self):
+ """Gets the isolated_position_margin of this FuturesAccount. # noqa: E501
+
+ Isolated position margin, applicable to new classic account margin mode # noqa: E501
+
+ :return: The isolated_position_margin of this FuturesAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._isolated_position_margin
+
+ @isolated_position_margin.setter
+ def isolated_position_margin(self, isolated_position_margin):
+ """Sets the isolated_position_margin of this FuturesAccount.
+
+ Isolated position margin, applicable to new classic account margin mode # noqa: E501
+
+ :param isolated_position_margin: The isolated_position_margin of this FuturesAccount. # noqa: E501
+ :type: str
+ """
+
+ self._isolated_position_margin = isolated_position_margin
+
+ @property
+ def enable_new_dual_mode(self):
+ """Gets the enable_new_dual_mode of this FuturesAccount. # noqa: E501
+
+ Whether to open a new two-way position mode # noqa: E501
+
+ :return: The enable_new_dual_mode of this FuturesAccount. # noqa: E501
+ :rtype: bool
+ """
+ return self._enable_new_dual_mode
+
+ @enable_new_dual_mode.setter
+ def enable_new_dual_mode(self, enable_new_dual_mode):
+ """Sets the enable_new_dual_mode of this FuturesAccount.
+
+ Whether to open a new two-way position mode # noqa: E501
+
+ :param enable_new_dual_mode: The enable_new_dual_mode of this FuturesAccount. # noqa: E501
+ :type: bool
+ """
+
+ self._enable_new_dual_mode = enable_new_dual_mode
+
+ @property
+ def margin_mode(self):
+ """Gets the margin_mode of this FuturesAccount. # noqa: E501
+
+ Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode # noqa: E501
+
+ :return: The margin_mode of this FuturesAccount. # noqa: E501
+ :rtype: int
+ """
+ return self._margin_mode
+
+ @margin_mode.setter
+ def margin_mode(self, margin_mode):
+ """Sets the margin_mode of this FuturesAccount.
+
+ Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode # noqa: E501
+
+ :param margin_mode: The margin_mode of this FuturesAccount. # noqa: E501
+ :type: int
+ """
+
+ self._margin_mode = margin_mode
+
+ @property
+ def enable_tiered_mm(self):
+ """Gets the enable_tiered_mm of this FuturesAccount. # noqa: E501
+
+ Whether to enable tiered maintenance margin calculation # noqa: E501
+
+ :return: The enable_tiered_mm of this FuturesAccount. # noqa: E501
+ :rtype: bool
+ """
+ return self._enable_tiered_mm
+
+ @enable_tiered_mm.setter
+ def enable_tiered_mm(self, enable_tiered_mm):
+ """Sets the enable_tiered_mm of this FuturesAccount.
+
+ Whether to enable tiered maintenance margin calculation # noqa: E501
+
+ :param enable_tiered_mm: The enable_tiered_mm of this FuturesAccount. # noqa: E501
+ :type: bool
+ """
+
+ self._enable_tiered_mm = enable_tiered_mm
+
@property
def history(self):
"""Gets the history of this FuturesAccount. # noqa: E501
@@ -433,16 +809,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_account_book.py b/gate_api/models/futures_account_book.py
index ef4b595..ff4e125 100644
--- a/gate_api/models/futures_account_book.py
+++ b/gate_api/models/futures_account_book.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,14 +32,30 @@ class FuturesAccountBook(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'time': 'float', 'change': 'str', 'balance': 'str', 'type': 'str', 'text': 'str'}
-
- attribute_map = {'time': 'time', 'change': 'change', 'balance': 'balance', 'type': 'type', 'text': 'text'}
-
- def __init__(
- self, time=None, change=None, balance=None, type=None, text=None, local_vars_configuration=None
- ): # noqa: E501
- # type: (float, str, str, str, str, Configuration) -> None
+ openapi_types = {
+ 'time': 'float',
+ 'change': 'str',
+ 'balance': 'str',
+ 'type': 'str',
+ 'text': 'str',
+ 'contract': 'str',
+ 'trade_id': 'str',
+ 'id': 'str'
+ }
+
+ attribute_map = {
+ 'time': 'time',
+ 'change': 'change',
+ 'balance': 'balance',
+ 'type': 'type',
+ 'text': 'text',
+ 'contract': 'contract',
+ 'trade_id': 'trade_id',
+ 'id': 'id'
+ }
+
+ def __init__(self, time=None, change=None, balance=None, type=None, text=None, contract=None, trade_id=None, id=None, local_vars_configuration=None): # noqa: E501
+ # type: (float, str, str, str, str, str, str, str, Configuration) -> None
"""FuturesAccountBook - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -50,6 +66,9 @@ def __init__(
self._balance = None
self._type = None
self._text = None
+ self._contract = None
+ self._trade_id = None
+ self._id = None
self.discriminator = None
if time is not None:
@@ -62,6 +81,12 @@ def __init__(
self.type = type
if text is not None:
self.text = text
+ if contract is not None:
+ self.contract = contract
+ if trade_id is not None:
+ self.trade_id = trade_id
+ if id is not None:
+ self.id = id
@property
def time(self):
@@ -136,7 +161,7 @@ def balance(self, balance):
def type(self):
"""Gets the type of this FuturesAccountBook. # noqa: E501
- Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501
+ Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction # noqa: E501
:return: The type of this FuturesAccountBook. # noqa: E501
:rtype: str
@@ -147,15 +172,16 @@ def type(self):
def type(self, type):
"""Sets the type of this FuturesAccountBook.
- Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501
+ Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction # noqa: E501
:param type: The type of this FuturesAccountBook. # noqa: E501
:type: str
"""
- allowed_values = ["dnw", "pnl", "fee", "refr", "fund", "point_dnw", "point_fee", "point_refr"] # noqa: E501
+ allowed_values = ["dnw", "pnl", "fee", "refr", "fund", "point_dnw", "point_fee", "point_refr", "bonus_offset"] # noqa: E501
if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `type` ({0}), must be one of {1}".format(type, allowed_values) # noqa: E501
+ "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
+ .format(type, allowed_values)
)
self._type = type
@@ -183,6 +209,75 @@ def text(self, text):
self._text = text
+ @property
+ def contract(self):
+ """Gets the contract of this FuturesAccountBook. # noqa: E501
+
+ Futures contract, the field is only available for data after 2023-10-30 # noqa: E501
+
+ :return: The contract of this FuturesAccountBook. # noqa: E501
+ :rtype: str
+ """
+ return self._contract
+
+ @contract.setter
+ def contract(self, contract):
+ """Sets the contract of this FuturesAccountBook.
+
+ Futures contract, the field is only available for data after 2023-10-30 # noqa: E501
+
+ :param contract: The contract of this FuturesAccountBook. # noqa: E501
+ :type: str
+ """
+
+ self._contract = contract
+
+ @property
+ def trade_id(self):
+ """Gets the trade_id of this FuturesAccountBook. # noqa: E501
+
+ trade id # noqa: E501
+
+ :return: The trade_id of this FuturesAccountBook. # noqa: E501
+ :rtype: str
+ """
+ return self._trade_id
+
+ @trade_id.setter
+ def trade_id(self, trade_id):
+ """Sets the trade_id of this FuturesAccountBook.
+
+ trade id # noqa: E501
+
+ :param trade_id: The trade_id of this FuturesAccountBook. # noqa: E501
+ :type: str
+ """
+
+ self._trade_id = trade_id
+
+ @property
+ def id(self):
+ """Gets the id of this FuturesAccountBook. # noqa: E501
+
+ Account change record ID # noqa: E501
+
+ :return: The id of this FuturesAccountBook. # noqa: E501
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this FuturesAccountBook.
+
+ Account change record ID # noqa: E501
+
+ :param id: The id of this FuturesAccountBook. # noqa: E501
+ :type: str
+ """
+
+ self._id = id
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -190,16 +285,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_account_history.py b/gate_api/models/futures_account_history.py
index 3a8e4e3..6960744 100644
--- a/gate_api/models/futures_account_history.py
+++ b/gate_api/models/futures_account_history.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -42,7 +42,7 @@ class FuturesAccountHistory(object):
'point_fee': 'str',
'point_refr': 'str',
'bonus_dnw': 'str',
- 'bonus_offset': 'str',
+ 'bonus_offset': 'str'
}
attribute_map = {
@@ -55,23 +55,10 @@ class FuturesAccountHistory(object):
'point_fee': 'point_fee',
'point_refr': 'point_refr',
'bonus_dnw': 'bonus_dnw',
- 'bonus_offset': 'bonus_offset',
+ 'bonus_offset': 'bonus_offset'
}
- def __init__(
- self,
- dnw=None,
- pnl=None,
- fee=None,
- refr=None,
- fund=None,
- point_dnw=None,
- point_fee=None,
- point_refr=None,
- bonus_dnw=None,
- bonus_offset=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, dnw=None, pnl=None, fee=None, refr=None, fund=None, point_dnw=None, point_fee=None, point_refr=None, bonus_dnw=None, bonus_offset=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None
"""FuturesAccountHistory - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -348,16 +335,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_auto_deleverage.py b/gate_api/models/futures_auto_deleverage.py
index d912437..f6064c7 100644
--- a/gate_api/models/futures_auto_deleverage.py
+++ b/gate_api/models/futures_auto_deleverage.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -42,7 +42,7 @@ class FuturesAutoDeleverage(object):
'entry_price': 'str',
'fill_price': 'str',
'trade_size': 'int',
- 'position_size': 'int',
+ 'position_size': 'int'
}
attribute_map = {
@@ -55,23 +55,10 @@ class FuturesAutoDeleverage(object):
'entry_price': 'entry_price',
'fill_price': 'fill_price',
'trade_size': 'trade_size',
- 'position_size': 'position_size',
+ 'position_size': 'position_size'
}
- def __init__(
- self,
- time=None,
- user=None,
- order_id=None,
- contract=None,
- leverage=None,
- cross_leverage_limit=None,
- entry_price=None,
- fill_price=None,
- trade_size=None,
- position_size=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, time=None, user=None, order_id=None, contract=None, leverage=None, cross_leverage_limit=None, entry_price=None, fill_price=None, trade_size=None, position_size=None, local_vars_configuration=None): # noqa: E501
# type: (int, int, int, str, str, str, str, str, int, int, Configuration) -> None
"""FuturesAutoDeleverage - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -230,7 +217,7 @@ def leverage(self, leverage):
def cross_leverage_limit(self):
"""Gets the cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501
- Cross margin leverage(valid only when `leverage` is 0) # noqa: E501
+ Cross margin leverage (valid only when `leverage` is 0) # noqa: E501
:return: The cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501
:rtype: str
@@ -241,7 +228,7 @@ def cross_leverage_limit(self):
def cross_leverage_limit(self, cross_leverage_limit):
"""Sets the cross_leverage_limit of this FuturesAutoDeleverage.
- Cross margin leverage(valid only when `leverage` is 0) # noqa: E501
+ Cross margin leverage (valid only when `leverage` is 0) # noqa: E501
:param cross_leverage_limit: The cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501
:type: str
@@ -348,16 +335,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_batch_amend_order_request.py b/gate_api/models/futures_batch_amend_order_request.py
new file mode 100644
index 0000000..c12d869
--- /dev/null
+++ b/gate_api/models/futures_batch_amend_order_request.py
@@ -0,0 +1,235 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class FuturesBatchAmendOrderRequest(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'order_id': 'int',
+ 'text': 'str',
+ 'size': 'int',
+ 'price': 'str',
+ 'amend_text': 'str'
+ }
+
+ attribute_map = {
+ 'order_id': 'order_id',
+ 'text': 'text',
+ 'size': 'size',
+ 'price': 'price',
+ 'amend_text': 'amend_text'
+ }
+
+ def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, int, str, str, Configuration) -> None
+ """FuturesBatchAmendOrderRequest - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._order_id = None
+ self._text = None
+ self._size = None
+ self._price = None
+ self._amend_text = None
+ self.discriminator = None
+
+ if order_id is not None:
+ self.order_id = order_id
+ if text is not None:
+ self.text = text
+ if size is not None:
+ self.size = size
+ if price is not None:
+ self.price = price
+ if amend_text is not None:
+ self.amend_text = amend_text
+
+ @property
+ def order_id(self):
+ """Gets the order_id of this FuturesBatchAmendOrderRequest. # noqa: E501
+
+ Order id, order_id and text must contain at least one # noqa: E501
+
+ :return: The order_id of this FuturesBatchAmendOrderRequest. # noqa: E501
+ :rtype: int
+ """
+ return self._order_id
+
+ @order_id.setter
+ def order_id(self, order_id):
+ """Sets the order_id of this FuturesBatchAmendOrderRequest.
+
+ Order id, order_id and text must contain at least one # noqa: E501
+
+ :param order_id: The order_id of this FuturesBatchAmendOrderRequest. # noqa: E501
+ :type: int
+ """
+
+ self._order_id = order_id
+
+ @property
+ def text(self):
+ """Gets the text of this FuturesBatchAmendOrderRequest. # noqa: E501
+
+ User-defined order text, at least one of order_id and text must be passed # noqa: E501
+
+ :return: The text of this FuturesBatchAmendOrderRequest. # noqa: E501
+ :rtype: str
+ """
+ return self._text
+
+ @text.setter
+ def text(self, text):
+ """Sets the text of this FuturesBatchAmendOrderRequest.
+
+ User-defined order text, at least one of order_id and text must be passed # noqa: E501
+
+ :param text: The text of this FuturesBatchAmendOrderRequest. # noqa: E501
+ :type: str
+ """
+
+ self._text = text
+
+ @property
+ def size(self):
+ """Gets the size of this FuturesBatchAmendOrderRequest. # noqa: E501
+
+ New order size, including filled size. - If less than or equal to the filled quantity, the order will be cancelled. - The new order side must be identical to the original one. - Close order size cannot be modified. - For reduce-only orders, increasing the size may cancel other reduce-only orders. - If the price is not modified, decreasing the size will not affect the depth queue, while increasing the size will place it at the end of the current price level. # noqa: E501
+
+ :return: The size of this FuturesBatchAmendOrderRequest. # noqa: E501
+ :rtype: int
+ """
+ return self._size
+
+ @size.setter
+ def size(self, size):
+ """Sets the size of this FuturesBatchAmendOrderRequest.
+
+ New order size, including filled size. - If less than or equal to the filled quantity, the order will be cancelled. - The new order side must be identical to the original one. - Close order size cannot be modified. - For reduce-only orders, increasing the size may cancel other reduce-only orders. - If the price is not modified, decreasing the size will not affect the depth queue, while increasing the size will place it at the end of the current price level. # noqa: E501
+
+ :param size: The size of this FuturesBatchAmendOrderRequest. # noqa: E501
+ :type: int
+ """
+
+ self._size = size
+
+ @property
+ def price(self):
+ """Gets the price of this FuturesBatchAmendOrderRequest. # noqa: E501
+
+ New order price # noqa: E501
+
+ :return: The price of this FuturesBatchAmendOrderRequest. # noqa: E501
+ :rtype: str
+ """
+ return self._price
+
+ @price.setter
+ def price(self, price):
+ """Sets the price of this FuturesBatchAmendOrderRequest.
+
+ New order price # noqa: E501
+
+ :param price: The price of this FuturesBatchAmendOrderRequest. # noqa: E501
+ :type: str
+ """
+
+ self._price = price
+
+ @property
+ def amend_text(self):
+ """Gets the amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501
+
+ Custom info during order amendment # noqa: E501
+
+ :return: The amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501
+ :rtype: str
+ """
+ return self._amend_text
+
+ @amend_text.setter
+ def amend_text(self, amend_text):
+ """Sets the amend_text of this FuturesBatchAmendOrderRequest.
+
+ Custom info during order amendment # noqa: E501
+
+ :param amend_text: The amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501
+ :type: str
+ """
+
+ self._amend_text = amend_text
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, FuturesBatchAmendOrderRequest):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, FuturesBatchAmendOrderRequest):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/futures_candlestick.py b/gate_api/models/futures_candlestick.py
index 30cb0db..246d19d 100644
--- a/gate_api/models/futures_candlestick.py
+++ b/gate_api/models/futures_candlestick.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,13 +32,27 @@ class FuturesCandlestick(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'t': 'float', 'v': 'int', 'c': 'str', 'h': 'str', 'l': 'str', 'o': 'str', 'sum': 'str'}
-
- attribute_map = {'t': 't', 'v': 'v', 'c': 'c', 'h': 'h', 'l': 'l', 'o': 'o', 'sum': 'sum'}
-
- def __init__(
- self, t=None, v=None, c=None, h=None, l=None, o=None, sum=None, local_vars_configuration=None
- ): # noqa: E501
+ openapi_types = {
+ 't': 'float',
+ 'v': 'int',
+ 'c': 'str',
+ 'h': 'str',
+ 'l': 'str',
+ 'o': 'str',
+ 'sum': 'str'
+ }
+
+ attribute_map = {
+ 't': 't',
+ 'v': 'v',
+ 'c': 'c',
+ 'h': 'h',
+ 'l': 'l',
+ 'o': 'o',
+ 'sum': 'sum'
+ }
+
+ def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, sum=None, local_vars_configuration=None): # noqa: E501
# type: (float, int, str, str, str, str, str, Configuration) -> None
"""FuturesCandlestick - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -237,16 +251,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_fee.py b/gate_api/models/futures_fee.py
index 7445a90..07aa347 100644
--- a/gate_api/models/futures_fee.py
+++ b/gate_api/models/futures_fee.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class FuturesFee(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'taker_fee': 'str', 'maker_fee': 'str'}
+ openapi_types = {
+ 'taker_fee': 'str',
+ 'maker_fee': 'str'
+ }
- attribute_map = {'taker_fee': 'taker_fee', 'maker_fee': 'maker_fee'}
+ attribute_map = {
+ 'taker_fee': 'taker_fee',
+ 'maker_fee': 'maker_fee'
+ }
def __init__(self, taker_fee=None, maker_fee=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, Configuration) -> None
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_index_constituents.py b/gate_api/models/futures_index_constituents.py
index c9918c3..12232a7 100644
--- a/gate_api/models/futures_index_constituents.py
+++ b/gate_api/models/futures_index_constituents.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class FuturesIndexConstituents(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'index': 'str', 'constituents': 'list[IndexConstituent]'}
+ openapi_types = {
+ 'index': 'str',
+ 'constituents': 'list[IndexConstituent]'
+ }
- attribute_map = {'index': 'index', 'constituents': 'constituents'}
+ attribute_map = {
+ 'index': 'index',
+ 'constituents': 'constituents'
+ }
def __init__(self, index=None, constituents=None, local_vars_configuration=None): # noqa: E501
# type: (str, list[IndexConstituent], Configuration) -> None
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_initial_order.py b/gate_api/models/futures_initial_order.py
index 3bb75ba..7f3999c 100644
--- a/gate_api/models/futures_initial_order.py
+++ b/gate_api/models/futures_initial_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -42,7 +42,7 @@ class FuturesInitialOrder(object):
'reduce_only': 'bool',
'auto_size': 'str',
'is_reduce_only': 'bool',
- 'is_close': 'bool',
+ 'is_close': 'bool'
}
attribute_map = {
@@ -55,23 +55,10 @@ class FuturesInitialOrder(object):
'reduce_only': 'reduce_only',
'auto_size': 'auto_size',
'is_reduce_only': 'is_reduce_only',
- 'is_close': 'is_close',
+ 'is_close': 'is_close'
}
- def __init__(
- self,
- contract=None,
- size=None,
- price=None,
- close=False,
- tif='gtc',
- text=None,
- reduce_only=False,
- auto_size=None,
- is_reduce_only=None,
- is_close=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, contract=None, size=None, price=None, close=False, tif='gtc', text=None, reduce_only=False, auto_size=None, is_reduce_only=None, is_close=None, local_vars_configuration=None): # noqa: E501
# type: (str, int, str, bool, str, str, bool, str, bool, bool, Configuration) -> None
"""FuturesInitialOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -138,7 +125,7 @@ def contract(self, contract):
def size(self):
"""Gets the size of this FuturesInitialOrder. # noqa: E501
- Order size. Positive size means to buy, while negative one means to sell. Set to 0 to close the position # noqa: E501
+ Represents the number of contracts that need to be closed, full closing: size=0 Partial closing: plan-close-short-position size>0 Partial closing: plan-close-long-position size<0 # noqa: E501
:return: The size of this FuturesInitialOrder. # noqa: E501
:rtype: int
@@ -149,7 +136,7 @@ def size(self):
def size(self, size):
"""Sets the size of this FuturesInitialOrder.
- Order size. Positive size means to buy, while negative one means to sell. Set to 0 to close the position # noqa: E501
+ Represents the number of contracts that need to be closed, full closing: size=0 Partial closing: plan-close-short-position size>0 Partial closing: plan-close-long-position size<0 # noqa: E501
:param size: The size of this FuturesInitialOrder. # noqa: E501
:type: int
@@ -186,7 +173,7 @@ def price(self, price):
def close(self):
"""Gets the close of this FuturesInitialOrder. # noqa: E501
- Set to true if trying to close the position # noqa: E501
+ When all positions are closed in a single position mode, it must be set to true to perform the closing operation When partially closed positions in single-store mode/double-store mode, you can not set close, or close=false # noqa: E501
:return: The close of this FuturesInitialOrder. # noqa: E501
:rtype: bool
@@ -197,7 +184,7 @@ def close(self):
def close(self, close):
"""Sets the close of this FuturesInitialOrder.
- Set to true if trying to close the position # noqa: E501
+ When all positions are closed in a single position mode, it must be set to true to perform the closing operation When partially closed positions in single-store mode/double-store mode, you can not set close, or close=false # noqa: E501
:param close: The close of this FuturesInitialOrder. # noqa: E501
:type: bool
@@ -209,7 +196,7 @@ def close(self, close):
def tif(self):
"""Gets the tif of this FuturesInitialOrder. # noqa: E501
- Time in force. If using market price, only `ioc` is supported. - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501
+ Time in force strategy, default is gtc, market orders currently only support ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501
:return: The tif of this FuturesInitialOrder. # noqa: E501
:rtype: str
@@ -220,7 +207,7 @@ def tif(self):
def tif(self, tif):
"""Sets the tif of this FuturesInitialOrder.
- Time in force. If using market price, only `ioc` is supported. - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501
+ Time in force strategy, default is gtc, market orders currently only support ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501
:param tif: The tif of this FuturesInitialOrder. # noqa: E501
:type: str
@@ -228,7 +215,8 @@ def tif(self, tif):
allowed_values = ["gtc", "ioc"] # noqa: E501
if self.local_vars_configuration.client_side_validation and tif not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `tif` ({0}), must be one of {1}".format(tif, allowed_values) # noqa: E501
+ "Invalid value for `tif` ({0}), must be one of {1}" # noqa: E501
+ .format(tif, allowed_values)
)
self._tif = tif
@@ -237,7 +225,7 @@ def tif(self, tif):
def text(self):
"""Gets the text of this FuturesInitialOrder. # noqa: E501
- How the order is created. Possible values are: web, api and app # noqa: E501
+ The source of the order, including: - web: Web - api: API call - app: Mobile app # noqa: E501
:return: The text of this FuturesInitialOrder. # noqa: E501
:rtype: str
@@ -248,7 +236,7 @@ def text(self):
def text(self, text):
"""Sets the text of this FuturesInitialOrder.
- How the order is created. Possible values are: web, api and app # noqa: E501
+ The source of the order, including: - web: Web - api: API call - app: Mobile app # noqa: E501
:param text: The text of this FuturesInitialOrder. # noqa: E501
:type: str
@@ -260,7 +248,7 @@ def text(self, text):
def reduce_only(self):
"""Gets the reduce_only of this FuturesInitialOrder. # noqa: E501
- Set to true to create a reduce-only order # noqa: E501
+ When set to true, perform automatic position reduction operation. Set to true to ensure that the order will not open a new position, and is only used to close or reduce positions # noqa: E501
:return: The reduce_only of this FuturesInitialOrder. # noqa: E501
:rtype: bool
@@ -271,7 +259,7 @@ def reduce_only(self):
def reduce_only(self, reduce_only):
"""Sets the reduce_only of this FuturesInitialOrder.
- Set to true to create a reduce-only order # noqa: E501
+ When set to true, perform automatic position reduction operation. Set to true to ensure that the order will not open a new position, and is only used to close or reduce positions # noqa: E501
:param reduce_only: The reduce_only of this FuturesInitialOrder. # noqa: E501
:type: bool
@@ -283,7 +271,7 @@ def reduce_only(self, reduce_only):
def auto_size(self):
"""Gets the auto_size of this FuturesInitialOrder. # noqa: E501
- 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 # noqa: E501
+ Single position mode: auto_size is not required Dual position mode full closing (size=0): auto_size must be set, close_long for closing long positions, close_short for closing short positions Dual position mode partial closing (size≠0): auto_size is not required # noqa: E501
:return: The auto_size of this FuturesInitialOrder. # noqa: E501
:rtype: str
@@ -294,7 +282,7 @@ def auto_size(self):
def auto_size(self, auto_size):
"""Sets the auto_size of this FuturesInitialOrder.
- 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 # noqa: E501
+ Single position mode: auto_size is not required Dual position mode full closing (size=0): auto_size must be set, close_long for closing long positions, close_short for closing short positions Dual position mode partial closing (size≠0): auto_size is not required # noqa: E501
:param auto_size: The auto_size of this FuturesInitialOrder. # noqa: E501
:type: str
@@ -355,16 +343,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_limit_risk_tiers.py b/gate_api/models/futures_limit_risk_tiers.py
new file mode 100644
index 0000000..a636a2e
--- /dev/null
+++ b/gate_api/models/futures_limit_risk_tiers.py
@@ -0,0 +1,291 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class FuturesLimitRiskTiers(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'tier': 'int',
+ 'risk_limit': 'str',
+ 'initial_rate': 'str',
+ 'maintenance_rate': 'str',
+ 'leverage_max': 'str',
+ 'contract': 'str',
+ 'deduction': 'str'
+ }
+
+ attribute_map = {
+ 'tier': 'tier',
+ 'risk_limit': 'risk_limit',
+ 'initial_rate': 'initial_rate',
+ 'maintenance_rate': 'maintenance_rate',
+ 'leverage_max': 'leverage_max',
+ 'contract': 'contract',
+ 'deduction': 'deduction'
+ }
+
+ def __init__(self, tier=None, risk_limit=None, initial_rate=None, maintenance_rate=None, leverage_max=None, contract=None, deduction=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, str, str, str, str, Configuration) -> None
+ """FuturesLimitRiskTiers - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._tier = None
+ self._risk_limit = None
+ self._initial_rate = None
+ self._maintenance_rate = None
+ self._leverage_max = None
+ self._contract = None
+ self._deduction = None
+ self.discriminator = None
+
+ if tier is not None:
+ self.tier = tier
+ if risk_limit is not None:
+ self.risk_limit = risk_limit
+ if initial_rate is not None:
+ self.initial_rate = initial_rate
+ if maintenance_rate is not None:
+ self.maintenance_rate = maintenance_rate
+ if leverage_max is not None:
+ self.leverage_max = leverage_max
+ if contract is not None:
+ self.contract = contract
+ if deduction is not None:
+ self.deduction = deduction
+
+ @property
+ def tier(self):
+ """Gets the tier of this FuturesLimitRiskTiers. # noqa: E501
+
+ Tier # noqa: E501
+
+ :return: The tier of this FuturesLimitRiskTiers. # noqa: E501
+ :rtype: int
+ """
+ return self._tier
+
+ @tier.setter
+ def tier(self, tier):
+ """Sets the tier of this FuturesLimitRiskTiers.
+
+ Tier # noqa: E501
+
+ :param tier: The tier of this FuturesLimitRiskTiers. # noqa: E501
+ :type: int
+ """
+
+ self._tier = tier
+
+ @property
+ def risk_limit(self):
+ """Gets the risk_limit of this FuturesLimitRiskTiers. # noqa: E501
+
+ Position risk limit # noqa: E501
+
+ :return: The risk_limit of this FuturesLimitRiskTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._risk_limit
+
+ @risk_limit.setter
+ def risk_limit(self, risk_limit):
+ """Sets the risk_limit of this FuturesLimitRiskTiers.
+
+ Position risk limit # noqa: E501
+
+ :param risk_limit: The risk_limit of this FuturesLimitRiskTiers. # noqa: E501
+ :type: str
+ """
+
+ self._risk_limit = risk_limit
+
+ @property
+ def initial_rate(self):
+ """Gets the initial_rate of this FuturesLimitRiskTiers. # noqa: E501
+
+ Initial margin rate # noqa: E501
+
+ :return: The initial_rate of this FuturesLimitRiskTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._initial_rate
+
+ @initial_rate.setter
+ def initial_rate(self, initial_rate):
+ """Sets the initial_rate of this FuturesLimitRiskTiers.
+
+ Initial margin rate # noqa: E501
+
+ :param initial_rate: The initial_rate of this FuturesLimitRiskTiers. # noqa: E501
+ :type: str
+ """
+
+ self._initial_rate = initial_rate
+
+ @property
+ def maintenance_rate(self):
+ """Gets the maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501
+
+ Maintenance margin rate # noqa: E501
+
+ :return: The maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._maintenance_rate
+
+ @maintenance_rate.setter
+ def maintenance_rate(self, maintenance_rate):
+ """Sets the maintenance_rate of this FuturesLimitRiskTiers.
+
+ Maintenance margin rate # noqa: E501
+
+ :param maintenance_rate: The maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501
+ :type: str
+ """
+
+ self._maintenance_rate = maintenance_rate
+
+ @property
+ def leverage_max(self):
+ """Gets the leverage_max of this FuturesLimitRiskTiers. # noqa: E501
+
+ Maximum leverage # noqa: E501
+
+ :return: The leverage_max of this FuturesLimitRiskTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._leverage_max
+
+ @leverage_max.setter
+ def leverage_max(self, leverage_max):
+ """Sets the leverage_max of this FuturesLimitRiskTiers.
+
+ Maximum leverage # noqa: E501
+
+ :param leverage_max: The leverage_max of this FuturesLimitRiskTiers. # noqa: E501
+ :type: str
+ """
+
+ self._leverage_max = leverage_max
+
+ @property
+ def contract(self):
+ """Gets the contract of this FuturesLimitRiskTiers. # noqa: E501
+
+ Market, only visible when market pagination is requested # noqa: E501
+
+ :return: The contract of this FuturesLimitRiskTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._contract
+
+ @contract.setter
+ def contract(self, contract):
+ """Sets the contract of this FuturesLimitRiskTiers.
+
+ Market, only visible when market pagination is requested # noqa: E501
+
+ :param contract: The contract of this FuturesLimitRiskTiers. # noqa: E501
+ :type: str
+ """
+
+ self._contract = contract
+
+ @property
+ def deduction(self):
+ """Gets the deduction of this FuturesLimitRiskTiers. # noqa: E501
+
+ Maintenance margin quick calculation deduction amount # noqa: E501
+
+ :return: The deduction of this FuturesLimitRiskTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._deduction
+
+ @deduction.setter
+ def deduction(self, deduction):
+ """Sets the deduction of this FuturesLimitRiskTiers.
+
+ Maintenance margin quick calculation deduction amount # noqa: E501
+
+ :param deduction: The deduction of this FuturesLimitRiskTiers. # noqa: E501
+ :type: str
+ """
+
+ self._deduction = deduction
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, FuturesLimitRiskTiers):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, FuturesLimitRiskTiers):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/futures_liq_order.py b/gate_api/models/futures_liq_order.py
index e0140d5..fabcb0a 100644
--- a/gate_api/models/futures_liq_order.py
+++ b/gate_api/models/futures_liq_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -36,31 +36,24 @@ class FuturesLiqOrder(object):
'time': 'int',
'contract': 'str',
'size': 'int',
+ 'order_size': 'int',
'order_price': 'str',
'fill_price': 'str',
- 'left': 'int',
+ 'left': 'int'
}
attribute_map = {
'time': 'time',
'contract': 'contract',
'size': 'size',
+ 'order_size': 'order_size',
'order_price': 'order_price',
'fill_price': 'fill_price',
- 'left': 'left',
+ 'left': 'left'
}
- def __init__(
- self,
- time=None,
- contract=None,
- size=None,
- order_price=None,
- fill_price=None,
- left=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, str, int, str, str, int, Configuration) -> None
+ def __init__(self, time=None, contract=None, size=None, order_size=None, order_price=None, fill_price=None, left=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, int, int, str, str, int, Configuration) -> None
"""FuturesLiqOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -69,6 +62,7 @@ def __init__(
self._time = None
self._contract = None
self._size = None
+ self._order_size = None
self._order_price = None
self._fill_price = None
self._left = None
@@ -80,6 +74,8 @@ def __init__(
self.contract = contract
if size is not None:
self.size = size
+ if order_size is not None:
+ self.order_size = order_size
if order_price is not None:
self.order_price = order_price
if fill_price is not None:
@@ -156,6 +152,29 @@ def size(self, size):
self._size = size
+ @property
+ def order_size(self):
+ """Gets the order_size of this FuturesLiqOrder. # noqa: E501
+
+ Number of forced liquidation orders # noqa: E501
+
+ :return: The order_size of this FuturesLiqOrder. # noqa: E501
+ :rtype: int
+ """
+ return self._order_size
+
+ @order_size.setter
+ def order_size(self, order_size):
+ """Sets the order_size of this FuturesLiqOrder.
+
+ Number of forced liquidation orders # noqa: E501
+
+ :param order_size: The order_size of this FuturesLiqOrder. # noqa: E501
+ :type: int
+ """
+
+ self._order_size = order_size
+
@property
def order_price(self):
"""Gets the order_price of this FuturesLiqOrder. # noqa: E501
@@ -232,16 +251,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_liquidate.py b/gate_api/models/futures_liquidate.py
index 95ed1a6..549e71f 100644
--- a/gate_api/models/futures_liquidate.py
+++ b/gate_api/models/futures_liquidate.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -44,7 +44,7 @@ class FuturesLiquidate(object):
'order_id': 'int',
'order_price': 'str',
'fill_price': 'str',
- 'left': 'int',
+ 'left': 'int'
}
attribute_map = {
@@ -59,25 +59,10 @@ class FuturesLiquidate(object):
'order_id': 'order_id',
'order_price': 'order_price',
'fill_price': 'fill_price',
- 'left': 'left',
+ 'left': 'left'
}
- def __init__(
- self,
- time=None,
- contract=None,
- leverage=None,
- size=None,
- margin=None,
- entry_price=None,
- liq_price=None,
- mark_price=None,
- order_id=None,
- order_price=None,
- fill_price=None,
- left=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, time=None, contract=None, leverage=None, size=None, margin=None, entry_price=None, liq_price=None, mark_price=None, order_id=None, order_price=None, fill_price=None, left=None, local_vars_configuration=None): # noqa: E501
# type: (int, str, str, int, str, str, str, str, int, str, str, int, Configuration) -> None
"""FuturesLiquidate - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -173,7 +158,7 @@ def contract(self, contract):
def leverage(self):
"""Gets the leverage of this FuturesLiquidate. # noqa: E501
- Position leverage. Not returned in public endpoints. # noqa: E501
+ Position leverage. Not returned in public endpoints # noqa: E501
:return: The leverage of this FuturesLiquidate. # noqa: E501
:rtype: str
@@ -184,7 +169,7 @@ def leverage(self):
def leverage(self, leverage):
"""Sets the leverage of this FuturesLiquidate.
- Position leverage. Not returned in public endpoints. # noqa: E501
+ Position leverage. Not returned in public endpoints # noqa: E501
:param leverage: The leverage of this FuturesLiquidate. # noqa: E501
:type: str
@@ -219,7 +204,7 @@ def size(self, size):
def margin(self):
"""Gets the margin of this FuturesLiquidate. # noqa: E501
- Position margin. Not returned in public endpoints. # noqa: E501
+ Position margin. Not returned in public endpoints # noqa: E501
:return: The margin of this FuturesLiquidate. # noqa: E501
:rtype: str
@@ -230,7 +215,7 @@ def margin(self):
def margin(self, margin):
"""Sets the margin of this FuturesLiquidate.
- Position margin. Not returned in public endpoints. # noqa: E501
+ Position margin. Not returned in public endpoints # noqa: E501
:param margin: The margin of this FuturesLiquidate. # noqa: E501
:type: str
@@ -242,7 +227,7 @@ def margin(self, margin):
def entry_price(self):
"""Gets the entry_price of this FuturesLiquidate. # noqa: E501
- Average entry price. Not returned in public endpoints. # noqa: E501
+ Average entry price. Not returned in public endpoints # noqa: E501
:return: The entry_price of this FuturesLiquidate. # noqa: E501
:rtype: str
@@ -253,7 +238,7 @@ def entry_price(self):
def entry_price(self, entry_price):
"""Sets the entry_price of this FuturesLiquidate.
- Average entry price. Not returned in public endpoints. # noqa: E501
+ Average entry price. Not returned in public endpoints # noqa: E501
:param entry_price: The entry_price of this FuturesLiquidate. # noqa: E501
:type: str
@@ -265,7 +250,7 @@ def entry_price(self, entry_price):
def liq_price(self):
"""Gets the liq_price of this FuturesLiquidate. # noqa: E501
- Liquidation price. Not returned in public endpoints. # noqa: E501
+ Liquidation price. Not returned in public endpoints # noqa: E501
:return: The liq_price of this FuturesLiquidate. # noqa: E501
:rtype: str
@@ -276,7 +261,7 @@ def liq_price(self):
def liq_price(self, liq_price):
"""Sets the liq_price of this FuturesLiquidate.
- Liquidation price. Not returned in public endpoints. # noqa: E501
+ Liquidation price. Not returned in public endpoints # noqa: E501
:param liq_price: The liq_price of this FuturesLiquidate. # noqa: E501
:type: str
@@ -288,7 +273,7 @@ def liq_price(self, liq_price):
def mark_price(self):
"""Gets the mark_price of this FuturesLiquidate. # noqa: E501
- Mark price. Not returned in public endpoints. # noqa: E501
+ Mark price. Not returned in public endpoints # noqa: E501
:return: The mark_price of this FuturesLiquidate. # noqa: E501
:rtype: str
@@ -299,7 +284,7 @@ def mark_price(self):
def mark_price(self, mark_price):
"""Sets the mark_price of this FuturesLiquidate.
- Mark price. Not returned in public endpoints. # noqa: E501
+ Mark price. Not returned in public endpoints # noqa: E501
:param mark_price: The mark_price of this FuturesLiquidate. # noqa: E501
:type: str
@@ -311,7 +296,7 @@ def mark_price(self, mark_price):
def order_id(self):
"""Gets the order_id of this FuturesLiquidate. # noqa: E501
- Liquidation order ID. Not returned in public endpoints. # noqa: E501
+ Liquidation order ID. Not returned in public endpoints # noqa: E501
:return: The order_id of this FuturesLiquidate. # noqa: E501
:rtype: int
@@ -322,7 +307,7 @@ def order_id(self):
def order_id(self, order_id):
"""Sets the order_id of this FuturesLiquidate.
- Liquidation order ID. Not returned in public endpoints. # noqa: E501
+ Liquidation order ID. Not returned in public endpoints # noqa: E501
:param order_id: The order_id of this FuturesLiquidate. # noqa: E501
:type: int
@@ -406,16 +391,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_order.py b/gate_api/models/futures_order.py
index e003b58..0f60281 100644
--- a/gate_api/models/futures_order.py
+++ b/gate_api/models/futures_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -36,6 +36,7 @@ class FuturesOrder(object):
'id': 'int',
'user': 'int',
'create_time': 'float',
+ 'update_time': 'float',
'finish_time': 'float',
'finish_as': 'str',
'status': 'str',
@@ -59,12 +60,15 @@ class FuturesOrder(object):
'stp_id': 'int',
'stp_act': 'str',
'amend_text': 'str',
+ 'limit_vip': 'int',
+ 'pid': 'int'
}
attribute_map = {
'id': 'id',
'user': 'user',
'create_time': 'create_time',
+ 'update_time': 'update_time',
'finish_time': 'finish_time',
'finish_as': 'finish_as',
'status': 'status',
@@ -88,39 +92,12 @@ class FuturesOrder(object):
'stp_id': 'stp_id',
'stp_act': 'stp_act',
'amend_text': 'amend_text',
+ 'limit_vip': 'limit_vip',
+ 'pid': 'pid'
}
- def __init__(
- self,
- id=None,
- user=None,
- create_time=None,
- finish_time=None,
- finish_as=None,
- status=None,
- contract=None,
- size=None,
- iceberg=None,
- price=None,
- close=False,
- is_close=None,
- reduce_only=False,
- is_reduce_only=None,
- is_liq=None,
- tif='gtc',
- left=None,
- fill_price=None,
- text=None,
- tkfr=None,
- mkfr=None,
- refu=None,
- auto_size=None,
- stp_id=None,
- stp_act=None,
- amend_text=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, int, str, str, Configuration) -> None
+ def __init__(self, id=None, user=None, create_time=None, update_time=None, finish_time=None, finish_as=None, status=None, contract=None, size=None, iceberg=None, price=None, close=False, is_close=None, reduce_only=False, is_reduce_only=None, is_liq=None, tif='gtc', left=None, fill_price=None, text=None, tkfr=None, mkfr=None, refu=None, auto_size=None, stp_id=None, stp_act=None, amend_text=None, limit_vip=None, pid=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, int, float, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, int, str, str, int, int, Configuration) -> None
"""FuturesOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -129,6 +106,7 @@ def __init__(
self._id = None
self._user = None
self._create_time = None
+ self._update_time = None
self._finish_time = None
self._finish_as = None
self._status = None
@@ -152,6 +130,8 @@ def __init__(
self._stp_id = None
self._stp_act = None
self._amend_text = None
+ self._limit_vip = None
+ self._pid = None
self.discriminator = None
if id is not None:
@@ -160,6 +140,8 @@ def __init__(
self.user = user
if create_time is not None:
self.create_time = create_time
+ if update_time is not None:
+ self.update_time = update_time
if finish_time is not None:
self.finish_time = finish_time
if finish_as is not None:
@@ -204,6 +186,10 @@ def __init__(
self.stp_act = stp_act
if amend_text is not None:
self.amend_text = amend_text
+ if limit_vip is not None:
+ self.limit_vip = limit_vip
+ if pid is not None:
+ self.pid = pid
@property
def id(self):
@@ -274,6 +260,29 @@ def create_time(self, create_time):
self._create_time = create_time
+ @property
+ def update_time(self):
+ """Gets the update_time of this FuturesOrder. # noqa: E501
+
+ OrderUpdateTime # noqa: E501
+
+ :return: The update_time of this FuturesOrder. # noqa: E501
+ :rtype: float
+ """
+ return self._update_time
+
+ @update_time.setter
+ def update_time(self, update_time):
+ """Sets the update_time of this FuturesOrder.
+
+ OrderUpdateTime # noqa: E501
+
+ :param update_time: The update_time of this FuturesOrder. # noqa: E501
+ :type: float
+ """
+
+ self._update_time = update_time
+
@property
def finish_time(self):
"""Gets the finish_time of this FuturesOrder. # noqa: E501
@@ -301,7 +310,7 @@ def finish_time(self, finish_time):
def finish_as(self):
"""Gets the finish_as of this FuturesOrder. # noqa: E501
- 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 # noqa: E501
+ 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 # noqa: E501
:return: The finish_as of this FuturesOrder. # noqa: E501
:rtype: str
@@ -312,27 +321,16 @@ def finish_as(self):
def finish_as(self, finish_as):
"""Sets the finish_as of this FuturesOrder.
- 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 # noqa: E501
+ 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 # noqa: E501
:param finish_as: The finish_as of this FuturesOrder. # noqa: E501
:type: str
"""
- allowed_values = [
- "filled",
- "cancelled",
- "liquidated",
- "ioc",
- "auto_deleveraged",
- "reduce_only",
- "position_closed",
- "reduce_out",
- "stp",
- ] # noqa: E501
+ allowed_values = ["filled", "cancelled", "liquidated", "ioc", "auto_deleveraged", "reduce_only", "position_closed", "reduce_out", "stp"] # noqa: E501
if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `finish_as` ({0}), must be one of {1}".format( # noqa: E501
- finish_as, allowed_values
- )
+ "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501
+ .format(finish_as, allowed_values)
)
self._finish_as = finish_as
@@ -341,7 +339,7 @@ def finish_as(self, finish_as):
def status(self):
"""Gets the status of this FuturesOrder. # noqa: E501
- Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501
+ Order status - `open`: Pending - `finished`: Completed # noqa: E501
:return: The status of this FuturesOrder. # noqa: E501
:rtype: str
@@ -352,7 +350,7 @@ def status(self):
def status(self, status):
"""Sets the status of this FuturesOrder.
- Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501
+ Order status - `open`: Pending - `finished`: Completed # noqa: E501
:param status: The status of this FuturesOrder. # noqa: E501
:type: str
@@ -360,7 +358,8 @@ def status(self, status):
allowed_values = ["open", "finished"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values) # noqa: E501
+ "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
+ .format(status, allowed_values)
)
self._status = status
@@ -394,7 +393,7 @@ def contract(self, contract):
def size(self):
"""Gets the size of this FuturesOrder. # noqa: E501
- Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501
+ Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. # noqa: E501
:return: The size of this FuturesOrder. # noqa: E501
:rtype: int
@@ -405,7 +404,7 @@ def size(self):
def size(self, size):
"""Sets the size of this FuturesOrder.
- Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501
+ Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. # noqa: E501
:param size: The size of this FuturesOrder. # noqa: E501
:type: int
@@ -419,7 +418,7 @@ def size(self, size):
def iceberg(self):
"""Gets the iceberg of this FuturesOrder. # noqa: E501
- Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501
+ Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. # noqa: E501
:return: The iceberg of this FuturesOrder. # noqa: E501
:rtype: int
@@ -430,7 +429,7 @@ def iceberg(self):
def iceberg(self, iceberg):
"""Sets the iceberg of this FuturesOrder.
- Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501
+ Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. # noqa: E501
:param iceberg: The iceberg of this FuturesOrder. # noqa: E501
:type: int
@@ -442,7 +441,7 @@ def iceberg(self, iceberg):
def price(self):
"""Gets the price of this FuturesOrder. # noqa: E501
- Order price. 0 for market order with `tif` set as `ioc` # noqa: E501
+ Order price. Price of 0 with `tif` set to `ioc` represents a market order. # noqa: E501
:return: The price of this FuturesOrder. # noqa: E501
:rtype: str
@@ -453,7 +452,7 @@ def price(self):
def price(self, price):
"""Sets the price of this FuturesOrder.
- Order price. 0 for market order with `tif` set as `ioc` # noqa: E501
+ Order price. Price of 0 with `tif` set to `ioc` represents a market order. # noqa: E501
:param price: The price of this FuturesOrder. # noqa: E501
:type: str
@@ -599,7 +598,8 @@ def tif(self, tif):
allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501
if self.local_vars_configuration.client_side_validation and tif not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `tif` ({0}), must be one of {1}".format(tif, allowed_values) # noqa: E501
+ "Invalid value for `tif` ({0}), must be one of {1}" # noqa: E501
+ .format(tif, allowed_values)
)
self._tif = tif
@@ -608,7 +608,7 @@ def tif(self, tif):
def left(self):
"""Gets the left of this FuturesOrder. # noqa: E501
- Size left to be traded # noqa: E501
+ Unfilled quantity # noqa: E501
:return: The left of this FuturesOrder. # noqa: E501
:rtype: int
@@ -619,7 +619,7 @@ def left(self):
def left(self, left):
"""Sets the left of this FuturesOrder.
- Size left to be traded # noqa: E501
+ Unfilled quantity # noqa: E501
:param left: The left of this FuturesOrder. # noqa: E501
:type: int
@@ -631,7 +631,7 @@ def left(self, left):
def fill_price(self):
"""Gets the fill_price of this FuturesOrder. # noqa: E501
- Fill price of the order # noqa: E501
+ Fill price # noqa: E501
:return: The fill_price of this FuturesOrder. # noqa: E501
:rtype: str
@@ -642,7 +642,7 @@ def fill_price(self):
def fill_price(self, fill_price):
"""Sets the fill_price of this FuturesOrder.
- Fill price of the order # noqa: E501
+ Fill price # noqa: E501
:param fill_price: The fill_price of this FuturesOrder. # noqa: E501
:type: str
@@ -654,7 +654,7 @@ def fill_price(self, fill_price):
def text(self):
"""Gets the text of this FuturesOrder. # noqa: E501
- 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(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance # noqa: E501
+ Custom order 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(.) In addition to user-defined information, the following are internal reserved fields that identify the order source: - web: Web - api: API call - app: Mobile app - auto_deleveraging: Automatic deleveraging - liquidation: Forced liquidation of positions under the old classic mode - liq-xxx: a. Forced liquidation of positions under the new classic mode, including isolated margin, one-way cross margin, and non-hedged positions under two-way cross margin. b. Forced liquidation of isolated positions under the unified account single-currency margin mode - hedge-liq-xxx: Forced liquidation of hedged positions under the new classic mode two-way cross margin, i.e., simultaneously closing long and short positions - pm_liquidate: Forced liquidation under unified account multi-currency margin mode - comb_margin_liquidate: Forced liquidation under unified account portfolio margin mode - scm_liquidate: Forced liquidation of positions under unified account single-currency margin mode - insurance: Insurance # noqa: E501
:return: The text of this FuturesOrder. # noqa: E501
:rtype: str
@@ -665,7 +665,7 @@ def text(self):
def text(self, text):
"""Sets the text of this FuturesOrder.
- 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(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance # noqa: E501
+ Custom order 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(.) In addition to user-defined information, the following are internal reserved fields that identify the order source: - web: Web - api: API call - app: Mobile app - auto_deleveraging: Automatic deleveraging - liquidation: Forced liquidation of positions under the old classic mode - liq-xxx: a. Forced liquidation of positions under the new classic mode, including isolated margin, one-way cross margin, and non-hedged positions under two-way cross margin. b. Forced liquidation of isolated positions under the unified account single-currency margin mode - hedge-liq-xxx: Forced liquidation of hedged positions under the new classic mode two-way cross margin, i.e., simultaneously closing long and short positions - pm_liquidate: Forced liquidation under unified account multi-currency margin mode - comb_margin_liquidate: Forced liquidation under unified account portfolio margin mode - scm_liquidate: Forced liquidation of positions under unified account single-currency margin mode - insurance: Insurance # noqa: E501
:param text: The text of this FuturesOrder. # noqa: E501
:type: str
@@ -723,7 +723,7 @@ def mkfr(self, mkfr):
def refu(self):
"""Gets the refu of this FuturesOrder. # noqa: E501
- Reference user ID # noqa: E501
+ Referrer user ID # noqa: E501
:return: The refu of this FuturesOrder. # noqa: E501
:rtype: int
@@ -734,7 +734,7 @@ def refu(self):
def refu(self, refu):
"""Sets the refu of this FuturesOrder.
- Reference user ID # noqa: E501
+ Referrer user ID # noqa: E501
:param refu: The refu of this FuturesOrder. # noqa: E501
:type: int
@@ -765,9 +765,8 @@ def auto_size(self, auto_size):
allowed_values = ["close_long", "close_short"] # noqa: E501
if self.local_vars_configuration.client_side_validation and auto_size not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `auto_size` ({0}), must be one of {1}".format( # noqa: E501
- auto_size, allowed_values
- )
+ "Invalid value for `auto_size` ({0}), must be one of {1}" # noqa: E501
+ .format(auto_size, allowed_values)
)
self._auto_size = auto_size
@@ -799,7 +798,7 @@ def stp_id(self, stp_id):
def stp_act(self):
"""Gets the stp_act of this FuturesOrder. # noqa: E501
- 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 # noqa: E501
+ Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention 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 # noqa: E501
:return: The stp_act of this FuturesOrder. # noqa: E501
:rtype: str
@@ -810,7 +809,7 @@ def stp_act(self):
def stp_act(self, stp_act):
"""Sets the stp_act of this FuturesOrder.
- 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 # noqa: E501
+ Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention 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 # noqa: E501
:param stp_act: The stp_act of this FuturesOrder. # noqa: E501
:type: str
@@ -818,7 +817,8 @@ def stp_act(self, stp_act):
allowed_values = ["co", "cn", "cb", "-"] # noqa: E501
if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `stp_act` ({0}), must be one of {1}".format(stp_act, allowed_values) # noqa: E501
+ "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501
+ .format(stp_act, allowed_values)
)
self._stp_act = stp_act
@@ -846,6 +846,52 @@ def amend_text(self, amend_text):
self._amend_text = amend_text
+ @property
+ def limit_vip(self):
+ """Gets the limit_vip of this FuturesOrder. # noqa: E501
+
+ Counterparty user's VIP level for limit order fills. Current order will only match with orders whose VIP level is less than or equal to the specified level. Only 11~16 are supported; default is 0 # noqa: E501
+
+ :return: The limit_vip of this FuturesOrder. # noqa: E501
+ :rtype: int
+ """
+ return self._limit_vip
+
+ @limit_vip.setter
+ def limit_vip(self, limit_vip):
+ """Sets the limit_vip of this FuturesOrder.
+
+ Counterparty user's VIP level for limit order fills. Current order will only match with orders whose VIP level is less than or equal to the specified level. Only 11~16 are supported; default is 0 # noqa: E501
+
+ :param limit_vip: The limit_vip of this FuturesOrder. # noqa: E501
+ :type: int
+ """
+
+ self._limit_vip = limit_vip
+
+ @property
+ def pid(self):
+ """Gets the pid of this FuturesOrder. # noqa: E501
+
+ Position ID # noqa: E501
+
+ :return: The pid of this FuturesOrder. # noqa: E501
+ :rtype: int
+ """
+ return self._pid
+
+ @pid.setter
+ def pid(self, pid):
+ """Sets the pid of this FuturesOrder.
+
+ Position ID # noqa: E501
+
+ :param pid: The pid of this FuturesOrder. # noqa: E501
+ :type: int
+ """
+
+ self._pid = pid
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -853,16 +899,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_order_amendment.py b/gate_api/models/futures_order_amendment.py
index f32e092..1232631 100644
--- a/gate_api/models/futures_order_amendment.py
+++ b/gate_api/models/futures_order_amendment.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,12 +32,22 @@ class FuturesOrderAmendment(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'size': 'int', 'price': 'str', 'amend_text': 'str'}
-
- attribute_map = {'size': 'size', 'price': 'price', 'amend_text': 'amend_text'}
-
- def __init__(self, size=None, price=None, amend_text=None, local_vars_configuration=None): # noqa: E501
- # type: (int, str, str, Configuration) -> None
+ openapi_types = {
+ 'size': 'int',
+ 'price': 'str',
+ 'amend_text': 'str',
+ 'text': 'str'
+ }
+
+ attribute_map = {
+ 'size': 'size',
+ 'price': 'price',
+ 'amend_text': 'amend_text',
+ 'text': 'text'
+ }
+
+ def __init__(self, size=None, price=None, amend_text=None, text=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, str, Configuration) -> None
"""FuturesOrderAmendment - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -46,6 +56,7 @@ def __init__(self, size=None, price=None, amend_text=None, local_vars_configurat
self._size = None
self._price = None
self._amend_text = None
+ self._text = None
self.discriminator = None
if size is not None:
@@ -54,6 +65,8 @@ def __init__(self, size=None, price=None, amend_text=None, local_vars_configurat
self.price = price
if amend_text is not None:
self.amend_text = amend_text
+ if text is not None:
+ self.text = text
@property
def size(self):
@@ -82,7 +95,7 @@ def size(self, size):
def price(self):
"""Gets the price of this FuturesOrderAmendment. # noqa: E501
- New order price. # noqa: E501
+ New order price # noqa: E501
:return: The price of this FuturesOrderAmendment. # noqa: E501
:rtype: str
@@ -93,7 +106,7 @@ def price(self):
def price(self, price):
"""Sets the price of this FuturesOrderAmendment.
- New order price. # noqa: E501
+ New order price # noqa: E501
:param price: The price of this FuturesOrderAmendment. # noqa: E501
:type: str
@@ -105,7 +118,7 @@ def price(self, price):
def amend_text(self):
"""Gets the amend_text of this FuturesOrderAmendment. # noqa: E501
- Custom info during amending order # noqa: E501
+ Custom info during order amendment # noqa: E501
:return: The amend_text of this FuturesOrderAmendment. # noqa: E501
:rtype: str
@@ -116,7 +129,7 @@ def amend_text(self):
def amend_text(self, amend_text):
"""Sets the amend_text of this FuturesOrderAmendment.
- Custom info during amending order # noqa: E501
+ Custom info during order amendment # noqa: E501
:param amend_text: The amend_text of this FuturesOrderAmendment. # noqa: E501
:type: str
@@ -124,6 +137,29 @@ def amend_text(self, amend_text):
self._amend_text = amend_text
+ @property
+ def text(self):
+ """Gets the text of this FuturesOrderAmendment. # noqa: E501
+
+ Internal users can modify information in the text field. # noqa: E501
+
+ :return: The text of this FuturesOrderAmendment. # noqa: E501
+ :rtype: str
+ """
+ return self._text
+
+ @text.setter
+ def text(self, text):
+ """Sets the text of this FuturesOrderAmendment.
+
+ Internal users can modify information in the text field. # noqa: E501
+
+ :param text: The text of this FuturesOrderAmendment. # noqa: E501
+ :type: str
+ """
+
+ self._text = text
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -131,16 +167,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_order_book.py b/gate_api/models/futures_order_book.py
index 93c1ea7..cc240a6 100644
--- a/gate_api/models/futures_order_book.py
+++ b/gate_api/models/futures_order_book.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -37,14 +37,18 @@ class FuturesOrderBook(object):
'current': 'float',
'update': 'float',
'asks': 'list[FuturesOrderBookItem]',
- 'bids': 'list[FuturesOrderBookItem]',
+ 'bids': 'list[FuturesOrderBookItem]'
}
- attribute_map = {'id': 'id', 'current': 'current', 'update': 'update', 'asks': 'asks', 'bids': 'bids'}
+ attribute_map = {
+ 'id': 'id',
+ 'current': 'current',
+ 'update': 'update',
+ 'asks': 'asks',
+ 'bids': 'bids'
+ }
- def __init__(
- self, id=None, current=None, update=None, asks=None, bids=None, local_vars_configuration=None
- ): # noqa: E501
+ def __init__(self, id=None, current=None, update=None, asks=None, bids=None, local_vars_configuration=None): # noqa: E501
# type: (int, float, float, list[FuturesOrderBookItem], list[FuturesOrderBookItem], Configuration) -> None
"""FuturesOrderBook - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -140,7 +144,7 @@ def update(self, update):
def asks(self):
"""Gets the asks of this FuturesOrderBook. # noqa: E501
- Asks order depth # noqa: E501
+ Ask Depth # noqa: E501
:return: The asks of this FuturesOrderBook. # noqa: E501
:rtype: list[FuturesOrderBookItem]
@@ -151,7 +155,7 @@ def asks(self):
def asks(self, asks):
"""Sets the asks of this FuturesOrderBook.
- Asks order depth # noqa: E501
+ Ask Depth # noqa: E501
:param asks: The asks of this FuturesOrderBook. # noqa: E501
:type: list[FuturesOrderBookItem]
@@ -165,7 +169,7 @@ def asks(self, asks):
def bids(self):
"""Gets the bids of this FuturesOrderBook. # noqa: E501
- Bids order depth # noqa: E501
+ Bid Depth # noqa: E501
:return: The bids of this FuturesOrderBook. # noqa: E501
:rtype: list[FuturesOrderBookItem]
@@ -176,7 +180,7 @@ def bids(self):
def bids(self, bids):
"""Sets the bids of this FuturesOrderBook.
- Bids order depth # noqa: E501
+ Bid Depth # noqa: E501
:param bids: The bids of this FuturesOrderBook. # noqa: E501
:type: list[FuturesOrderBookItem]
@@ -193,16 +197,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_order_book_item.py b/gate_api/models/futures_order_book_item.py
index 576c852..4ca4732 100644
--- a/gate_api/models/futures_order_book_item.py
+++ b/gate_api/models/futures_order_book_item.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class FuturesOrderBookItem(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'p': 'str', 's': 'int'}
+ openapi_types = {
+ 'p': 'str',
+ 's': 'int'
+ }
- attribute_map = {'p': 'p', 's': 's'}
+ attribute_map = {
+ 'p': 'p',
+ 's': 's'
+ }
def __init__(self, p=None, s=None, local_vars_configuration=None): # noqa: E501
# type: (str, int, Configuration) -> None
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_position_cross_mode.py b/gate_api/models/futures_position_cross_mode.py
new file mode 100644
index 0000000..4f4a83c
--- /dev/null
+++ b/gate_api/models/futures_position_cross_mode.py
@@ -0,0 +1,153 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class FuturesPositionCrossMode(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'mode': 'str',
+ 'contract': 'str'
+ }
+
+ attribute_map = {
+ 'mode': 'mode',
+ 'contract': 'contract'
+ }
+
+ def __init__(self, mode=None, contract=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """FuturesPositionCrossMode - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._mode = None
+ self._contract = None
+ self.discriminator = None
+
+ self.mode = mode
+ self.contract = contract
+
+ @property
+ def mode(self):
+ """Gets the mode of this FuturesPositionCrossMode. # noqa: E501
+
+ Cross margin or isolated margin mode. ISOLATED - isolated margin mode, CROSS - cross margin mode # noqa: E501
+
+ :return: The mode of this FuturesPositionCrossMode. # noqa: E501
+ :rtype: str
+ """
+ return self._mode
+
+ @mode.setter
+ def mode(self, mode):
+ """Sets the mode of this FuturesPositionCrossMode.
+
+ Cross margin or isolated margin mode. ISOLATED - isolated margin mode, CROSS - cross margin mode # noqa: E501
+
+ :param mode: The mode of this FuturesPositionCrossMode. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and mode is None: # noqa: E501
+ raise ValueError("Invalid value for `mode`, must not be `None`") # noqa: E501
+
+ self._mode = mode
+
+ @property
+ def contract(self):
+ """Gets the contract of this FuturesPositionCrossMode. # noqa: E501
+
+ Futures market # noqa: E501
+
+ :return: The contract of this FuturesPositionCrossMode. # noqa: E501
+ :rtype: str
+ """
+ return self._contract
+
+ @contract.setter
+ def contract(self, contract):
+ """Sets the contract of this FuturesPositionCrossMode.
+
+ Futures market # noqa: E501
+
+ :param contract: The contract of this FuturesPositionCrossMode. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501
+ raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501
+
+ self._contract = contract
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, FuturesPositionCrossMode):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, FuturesPositionCrossMode):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/futures_premium_index.py b/gate_api/models/futures_premium_index.py
index 806e20c..f02adc1 100644
--- a/gate_api/models/futures_premium_index.py
+++ b/gate_api/models/futures_premium_index.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,21 @@ class FuturesPremiumIndex(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'t': 'float', 'c': 'str', 'h': 'str', 'l': 'str', 'o': 'str'}
-
- attribute_map = {'t': 't', 'c': 'c', 'h': 'h', 'l': 'l', 'o': 'o'}
+ openapi_types = {
+ 't': 'float',
+ 'c': 'str',
+ 'h': 'str',
+ 'l': 'str',
+ 'o': 'str'
+ }
+
+ attribute_map = {
+ 't': 't',
+ 'c': 'c',
+ 'h': 'h',
+ 'l': 'l',
+ 'o': 'o'
+ }
def __init__(self, t=None, c=None, h=None, l=None, o=None, local_vars_configuration=None): # noqa: E501
# type: (float, str, str, str, str, Configuration) -> None
@@ -134,7 +146,7 @@ def h(self, h):
def l(self):
"""Gets the l of this FuturesPremiumIndex. # noqa: E501
- Lowest price` # noqa: E501
+ Lowest price # noqa: E501
:return: The l of this FuturesPremiumIndex. # noqa: E501
:rtype: str
@@ -145,7 +157,7 @@ def l(self):
def l(self, l):
"""Sets the l of this FuturesPremiumIndex.
- Lowest price` # noqa: E501
+ Lowest price # noqa: E501
:param l: The l of this FuturesPremiumIndex. # noqa: E501
:type: str
@@ -183,16 +195,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_price_trigger.py b/gate_api/models/futures_price_trigger.py
index 4f6b612..7dd48a6 100644
--- a/gate_api/models/futures_price_trigger.py
+++ b/gate_api/models/futures_price_trigger.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,19 +32,23 @@ class FuturesPriceTrigger(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'strategy_type': 'int', 'price_type': 'int', 'price': 'str', 'rule': 'int', 'expiration': 'int'}
+ openapi_types = {
+ 'strategy_type': 'int',
+ 'price_type': 'int',
+ 'price': 'str',
+ 'rule': 'int',
+ 'expiration': 'int'
+ }
attribute_map = {
'strategy_type': 'strategy_type',
'price_type': 'price_type',
'price': 'price',
'rule': 'rule',
- 'expiration': 'expiration',
+ 'expiration': 'expiration'
}
- def __init__(
- self, strategy_type=None, price_type=None, price=None, rule=None, expiration=None, local_vars_configuration=None
- ): # noqa: E501
+ def __init__(self, strategy_type=None, price_type=None, price=None, rule=None, expiration=None, local_vars_configuration=None): # noqa: E501
# type: (int, int, str, int, int, Configuration) -> None
"""FuturesPriceTrigger - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -73,7 +77,7 @@ def __init__(
def strategy_type(self):
"""Gets the strategy_type of this FuturesPriceTrigger. # noqa: E501
- How the order will be triggered - `0`: by price, which means the order will be triggered if price condition is satisfied - `1`: by price gap, which means the order will be triggered if gap of recent two prices of specified `price_type` are satisfied. Only `0` is supported currently # noqa: E501
+ Trigger Strategy - 0: Price trigger, triggered when price meets conditions - 1: Price spread trigger, i.e. the difference between the latest price specified in `price_type` and the second-last price Currently only supports 0 (latest transaction price) # noqa: E501
:return: The strategy_type of this FuturesPriceTrigger. # noqa: E501
:rtype: int
@@ -84,7 +88,7 @@ def strategy_type(self):
def strategy_type(self, strategy_type):
"""Sets the strategy_type of this FuturesPriceTrigger.
- How the order will be triggered - `0`: by price, which means the order will be triggered if price condition is satisfied - `1`: by price gap, which means the order will be triggered if gap of recent two prices of specified `price_type` are satisfied. Only `0` is supported currently # noqa: E501
+ Trigger Strategy - 0: Price trigger, triggered when price meets conditions - 1: Price spread trigger, i.e. the difference between the latest price specified in `price_type` and the second-last price Currently only supports 0 (latest transaction price) # noqa: E501
:param strategy_type: The strategy_type of this FuturesPriceTrigger. # noqa: E501
:type: int
@@ -92,9 +96,8 @@ def strategy_type(self, strategy_type):
allowed_values = [0, 1] # noqa: E501
if self.local_vars_configuration.client_side_validation and strategy_type not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `strategy_type` ({0}), must be one of {1}".format( # noqa: E501
- strategy_type, allowed_values
- )
+ "Invalid value for `strategy_type` ({0}), must be one of {1}" # noqa: E501
+ .format(strategy_type, allowed_values)
)
self._strategy_type = strategy_type
@@ -103,7 +106,7 @@ def strategy_type(self, strategy_type):
def price_type(self):
"""Gets the price_type of this FuturesPriceTrigger. # noqa: E501
- Price type. 0 - latest deal price, 1 - mark price, 2 - index price # noqa: E501
+ Reference price type. 0 - Latest trade price, 1 - Mark price, 2 - Index price # noqa: E501
:return: The price_type of this FuturesPriceTrigger. # noqa: E501
:rtype: int
@@ -114,7 +117,7 @@ def price_type(self):
def price_type(self, price_type):
"""Sets the price_type of this FuturesPriceTrigger.
- Price type. 0 - latest deal price, 1 - mark price, 2 - index price # noqa: E501
+ Reference price type. 0 - Latest trade price, 1 - Mark price, 2 - Index price # noqa: E501
:param price_type: The price_type of this FuturesPriceTrigger. # noqa: E501
:type: int
@@ -122,9 +125,8 @@ def price_type(self, price_type):
allowed_values = [0, 1, 2] # noqa: E501
if self.local_vars_configuration.client_side_validation and price_type not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `price_type` ({0}), must be one of {1}".format( # noqa: E501
- price_type, allowed_values
- )
+ "Invalid value for `price_type` ({0}), must be one of {1}" # noqa: E501
+ .format(price_type, allowed_values)
)
self._price_type = price_type
@@ -133,7 +135,7 @@ def price_type(self, price_type):
def price(self):
"""Gets the price of this FuturesPriceTrigger. # noqa: E501
- Value of price on price triggered, or price gap on price gap triggered # noqa: E501
+ Price value for price trigger, or spread value for spread trigger # noqa: E501
:return: The price of this FuturesPriceTrigger. # noqa: E501
:rtype: str
@@ -144,7 +146,7 @@ def price(self):
def price(self, price):
"""Sets the price of this FuturesPriceTrigger.
- Value of price on price triggered, or price gap on price gap triggered # noqa: E501
+ Price value for price trigger, or spread value for spread trigger # noqa: E501
:param price: The price of this FuturesPriceTrigger. # noqa: E501
:type: str
@@ -156,7 +158,7 @@ def price(self, price):
def rule(self):
"""Gets the rule of this FuturesPriceTrigger. # noqa: E501
- Trigger condition type - `1`: calculated price based on `strategy_type` and `price_type` >= `price` - `2`: calculated price based on `strategy_type` and `price_type` <= `price` # noqa: E501
+ Price Condition Type - 1: Trigger when the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price`, while Trigger.Price must > last_price - 2: Trigger when the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price`, and Trigger.Price must < last_price # noqa: E501
:return: The rule of this FuturesPriceTrigger. # noqa: E501
:rtype: int
@@ -167,7 +169,7 @@ def rule(self):
def rule(self, rule):
"""Sets the rule of this FuturesPriceTrigger.
- Trigger condition type - `1`: calculated price based on `strategy_type` and `price_type` >= `price` - `2`: calculated price based on `strategy_type` and `price_type` <= `price` # noqa: E501
+ Price Condition Type - 1: Trigger when the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price`, while Trigger.Price must > last_price - 2: Trigger when the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price`, and Trigger.Price must < last_price # noqa: E501
:param rule: The rule of this FuturesPriceTrigger. # noqa: E501
:type: int
@@ -175,7 +177,8 @@ def rule(self, rule):
allowed_values = [1, 2] # noqa: E501
if self.local_vars_configuration.client_side_validation and rule not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `rule` ({0}), must be one of {1}".format(rule, allowed_values) # noqa: E501
+ "Invalid value for `rule` ({0}), must be one of {1}" # noqa: E501
+ .format(rule, allowed_values)
)
self._rule = rule
@@ -184,7 +187,7 @@ def rule(self, rule):
def expiration(self):
"""Gets the expiration of this FuturesPriceTrigger. # noqa: E501
- How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501
+ Maximum wait time for trigger condition (in seconds). Order will be cancelled if timeout # noqa: E501
:return: The expiration of this FuturesPriceTrigger. # noqa: E501
:rtype: int
@@ -195,7 +198,7 @@ def expiration(self):
def expiration(self, expiration):
"""Sets the expiration of this FuturesPriceTrigger.
- How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501
+ Maximum wait time for trigger condition (in seconds). Order will be cancelled if timeout # noqa: E501
:param expiration: The expiration of this FuturesPriceTrigger. # noqa: E501
:type: int
@@ -210,16 +213,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_price_triggered_order.py b/gate_api/models/futures_price_triggered_order.py
index 999d5bf..14e16ae 100644
--- a/gate_api/models/futures_price_triggered_order.py
+++ b/gate_api/models/futures_price_triggered_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -44,7 +44,7 @@ class FuturesPriceTriggeredOrder(object):
'finish_as': 'str',
'reason': 'str',
'order_type': 'str',
- 'me_order_id': 'str',
+ 'me_order_id': 'int'
}
attribute_map = {
@@ -59,26 +59,11 @@ class FuturesPriceTriggeredOrder(object):
'finish_as': 'finish_as',
'reason': 'reason',
'order_type': 'order_type',
- 'me_order_id': 'me_order_id',
+ 'me_order_id': 'me_order_id'
}
- def __init__(
- self,
- initial=None,
- trigger=None,
- id=None,
- user=None,
- create_time=None,
- finish_time=None,
- trade_id=None,
- status=None,
- finish_as=None,
- reason=None,
- order_type=None,
- me_order_id=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (FuturesInitialOrder, FuturesPriceTrigger, int, int, float, float, int, str, str, str, str, str, Configuration) -> None
+ def __init__(self, initial=None, trigger=None, id=None, user=None, create_time=None, finish_time=None, trade_id=None, status=None, finish_as=None, reason=None, order_type=None, me_order_id=None, local_vars_configuration=None): # noqa: E501
+ # type: (FuturesInitialOrder, FuturesPriceTrigger, int, int, float, float, int, str, str, str, str, int, Configuration) -> None
"""FuturesPriceTriggeredOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -217,7 +202,7 @@ def user(self, user):
def create_time(self):
"""Gets the create_time of this FuturesPriceTriggeredOrder. # noqa: E501
- Creation time # noqa: E501
+ Created time # noqa: E501
:return: The create_time of this FuturesPriceTriggeredOrder. # noqa: E501
:rtype: float
@@ -228,7 +213,7 @@ def create_time(self):
def create_time(self, create_time):
"""Sets the create_time of this FuturesPriceTriggeredOrder.
- Creation time # noqa: E501
+ Created time # noqa: E501
:param create_time: The create_time of this FuturesPriceTriggeredOrder. # noqa: E501
:type: float
@@ -240,7 +225,7 @@ def create_time(self, create_time):
def finish_time(self):
"""Gets the finish_time of this FuturesPriceTriggeredOrder. # noqa: E501
- Finished time # noqa: E501
+ End time # noqa: E501
:return: The finish_time of this FuturesPriceTriggeredOrder. # noqa: E501
:rtype: float
@@ -251,7 +236,7 @@ def finish_time(self):
def finish_time(self, finish_time):
"""Sets the finish_time of this FuturesPriceTriggeredOrder.
- Finished time # noqa: E501
+ End time # noqa: E501
:param finish_time: The finish_time of this FuturesPriceTriggeredOrder. # noqa: E501
:type: float
@@ -263,7 +248,7 @@ def finish_time(self, finish_time):
def trade_id(self):
"""Gets the trade_id of this FuturesPriceTriggeredOrder. # noqa: E501
- ID of the newly created order on condition triggered # noqa: E501
+ ID of the order created after trigger # noqa: E501
:return: The trade_id of this FuturesPriceTriggeredOrder. # noqa: E501
:rtype: int
@@ -274,7 +259,7 @@ def trade_id(self):
def trade_id(self, trade_id):
"""Sets the trade_id of this FuturesPriceTriggeredOrder.
- ID of the newly created order on condition triggered # noqa: E501
+ ID of the order created after trigger # noqa: E501
:param trade_id: The trade_id of this FuturesPriceTriggeredOrder. # noqa: E501
:type: int
@@ -286,7 +271,7 @@ def trade_id(self, trade_id):
def status(self):
"""Gets the status of this FuturesPriceTriggeredOrder. # noqa: E501
- Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is invalid, only for close-long-order or close-short-order # noqa: E501
+ Order status - `open`: Active - `finished`: Finished - `inactive`: Inactive, only applies to order take-profit/stop-loss - `invalid`: Invalid, only applies to order take-profit/stop-loss # noqa: E501
:return: The status of this FuturesPriceTriggeredOrder. # noqa: E501
:rtype: str
@@ -297,7 +282,7 @@ def status(self):
def status(self, status):
"""Sets the status of this FuturesPriceTriggeredOrder.
- Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is invalid, only for close-long-order or close-short-order # noqa: E501
+ Order status - `open`: Active - `finished`: Finished - `inactive`: Inactive, only applies to order take-profit/stop-loss - `invalid`: Invalid, only applies to order take-profit/stop-loss # noqa: E501
:param status: The status of this FuturesPriceTriggeredOrder. # noqa: E501
:type: str
@@ -305,7 +290,8 @@ def status(self, status):
allowed_values = ["open", "finished", "inactive", "invalid"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values) # noqa: E501
+ "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
+ .format(status, allowed_values)
)
self._status = status
@@ -314,7 +300,7 @@ def status(self, status):
def finish_as(self):
"""Gets the finish_as of this FuturesPriceTriggeredOrder. # noqa: E501
- How order is finished # noqa: E501
+ Finish status: cancelled - Cancelled; succeeded - Succeeded; failed - Failed; expired - Expired # noqa: E501
:return: The finish_as of this FuturesPriceTriggeredOrder. # noqa: E501
:rtype: str
@@ -325,7 +311,7 @@ def finish_as(self):
def finish_as(self, finish_as):
"""Sets the finish_as of this FuturesPriceTriggeredOrder.
- How order is finished # noqa: E501
+ Finish status: cancelled - Cancelled; succeeded - Succeeded; failed - Failed; expired - Expired # noqa: E501
:param finish_as: The finish_as of this FuturesPriceTriggeredOrder. # noqa: E501
:type: str
@@ -333,9 +319,8 @@ def finish_as(self, finish_as):
allowed_values = ["cancelled", "succeeded", "failed", "expired"] # noqa: E501
if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `finish_as` ({0}), must be one of {1}".format( # noqa: E501
- finish_as, allowed_values
- )
+ "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501
+ .format(finish_as, allowed_values)
)
self._finish_as = finish_as
@@ -344,7 +329,7 @@ def finish_as(self, finish_as):
def reason(self):
"""Gets the reason of this FuturesPriceTriggeredOrder. # noqa: E501
- Additional remarks on how the order was finished # noqa: E501
+ Additional description of how the order was completed # noqa: E501
:return: The reason of this FuturesPriceTriggeredOrder. # noqa: E501
:rtype: str
@@ -355,7 +340,7 @@ def reason(self):
def reason(self, reason):
"""Sets the reason of this FuturesPriceTriggeredOrder.
- Additional remarks on how the order was finished # noqa: E501
+ Additional description of how the order was completed # noqa: E501
:param reason: The reason of this FuturesPriceTriggeredOrder. # noqa: E501
:type: str
@@ -367,7 +352,7 @@ def reason(self, reason):
def order_type(self):
"""Gets the order_type of this FuturesPriceTriggeredOrder. # noqa: E501
- Take-profit/stop-loss types, which include: - `close-long-order`: order take-profit/stop-loss, close long position - `close-short-order`: order take-profit/stop-loss, close short position - `close-long-position`: position take-profit/stop-loss, close long position - `close-short-position`: position take-profit/stop-loss, close short position - `plan-close-long-position`: position planned take-profit/stop-loss, close long position - `plan-close-short-position`: position planned take-profit/stop-loss, close short position The order take-profit/stop-loss can not be passed by request. These two types are read only. # noqa: E501
+ Types of take-profit and stop-loss orders, including: - `close-long-order`: Order take-profit/stop-loss, close long position - `close-short-order`: Order take-profit/stop-loss, close short position - `close-long-position`: Position take-profit/stop-loss, used to close all long positions - `close-short-position`: Position take-profit/stop-loss, used to close all short positions - `plan-close-long-position`: Position plan take-profit/stop-loss, used to close all or partial long positions - `plan-close-short-position`: Position plan take-profit/stop-loss, used to close all or partial short positions The two types of order take-profit/stop-loss are read-only and cannot be passed in requests # noqa: E501
:return: The order_type of this FuturesPriceTriggeredOrder. # noqa: E501
:rtype: str
@@ -378,7 +363,7 @@ def order_type(self):
def order_type(self, order_type):
"""Sets the order_type of this FuturesPriceTriggeredOrder.
- Take-profit/stop-loss types, which include: - `close-long-order`: order take-profit/stop-loss, close long position - `close-short-order`: order take-profit/stop-loss, close short position - `close-long-position`: position take-profit/stop-loss, close long position - `close-short-position`: position take-profit/stop-loss, close short position - `plan-close-long-position`: position planned take-profit/stop-loss, close long position - `plan-close-short-position`: position planned take-profit/stop-loss, close short position The order take-profit/stop-loss can not be passed by request. These two types are read only. # noqa: E501
+ Types of take-profit and stop-loss orders, including: - `close-long-order`: Order take-profit/stop-loss, close long position - `close-short-order`: Order take-profit/stop-loss, close short position - `close-long-position`: Position take-profit/stop-loss, used to close all long positions - `close-short-position`: Position take-profit/stop-loss, used to close all short positions - `plan-close-long-position`: Position plan take-profit/stop-loss, used to close all or partial long positions - `plan-close-short-position`: Position plan take-profit/stop-loss, used to close all or partial short positions The two types of order take-profit/stop-loss are read-only and cannot be passed in requests # noqa: E501
:param order_type: The order_type of this FuturesPriceTriggeredOrder. # noqa: E501
:type: str
@@ -390,10 +375,10 @@ def order_type(self, order_type):
def me_order_id(self):
"""Gets the me_order_id of this FuturesPriceTriggeredOrder. # noqa: E501
- Corresponding order ID of order take-profit/stop-loss. # noqa: E501
+ Corresponding order ID for order take-profit/stop-loss orders # noqa: E501
:return: The me_order_id of this FuturesPriceTriggeredOrder. # noqa: E501
- :rtype: str
+ :rtype: int
"""
return self._me_order_id
@@ -401,10 +386,10 @@ def me_order_id(self):
def me_order_id(self, me_order_id):
"""Sets the me_order_id of this FuturesPriceTriggeredOrder.
- Corresponding order ID of order take-profit/stop-loss. # noqa: E501
+ Corresponding order ID for order take-profit/stop-loss orders # noqa: E501
:param me_order_id: The me_order_id of this FuturesPriceTriggeredOrder. # noqa: E501
- :type: str
+ :type: int
"""
self._me_order_id = me_order_id
@@ -416,16 +401,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_risk_limit_tier.py b/gate_api/models/futures_risk_limit_tier.py
new file mode 100644
index 0000000..fcbc314
--- /dev/null
+++ b/gate_api/models/futures_risk_limit_tier.py
@@ -0,0 +1,263 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class FuturesRiskLimitTier(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'tier': 'int',
+ 'risk_limit': 'str',
+ 'initial_rate': 'str',
+ 'maintenance_rate': 'str',
+ 'leverage_max': 'str',
+ 'deduction': 'str'
+ }
+
+ attribute_map = {
+ 'tier': 'tier',
+ 'risk_limit': 'risk_limit',
+ 'initial_rate': 'initial_rate',
+ 'maintenance_rate': 'maintenance_rate',
+ 'leverage_max': 'leverage_max',
+ 'deduction': 'deduction'
+ }
+
+ def __init__(self, tier=None, risk_limit=None, initial_rate=None, maintenance_rate=None, leverage_max=None, deduction=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, str, str, str, Configuration) -> None
+ """FuturesRiskLimitTier - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._tier = None
+ self._risk_limit = None
+ self._initial_rate = None
+ self._maintenance_rate = None
+ self._leverage_max = None
+ self._deduction = None
+ self.discriminator = None
+
+ if tier is not None:
+ self.tier = tier
+ if risk_limit is not None:
+ self.risk_limit = risk_limit
+ if initial_rate is not None:
+ self.initial_rate = initial_rate
+ if maintenance_rate is not None:
+ self.maintenance_rate = maintenance_rate
+ if leverage_max is not None:
+ self.leverage_max = leverage_max
+ if deduction is not None:
+ self.deduction = deduction
+
+ @property
+ def tier(self):
+ """Gets the tier of this FuturesRiskLimitTier. # noqa: E501
+
+ Tier # noqa: E501
+
+ :return: The tier of this FuturesRiskLimitTier. # noqa: E501
+ :rtype: int
+ """
+ return self._tier
+
+ @tier.setter
+ def tier(self, tier):
+ """Sets the tier of this FuturesRiskLimitTier.
+
+ Tier # noqa: E501
+
+ :param tier: The tier of this FuturesRiskLimitTier. # noqa: E501
+ :type: int
+ """
+
+ self._tier = tier
+
+ @property
+ def risk_limit(self):
+ """Gets the risk_limit of this FuturesRiskLimitTier. # noqa: E501
+
+ Position risk limit # noqa: E501
+
+ :return: The risk_limit of this FuturesRiskLimitTier. # noqa: E501
+ :rtype: str
+ """
+ return self._risk_limit
+
+ @risk_limit.setter
+ def risk_limit(self, risk_limit):
+ """Sets the risk_limit of this FuturesRiskLimitTier.
+
+ Position risk limit # noqa: E501
+
+ :param risk_limit: The risk_limit of this FuturesRiskLimitTier. # noqa: E501
+ :type: str
+ """
+
+ self._risk_limit = risk_limit
+
+ @property
+ def initial_rate(self):
+ """Gets the initial_rate of this FuturesRiskLimitTier. # noqa: E501
+
+ Initial margin rate # noqa: E501
+
+ :return: The initial_rate of this FuturesRiskLimitTier. # noqa: E501
+ :rtype: str
+ """
+ return self._initial_rate
+
+ @initial_rate.setter
+ def initial_rate(self, initial_rate):
+ """Sets the initial_rate of this FuturesRiskLimitTier.
+
+ Initial margin rate # noqa: E501
+
+ :param initial_rate: The initial_rate of this FuturesRiskLimitTier. # noqa: E501
+ :type: str
+ """
+
+ self._initial_rate = initial_rate
+
+ @property
+ def maintenance_rate(self):
+ """Gets the maintenance_rate of this FuturesRiskLimitTier. # noqa: E501
+
+ Maintenance margin rate # noqa: E501
+
+ :return: The maintenance_rate of this FuturesRiskLimitTier. # noqa: E501
+ :rtype: str
+ """
+ return self._maintenance_rate
+
+ @maintenance_rate.setter
+ def maintenance_rate(self, maintenance_rate):
+ """Sets the maintenance_rate of this FuturesRiskLimitTier.
+
+ Maintenance margin rate # noqa: E501
+
+ :param maintenance_rate: The maintenance_rate of this FuturesRiskLimitTier. # noqa: E501
+ :type: str
+ """
+
+ self._maintenance_rate = maintenance_rate
+
+ @property
+ def leverage_max(self):
+ """Gets the leverage_max of this FuturesRiskLimitTier. # noqa: E501
+
+ Maximum leverage # noqa: E501
+
+ :return: The leverage_max of this FuturesRiskLimitTier. # noqa: E501
+ :rtype: str
+ """
+ return self._leverage_max
+
+ @leverage_max.setter
+ def leverage_max(self, leverage_max):
+ """Sets the leverage_max of this FuturesRiskLimitTier.
+
+ Maximum leverage # noqa: E501
+
+ :param leverage_max: The leverage_max of this FuturesRiskLimitTier. # noqa: E501
+ :type: str
+ """
+
+ self._leverage_max = leverage_max
+
+ @property
+ def deduction(self):
+ """Gets the deduction of this FuturesRiskLimitTier. # noqa: E501
+
+ Maintenance margin quick calculation deduction amount # noqa: E501
+
+ :return: The deduction of this FuturesRiskLimitTier. # noqa: E501
+ :rtype: str
+ """
+ return self._deduction
+
+ @deduction.setter
+ def deduction(self, deduction):
+ """Sets the deduction of this FuturesRiskLimitTier.
+
+ Maintenance margin quick calculation deduction amount # noqa: E501
+
+ :param deduction: The deduction of this FuturesRiskLimitTier. # noqa: E501
+ :type: str
+ """
+
+ self._deduction = deduction
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, FuturesRiskLimitTier):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, FuturesRiskLimitTier):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/futures_ticker.py b/gate_api/models/futures_ticker.py
index e830bfd..37acc8e 100644
--- a/gate_api/models/futures_ticker.py
+++ b/gate_api/models/futures_ticker.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -50,10 +50,15 @@ class FuturesTicker(object):
'funding_rate_indicative': 'str',
'index_price': 'str',
'quanto_base_rate': 'str',
- 'basis_rate': 'str',
- 'basis_value': 'str',
'lowest_ask': 'str',
+ 'lowest_size': 'str',
'highest_bid': 'str',
+ 'highest_size': 'str',
+ 'change_utc0': 'str',
+ 'change_utc8': 'str',
+ 'change_price': 'str',
+ 'change_utc0_price': 'str',
+ 'change_utc8_price': 'str'
}
attribute_map = {
@@ -74,38 +79,19 @@ class FuturesTicker(object):
'funding_rate_indicative': 'funding_rate_indicative',
'index_price': 'index_price',
'quanto_base_rate': 'quanto_base_rate',
- 'basis_rate': 'basis_rate',
- 'basis_value': 'basis_value',
'lowest_ask': 'lowest_ask',
+ 'lowest_size': 'lowest_size',
'highest_bid': 'highest_bid',
+ 'highest_size': 'highest_size',
+ 'change_utc0': 'change_utc0',
+ 'change_utc8': 'change_utc8',
+ 'change_price': 'change_price',
+ 'change_utc0_price': 'change_utc0_price',
+ 'change_utc8_price': 'change_utc8_price'
}
- def __init__(
- self,
- contract=None,
- last=None,
- change_percentage=None,
- total_size=None,
- low_24h=None,
- high_24h=None,
- volume_24h=None,
- volume_24h_btc=None,
- volume_24h_usd=None,
- volume_24h_base=None,
- volume_24h_quote=None,
- volume_24h_settle=None,
- mark_price=None,
- funding_rate=None,
- funding_rate_indicative=None,
- index_price=None,
- quanto_base_rate=None,
- basis_rate=None,
- basis_value=None,
- lowest_ask=None,
- highest_bid=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None
+ def __init__(self, contract=None, last=None, change_percentage=None, total_size=None, low_24h=None, high_24h=None, volume_24h=None, volume_24h_btc=None, volume_24h_usd=None, volume_24h_base=None, volume_24h_quote=None, volume_24h_settle=None, mark_price=None, funding_rate=None, funding_rate_indicative=None, index_price=None, quanto_base_rate=None, lowest_ask=None, lowest_size=None, highest_bid=None, highest_size=None, change_utc0=None, change_utc8=None, change_price=None, change_utc0_price=None, change_utc8_price=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None
"""FuturesTicker - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -128,10 +114,15 @@ def __init__(
self._funding_rate_indicative = None
self._index_price = None
self._quanto_base_rate = None
- self._basis_rate = None
- self._basis_value = None
self._lowest_ask = None
+ self._lowest_size = None
self._highest_bid = None
+ self._highest_size = None
+ self._change_utc0 = None
+ self._change_utc8 = None
+ self._change_price = None
+ self._change_utc0_price = None
+ self._change_utc8_price = None
self.discriminator = None
if contract is not None:
@@ -168,14 +159,24 @@ def __init__(
self.index_price = index_price
if quanto_base_rate is not None:
self.quanto_base_rate = quanto_base_rate
- if basis_rate is not None:
- self.basis_rate = basis_rate
- if basis_value is not None:
- self.basis_value = basis_value
if lowest_ask is not None:
self.lowest_ask = lowest_ask
+ if lowest_size is not None:
+ self.lowest_size = lowest_size
if highest_bid is not None:
self.highest_bid = highest_bid
+ if highest_size is not None:
+ self.highest_size = highest_size
+ if change_utc0 is not None:
+ self.change_utc0 = change_utc0
+ if change_utc8 is not None:
+ self.change_utc8 = change_utc8
+ if change_price is not None:
+ self.change_price = change_price
+ if change_utc0_price is not None:
+ self.change_utc0_price = change_utc0_price
+ if change_utc8_price is not None:
+ self.change_utc8_price = change_utc8_price
@property
def contract(self):
@@ -227,7 +228,7 @@ def last(self, last):
def change_percentage(self):
"""Gets the change_percentage of this FuturesTicker. # noqa: E501
- Change percentage. # noqa: E501
+ Price change percentage. Negative values indicate price decrease, e.g. -7.45 # noqa: E501
:return: The change_percentage of this FuturesTicker. # noqa: E501
:rtype: str
@@ -238,7 +239,7 @@ def change_percentage(self):
def change_percentage(self, change_percentage):
"""Sets the change_percentage of this FuturesTicker.
- Change percentage. # noqa: E501
+ Price change percentage. Negative values indicate price decrease, e.g. -7.45 # noqa: E501
:param change_percentage: The change_percentage of this FuturesTicker. # noqa: E501
:type: str
@@ -273,7 +274,7 @@ def total_size(self, total_size):
def low_24h(self):
"""Gets the low_24h of this FuturesTicker. # noqa: E501
- Lowest trading price in recent 24h # noqa: E501
+ 24-hour lowest price # noqa: E501
:return: The low_24h of this FuturesTicker. # noqa: E501
:rtype: str
@@ -284,7 +285,7 @@ def low_24h(self):
def low_24h(self, low_24h):
"""Sets the low_24h of this FuturesTicker.
- Lowest trading price in recent 24h # noqa: E501
+ 24-hour lowest price # noqa: E501
:param low_24h: The low_24h of this FuturesTicker. # noqa: E501
:type: str
@@ -296,7 +297,7 @@ def low_24h(self, low_24h):
def high_24h(self):
"""Gets the high_24h of this FuturesTicker. # noqa: E501
- Highest trading price in recent 24h # noqa: E501
+ 24-hour highest price # noqa: E501
:return: The high_24h of this FuturesTicker. # noqa: E501
:rtype: str
@@ -307,7 +308,7 @@ def high_24h(self):
def high_24h(self, high_24h):
"""Sets the high_24h of this FuturesTicker.
- Highest trading price in recent 24h # noqa: E501
+ 24-hour highest price # noqa: E501
:param high_24h: The high_24h of this FuturesTicker. # noqa: E501
:type: str
@@ -319,7 +320,7 @@ def high_24h(self, high_24h):
def volume_24h(self):
"""Gets the volume_24h of this FuturesTicker. # noqa: E501
- Trade size in recent 24h # noqa: E501
+ 24-hour trading volume # noqa: E501
:return: The volume_24h of this FuturesTicker. # noqa: E501
:rtype: str
@@ -330,7 +331,7 @@ def volume_24h(self):
def volume_24h(self, volume_24h):
"""Sets the volume_24h of this FuturesTicker.
- Trade size in recent 24h # noqa: E501
+ 24-hour trading volume # noqa: E501
:param volume_24h: The volume_24h of this FuturesTicker. # noqa: E501
:type: str
@@ -342,7 +343,7 @@ def volume_24h(self, volume_24h):
def volume_24h_btc(self):
"""Gets the volume_24h_btc of this FuturesTicker. # noqa: E501
- Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501
+ 24-hour trading volume in BTC (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501
:return: The volume_24h_btc of this FuturesTicker. # noqa: E501
:rtype: str
@@ -353,7 +354,7 @@ def volume_24h_btc(self):
def volume_24h_btc(self, volume_24h_btc):
"""Sets the volume_24h_btc of this FuturesTicker.
- Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501
+ 24-hour trading volume in BTC (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501
:param volume_24h_btc: The volume_24h_btc of this FuturesTicker. # noqa: E501
:type: str
@@ -365,7 +366,7 @@ def volume_24h_btc(self, volume_24h_btc):
def volume_24h_usd(self):
"""Gets the volume_24h_usd of this FuturesTicker. # noqa: E501
- Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501
+ 24-hour trading volume in USD (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501
:return: The volume_24h_usd of this FuturesTicker. # noqa: E501
:rtype: str
@@ -376,7 +377,7 @@ def volume_24h_usd(self):
def volume_24h_usd(self, volume_24h_usd):
"""Sets the volume_24h_usd of this FuturesTicker.
- Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501
+ 24-hour trading volume in USD (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501
:param volume_24h_usd: The volume_24h_usd of this FuturesTicker. # noqa: E501
:type: str
@@ -388,7 +389,7 @@ def volume_24h_usd(self, volume_24h_usd):
def volume_24h_base(self):
"""Gets the volume_24h_base of this FuturesTicker. # noqa: E501
- Trade volume in recent 24h, in base currency # noqa: E501
+ 24-hour trading volume in base currency # noqa: E501
:return: The volume_24h_base of this FuturesTicker. # noqa: E501
:rtype: str
@@ -399,7 +400,7 @@ def volume_24h_base(self):
def volume_24h_base(self, volume_24h_base):
"""Sets the volume_24h_base of this FuturesTicker.
- Trade volume in recent 24h, in base currency # noqa: E501
+ 24-hour trading volume in base currency # noqa: E501
:param volume_24h_base: The volume_24h_base of this FuturesTicker. # noqa: E501
:type: str
@@ -411,7 +412,7 @@ def volume_24h_base(self, volume_24h_base):
def volume_24h_quote(self):
"""Gets the volume_24h_quote of this FuturesTicker. # noqa: E501
- Trade volume in recent 24h, in quote currency # noqa: E501
+ 24-hour trading volume in quote currency # noqa: E501
:return: The volume_24h_quote of this FuturesTicker. # noqa: E501
:rtype: str
@@ -422,7 +423,7 @@ def volume_24h_quote(self):
def volume_24h_quote(self, volume_24h_quote):
"""Sets the volume_24h_quote of this FuturesTicker.
- Trade volume in recent 24h, in quote currency # noqa: E501
+ 24-hour trading volume in quote currency # noqa: E501
:param volume_24h_quote: The volume_24h_quote of this FuturesTicker. # noqa: E501
:type: str
@@ -434,7 +435,7 @@ def volume_24h_quote(self, volume_24h_quote):
def volume_24h_settle(self):
"""Gets the volume_24h_settle of this FuturesTicker. # noqa: E501
- Trade volume in recent 24h, in settle currency # noqa: E501
+ 24-hour trading volume in settle currency # noqa: E501
:return: The volume_24h_settle of this FuturesTicker. # noqa: E501
:rtype: str
@@ -445,7 +446,7 @@ def volume_24h_settle(self):
def volume_24h_settle(self, volume_24h_settle):
"""Sets the volume_24h_settle of this FuturesTicker.
- Trade volume in recent 24h, in settle currency # noqa: E501
+ 24-hour trading volume in settle currency # noqa: E501
:param volume_24h_settle: The volume_24h_settle of this FuturesTicker. # noqa: E501
:type: str
@@ -503,7 +504,7 @@ def funding_rate(self, funding_rate):
def funding_rate_indicative(self):
"""Gets the funding_rate_indicative of this FuturesTicker. # noqa: E501
- Indicative Funding rate in next period # noqa: E501
+ Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501
:return: The funding_rate_indicative of this FuturesTicker. # noqa: E501
:rtype: str
@@ -514,7 +515,7 @@ def funding_rate_indicative(self):
def funding_rate_indicative(self, funding_rate_indicative):
"""Sets the funding_rate_indicative of this FuturesTicker.
- Indicative Funding rate in next period # noqa: E501
+ Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501
:param funding_rate_indicative: The funding_rate_indicative of this FuturesTicker. # noqa: E501
:type: str
@@ -569,96 +570,211 @@ def quanto_base_rate(self, quanto_base_rate):
self._quanto_base_rate = quanto_base_rate
@property
- def basis_rate(self):
- """Gets the basis_rate of this FuturesTicker. # noqa: E501
+ def lowest_ask(self):
+ """Gets the lowest_ask of this FuturesTicker. # noqa: E501
- Basis rate # noqa: E501
+ Recent lowest ask # noqa: E501
- :return: The basis_rate of this FuturesTicker. # noqa: E501
+ :return: The lowest_ask of this FuturesTicker. # noqa: E501
:rtype: str
"""
- return self._basis_rate
+ return self._lowest_ask
- @basis_rate.setter
- def basis_rate(self, basis_rate):
- """Sets the basis_rate of this FuturesTicker.
+ @lowest_ask.setter
+ def lowest_ask(self, lowest_ask):
+ """Sets the lowest_ask of this FuturesTicker.
- Basis rate # noqa: E501
+ Recent lowest ask # noqa: E501
- :param basis_rate: The basis_rate of this FuturesTicker. # noqa: E501
+ :param lowest_ask: The lowest_ask of this FuturesTicker. # noqa: E501
:type: str
"""
- self._basis_rate = basis_rate
+ self._lowest_ask = lowest_ask
@property
- def basis_value(self):
- """Gets the basis_value of this FuturesTicker. # noqa: E501
+ def lowest_size(self):
+ """Gets the lowest_size of this FuturesTicker. # noqa: E501
- Basis value # noqa: E501
+ The latest seller's lowest price order quantity # noqa: E501
- :return: The basis_value of this FuturesTicker. # noqa: E501
+ :return: The lowest_size of this FuturesTicker. # noqa: E501
:rtype: str
"""
- return self._basis_value
+ return self._lowest_size
- @basis_value.setter
- def basis_value(self, basis_value):
- """Sets the basis_value of this FuturesTicker.
+ @lowest_size.setter
+ def lowest_size(self, lowest_size):
+ """Sets the lowest_size of this FuturesTicker.
- Basis value # noqa: E501
+ The latest seller's lowest price order quantity # noqa: E501
- :param basis_value: The basis_value of this FuturesTicker. # noqa: E501
+ :param lowest_size: The lowest_size of this FuturesTicker. # noqa: E501
:type: str
"""
- self._basis_value = basis_value
+ self._lowest_size = lowest_size
@property
- def lowest_ask(self):
- """Gets the lowest_ask of this FuturesTicker. # noqa: E501
+ def highest_bid(self):
+ """Gets the highest_bid of this FuturesTicker. # noqa: E501
- Recent lowest ask # noqa: E501
+ Recent highest bid # noqa: E501
- :return: The lowest_ask of this FuturesTicker. # noqa: E501
+ :return: The highest_bid of this FuturesTicker. # noqa: E501
:rtype: str
"""
- return self._lowest_ask
+ return self._highest_bid
- @lowest_ask.setter
- def lowest_ask(self, lowest_ask):
- """Sets the lowest_ask of this FuturesTicker.
+ @highest_bid.setter
+ def highest_bid(self, highest_bid):
+ """Sets the highest_bid of this FuturesTicker.
- Recent lowest ask # noqa: E501
+ Recent highest bid # noqa: E501
- :param lowest_ask: The lowest_ask of this FuturesTicker. # noqa: E501
+ :param highest_bid: The highest_bid of this FuturesTicker. # noqa: E501
:type: str
"""
- self._lowest_ask = lowest_ask
+ self._highest_bid = highest_bid
@property
- def highest_bid(self):
- """Gets the highest_bid of this FuturesTicker. # noqa: E501
+ def highest_size(self):
+ """Gets the highest_size of this FuturesTicker. # noqa: E501
- Recent highest bid # noqa: E501
+ The latest buyer's highest price order volume # noqa: E501
- :return: The highest_bid of this FuturesTicker. # noqa: E501
+ :return: The highest_size of this FuturesTicker. # noqa: E501
:rtype: str
"""
- return self._highest_bid
+ return self._highest_size
- @highest_bid.setter
- def highest_bid(self, highest_bid):
- """Sets the highest_bid of this FuturesTicker.
+ @highest_size.setter
+ def highest_size(self, highest_size):
+ """Sets the highest_size of this FuturesTicker.
- Recent highest bid # noqa: E501
+ The latest buyer's highest price order volume # noqa: E501
- :param highest_bid: The highest_bid of this FuturesTicker. # noqa: E501
+ :param highest_size: The highest_size of this FuturesTicker. # noqa: E501
:type: str
"""
- self._highest_bid = highest_bid
+ self._highest_size = highest_size
+
+ @property
+ def change_utc0(self):
+ """Gets the change_utc0 of this FuturesTicker. # noqa: E501
+
+ Percentage change at utc0. Negative values indicate a drop, e.g., -7.45% # noqa: E501
+
+ :return: The change_utc0 of this FuturesTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._change_utc0
+
+ @change_utc0.setter
+ def change_utc0(self, change_utc0):
+ """Sets the change_utc0 of this FuturesTicker.
+
+ Percentage change at utc0. Negative values indicate a drop, e.g., -7.45% # noqa: E501
+
+ :param change_utc0: The change_utc0 of this FuturesTicker. # noqa: E501
+ :type: str
+ """
+
+ self._change_utc0 = change_utc0
+
+ @property
+ def change_utc8(self):
+ """Gets the change_utc8 of this FuturesTicker. # noqa: E501
+
+ Percentage change at utc8. Negative values indicate a drop, e.g., -7.45% # noqa: E501
+
+ :return: The change_utc8 of this FuturesTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._change_utc8
+
+ @change_utc8.setter
+ def change_utc8(self, change_utc8):
+ """Sets the change_utc8 of this FuturesTicker.
+
+ Percentage change at utc8. Negative values indicate a drop, e.g., -7.45% # noqa: E501
+
+ :param change_utc8: The change_utc8 of this FuturesTicker. # noqa: E501
+ :type: str
+ """
+
+ self._change_utc8 = change_utc8
+
+ @property
+ def change_price(self):
+ """Gets the change_price of this FuturesTicker. # noqa: E501
+
+ 24h change amount. Negative values indicate a drop, e.g., -7.45 # noqa: E501
+
+ :return: The change_price of this FuturesTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._change_price
+
+ @change_price.setter
+ def change_price(self, change_price):
+ """Sets the change_price of this FuturesTicker.
+
+ 24h change amount. Negative values indicate a drop, e.g., -7.45 # noqa: E501
+
+ :param change_price: The change_price of this FuturesTicker. # noqa: E501
+ :type: str
+ """
+
+ self._change_price = change_price
+
+ @property
+ def change_utc0_price(self):
+ """Gets the change_utc0_price of this FuturesTicker. # noqa: E501
+
+ Change amount at utc0. Negative values indicate a drop, e.g., -7.45 # noqa: E501
+
+ :return: The change_utc0_price of this FuturesTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._change_utc0_price
+
+ @change_utc0_price.setter
+ def change_utc0_price(self, change_utc0_price):
+ """Sets the change_utc0_price of this FuturesTicker.
+
+ Change amount at utc0. Negative values indicate a drop, e.g., -7.45 # noqa: E501
+
+ :param change_utc0_price: The change_utc0_price of this FuturesTicker. # noqa: E501
+ :type: str
+ """
+
+ self._change_utc0_price = change_utc0_price
+
+ @property
+ def change_utc8_price(self):
+ """Gets the change_utc8_price of this FuturesTicker. # noqa: E501
+
+ Change amount at utc8. Negative values indicate a drop, e.g., -7.45 # noqa: E501
+
+ :return: The change_utc8_price of this FuturesTicker. # noqa: E501
+ :rtype: str
+ """
+ return self._change_utc8_price
+
+ @change_utc8_price.setter
+ def change_utc8_price(self, change_utc8_price):
+ """Sets the change_utc8_price of this FuturesTicker.
+
+ Change amount at utc8. Negative values indicate a drop, e.g., -7.45 # noqa: E501
+
+ :param change_utc8_price: The change_utc8_price of this FuturesTicker. # noqa: E501
+ :type: str
+ """
+
+ self._change_utc8_price = change_utc8_price
def to_dict(self):
"""Returns the model properties as a dict"""
@@ -667,16 +783,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/futures_trade.py b/gate_api/models/futures_trade.py
index 8b745a5..66b45c0 100644
--- a/gate_api/models/futures_trade.py
+++ b/gate_api/models/futures_trade.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -39,7 +39,7 @@ class FuturesTrade(object):
'contract': 'str',
'size': 'int',
'price': 'str',
- 'is_internal': 'bool',
+ 'is_internal': 'bool'
}
attribute_map = {
@@ -49,20 +49,10 @@ class FuturesTrade(object):
'contract': 'contract',
'size': 'size',
'price': 'price',
- 'is_internal': 'is_internal',
+ 'is_internal': 'is_internal'
}
- def __init__(
- self,
- id=None,
- create_time=None,
- create_time_ms=None,
- contract=None,
- size=None,
- price=None,
- is_internal=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, id=None, create_time=None, create_time_ms=None, contract=None, size=None, price=None, is_internal=None, local_vars_configuration=None): # noqa: E501
# type: (int, float, float, str, int, str, bool, Configuration) -> None
"""FuturesTrade - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -97,7 +87,7 @@ def __init__(
def id(self):
"""Gets the id of this FuturesTrade. # noqa: E501
- Trade ID # noqa: E501
+ Fill ID # noqa: E501
:return: The id of this FuturesTrade. # noqa: E501
:rtype: int
@@ -108,7 +98,7 @@ def id(self):
def id(self, id):
"""Sets the id of this FuturesTrade.
- Trade ID # noqa: E501
+ Fill ID # noqa: E501
:param id: The id of this FuturesTrade. # noqa: E501
:type: int
@@ -120,7 +110,7 @@ def id(self, id):
def create_time(self):
"""Gets the create_time of this FuturesTrade. # noqa: E501
- Trading time # noqa: E501
+ Fill Time # noqa: E501
:return: The create_time of this FuturesTrade. # noqa: E501
:rtype: float
@@ -131,7 +121,7 @@ def create_time(self):
def create_time(self, create_time):
"""Sets the create_time of this FuturesTrade.
- Trading time # noqa: E501
+ Fill Time # noqa: E501
:param create_time: The create_time of this FuturesTrade. # noqa: E501
:type: float
@@ -143,7 +133,7 @@ def create_time(self, create_time):
def create_time_ms(self):
"""Gets the create_time_ms of this FuturesTrade. # noqa: E501
- Trading time, with milliseconds set to 3 decimal places. # noqa: E501
+ Trade time, with millisecond precision to 3 decimal places # noqa: E501
:return: The create_time_ms of this FuturesTrade. # noqa: E501
:rtype: float
@@ -154,7 +144,7 @@ def create_time_ms(self):
def create_time_ms(self, create_time_ms):
"""Sets the create_time_ms of this FuturesTrade.
- Trading time, with milliseconds set to 3 decimal places. # noqa: E501
+ Trade time, with millisecond precision to 3 decimal places # noqa: E501
:param create_time_ms: The create_time_ms of this FuturesTrade. # noqa: E501
:type: float
@@ -212,7 +202,7 @@ def size(self, size):
def price(self):
"""Gets the price of this FuturesTrade. # noqa: E501
- Trading price (quote currency) # noqa: E501
+ Trade price (quote currency) # noqa: E501
:return: The price of this FuturesTrade. # noqa: E501
:rtype: str
@@ -223,7 +213,7 @@ def price(self):
def price(self, price):
"""Sets the price of this FuturesTrade.
- Trading price (quote currency) # noqa: E501
+ Trade price (quote currency) # noqa: E501
:param price: The price of this FuturesTrade. # noqa: E501
:type: str
@@ -235,7 +225,7 @@ def price(self, price):
def is_internal(self):
"""Gets the is_internal of this FuturesTrade. # noqa: E501
- Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned. # noqa: E501
+ Whether it is an internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the trade price may deviate from the market, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned # noqa: E501
:return: The is_internal of this FuturesTrade. # noqa: E501
:rtype: bool
@@ -246,7 +236,7 @@ def is_internal(self):
def is_internal(self, is_internal):
"""Sets the is_internal of this FuturesTrade.
- Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned. # noqa: E501
+ Whether it is an internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the trade price may deviate from the market, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned # noqa: E501
:param is_internal: The is_internal of this FuturesTrade. # noqa: E501
:type: bool
@@ -261,16 +251,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/index_constituent.py b/gate_api/models/index_constituent.py
index 6018995..7357ff1 100644
--- a/gate_api/models/index_constituent.py
+++ b/gate_api/models/index_constituent.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class IndexConstituent(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'exchange': 'str', 'symbols': 'list[str]'}
+ openapi_types = {
+ 'exchange': 'str',
+ 'symbols': 'list[str]'
+ }
- attribute_map = {'exchange': 'exchange', 'symbols': 'symbols'}
+ attribute_map = {
+ 'exchange': 'exchange',
+ 'symbols': 'symbols'
+ }
def __init__(self, exchange=None, symbols=None, local_vars_configuration=None): # noqa: E501
# type: (str, list[str], Configuration) -> None
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/inline_object.py b/gate_api/models/inline_object.py
new file mode 100644
index 0000000..a034500
--- /dev/null
+++ b/gate_api/models/inline_object.py
@@ -0,0 +1,153 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class InlineObject(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'mode': 'str',
+ 'contract': 'str'
+ }
+
+ attribute_map = {
+ 'mode': 'mode',
+ 'contract': 'contract'
+ }
+
+ def __init__(self, mode=None, contract=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """InlineObject - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._mode = None
+ self._contract = None
+ self.discriminator = None
+
+ self.mode = mode
+ self.contract = contract
+
+ @property
+ def mode(self):
+ """Gets the mode of this InlineObject. # noqa: E501
+
+ Cross margin or isolated margin mode. ISOLATED - isolated margin mode, CROSS - cross margin mode # noqa: E501
+
+ :return: The mode of this InlineObject. # noqa: E501
+ :rtype: str
+ """
+ return self._mode
+
+ @mode.setter
+ def mode(self, mode):
+ """Sets the mode of this InlineObject.
+
+ Cross margin or isolated margin mode. ISOLATED - isolated margin mode, CROSS - cross margin mode # noqa: E501
+
+ :param mode: The mode of this InlineObject. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and mode is None: # noqa: E501
+ raise ValueError("Invalid value for `mode`, must not be `None`") # noqa: E501
+
+ self._mode = mode
+
+ @property
+ def contract(self):
+ """Gets the contract of this InlineObject. # noqa: E501
+
+ Futures market # noqa: E501
+
+ :return: The contract of this InlineObject. # noqa: E501
+ :rtype: str
+ """
+ return self._contract
+
+ @contract.setter
+ def contract(self, contract):
+ """Sets the contract of this InlineObject.
+
+ Futures market # noqa: E501
+
+ :param contract: The contract of this InlineObject. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501
+ raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501
+
+ self._contract = contract
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, InlineObject):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, InlineObject):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/inline_response200.py b/gate_api/models/inline_response200.py
new file mode 100644
index 0000000..171fd14
--- /dev/null
+++ b/gate_api/models/inline_response200.py
@@ -0,0 +1,147 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class InlineResponse200(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'time': 'int',
+ 'value': 'str'
+ }
+
+ attribute_map = {
+ 'time': 'time',
+ 'value': 'value'
+ }
+
+ def __init__(self, time=None, value=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, Configuration) -> None
+ """InlineResponse200 - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._time = None
+ self._value = None
+ self.discriminator = None
+
+ if time is not None:
+ self.time = time
+ if value is not None:
+ self.value = value
+
+ @property
+ def time(self):
+ """Gets the time of this InlineResponse200. # noqa: E501
+
+
+ :return: The time of this InlineResponse200. # noqa: E501
+ :rtype: int
+ """
+ return self._time
+
+ @time.setter
+ def time(self, time):
+ """Sets the time of this InlineResponse200.
+
+
+ :param time: The time of this InlineResponse200. # noqa: E501
+ :type: int
+ """
+
+ self._time = time
+
+ @property
+ def value(self):
+ """Gets the value of this InlineResponse200. # noqa: E501
+
+
+ :return: The value of this InlineResponse200. # noqa: E501
+ :rtype: str
+ """
+ return self._value
+
+ @value.setter
+ def value(self, value):
+ """Sets the value of this InlineResponse200.
+
+
+ :param value: The value of this InlineResponse200. # noqa: E501
+ :type: str
+ """
+
+ self._value = value
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, InlineResponse200):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, InlineResponse200):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/inline_response2001.py b/gate_api/models/inline_response2001.py
new file mode 100644
index 0000000..e637913
--- /dev/null
+++ b/gate_api/models/inline_response2001.py
@@ -0,0 +1,149 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class InlineResponse2001(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'est_rate': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'est_rate': 'est_rate'
+ }
+
+ def __init__(self, currency=None, est_rate=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """InlineResponse2001 - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._est_rate = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if est_rate is not None:
+ self.est_rate = est_rate
+
+ @property
+ def currency(self):
+ """Gets the currency of this InlineResponse2001. # noqa: E501
+
+
+ :return: The currency of this InlineResponse2001. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this InlineResponse2001.
+
+
+ :param currency: The currency of this InlineResponse2001. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def est_rate(self):
+ """Gets the est_rate of this InlineResponse2001. # noqa: E501
+
+ Unconverted percentage # noqa: E501
+
+ :return: The est_rate of this InlineResponse2001. # noqa: E501
+ :rtype: str
+ """
+ return self._est_rate
+
+ @est_rate.setter
+ def est_rate(self, est_rate):
+ """Sets the est_rate of this InlineResponse2001.
+
+ Unconverted percentage # noqa: E501
+
+ :param est_rate: The est_rate of this InlineResponse2001. # noqa: E501
+ :type: str
+ """
+
+ self._est_rate = est_rate
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, InlineResponse2001):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, InlineResponse2001):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/insurance_record.py b/gate_api/models/insurance_record.py
index 26d017c..9ee7e93 100644
--- a/gate_api/models/insurance_record.py
+++ b/gate_api/models/insurance_record.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class InsuranceRecord(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'t': 'int', 'b': 'str'}
+ openapi_types = {
+ 't': 'int',
+ 'b': 'str'
+ }
- attribute_map = {'t': 't', 'b': 'b'}
+ attribute_map = {
+ 't': 't',
+ 'b': 'b'
+ }
def __init__(self, t=None, b=None, local_vars_configuration=None): # noqa: E501
# type: (int, str, Configuration) -> None
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/ledger_record.py b/gate_api/models/ledger_record.py
index fd08231..c1cd314 100644
--- a/gate_api/models/ledger_record.py
+++ b/gate_api/models/ledger_record.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -41,8 +41,10 @@ class LedgerRecord(object):
'currency': 'str',
'address': 'str',
'memo': 'str',
+ 'withdraw_id': 'str',
+ 'asset_class': 'str',
'status': 'str',
- 'chain': 'str',
+ 'chain': 'str'
}
attribute_map = {
@@ -54,25 +56,14 @@ class LedgerRecord(object):
'currency': 'currency',
'address': 'address',
'memo': 'memo',
+ 'withdraw_id': 'withdraw_id',
+ 'asset_class': 'asset_class',
'status': 'status',
- 'chain': 'chain',
+ 'chain': 'chain'
}
- def __init__(
- self,
- id=None,
- txid=None,
- withdraw_order_id=None,
- timestamp=None,
- amount=None,
- currency=None,
- address=None,
- memo=None,
- status=None,
- chain=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None
+ def __init__(self, id=None, txid=None, withdraw_order_id=None, timestamp=None, amount=None, currency=None, address=None, memo=None, withdraw_id=None, asset_class=None, status=None, chain=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None
"""LedgerRecord - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -86,6 +77,8 @@ def __init__(
self._currency = None
self._address = None
self._memo = None
+ self._withdraw_id = None
+ self._asset_class = None
self._status = None
self._chain = None
self.discriminator = None
@@ -104,6 +97,10 @@ def __init__(
self.address = address
if memo is not None:
self.memo = memo
+ if withdraw_id is not None:
+ self.withdraw_id = withdraw_id
+ if asset_class is not None:
+ self.asset_class = asset_class
if status is not None:
self.status = status
self.chain = chain
@@ -158,7 +155,7 @@ def txid(self, txid):
def withdraw_order_id(self):
"""Gets the withdraw_order_id of this LedgerRecord. # noqa: E501
- Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501
+ User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried # noqa: E501
:return: The withdraw_order_id of this LedgerRecord. # noqa: E501
:rtype: str
@@ -169,7 +166,7 @@ def withdraw_order_id(self):
def withdraw_order_id(self, withdraw_order_id):
"""Sets the withdraw_order_id of this LedgerRecord.
- Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501
+ User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried # noqa: E501
:param withdraw_order_id: The withdraw_order_id of this LedgerRecord. # noqa: E501
:type: str
@@ -204,7 +201,7 @@ def timestamp(self, timestamp):
def amount(self):
"""Gets the amount of this LedgerRecord. # noqa: E501
- Currency amount # noqa: E501
+ Token amount # noqa: E501
:return: The amount of this LedgerRecord. # noqa: E501
:rtype: str
@@ -215,7 +212,7 @@ def amount(self):
def amount(self, amount):
"""Sets the amount of this LedgerRecord.
- Currency amount # noqa: E501
+ Token amount # noqa: E501
:param amount: The amount of this LedgerRecord. # noqa: E501
:type: str
@@ -296,11 +293,57 @@ def memo(self, memo):
self._memo = memo
+ @property
+ def withdraw_id(self):
+ """Gets the withdraw_id of this LedgerRecord. # noqa: E501
+
+ Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled # noqa: E501
+
+ :return: The withdraw_id of this LedgerRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._withdraw_id
+
+ @withdraw_id.setter
+ def withdraw_id(self, withdraw_id):
+ """Sets the withdraw_id of this LedgerRecord.
+
+ Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled # noqa: E501
+
+ :param withdraw_id: The withdraw_id of this LedgerRecord. # noqa: E501
+ :type: str
+ """
+
+ self._withdraw_id = withdraw_id
+
+ @property
+ def asset_class(self):
+ """Gets the asset_class of this LedgerRecord. # noqa: E501
+
+ Withdrawal record currency type, empty by default. Supports users to query withdrawal records in main area and innovation area on demand. Valid values: SPOT, PILOT SPOT: Main area PILOT: Innovation area # noqa: E501
+
+ :return: The asset_class of this LedgerRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._asset_class
+
+ @asset_class.setter
+ def asset_class(self, asset_class):
+ """Sets the asset_class of this LedgerRecord.
+
+ Withdrawal record currency type, empty by default. Supports users to query withdrawal records in main area and innovation area on demand. Valid values: SPOT, PILOT SPOT: Main area PILOT: Innovation area # noqa: E501
+
+ :param asset_class: The asset_class of this LedgerRecord. # noqa: E501
+ :type: str
+ """
+
+ self._asset_class = asset_class
+
@property
def status(self):
"""Gets the status of this LedgerRecord. # noqa: E501
- Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval - SPLITPEND: the order is automatically split due to large amount # noqa: E501
+ Transaction status - DONE: Completed - CANCEL: Cancelled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: GateCode operation - EXTPEND: Sent, waiting for confirmation - FAIL: Failed on chain, waiting for confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: Pending manual review - REVIEW: Under review # noqa: E501
:return: The status of this LedgerRecord. # noqa: E501
:rtype: str
@@ -311,30 +354,11 @@ def status(self):
def status(self, status):
"""Sets the status of this LedgerRecord.
- Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval - SPLITPEND: the order is automatically split due to large amount # noqa: E501
+ Transaction status - DONE: Completed - CANCEL: Cancelled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: GateCode operation - EXTPEND: Sent, waiting for confirmation - FAIL: Failed on chain, waiting for confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: Pending manual review - REVIEW: Under review # noqa: E501
:param status: The status of this LedgerRecord. # noqa: E501
:type: str
"""
- allowed_values = [
- "DONE",
- "CANCEL",
- "REQUEST",
- "MANUAL",
- "BCODE",
- "EXTPEND",
- "FAIL",
- "INVALID",
- "VERIFY",
- "PROCES",
- "PEND",
- "DMOVE",
- "SPLITPEND",
- ] # noqa: E501
- if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
- raise ValueError(
- "Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values) # noqa: E501
- )
self._status = status
@@ -370,16 +394,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/liquidate_order.py b/gate_api/models/liquidate_order.py
index 1a24ced..97214b5 100644
--- a/gate_api/models/liquidate_order.py
+++ b/gate_api/models/liquidate_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,14 +32,24 @@ class LiquidateOrder(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'text': 'str', 'currency_pair': 'str', 'amount': 'str', 'price': 'str'}
-
- attribute_map = {'text': 'text', 'currency_pair': 'currency_pair', 'amount': 'amount', 'price': 'price'}
-
- def __init__(
- self, text=None, currency_pair=None, amount=None, price=None, local_vars_configuration=None
- ): # noqa: E501
- # type: (str, str, str, str, Configuration) -> None
+ openapi_types = {
+ 'text': 'str',
+ 'currency_pair': 'str',
+ 'amount': 'str',
+ 'price': 'str',
+ 'action_mode': 'str'
+ }
+
+ attribute_map = {
+ 'text': 'text',
+ 'currency_pair': 'currency_pair',
+ 'amount': 'amount',
+ 'price': 'price',
+ 'action_mode': 'action_mode'
+ }
+
+ def __init__(self, text=None, currency_pair=None, amount=None, price=None, action_mode=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, Configuration) -> None
"""LiquidateOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -49,6 +59,7 @@ def __init__(
self._currency_pair = None
self._amount = None
self._price = None
+ self._action_mode = None
self.discriminator = None
if text is not None:
@@ -56,12 +67,14 @@ def __init__(
self.currency_pair = currency_pair
self.amount = amount
self.price = price
+ if action_mode is not None:
+ self.action_mode = action_mode
@property
def text(self):
"""Gets the text of this LiquidateOrder. # noqa: E501
- 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(.) # noqa: E501
+ Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501
:return: The text of this LiquidateOrder. # noqa: E501
:rtype: str
@@ -72,7 +85,7 @@ def text(self):
def text(self, text):
"""Sets the text of this LiquidateOrder.
- 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(.) # noqa: E501
+ Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501
:param text: The text of this LiquidateOrder. # noqa: E501
:type: str
@@ -155,6 +168,29 @@ def price(self, price):
self._price = price
+ @property
+ def action_mode(self):
+ """Gets the action_mode of this LiquidateOrder. # noqa: E501
+
+ Processing mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request and is not included in the response `ACK`: Asynchronous mode, only returns key order fields `RESULT`: No liquidation information `FULL`: Full mode (default) # noqa: E501
+
+ :return: The action_mode of this LiquidateOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._action_mode
+
+ @action_mode.setter
+ def action_mode(self, action_mode):
+ """Sets the action_mode of this LiquidateOrder.
+
+ Processing mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request and is not included in the response `ACK`: Asynchronous mode, only returns key order fields `RESULT`: No liquidation information `FULL`: Full mode (default) # noqa: E501
+
+ :param action_mode: The action_mode of this LiquidateOrder. # noqa: E501
+ :type: str
+ """
+
+ self._action_mode = action_mode
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -162,16 +198,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/loan.py b/gate_api/models/loan.py
deleted file mode 100644
index a83e5e1..0000000
--- a/gate_api/models/loan.py
+++ /dev/null
@@ -1,631 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class Loan(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'id': 'str',
- 'create_time': 'str',
- 'expire_time': 'str',
- 'status': 'str',
- 'side': 'str',
- 'currency': 'str',
- 'rate': 'str',
- 'amount': 'str',
- 'days': 'int',
- 'auto_renew': 'bool',
- 'currency_pair': 'str',
- 'left': 'str',
- 'repaid': 'str',
- 'paid_interest': 'str',
- 'unpaid_interest': 'str',
- 'fee_rate': 'str',
- 'orig_id': 'str',
- 'text': 'str',
- }
-
- attribute_map = {
- 'id': 'id',
- 'create_time': 'create_time',
- 'expire_time': 'expire_time',
- 'status': 'status',
- 'side': 'side',
- 'currency': 'currency',
- 'rate': 'rate',
- 'amount': 'amount',
- 'days': 'days',
- 'auto_renew': 'auto_renew',
- 'currency_pair': 'currency_pair',
- 'left': 'left',
- 'repaid': 'repaid',
- 'paid_interest': 'paid_interest',
- 'unpaid_interest': 'unpaid_interest',
- 'fee_rate': 'fee_rate',
- 'orig_id': 'orig_id',
- 'text': 'text',
- }
-
- def __init__(
- self,
- id=None,
- create_time=None,
- expire_time=None,
- status=None,
- side=None,
- currency=None,
- rate=None,
- amount=None,
- days=None,
- auto_renew=False,
- currency_pair=None,
- left=None,
- repaid=None,
- paid_interest=None,
- unpaid_interest=None,
- fee_rate=None,
- orig_id=None,
- text=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, str, int, bool, str, str, str, str, str, str, str, str, Configuration) -> None
- """Loan - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._id = None
- self._create_time = None
- self._expire_time = None
- self._status = None
- self._side = None
- self._currency = None
- self._rate = None
- self._amount = None
- self._days = None
- self._auto_renew = None
- self._currency_pair = None
- self._left = None
- self._repaid = None
- self._paid_interest = None
- self._unpaid_interest = None
- self._fee_rate = None
- self._orig_id = None
- self._text = None
- self.discriminator = None
-
- if id is not None:
- self.id = id
- if create_time is not None:
- self.create_time = create_time
- if expire_time is not None:
- self.expire_time = expire_time
- if status is not None:
- self.status = status
- self.side = side
- self.currency = currency
- if rate is not None:
- self.rate = rate
- self.amount = amount
- if days is not None:
- self.days = days
- if auto_renew is not None:
- self.auto_renew = auto_renew
- if currency_pair is not None:
- self.currency_pair = currency_pair
- if left is not None:
- self.left = left
- if repaid is not None:
- self.repaid = repaid
- if paid_interest is not None:
- self.paid_interest = paid_interest
- if unpaid_interest is not None:
- self.unpaid_interest = unpaid_interest
- if fee_rate is not None:
- self.fee_rate = fee_rate
- if orig_id is not None:
- self.orig_id = orig_id
- if text is not None:
- self.text = text
-
- @property
- def id(self):
- """Gets the id of this Loan. # noqa: E501
-
- Loan ID # noqa: E501
-
- :return: The id of this Loan. # noqa: E501
- :rtype: str
- """
- return self._id
-
- @id.setter
- def id(self, id):
- """Sets the id of this Loan.
-
- Loan ID # noqa: E501
-
- :param id: The id of this Loan. # noqa: E501
- :type: str
- """
-
- self._id = id
-
- @property
- def create_time(self):
- """Gets the create_time of this Loan. # noqa: E501
-
- Creation time # noqa: E501
-
- :return: The create_time of this Loan. # noqa: E501
- :rtype: str
- """
- return self._create_time
-
- @create_time.setter
- def create_time(self, create_time):
- """Sets the create_time of this Loan.
-
- Creation time # noqa: E501
-
- :param create_time: The create_time of this Loan. # noqa: E501
- :type: str
- """
-
- self._create_time = create_time
-
- @property
- def expire_time(self):
- """Gets the expire_time of this Loan. # noqa: E501
-
- Repay time of the loan. No value will be returned for lending loan # noqa: E501
-
- :return: The expire_time of this Loan. # noqa: E501
- :rtype: str
- """
- return self._expire_time
-
- @expire_time.setter
- def expire_time(self, expire_time):
- """Sets the expire_time of this Loan.
-
- Repay time of the loan. No value will be returned for lending loan # noqa: E501
-
- :param expire_time: The expire_time of this Loan. # noqa: E501
- :type: str
- """
-
- self._expire_time = expire_time
-
- @property
- def status(self):
- """Gets the status of this Loan. # noqa: E501
-
- Loan status open - not fully loaned loaned - all loaned out for lending loan; loaned in for borrowing side finished - loan is finished, either being all repaid or cancelled by the lender auto_repaid - automatically repaid by the system # noqa: E501
-
- :return: The status of this Loan. # noqa: E501
- :rtype: str
- """
- return self._status
-
- @status.setter
- def status(self, status):
- """Sets the status of this Loan.
-
- Loan status open - not fully loaned loaned - all loaned out for lending loan; loaned in for borrowing side finished - loan is finished, either being all repaid or cancelled by the lender auto_repaid - automatically repaid by the system # noqa: E501
-
- :param status: The status of this Loan. # noqa: E501
- :type: str
- """
- allowed_values = ["open", "loaned", "finished", "auto_repaid"] # noqa: E501
- if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
- raise ValueError(
- "Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values) # noqa: E501
- )
-
- self._status = status
-
- @property
- def side(self):
- """Gets the side of this Loan. # noqa: E501
-
- Loan side # noqa: E501
-
- :return: The side of this Loan. # noqa: E501
- :rtype: str
- """
- return self._side
-
- @side.setter
- def side(self, side):
- """Sets the side of this Loan.
-
- Loan side # noqa: E501
-
- :param side: The side of this Loan. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501
- raise ValueError("Invalid value for `side`, must not be `None`") # noqa: E501
- allowed_values = ["lend", "borrow"] # noqa: E501
- if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501
- raise ValueError(
- "Invalid value for `side` ({0}), must be one of {1}".format(side, allowed_values) # noqa: E501
- )
-
- self._side = side
-
- @property
- def currency(self):
- """Gets the currency of this Loan. # noqa: E501
-
- Loan currency # noqa: E501
-
- :return: The currency of this Loan. # noqa: E501
- :rtype: str
- """
- return self._currency
-
- @currency.setter
- def currency(self, currency):
- """Sets the currency of this Loan.
-
- Loan currency # noqa: E501
-
- :param currency: The currency of this Loan. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501
- raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501
-
- self._currency = currency
-
- @property
- def rate(self):
- """Gets the rate of this Loan. # noqa: E501
-
- Loan rate. Only rates in [0.0001, 0.01] are supported. Not required in lending. Market rate calculated from recent rates will be used if not set # noqa: E501
-
- :return: The rate of this Loan. # noqa: E501
- :rtype: str
- """
- return self._rate
-
- @rate.setter
- def rate(self, rate):
- """Sets the rate of this Loan.
-
- Loan rate. Only rates in [0.0001, 0.01] are supported. Not required in lending. Market rate calculated from recent rates will be used if not set # noqa: E501
-
- :param rate: The rate of this Loan. # noqa: E501
- :type: str
- """
-
- self._rate = rate
-
- @property
- def amount(self):
- """Gets the amount of this Loan. # noqa: E501
-
- Loan amount # noqa: E501
-
- :return: The amount of this Loan. # noqa: E501
- :rtype: str
- """
- return self._amount
-
- @amount.setter
- def amount(self, amount):
- """Sets the amount of this Loan.
-
- Loan amount # noqa: E501
-
- :param amount: The amount of this Loan. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501
- raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501
-
- self._amount = amount
-
- @property
- def days(self):
- """Gets the days of this Loan. # noqa: E501
-
- Loan days. Only 10 is supported for now # noqa: E501
-
- :return: The days of this Loan. # noqa: E501
- :rtype: int
- """
- return self._days
-
- @days.setter
- def days(self, days):
- """Sets the days of this Loan.
-
- Loan days. Only 10 is supported for now # noqa: E501
-
- :param days: The days of this Loan. # noqa: E501
- :type: int
- """
-
- self._days = days
-
- @property
- def auto_renew(self):
- """Gets the auto_renew of this Loan. # noqa: E501
-
- Whether to auto renew the loan upon expiration # noqa: E501
-
- :return: The auto_renew of this Loan. # noqa: E501
- :rtype: bool
- """
- return self._auto_renew
-
- @auto_renew.setter
- def auto_renew(self, auto_renew):
- """Sets the auto_renew of this Loan.
-
- Whether to auto renew the loan upon expiration # noqa: E501
-
- :param auto_renew: The auto_renew of this Loan. # noqa: E501
- :type: bool
- """
-
- self._auto_renew = auto_renew
-
- @property
- def currency_pair(self):
- """Gets the currency_pair of this Loan. # noqa: E501
-
- Currency pair. Required if borrowing # noqa: E501
-
- :return: The currency_pair of this Loan. # noqa: E501
- :rtype: str
- """
- return self._currency_pair
-
- @currency_pair.setter
- def currency_pair(self, currency_pair):
- """Sets the currency_pair of this Loan.
-
- Currency pair. Required if borrowing # noqa: E501
-
- :param currency_pair: The currency_pair of this Loan. # noqa: E501
- :type: str
- """
-
- self._currency_pair = currency_pair
-
- @property
- def left(self):
- """Gets the left of this Loan. # noqa: E501
-
- Amount not lent out yet # noqa: E501
-
- :return: The left of this Loan. # noqa: E501
- :rtype: str
- """
- return self._left
-
- @left.setter
- def left(self, left):
- """Sets the left of this Loan.
-
- Amount not lent out yet # noqa: E501
-
- :param left: The left of this Loan. # noqa: E501
- :type: str
- """
-
- self._left = left
-
- @property
- def repaid(self):
- """Gets the repaid of this Loan. # noqa: E501
-
- Repaid amount # noqa: E501
-
- :return: The repaid of this Loan. # noqa: E501
- :rtype: str
- """
- return self._repaid
-
- @repaid.setter
- def repaid(self, repaid):
- """Sets the repaid of this Loan.
-
- Repaid amount # noqa: E501
-
- :param repaid: The repaid of this Loan. # noqa: E501
- :type: str
- """
-
- self._repaid = repaid
-
- @property
- def paid_interest(self):
- """Gets the paid_interest of this Loan. # noqa: E501
-
- Repaid interest # noqa: E501
-
- :return: The paid_interest of this Loan. # noqa: E501
- :rtype: str
- """
- return self._paid_interest
-
- @paid_interest.setter
- def paid_interest(self, paid_interest):
- """Sets the paid_interest of this Loan.
-
- Repaid interest # noqa: E501
-
- :param paid_interest: The paid_interest of this Loan. # noqa: E501
- :type: str
- """
-
- self._paid_interest = paid_interest
-
- @property
- def unpaid_interest(self):
- """Gets the unpaid_interest of this Loan. # noqa: E501
-
- Outstanding interest yet to be paid # noqa: E501
-
- :return: The unpaid_interest of this Loan. # noqa: E501
- :rtype: str
- """
- return self._unpaid_interest
-
- @unpaid_interest.setter
- def unpaid_interest(self, unpaid_interest):
- """Sets the unpaid_interest of this Loan.
-
- Outstanding interest yet to be paid # noqa: E501
-
- :param unpaid_interest: The unpaid_interest of this Loan. # noqa: E501
- :type: str
- """
-
- self._unpaid_interest = unpaid_interest
-
- @property
- def fee_rate(self):
- """Gets the fee_rate of this Loan. # noqa: E501
-
- Loan fee rate # noqa: E501
-
- :return: The fee_rate of this Loan. # noqa: E501
- :rtype: str
- """
- return self._fee_rate
-
- @fee_rate.setter
- def fee_rate(self, fee_rate):
- """Sets the fee_rate of this Loan.
-
- Loan fee rate # noqa: E501
-
- :param fee_rate: The fee_rate of this Loan. # noqa: E501
- :type: str
- """
-
- self._fee_rate = fee_rate
-
- @property
- def orig_id(self):
- """Gets the orig_id of this Loan. # noqa: E501
-
- Original loan ID of the loan if auto-renewed, otherwise equals to id # noqa: E501
-
- :return: The orig_id of this Loan. # noqa: E501
- :rtype: str
- """
- return self._orig_id
-
- @orig_id.setter
- def orig_id(self, orig_id):
- """Sets the orig_id of this Loan.
-
- Original loan ID of the loan if auto-renewed, otherwise equals to id # noqa: E501
-
- :param orig_id: The orig_id of this Loan. # noqa: E501
- :type: str
- """
-
- self._orig_id = orig_id
-
- @property
- def text(self):
- """Gets the text of this Loan. # noqa: E501
-
- User defined custom ID # noqa: E501
-
- :return: The text of this Loan. # noqa: E501
- :rtype: str
- """
- return self._text
-
- @text.setter
- def text(self, text):
- """Sets the text of this Loan.
-
- User defined custom ID # noqa: E501
-
- :param text: The text of this Loan. # noqa: E501
- :type: str
- """
-
- self._text = text
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, Loan):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, Loan):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/loan_patch.py b/gate_api/models/loan_patch.py
deleted file mode 100644
index 05dfc0e..0000000
--- a/gate_api/models/loan_patch.py
+++ /dev/null
@@ -1,237 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class LoanPatch(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {'currency': 'str', 'side': 'str', 'auto_renew': 'bool', 'currency_pair': 'str', 'loan_id': 'str'}
-
- attribute_map = {
- 'currency': 'currency',
- 'side': 'side',
- 'auto_renew': 'auto_renew',
- 'currency_pair': 'currency_pair',
- 'loan_id': 'loan_id',
- }
-
- def __init__(
- self, currency=None, side=None, auto_renew=None, currency_pair=None, loan_id=None, local_vars_configuration=None
- ): # noqa: E501
- # type: (str, str, bool, str, str, Configuration) -> None
- """LoanPatch - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._currency = None
- self._side = None
- self._auto_renew = None
- self._currency_pair = None
- self._loan_id = None
- self.discriminator = None
-
- self.currency = currency
- self.side = side
- self.auto_renew = auto_renew
- if currency_pair is not None:
- self.currency_pair = currency_pair
- if loan_id is not None:
- self.loan_id = loan_id
-
- @property
- def currency(self):
- """Gets the currency of this LoanPatch. # noqa: E501
-
- Loan currency # noqa: E501
-
- :return: The currency of this LoanPatch. # noqa: E501
- :rtype: str
- """
- return self._currency
-
- @currency.setter
- def currency(self, currency):
- """Sets the currency of this LoanPatch.
-
- Loan currency # noqa: E501
-
- :param currency: The currency of this LoanPatch. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501
- raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501
-
- self._currency = currency
-
- @property
- def side(self):
- """Gets the side of this LoanPatch. # noqa: E501
-
- Loan side. Possible values are `lend` and `borrow`. For `LoanRecord` patching, only `lend` is supported # noqa: E501
-
- :return: The side of this LoanPatch. # noqa: E501
- :rtype: str
- """
- return self._side
-
- @side.setter
- def side(self, side):
- """Sets the side of this LoanPatch.
-
- Loan side. Possible values are `lend` and `borrow`. For `LoanRecord` patching, only `lend` is supported # noqa: E501
-
- :param side: The side of this LoanPatch. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501
- raise ValueError("Invalid value for `side`, must not be `None`") # noqa: E501
- allowed_values = ["lend", "borrow"] # noqa: E501
- if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501
- raise ValueError(
- "Invalid value for `side` ({0}), must be one of {1}".format(side, allowed_values) # noqa: E501
- )
-
- self._side = side
-
- @property
- def auto_renew(self):
- """Gets the auto_renew of this LoanPatch. # noqa: E501
-
- Auto renew # noqa: E501
-
- :return: The auto_renew of this LoanPatch. # noqa: E501
- :rtype: bool
- """
- return self._auto_renew
-
- @auto_renew.setter
- def auto_renew(self, auto_renew):
- """Sets the auto_renew of this LoanPatch.
-
- Auto renew # noqa: E501
-
- :param auto_renew: The auto_renew of this LoanPatch. # noqa: E501
- :type: bool
- """
- if self.local_vars_configuration.client_side_validation and auto_renew is None: # noqa: E501
- raise ValueError("Invalid value for `auto_renew`, must not be `None`") # noqa: E501
-
- self._auto_renew = auto_renew
-
- @property
- def currency_pair(self):
- """Gets the currency_pair of this LoanPatch. # noqa: E501
-
- Currency pair. Required if borrowing # noqa: E501
-
- :return: The currency_pair of this LoanPatch. # noqa: E501
- :rtype: str
- """
- return self._currency_pair
-
- @currency_pair.setter
- def currency_pair(self, currency_pair):
- """Sets the currency_pair of this LoanPatch.
-
- Currency pair. Required if borrowing # noqa: E501
-
- :param currency_pair: The currency_pair of this LoanPatch. # noqa: E501
- :type: str
- """
-
- self._currency_pair = currency_pair
-
- @property
- def loan_id(self):
- """Gets the loan_id of this LoanPatch. # noqa: E501
-
- Loan ID. Required for `LoanRecord` patching # noqa: E501
-
- :return: The loan_id of this LoanPatch. # noqa: E501
- :rtype: str
- """
- return self._loan_id
-
- @loan_id.setter
- def loan_id(self, loan_id):
- """Sets the loan_id of this LoanPatch.
-
- Loan ID. Required for `LoanRecord` patching # noqa: E501
-
- :param loan_id: The loan_id of this LoanPatch. # noqa: E501
- :type: str
- """
-
- self._loan_id = loan_id
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, LoanPatch):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, LoanPatch):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/loan_record.py b/gate_api/models/loan_record.py
deleted file mode 100644
index 7e0f5a0..0000000
--- a/gate_api/models/loan_record.py
+++ /dev/null
@@ -1,507 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class LoanRecord(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'id': 'str',
- 'loan_id': 'str',
- 'create_time': 'str',
- 'expire_time': 'str',
- 'status': 'str',
- 'borrow_user_id': 'str',
- 'currency': 'str',
- 'rate': 'str',
- 'amount': 'str',
- 'days': 'int',
- 'auto_renew': 'bool',
- 'repaid': 'str',
- 'paid_interest': 'str',
- 'unpaid_interest': 'str',
- }
-
- attribute_map = {
- 'id': 'id',
- 'loan_id': 'loan_id',
- 'create_time': 'create_time',
- 'expire_time': 'expire_time',
- 'status': 'status',
- 'borrow_user_id': 'borrow_user_id',
- 'currency': 'currency',
- 'rate': 'rate',
- 'amount': 'amount',
- 'days': 'days',
- 'auto_renew': 'auto_renew',
- 'repaid': 'repaid',
- 'paid_interest': 'paid_interest',
- 'unpaid_interest': 'unpaid_interest',
- }
-
- def __init__(
- self,
- id=None,
- loan_id=None,
- create_time=None,
- expire_time=None,
- status=None,
- borrow_user_id=None,
- currency=None,
- rate=None,
- amount=None,
- days=None,
- auto_renew=False,
- repaid=None,
- paid_interest=None,
- unpaid_interest=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, str, str, int, bool, str, str, str, Configuration) -> None
- """LoanRecord - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._id = None
- self._loan_id = None
- self._create_time = None
- self._expire_time = None
- self._status = None
- self._borrow_user_id = None
- self._currency = None
- self._rate = None
- self._amount = None
- self._days = None
- self._auto_renew = None
- self._repaid = None
- self._paid_interest = None
- self._unpaid_interest = None
- self.discriminator = None
-
- if id is not None:
- self.id = id
- if loan_id is not None:
- self.loan_id = loan_id
- if create_time is not None:
- self.create_time = create_time
- if expire_time is not None:
- self.expire_time = expire_time
- if status is not None:
- self.status = status
- if borrow_user_id is not None:
- self.borrow_user_id = borrow_user_id
- if currency is not None:
- self.currency = currency
- if rate is not None:
- self.rate = rate
- if amount is not None:
- self.amount = amount
- if days is not None:
- self.days = days
- if auto_renew is not None:
- self.auto_renew = auto_renew
- if repaid is not None:
- self.repaid = repaid
- if paid_interest is not None:
- self.paid_interest = paid_interest
- if unpaid_interest is not None:
- self.unpaid_interest = unpaid_interest
-
- @property
- def id(self):
- """Gets the id of this LoanRecord. # noqa: E501
-
- Loan record ID # noqa: E501
-
- :return: The id of this LoanRecord. # noqa: E501
- :rtype: str
- """
- return self._id
-
- @id.setter
- def id(self, id):
- """Sets the id of this LoanRecord.
-
- Loan record ID # noqa: E501
-
- :param id: The id of this LoanRecord. # noqa: E501
- :type: str
- """
-
- self._id = id
-
- @property
- def loan_id(self):
- """Gets the loan_id of this LoanRecord. # noqa: E501
-
- Loan ID the record belongs to # noqa: E501
-
- :return: The loan_id of this LoanRecord. # noqa: E501
- :rtype: str
- """
- return self._loan_id
-
- @loan_id.setter
- def loan_id(self, loan_id):
- """Sets the loan_id of this LoanRecord.
-
- Loan ID the record belongs to # noqa: E501
-
- :param loan_id: The loan_id of this LoanRecord. # noqa: E501
- :type: str
- """
-
- self._loan_id = loan_id
-
- @property
- def create_time(self):
- """Gets the create_time of this LoanRecord. # noqa: E501
-
- Loan time # noqa: E501
-
- :return: The create_time of this LoanRecord. # noqa: E501
- :rtype: str
- """
- return self._create_time
-
- @create_time.setter
- def create_time(self, create_time):
- """Sets the create_time of this LoanRecord.
-
- Loan time # noqa: E501
-
- :param create_time: The create_time of this LoanRecord. # noqa: E501
- :type: str
- """
-
- self._create_time = create_time
-
- @property
- def expire_time(self):
- """Gets the expire_time of this LoanRecord. # noqa: E501
-
- Expiration time # noqa: E501
-
- :return: The expire_time of this LoanRecord. # noqa: E501
- :rtype: str
- """
- return self._expire_time
-
- @expire_time.setter
- def expire_time(self, expire_time):
- """Sets the expire_time of this LoanRecord.
-
- Expiration time # noqa: E501
-
- :param expire_time: The expire_time of this LoanRecord. # noqa: E501
- :type: str
- """
-
- self._expire_time = expire_time
-
- @property
- def status(self):
- """Gets the status of this LoanRecord. # noqa: E501
-
- Loan record status # noqa: E501
-
- :return: The status of this LoanRecord. # noqa: E501
- :rtype: str
- """
- return self._status
-
- @status.setter
- def status(self, status):
- """Sets the status of this LoanRecord.
-
- Loan record status # noqa: E501
-
- :param status: The status of this LoanRecord. # noqa: E501
- :type: str
- """
- allowed_values = ["loaned", "finished"] # noqa: E501
- if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
- raise ValueError(
- "Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values) # noqa: E501
- )
-
- self._status = status
-
- @property
- def borrow_user_id(self):
- """Gets the borrow_user_id of this LoanRecord. # noqa: E501
-
- Garbled user ID # noqa: E501
-
- :return: The borrow_user_id of this LoanRecord. # noqa: E501
- :rtype: str
- """
- return self._borrow_user_id
-
- @borrow_user_id.setter
- def borrow_user_id(self, borrow_user_id):
- """Sets the borrow_user_id of this LoanRecord.
-
- Garbled user ID # noqa: E501
-
- :param borrow_user_id: The borrow_user_id of this LoanRecord. # noqa: E501
- :type: str
- """
-
- self._borrow_user_id = borrow_user_id
-
- @property
- def currency(self):
- """Gets the currency of this LoanRecord. # noqa: E501
-
- Loan currency # noqa: E501
-
- :return: The currency of this LoanRecord. # noqa: E501
- :rtype: str
- """
- return self._currency
-
- @currency.setter
- def currency(self, currency):
- """Sets the currency of this LoanRecord.
-
- Loan currency # noqa: E501
-
- :param currency: The currency of this LoanRecord. # noqa: E501
- :type: str
- """
-
- self._currency = currency
-
- @property
- def rate(self):
- """Gets the rate of this LoanRecord. # noqa: E501
-
- Loan rate # noqa: E501
-
- :return: The rate of this LoanRecord. # noqa: E501
- :rtype: str
- """
- return self._rate
-
- @rate.setter
- def rate(self, rate):
- """Sets the rate of this LoanRecord.
-
- Loan rate # noqa: E501
-
- :param rate: The rate of this LoanRecord. # noqa: E501
- :type: str
- """
-
- self._rate = rate
-
- @property
- def amount(self):
- """Gets the amount of this LoanRecord. # noqa: E501
-
- Loan amount # noqa: E501
-
- :return: The amount of this LoanRecord. # noqa: E501
- :rtype: str
- """
- return self._amount
-
- @amount.setter
- def amount(self, amount):
- """Sets the amount of this LoanRecord.
-
- Loan amount # noqa: E501
-
- :param amount: The amount of this LoanRecord. # noqa: E501
- :type: str
- """
-
- self._amount = amount
-
- @property
- def days(self):
- """Gets the days of this LoanRecord. # noqa: E501
-
- Loan days # noqa: E501
-
- :return: The days of this LoanRecord. # noqa: E501
- :rtype: int
- """
- return self._days
-
- @days.setter
- def days(self, days):
- """Sets the days of this LoanRecord.
-
- Loan days # noqa: E501
-
- :param days: The days of this LoanRecord. # noqa: E501
- :type: int
- """
-
- self._days = days
-
- @property
- def auto_renew(self):
- """Gets the auto_renew of this LoanRecord. # noqa: E501
-
- Whether the record will auto renew on expiration # noqa: E501
-
- :return: The auto_renew of this LoanRecord. # noqa: E501
- :rtype: bool
- """
- return self._auto_renew
-
- @auto_renew.setter
- def auto_renew(self, auto_renew):
- """Sets the auto_renew of this LoanRecord.
-
- Whether the record will auto renew on expiration # noqa: E501
-
- :param auto_renew: The auto_renew of this LoanRecord. # noqa: E501
- :type: bool
- """
-
- self._auto_renew = auto_renew
-
- @property
- def repaid(self):
- """Gets the repaid of this LoanRecord. # noqa: E501
-
- Repaid amount # noqa: E501
-
- :return: The repaid of this LoanRecord. # noqa: E501
- :rtype: str
- """
- return self._repaid
-
- @repaid.setter
- def repaid(self, repaid):
- """Sets the repaid of this LoanRecord.
-
- Repaid amount # noqa: E501
-
- :param repaid: The repaid of this LoanRecord. # noqa: E501
- :type: str
- """
-
- self._repaid = repaid
-
- @property
- def paid_interest(self):
- """Gets the paid_interest of this LoanRecord. # noqa: E501
-
- Repaid interest # noqa: E501
-
- :return: The paid_interest of this LoanRecord. # noqa: E501
- :rtype: str
- """
- return self._paid_interest
-
- @paid_interest.setter
- def paid_interest(self, paid_interest):
- """Sets the paid_interest of this LoanRecord.
-
- Repaid interest # noqa: E501
-
- :param paid_interest: The paid_interest of this LoanRecord. # noqa: E501
- :type: str
- """
-
- self._paid_interest = paid_interest
-
- @property
- def unpaid_interest(self):
- """Gets the unpaid_interest of this LoanRecord. # noqa: E501
-
- Outstanding interest yet to be paid # noqa: E501
-
- :return: The unpaid_interest of this LoanRecord. # noqa: E501
- :rtype: str
- """
- return self._unpaid_interest
-
- @unpaid_interest.setter
- def unpaid_interest(self, unpaid_interest):
- """Sets the unpaid_interest of this LoanRecord.
-
- Outstanding interest yet to be paid # noqa: E501
-
- :param unpaid_interest: The unpaid_interest of this LoanRecord. # noqa: E501
- :type: str
- """
-
- self._unpaid_interest = unpaid_interest
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, LoanRecord):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, LoanRecord):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/margin_account.py b/gate_api/models/margin_account.py
index c79e5ad..45561e7 100644
--- a/gate_api/models/margin_account.py
+++ b/gate_api/models/margin_account.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -34,42 +34,55 @@ class MarginAccount(object):
"""
openapi_types = {
'currency_pair': 'str',
+ 'account_type': 'str',
+ 'leverage': 'str',
'locked': 'bool',
'risk': 'str',
+ 'mmr': 'str',
'base': 'MarginAccountCurrency',
- 'quote': 'MarginAccountCurrency',
+ 'quote': 'MarginAccountCurrency'
}
attribute_map = {
'currency_pair': 'currency_pair',
+ 'account_type': 'account_type',
+ 'leverage': 'leverage',
'locked': 'locked',
'risk': 'risk',
+ 'mmr': 'mmr',
'base': 'base',
- 'quote': 'quote',
+ 'quote': 'quote'
}
- def __init__(
- self, currency_pair=None, locked=None, risk=None, base=None, quote=None, local_vars_configuration=None
- ): # noqa: E501
- # type: (str, bool, str, MarginAccountCurrency, MarginAccountCurrency, Configuration) -> None
+ def __init__(self, currency_pair=None, account_type=None, leverage=None, locked=None, risk=None, mmr=None, base=None, quote=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, bool, str, str, MarginAccountCurrency, MarginAccountCurrency, Configuration) -> None
"""MarginAccount - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._currency_pair = None
+ self._account_type = None
+ self._leverage = None
self._locked = None
self._risk = None
+ self._mmr = None
self._base = None
self._quote = None
self.discriminator = None
if currency_pair is not None:
self.currency_pair = currency_pair
+ if account_type is not None:
+ self.account_type = account_type
+ if leverage is not None:
+ self.leverage = leverage
if locked is not None:
self.locked = locked
if risk is not None:
self.risk = risk
+ if mmr is not None:
+ self.mmr = mmr
if base is not None:
self.base = base
if quote is not None:
@@ -98,11 +111,57 @@ def currency_pair(self, currency_pair):
self._currency_pair = currency_pair
+ @property
+ def account_type(self):
+ """Gets the account_type of this MarginAccount. # noqa: E501
+
+ Account type: risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated # noqa: E501
+
+ :return: The account_type of this MarginAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._account_type
+
+ @account_type.setter
+ def account_type(self, account_type):
+ """Sets the account_type of this MarginAccount.
+
+ Account type: risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated # noqa: E501
+
+ :param account_type: The account_type of this MarginAccount. # noqa: E501
+ :type: str
+ """
+
+ self._account_type = account_type
+
+ @property
+ def leverage(self):
+ """Gets the leverage of this MarginAccount. # noqa: E501
+
+ User's current market leverage multiplier # noqa: E501
+
+ :return: The leverage of this MarginAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._leverage
+
+ @leverage.setter
+ def leverage(self, leverage):
+ """Sets the leverage of this MarginAccount.
+
+ User's current market leverage multiplier # noqa: E501
+
+ :param leverage: The leverage of this MarginAccount. # noqa: E501
+ :type: str
+ """
+
+ self._leverage = leverage
+
@property
def locked(self):
"""Gets the locked of this MarginAccount. # noqa: E501
- Whether account is locked # noqa: E501
+ Whether the account is locked # noqa: E501
:return: The locked of this MarginAccount. # noqa: E501
:rtype: bool
@@ -113,7 +172,7 @@ def locked(self):
def locked(self, locked):
"""Sets the locked of this MarginAccount.
- Whether account is locked # noqa: E501
+ Whether the account is locked # noqa: E501
:param locked: The locked of this MarginAccount. # noqa: E501
:type: bool
@@ -125,7 +184,7 @@ def locked(self, locked):
def risk(self):
"""Gets the risk of this MarginAccount. # noqa: E501
- Current risk rate of margin account # noqa: E501
+ Current risk rate of the margin account (returned when the account is a risk rate account) # noqa: E501
:return: The risk of this MarginAccount. # noqa: E501
:rtype: str
@@ -136,7 +195,7 @@ def risk(self):
def risk(self, risk):
"""Sets the risk of this MarginAccount.
- Current risk rate of margin account # noqa: E501
+ Current risk rate of the margin account (returned when the account is a risk rate account) # noqa: E501
:param risk: The risk of this MarginAccount. # noqa: E501
:type: str
@@ -144,6 +203,29 @@ def risk(self, risk):
self._risk = risk
+ @property
+ def mmr(self):
+ """Gets the mmr of this MarginAccount. # noqa: E501
+
+ Leveraged Account Current Maintenance Margin Rate (returned when the Account is Account) # noqa: E501
+
+ :return: The mmr of this MarginAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._mmr
+
+ @mmr.setter
+ def mmr(self, mmr):
+ """Sets the mmr of this MarginAccount.
+
+ Leveraged Account Current Maintenance Margin Rate (returned when the Account is Account) # noqa: E501
+
+ :param mmr: The mmr of this MarginAccount. # noqa: E501
+ :type: str
+ """
+
+ self._mmr = mmr
+
@property
def base(self):
"""Gets the base of this MarginAccount. # noqa: E501
@@ -193,16 +275,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/margin_account_book.py b/gate_api/models/margin_account_book.py
index 146cb5b..1ee6bbd 100644
--- a/gate_api/models/margin_account_book.py
+++ b/gate_api/models/margin_account_book.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -40,7 +40,7 @@ class MarginAccountBook(object):
'currency_pair': 'str',
'change': 'str',
'balance': 'str',
- 'type': 'str',
+ 'type': 'str'
}
attribute_map = {
@@ -51,21 +51,10 @@ class MarginAccountBook(object):
'currency_pair': 'currency_pair',
'change': 'change',
'balance': 'balance',
- 'type': 'type',
+ 'type': 'type'
}
- def __init__(
- self,
- id=None,
- time=None,
- time_ms=None,
- currency=None,
- currency_pair=None,
- change=None,
- balance=None,
- type=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, id=None, time=None, time_ms=None, currency=None, currency_pair=None, change=None, balance=None, type=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, int, str, str, str, str, str, Configuration) -> None
"""MarginAccountBook - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -126,7 +115,7 @@ def id(self, id):
def time(self):
"""Gets the time of this MarginAccountBook. # noqa: E501
- Balance changed timestamp # noqa: E501
+ Account change timestamp # noqa: E501
:return: The time of this MarginAccountBook. # noqa: E501
:rtype: str
@@ -137,7 +126,7 @@ def time(self):
def time(self, time):
"""Sets the time of this MarginAccountBook.
- Balance changed timestamp # noqa: E501
+ Account change timestamp # noqa: E501
:param time: The time of this MarginAccountBook. # noqa: E501
:type: str
@@ -195,7 +184,7 @@ def currency(self, currency):
def currency_pair(self):
"""Gets the currency_pair of this MarginAccountBook. # noqa: E501
- Account currency pair # noqa: E501
+ Account trading pair # noqa: E501
:return: The currency_pair of this MarginAccountBook. # noqa: E501
:rtype: str
@@ -206,7 +195,7 @@ def currency_pair(self):
def currency_pair(self, currency_pair):
"""Sets the currency_pair of this MarginAccountBook.
- Account currency pair # noqa: E501
+ Account trading pair # noqa: E501
:param currency_pair: The currency_pair of this MarginAccountBook. # noqa: E501
:type: str
@@ -264,7 +253,7 @@ def balance(self, balance):
def type(self):
"""Gets the type of this MarginAccountBook. # noqa: E501
- Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501
+ Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501
:return: The type of this MarginAccountBook. # noqa: E501
:rtype: str
@@ -275,7 +264,7 @@ def type(self):
def type(self, type):
"""Sets the type of this MarginAccountBook.
- Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501
+ Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501
:param type: The type of this MarginAccountBook. # noqa: E501
:type: str
@@ -290,16 +279,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/margin_account_currency.py b/gate_api/models/margin_account_currency.py
index 64ad9a5..cb96b38 100644
--- a/gate_api/models/margin_account_currency.py
+++ b/gate_api/models/margin_account_currency.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,19 +32,23 @@ class MarginAccountCurrency(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'available': 'str', 'locked': 'str', 'borrowed': 'str', 'interest': 'str'}
+ openapi_types = {
+ 'currency': 'str',
+ 'available': 'str',
+ 'locked': 'str',
+ 'borrowed': 'str',
+ 'interest': 'str'
+ }
attribute_map = {
'currency': 'currency',
'available': 'available',
'locked': 'locked',
'borrowed': 'borrowed',
- 'interest': 'interest',
+ 'interest': 'interest'
}
- def __init__(
- self, currency=None, available=None, locked=None, borrowed=None, interest=None, local_vars_configuration=None
- ): # noqa: E501
+ def __init__(self, currency=None, available=None, locked=None, borrowed=None, interest=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, str, Configuration) -> None
"""MarginAccountCurrency - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -96,7 +100,7 @@ def currency(self, currency):
def available(self):
"""Gets the available of this MarginAccountCurrency. # noqa: E501
- Amount suitable for margin trading. # noqa: E501
+ Amount available for margin trading, available = margin + borrowed # noqa: E501
:return: The available of this MarginAccountCurrency. # noqa: E501
:rtype: str
@@ -107,7 +111,7 @@ def available(self):
def available(self, available):
"""Sets the available of this MarginAccountCurrency.
- Amount suitable for margin trading. # noqa: E501
+ Amount available for margin trading, available = margin + borrowed # noqa: E501
:param available: The available of this MarginAccountCurrency. # noqa: E501
:type: str
@@ -119,7 +123,7 @@ def available(self, available):
def locked(self):
"""Gets the locked of this MarginAccountCurrency. # noqa: E501
- Locked amount, used in margin trading # noqa: E501
+ Frozen funds, such as amounts already placed in margin market for order trading # noqa: E501
:return: The locked of this MarginAccountCurrency. # noqa: E501
:rtype: str
@@ -130,7 +134,7 @@ def locked(self):
def locked(self, locked):
"""Sets the locked of this MarginAccountCurrency.
- Locked amount, used in margin trading # noqa: E501
+ Frozen funds, such as amounts already placed in margin market for order trading # noqa: E501
:param locked: The locked of this MarginAccountCurrency. # noqa: E501
:type: str
@@ -142,7 +146,7 @@ def locked(self, locked):
def borrowed(self):
"""Gets the borrowed of this MarginAccountCurrency. # noqa: E501
- Borrowed amount # noqa: E501
+ Borrowed funds # noqa: E501
:return: The borrowed of this MarginAccountCurrency. # noqa: E501
:rtype: str
@@ -153,7 +157,7 @@ def borrowed(self):
def borrowed(self, borrowed):
"""Sets the borrowed of this MarginAccountCurrency.
- Borrowed amount # noqa: E501
+ Borrowed funds # noqa: E501
:param borrowed: The borrowed of this MarginAccountCurrency. # noqa: E501
:type: str
@@ -165,7 +169,7 @@ def borrowed(self, borrowed):
def interest(self):
"""Gets the interest of this MarginAccountCurrency. # noqa: E501
- Unpaid interests # noqa: E501
+ Unpaid interest # noqa: E501
:return: The interest of this MarginAccountCurrency. # noqa: E501
:rtype: str
@@ -176,7 +180,7 @@ def interest(self):
def interest(self, interest):
"""Sets the interest of this MarginAccountCurrency.
- Unpaid interests # noqa: E501
+ Unpaid interest # noqa: E501
:param interest: The interest of this MarginAccountCurrency. # noqa: E501
:type: str
@@ -191,16 +195,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/margin_borrowable.py b/gate_api/models/margin_borrowable.py
deleted file mode 100644
index 919e471..0000000
--- a/gate_api/models/margin_borrowable.py
+++ /dev/null
@@ -1,169 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class MarginBorrowable(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {'currency': 'str', 'currency_pair': 'str', 'amount': 'str'}
-
- attribute_map = {'currency': 'currency', 'currency_pair': 'currency_pair', 'amount': 'amount'}
-
- def __init__(self, currency=None, currency_pair=None, amount=None, local_vars_configuration=None): # noqa: E501
- # type: (str, str, str, Configuration) -> None
- """MarginBorrowable - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._currency = None
- self._currency_pair = None
- self._amount = None
- self.discriminator = None
-
- if currency is not None:
- self.currency = currency
- if currency_pair is not None:
- self.currency_pair = currency_pair
- if amount is not None:
- self.amount = amount
-
- @property
- def currency(self):
- """Gets the currency of this MarginBorrowable. # noqa: E501
-
- Currency detail # noqa: E501
-
- :return: The currency of this MarginBorrowable. # noqa: E501
- :rtype: str
- """
- return self._currency
-
- @currency.setter
- def currency(self, currency):
- """Sets the currency of this MarginBorrowable.
-
- Currency detail # noqa: E501
-
- :param currency: The currency of this MarginBorrowable. # noqa: E501
- :type: str
- """
-
- self._currency = currency
-
- @property
- def currency_pair(self):
- """Gets the currency_pair of this MarginBorrowable. # noqa: E501
-
- Currency pair # noqa: E501
-
- :return: The currency_pair of this MarginBorrowable. # noqa: E501
- :rtype: str
- """
- return self._currency_pair
-
- @currency_pair.setter
- def currency_pair(self, currency_pair):
- """Sets the currency_pair of this MarginBorrowable.
-
- Currency pair # noqa: E501
-
- :param currency_pair: The currency_pair of this MarginBorrowable. # noqa: E501
- :type: str
- """
-
- self._currency_pair = currency_pair
-
- @property
- def amount(self):
- """Gets the amount of this MarginBorrowable. # noqa: E501
-
- Max borrowable amount # noqa: E501
-
- :return: The amount of this MarginBorrowable. # noqa: E501
- :rtype: str
- """
- return self._amount
-
- @amount.setter
- def amount(self, amount):
- """Sets the amount of this MarginBorrowable.
-
- Max borrowable amount # noqa: E501
-
- :param amount: The amount of this MarginBorrowable. # noqa: E501
- :type: str
- """
-
- self._amount = amount
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, MarginBorrowable):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, MarginBorrowable):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/margin_currency_pair.py b/gate_api/models/margin_currency_pair.py
deleted file mode 100644
index 8c09a17..0000000
--- a/gate_api/models/margin_currency_pair.py
+++ /dev/null
@@ -1,328 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class MarginCurrencyPair(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'id': 'str',
- 'base': 'str',
- 'quote': 'str',
- 'leverage': 'int',
- 'min_base_amount': 'str',
- 'min_quote_amount': 'str',
- 'max_quote_amount': 'str',
- 'status': 'int',
- }
-
- attribute_map = {
- 'id': 'id',
- 'base': 'base',
- 'quote': 'quote',
- 'leverage': 'leverage',
- 'min_base_amount': 'min_base_amount',
- 'min_quote_amount': 'min_quote_amount',
- 'max_quote_amount': 'max_quote_amount',
- 'status': 'status',
- }
-
- def __init__(
- self,
- id=None,
- base=None,
- quote=None,
- leverage=None,
- min_base_amount=None,
- min_quote_amount=None,
- max_quote_amount=None,
- status=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, int, str, str, str, int, Configuration) -> None
- """MarginCurrencyPair - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._id = None
- self._base = None
- self._quote = None
- self._leverage = None
- self._min_base_amount = None
- self._min_quote_amount = None
- self._max_quote_amount = None
- self._status = None
- self.discriminator = None
-
- if id is not None:
- self.id = id
- if base is not None:
- self.base = base
- if quote is not None:
- self.quote = quote
- if leverage is not None:
- self.leverage = leverage
- if min_base_amount is not None:
- self.min_base_amount = min_base_amount
- if min_quote_amount is not None:
- self.min_quote_amount = min_quote_amount
- if max_quote_amount is not None:
- self.max_quote_amount = max_quote_amount
- if status is not None:
- self.status = status
-
- @property
- def id(self):
- """Gets the id of this MarginCurrencyPair. # noqa: E501
-
- Currency pair # noqa: E501
-
- :return: The id of this MarginCurrencyPair. # noqa: E501
- :rtype: str
- """
- return self._id
-
- @id.setter
- def id(self, id):
- """Sets the id of this MarginCurrencyPair.
-
- Currency pair # noqa: E501
-
- :param id: The id of this MarginCurrencyPair. # noqa: E501
- :type: str
- """
-
- self._id = id
-
- @property
- def base(self):
- """Gets the base of this MarginCurrencyPair. # noqa: E501
-
- Base currency # noqa: E501
-
- :return: The base of this MarginCurrencyPair. # noqa: E501
- :rtype: str
- """
- return self._base
-
- @base.setter
- def base(self, base):
- """Sets the base of this MarginCurrencyPair.
-
- Base currency # noqa: E501
-
- :param base: The base of this MarginCurrencyPair. # noqa: E501
- :type: str
- """
-
- self._base = base
-
- @property
- def quote(self):
- """Gets the quote of this MarginCurrencyPair. # noqa: E501
-
- Quote currency # noqa: E501
-
- :return: The quote of this MarginCurrencyPair. # noqa: E501
- :rtype: str
- """
- return self._quote
-
- @quote.setter
- def quote(self, quote):
- """Sets the quote of this MarginCurrencyPair.
-
- Quote currency # noqa: E501
-
- :param quote: The quote of this MarginCurrencyPair. # noqa: E501
- :type: str
- """
-
- self._quote = quote
-
- @property
- def leverage(self):
- """Gets the leverage of this MarginCurrencyPair. # noqa: E501
-
- Leverage # noqa: E501
-
- :return: The leverage of this MarginCurrencyPair. # noqa: E501
- :rtype: int
- """
- return self._leverage
-
- @leverage.setter
- def leverage(self, leverage):
- """Sets the leverage of this MarginCurrencyPair.
-
- Leverage # noqa: E501
-
- :param leverage: The leverage of this MarginCurrencyPair. # noqa: E501
- :type: int
- """
-
- self._leverage = leverage
-
- @property
- def min_base_amount(self):
- """Gets the min_base_amount of this MarginCurrencyPair. # noqa: E501
-
- Minimum base currency to loan, `null` means no limit # noqa: E501
-
- :return: The min_base_amount of this MarginCurrencyPair. # noqa: E501
- :rtype: str
- """
- return self._min_base_amount
-
- @min_base_amount.setter
- def min_base_amount(self, min_base_amount):
- """Sets the min_base_amount of this MarginCurrencyPair.
-
- Minimum base currency to loan, `null` means no limit # noqa: E501
-
- :param min_base_amount: The min_base_amount of this MarginCurrencyPair. # noqa: E501
- :type: str
- """
-
- self._min_base_amount = min_base_amount
-
- @property
- def min_quote_amount(self):
- """Gets the min_quote_amount of this MarginCurrencyPair. # noqa: E501
-
- Minimum quote currency to loan, `null` means no limit # noqa: E501
-
- :return: The min_quote_amount of this MarginCurrencyPair. # noqa: E501
- :rtype: str
- """
- return self._min_quote_amount
-
- @min_quote_amount.setter
- def min_quote_amount(self, min_quote_amount):
- """Sets the min_quote_amount of this MarginCurrencyPair.
-
- Minimum quote currency to loan, `null` means no limit # noqa: E501
-
- :param min_quote_amount: The min_quote_amount of this MarginCurrencyPair. # noqa: E501
- :type: str
- """
-
- self._min_quote_amount = min_quote_amount
-
- @property
- def max_quote_amount(self):
- """Gets the max_quote_amount of this MarginCurrencyPair. # noqa: E501
-
- Maximum borrowable amount for quote currency. Base currency limit is calculated by quote maximum and market price. `null` means no limit # noqa: E501
-
- :return: The max_quote_amount of this MarginCurrencyPair. # noqa: E501
- :rtype: str
- """
- return self._max_quote_amount
-
- @max_quote_amount.setter
- def max_quote_amount(self, max_quote_amount):
- """Sets the max_quote_amount of this MarginCurrencyPair.
-
- Maximum borrowable amount for quote currency. Base currency limit is calculated by quote maximum and market price. `null` means no limit # noqa: E501
-
- :param max_quote_amount: The max_quote_amount of this MarginCurrencyPair. # noqa: E501
- :type: str
- """
-
- self._max_quote_amount = max_quote_amount
-
- @property
- def status(self):
- """Gets the status of this MarginCurrencyPair. # noqa: E501
-
- Currency pair status - `0`: disabled - `1`: enabled # noqa: E501
-
- :return: The status of this MarginCurrencyPair. # noqa: E501
- :rtype: int
- """
- return self._status
-
- @status.setter
- def status(self, status):
- """Sets the status of this MarginCurrencyPair.
-
- Currency pair status - `0`: disabled - `1`: enabled # noqa: E501
-
- :param status: The status of this MarginCurrencyPair. # noqa: E501
- :type: int
- """
-
- self._status = status
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, MarginCurrencyPair):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, MarginCurrencyPair):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/margin_leverage_tier.py b/gate_api/models/margin_leverage_tier.py
new file mode 100644
index 0000000..ebf2237
--- /dev/null
+++ b/gate_api/models/margin_leverage_tier.py
@@ -0,0 +1,179 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MarginLeverageTier(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'upper_limit': 'str',
+ 'mmr': 'str',
+ 'leverage': 'str'
+ }
+
+ attribute_map = {
+ 'upper_limit': 'upper_limit',
+ 'mmr': 'mmr',
+ 'leverage': 'leverage'
+ }
+
+ def __init__(self, upper_limit=None, mmr=None, leverage=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, Configuration) -> None
+ """MarginLeverageTier - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._upper_limit = None
+ self._mmr = None
+ self._leverage = None
+ self.discriminator = None
+
+ if upper_limit is not None:
+ self.upper_limit = upper_limit
+ if mmr is not None:
+ self.mmr = mmr
+ if leverage is not None:
+ self.leverage = leverage
+
+ @property
+ def upper_limit(self):
+ """Gets the upper_limit of this MarginLeverageTier. # noqa: E501
+
+ Maximum loan limit # noqa: E501
+
+ :return: The upper_limit of this MarginLeverageTier. # noqa: E501
+ :rtype: str
+ """
+ return self._upper_limit
+
+ @upper_limit.setter
+ def upper_limit(self, upper_limit):
+ """Sets the upper_limit of this MarginLeverageTier.
+
+ Maximum loan limit # noqa: E501
+
+ :param upper_limit: The upper_limit of this MarginLeverageTier. # noqa: E501
+ :type: str
+ """
+
+ self._upper_limit = upper_limit
+
+ @property
+ def mmr(self):
+ """Gets the mmr of this MarginLeverageTier. # noqa: E501
+
+ Maintenance margin rate # noqa: E501
+
+ :return: The mmr of this MarginLeverageTier. # noqa: E501
+ :rtype: str
+ """
+ return self._mmr
+
+ @mmr.setter
+ def mmr(self, mmr):
+ """Sets the mmr of this MarginLeverageTier.
+
+ Maintenance margin rate # noqa: E501
+
+ :param mmr: The mmr of this MarginLeverageTier. # noqa: E501
+ :type: str
+ """
+
+ self._mmr = mmr
+
+ @property
+ def leverage(self):
+ """Gets the leverage of this MarginLeverageTier. # noqa: E501
+
+ Maximum leverage multiple # noqa: E501
+
+ :return: The leverage of this MarginLeverageTier. # noqa: E501
+ :rtype: str
+ """
+ return self._leverage
+
+ @leverage.setter
+ def leverage(self, leverage):
+ """Sets the leverage of this MarginLeverageTier.
+
+ Maximum leverage multiple # noqa: E501
+
+ :param leverage: The leverage of this MarginLeverageTier. # noqa: E501
+ :type: str
+ """
+
+ self._leverage = leverage
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MarginLeverageTier):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MarginLeverageTier):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/margin_market_leverage.py b/gate_api/models/margin_market_leverage.py
new file mode 100644
index 0000000..f024010
--- /dev/null
+++ b/gate_api/models/margin_market_leverage.py
@@ -0,0 +1,152 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MarginMarketLeverage(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency_pair': 'str',
+ 'leverage': 'str'
+ }
+
+ attribute_map = {
+ 'currency_pair': 'currency_pair',
+ 'leverage': 'leverage'
+ }
+
+ def __init__(self, currency_pair=None, leverage=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """MarginMarketLeverage - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency_pair = None
+ self._leverage = None
+ self.discriminator = None
+
+ if currency_pair is not None:
+ self.currency_pair = currency_pair
+ self.leverage = leverage
+
+ @property
+ def currency_pair(self):
+ """Gets the currency_pair of this MarginMarketLeverage. # noqa: E501
+
+ Market # noqa: E501
+
+ :return: The currency_pair of this MarginMarketLeverage. # noqa: E501
+ :rtype: str
+ """
+ return self._currency_pair
+
+ @currency_pair.setter
+ def currency_pair(self, currency_pair):
+ """Sets the currency_pair of this MarginMarketLeverage.
+
+ Market # noqa: E501
+
+ :param currency_pair: The currency_pair of this MarginMarketLeverage. # noqa: E501
+ :type: str
+ """
+
+ self._currency_pair = currency_pair
+
+ @property
+ def leverage(self):
+ """Gets the leverage of this MarginMarketLeverage. # noqa: E501
+
+ Position leverage # noqa: E501
+
+ :return: The leverage of this MarginMarketLeverage. # noqa: E501
+ :rtype: str
+ """
+ return self._leverage
+
+ @leverage.setter
+ def leverage(self, leverage):
+ """Sets the leverage of this MarginMarketLeverage.
+
+ Position leverage # noqa: E501
+
+ :param leverage: The leverage of this MarginMarketLeverage. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and leverage is None: # noqa: E501
+ raise ValueError("Invalid value for `leverage`, must not be `None`") # noqa: E501
+
+ self._leverage = leverage
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MarginMarketLeverage):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MarginMarketLeverage):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/margin_tiers.py b/gate_api/models/margin_tiers.py
new file mode 100644
index 0000000..a1bb5e7
--- /dev/null
+++ b/gate_api/models/margin_tiers.py
@@ -0,0 +1,235 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MarginTiers(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'tier': 'str',
+ 'margin_rate': 'str',
+ 'lower_limit': 'str',
+ 'upper_limit': 'str',
+ 'leverage': 'str'
+ }
+
+ attribute_map = {
+ 'tier': 'tier',
+ 'margin_rate': 'margin_rate',
+ 'lower_limit': 'lower_limit',
+ 'upper_limit': 'upper_limit',
+ 'leverage': 'leverage'
+ }
+
+ def __init__(self, tier=None, margin_rate=None, lower_limit=None, upper_limit=None, leverage=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, Configuration) -> None
+ """MarginTiers - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._tier = None
+ self._margin_rate = None
+ self._lower_limit = None
+ self._upper_limit = None
+ self._leverage = None
+ self.discriminator = None
+
+ if tier is not None:
+ self.tier = tier
+ if margin_rate is not None:
+ self.margin_rate = margin_rate
+ if lower_limit is not None:
+ self.lower_limit = lower_limit
+ if upper_limit is not None:
+ self.upper_limit = upper_limit
+ if leverage is not None:
+ self.leverage = leverage
+
+ @property
+ def tier(self):
+ """Gets the tier of this MarginTiers. # noqa: E501
+
+ Tier # noqa: E501
+
+ :return: The tier of this MarginTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._tier
+
+ @tier.setter
+ def tier(self, tier):
+ """Sets the tier of this MarginTiers.
+
+ Tier # noqa: E501
+
+ :param tier: The tier of this MarginTiers. # noqa: E501
+ :type: str
+ """
+
+ self._tier = tier
+
+ @property
+ def margin_rate(self):
+ """Gets the margin_rate of this MarginTiers. # noqa: E501
+
+ Discount # noqa: E501
+
+ :return: The margin_rate of this MarginTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._margin_rate
+
+ @margin_rate.setter
+ def margin_rate(self, margin_rate):
+ """Sets the margin_rate of this MarginTiers.
+
+ Discount # noqa: E501
+
+ :param margin_rate: The margin_rate of this MarginTiers. # noqa: E501
+ :type: str
+ """
+
+ self._margin_rate = margin_rate
+
+ @property
+ def lower_limit(self):
+ """Gets the lower_limit of this MarginTiers. # noqa: E501
+
+ Lower limit # noqa: E501
+
+ :return: The lower_limit of this MarginTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._lower_limit
+
+ @lower_limit.setter
+ def lower_limit(self, lower_limit):
+ """Sets the lower_limit of this MarginTiers.
+
+ Lower limit # noqa: E501
+
+ :param lower_limit: The lower_limit of this MarginTiers. # noqa: E501
+ :type: str
+ """
+
+ self._lower_limit = lower_limit
+
+ @property
+ def upper_limit(self):
+ """Gets the upper_limit of this MarginTiers. # noqa: E501
+
+ Upper limit, \"\" indicates greater than (the last tier) # noqa: E501
+
+ :return: The upper_limit of this MarginTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._upper_limit
+
+ @upper_limit.setter
+ def upper_limit(self, upper_limit):
+ """Sets the upper_limit of this MarginTiers.
+
+ Upper limit, \"\" indicates greater than (the last tier) # noqa: E501
+
+ :param upper_limit: The upper_limit of this MarginTiers. # noqa: E501
+ :type: str
+ """
+
+ self._upper_limit = upper_limit
+
+ @property
+ def leverage(self):
+ """Gets the leverage of this MarginTiers. # noqa: E501
+
+ Position leverage # noqa: E501
+
+ :return: The leverage of this MarginTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._leverage
+
+ @leverage.setter
+ def leverage(self, leverage):
+ """Sets the leverage of this MarginTiers.
+
+ Position leverage # noqa: E501
+
+ :param leverage: The leverage of this MarginTiers. # noqa: E501
+ :type: str
+ """
+
+ self._leverage = leverage
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MarginTiers):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MarginTiers):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/margin_transferable.py b/gate_api/models/margin_transferable.py
index 3736eed..4031c74 100644
--- a/gate_api/models/margin_transferable.py
+++ b/gate_api/models/margin_transferable.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,17 @@ class MarginTransferable(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'currency_pair': 'str', 'amount': 'str'}
-
- attribute_map = {'currency': 'currency', 'currency_pair': 'currency_pair', 'amount': 'amount'}
+ openapi_types = {
+ 'currency': 'str',
+ 'currency_pair': 'str',
+ 'amount': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'currency_pair': 'currency_pair',
+ 'amount': 'amount'
+ }
def __init__(self, currency=None, currency_pair=None, amount=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, Configuration) -> None
@@ -131,16 +139,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/max_uni_borrowable.py b/gate_api/models/max_uni_borrowable.py
index fd02906..5ac2d09 100644
--- a/gate_api/models/max_uni_borrowable.py
+++ b/gate_api/models/max_uni_borrowable.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,17 @@ class MaxUniBorrowable(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'currency_pair': 'str', 'borrowable': 'str'}
-
- attribute_map = {'currency': 'currency', 'currency_pair': 'currency_pair', 'borrowable': 'borrowable'}
+ openapi_types = {
+ 'currency': 'str',
+ 'currency_pair': 'str',
+ 'borrowable': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'currency_pair': 'currency_pair',
+ 'borrowable': 'borrowable'
+ }
def __init__(self, currency=None, currency_pair=None, borrowable=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, Configuration) -> None
@@ -133,16 +141,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/mock_futures_order.py b/gate_api/models/mock_futures_order.py
new file mode 100644
index 0000000..3adadb8
--- /dev/null
+++ b/gate_api/models/mock_futures_order.py
@@ -0,0 +1,182 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MockFuturesOrder(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'contract': 'str',
+ 'size': 'str',
+ 'left': 'str'
+ }
+
+ attribute_map = {
+ 'contract': 'contract',
+ 'size': 'size',
+ 'left': 'left'
+ }
+
+ def __init__(self, contract=None, size=None, left=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, Configuration) -> None
+ """MockFuturesOrder - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._contract = None
+ self._size = None
+ self._left = None
+ self.discriminator = None
+
+ self.contract = contract
+ self.size = size
+ self.left = left
+
+ @property
+ def contract(self):
+ """Gets the contract of this MockFuturesOrder. # noqa: E501
+
+ Futures name, currently only supports USDT perpetual contracts for BTC and ETH # noqa: E501
+
+ :return: The contract of this MockFuturesOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._contract
+
+ @contract.setter
+ def contract(self, contract):
+ """Sets the contract of this MockFuturesOrder.
+
+ Futures name, currently only supports USDT perpetual contracts for BTC and ETH # noqa: E501
+
+ :param contract: The contract of this MockFuturesOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501
+ raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501
+
+ self._contract = contract
+
+ @property
+ def size(self):
+ """Gets the size of this MockFuturesOrder. # noqa: E501
+
+ Contract quantity, representing the initial order quantity, not involved in actual settlement # noqa: E501
+
+ :return: The size of this MockFuturesOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._size
+
+ @size.setter
+ def size(self, size):
+ """Sets the size of this MockFuturesOrder.
+
+ Contract quantity, representing the initial order quantity, not involved in actual settlement # noqa: E501
+
+ :param size: The size of this MockFuturesOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501
+ raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501
+
+ self._size = size
+
+ @property
+ def left(self):
+ """Gets the left of this MockFuturesOrder. # noqa: E501
+
+ Unfilled contract quantity, involved in actual calculation # noqa: E501
+
+ :return: The left of this MockFuturesOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._left
+
+ @left.setter
+ def left(self, left):
+ """Sets the left of this MockFuturesOrder.
+
+ Unfilled contract quantity, involved in actual calculation # noqa: E501
+
+ :param left: The left of this MockFuturesOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and left is None: # noqa: E501
+ raise ValueError("Invalid value for `left`, must not be `None`") # noqa: E501
+
+ self._left = left
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MockFuturesOrder):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MockFuturesOrder):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/mock_futures_position.py b/gate_api/models/mock_futures_position.py
new file mode 100644
index 0000000..158c6a7
--- /dev/null
+++ b/gate_api/models/mock_futures_position.py
@@ -0,0 +1,153 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MockFuturesPosition(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'contract': 'str',
+ 'size': 'str'
+ }
+
+ attribute_map = {
+ 'contract': 'contract',
+ 'size': 'size'
+ }
+
+ def __init__(self, contract=None, size=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """MockFuturesPosition - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._contract = None
+ self._size = None
+ self.discriminator = None
+
+ self.contract = contract
+ self.size = size
+
+ @property
+ def contract(self):
+ """Gets the contract of this MockFuturesPosition. # noqa: E501
+
+ Futures name, currently only supports USDT perpetual contracts for BTC and ETH # noqa: E501
+
+ :return: The contract of this MockFuturesPosition. # noqa: E501
+ :rtype: str
+ """
+ return self._contract
+
+ @contract.setter
+ def contract(self, contract):
+ """Sets the contract of this MockFuturesPosition.
+
+ Futures name, currently only supports USDT perpetual contracts for BTC and ETH # noqa: E501
+
+ :param contract: The contract of this MockFuturesPosition. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501
+ raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501
+
+ self._contract = contract
+
+ @property
+ def size(self):
+ """Gets the size of this MockFuturesPosition. # noqa: E501
+
+ Position size, measured in contract quantity # noqa: E501
+
+ :return: The size of this MockFuturesPosition. # noqa: E501
+ :rtype: str
+ """
+ return self._size
+
+ @size.setter
+ def size(self, size):
+ """Sets the size of this MockFuturesPosition.
+
+ Position size, measured in contract quantity # noqa: E501
+
+ :param size: The size of this MockFuturesPosition. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501
+ raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501
+
+ self._size = size
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MockFuturesPosition):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MockFuturesPosition):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/mock_margin_result.py b/gate_api/models/mock_margin_result.py
new file mode 100644
index 0000000..7181f58
--- /dev/null
+++ b/gate_api/models/mock_margin_result.py
@@ -0,0 +1,291 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MockMarginResult(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'type': 'str',
+ 'profit_loss_ranges': 'list[ProfitLossRange]',
+ 'max_loss': 'ProfitLossRange',
+ 'mr1': 'str',
+ 'mr2': 'str',
+ 'mr3': 'str',
+ 'mr4': 'str'
+ }
+
+ attribute_map = {
+ 'type': 'type',
+ 'profit_loss_ranges': 'profit_loss_ranges',
+ 'max_loss': 'max_loss',
+ 'mr1': 'mr1',
+ 'mr2': 'mr2',
+ 'mr3': 'mr3',
+ 'mr4': 'mr4'
+ }
+
+ def __init__(self, type=None, profit_loss_ranges=None, max_loss=None, mr1=None, mr2=None, mr3=None, mr4=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, list[ProfitLossRange], ProfitLossRange, str, str, str, str, Configuration) -> None
+ """MockMarginResult - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._type = None
+ self._profit_loss_ranges = None
+ self._max_loss = None
+ self._mr1 = None
+ self._mr2 = None
+ self._mr3 = None
+ self._mr4 = None
+ self.discriminator = None
+
+ if type is not None:
+ self.type = type
+ if profit_loss_ranges is not None:
+ self.profit_loss_ranges = profit_loss_ranges
+ if max_loss is not None:
+ self.max_loss = max_loss
+ if mr1 is not None:
+ self.mr1 = mr1
+ if mr2 is not None:
+ self.mr2 = mr2
+ if mr3 is not None:
+ self.mr3 = mr3
+ if mr4 is not None:
+ self.mr4 = mr4
+
+ @property
+ def type(self):
+ """Gets the type of this MockMarginResult. # noqa: E501
+
+ Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position # noqa: E501
+
+ :return: The type of this MockMarginResult. # noqa: E501
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this MockMarginResult.
+
+ Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position # noqa: E501
+
+ :param type: The type of this MockMarginResult. # noqa: E501
+ :type: str
+ """
+
+ self._type = type
+
+ @property
+ def profit_loss_ranges(self):
+ """Gets the profit_loss_ranges of this MockMarginResult. # noqa: E501
+
+ Results of 33 stress scenarios for MR1 # noqa: E501
+
+ :return: The profit_loss_ranges of this MockMarginResult. # noqa: E501
+ :rtype: list[ProfitLossRange]
+ """
+ return self._profit_loss_ranges
+
+ @profit_loss_ranges.setter
+ def profit_loss_ranges(self, profit_loss_ranges):
+ """Sets the profit_loss_ranges of this MockMarginResult.
+
+ Results of 33 stress scenarios for MR1 # noqa: E501
+
+ :param profit_loss_ranges: The profit_loss_ranges of this MockMarginResult. # noqa: E501
+ :type: list[ProfitLossRange]
+ """
+
+ self._profit_loss_ranges = profit_loss_ranges
+
+ @property
+ def max_loss(self):
+ """Gets the max_loss of this MockMarginResult. # noqa: E501
+
+ 最大损失 # noqa: E501
+
+ :return: The max_loss of this MockMarginResult. # noqa: E501
+ :rtype: ProfitLossRange
+ """
+ return self._max_loss
+
+ @max_loss.setter
+ def max_loss(self, max_loss):
+ """Sets the max_loss of this MockMarginResult.
+
+ 最大损失 # noqa: E501
+
+ :param max_loss: The max_loss of this MockMarginResult. # noqa: E501
+ :type: ProfitLossRange
+ """
+
+ self._max_loss = max_loss
+
+ @property
+ def mr1(self):
+ """Gets the mr1 of this MockMarginResult. # noqa: E501
+
+ Stress testing # noqa: E501
+
+ :return: The mr1 of this MockMarginResult. # noqa: E501
+ :rtype: str
+ """
+ return self._mr1
+
+ @mr1.setter
+ def mr1(self, mr1):
+ """Sets the mr1 of this MockMarginResult.
+
+ Stress testing # noqa: E501
+
+ :param mr1: The mr1 of this MockMarginResult. # noqa: E501
+ :type: str
+ """
+
+ self._mr1 = mr1
+
+ @property
+ def mr2(self):
+ """Gets the mr2 of this MockMarginResult. # noqa: E501
+
+ Basis spread risk # noqa: E501
+
+ :return: The mr2 of this MockMarginResult. # noqa: E501
+ :rtype: str
+ """
+ return self._mr2
+
+ @mr2.setter
+ def mr2(self, mr2):
+ """Sets the mr2 of this MockMarginResult.
+
+ Basis spread risk # noqa: E501
+
+ :param mr2: The mr2 of this MockMarginResult. # noqa: E501
+ :type: str
+ """
+
+ self._mr2 = mr2
+
+ @property
+ def mr3(self):
+ """Gets the mr3 of this MockMarginResult. # noqa: E501
+
+ Volatility spread risk # noqa: E501
+
+ :return: The mr3 of this MockMarginResult. # noqa: E501
+ :rtype: str
+ """
+ return self._mr3
+
+ @mr3.setter
+ def mr3(self, mr3):
+ """Sets the mr3 of this MockMarginResult.
+
+ Volatility spread risk # noqa: E501
+
+ :param mr3: The mr3 of this MockMarginResult. # noqa: E501
+ :type: str
+ """
+
+ self._mr3 = mr3
+
+ @property
+ def mr4(self):
+ """Gets the mr4 of this MockMarginResult. # noqa: E501
+
+ Option short risk # noqa: E501
+
+ :return: The mr4 of this MockMarginResult. # noqa: E501
+ :rtype: str
+ """
+ return self._mr4
+
+ @mr4.setter
+ def mr4(self, mr4):
+ """Sets the mr4 of this MockMarginResult.
+
+ Option short risk # noqa: E501
+
+ :param mr4: The mr4 of this MockMarginResult. # noqa: E501
+ :type: str
+ """
+
+ self._mr4 = mr4
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MockMarginResult):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MockMarginResult):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/mock_options_order.py b/gate_api/models/mock_options_order.py
new file mode 100644
index 0000000..7a5193c
--- /dev/null
+++ b/gate_api/models/mock_options_order.py
@@ -0,0 +1,182 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MockOptionsOrder(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'options_name': 'str',
+ 'size': 'str',
+ 'left': 'str'
+ }
+
+ attribute_map = {
+ 'options_name': 'options_name',
+ 'size': 'size',
+ 'left': 'left'
+ }
+
+ def __init__(self, options_name=None, size=None, left=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, Configuration) -> None
+ """MockOptionsOrder - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._options_name = None
+ self._size = None
+ self._left = None
+ self.discriminator = None
+
+ self.options_name = options_name
+ self.size = size
+ self.left = left
+
+ @property
+ def options_name(self):
+ """Gets the options_name of this MockOptionsOrder. # noqa: E501
+
+ Option name, currently only supports USDT options for BTC and ETH # noqa: E501
+
+ :return: The options_name of this MockOptionsOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._options_name
+
+ @options_name.setter
+ def options_name(self, options_name):
+ """Sets the options_name of this MockOptionsOrder.
+
+ Option name, currently only supports USDT options for BTC and ETH # noqa: E501
+
+ :param options_name: The options_name of this MockOptionsOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and options_name is None: # noqa: E501
+ raise ValueError("Invalid value for `options_name`, must not be `None`") # noqa: E501
+
+ self._options_name = options_name
+
+ @property
+ def size(self):
+ """Gets the size of this MockOptionsOrder. # noqa: E501
+
+ Initial order quantity, not involved in actual calculation # noqa: E501
+
+ :return: The size of this MockOptionsOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._size
+
+ @size.setter
+ def size(self, size):
+ """Sets the size of this MockOptionsOrder.
+
+ Initial order quantity, not involved in actual calculation # noqa: E501
+
+ :param size: The size of this MockOptionsOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501
+ raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501
+
+ self._size = size
+
+ @property
+ def left(self):
+ """Gets the left of this MockOptionsOrder. # noqa: E501
+
+ Unfilled contract quantity, involved in actual calculation # noqa: E501
+
+ :return: The left of this MockOptionsOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._left
+
+ @left.setter
+ def left(self, left):
+ """Sets the left of this MockOptionsOrder.
+
+ Unfilled contract quantity, involved in actual calculation # noqa: E501
+
+ :param left: The left of this MockOptionsOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and left is None: # noqa: E501
+ raise ValueError("Invalid value for `left`, must not be `None`") # noqa: E501
+
+ self._left = left
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MockOptionsOrder):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MockOptionsOrder):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/mock_options_position.py b/gate_api/models/mock_options_position.py
new file mode 100644
index 0000000..3d27436
--- /dev/null
+++ b/gate_api/models/mock_options_position.py
@@ -0,0 +1,153 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MockOptionsPosition(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'options_name': 'str',
+ 'size': 'str'
+ }
+
+ attribute_map = {
+ 'options_name': 'options_name',
+ 'size': 'size'
+ }
+
+ def __init__(self, options_name=None, size=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """MockOptionsPosition - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._options_name = None
+ self._size = None
+ self.discriminator = None
+
+ self.options_name = options_name
+ self.size = size
+
+ @property
+ def options_name(self):
+ """Gets the options_name of this MockOptionsPosition. # noqa: E501
+
+ Option name, currently only supports USDT options for BTC and ETH # noqa: E501
+
+ :return: The options_name of this MockOptionsPosition. # noqa: E501
+ :rtype: str
+ """
+ return self._options_name
+
+ @options_name.setter
+ def options_name(self, options_name):
+ """Sets the options_name of this MockOptionsPosition.
+
+ Option name, currently only supports USDT options for BTC and ETH # noqa: E501
+
+ :param options_name: The options_name of this MockOptionsPosition. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and options_name is None: # noqa: E501
+ raise ValueError("Invalid value for `options_name`, must not be `None`") # noqa: E501
+
+ self._options_name = options_name
+
+ @property
+ def size(self):
+ """Gets the size of this MockOptionsPosition. # noqa: E501
+
+ Position size, measured in contract quantity # noqa: E501
+
+ :return: The size of this MockOptionsPosition. # noqa: E501
+ :rtype: str
+ """
+ return self._size
+
+ @size.setter
+ def size(self, size):
+ """Sets the size of this MockOptionsPosition.
+
+ Position size, measured in contract quantity # noqa: E501
+
+ :param size: The size of this MockOptionsPosition. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501
+ raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501
+
+ self._size = size
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MockOptionsPosition):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MockOptionsPosition):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/mock_risk_unit.py b/gate_api/models/mock_risk_unit.py
new file mode 100644
index 0000000..7ae22d4
--- /dev/null
+++ b/gate_api/models/mock_risk_unit.py
@@ -0,0 +1,347 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MockRiskUnit(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'symbol': 'str',
+ 'spot_in_use': 'str',
+ 'maintain_margin': 'str',
+ 'initial_margin': 'str',
+ 'margin_result': 'list[MockMarginResult]',
+ 'delta': 'str',
+ 'gamma': 'str',
+ 'theta': 'str',
+ 'vega': 'str'
+ }
+
+ attribute_map = {
+ 'symbol': 'symbol',
+ 'spot_in_use': 'spot_in_use',
+ 'maintain_margin': 'maintain_margin',
+ 'initial_margin': 'initial_margin',
+ 'margin_result': 'margin_result',
+ 'delta': 'delta',
+ 'gamma': 'gamma',
+ 'theta': 'theta',
+ 'vega': 'vega'
+ }
+
+ def __init__(self, symbol=None, spot_in_use=None, maintain_margin=None, initial_margin=None, margin_result=None, delta=None, gamma=None, theta=None, vega=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, list[MockMarginResult], str, str, str, str, Configuration) -> None
+ """MockRiskUnit - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._symbol = None
+ self._spot_in_use = None
+ self._maintain_margin = None
+ self._initial_margin = None
+ self._margin_result = None
+ self._delta = None
+ self._gamma = None
+ self._theta = None
+ self._vega = None
+ self.discriminator = None
+
+ if symbol is not None:
+ self.symbol = symbol
+ if spot_in_use is not None:
+ self.spot_in_use = spot_in_use
+ if maintain_margin is not None:
+ self.maintain_margin = maintain_margin
+ if initial_margin is not None:
+ self.initial_margin = initial_margin
+ if margin_result is not None:
+ self.margin_result = margin_result
+ if delta is not None:
+ self.delta = delta
+ if gamma is not None:
+ self.gamma = gamma
+ if theta is not None:
+ self.theta = theta
+ if vega is not None:
+ self.vega = vega
+
+ @property
+ def symbol(self):
+ """Gets the symbol of this MockRiskUnit. # noqa: E501
+
+ Risk unit name # noqa: E501
+
+ :return: The symbol of this MockRiskUnit. # noqa: E501
+ :rtype: str
+ """
+ return self._symbol
+
+ @symbol.setter
+ def symbol(self, symbol):
+ """Sets the symbol of this MockRiskUnit.
+
+ Risk unit name # noqa: E501
+
+ :param symbol: The symbol of this MockRiskUnit. # noqa: E501
+ :type: str
+ """
+
+ self._symbol = symbol
+
+ @property
+ def spot_in_use(self):
+ """Gets the spot_in_use of this MockRiskUnit. # noqa: E501
+
+ Spot hedge usage # noqa: E501
+
+ :return: The spot_in_use of this MockRiskUnit. # noqa: E501
+ :rtype: str
+ """
+ return self._spot_in_use
+
+ @spot_in_use.setter
+ def spot_in_use(self, spot_in_use):
+ """Sets the spot_in_use of this MockRiskUnit.
+
+ Spot hedge usage # noqa: E501
+
+ :param spot_in_use: The spot_in_use of this MockRiskUnit. # noqa: E501
+ :type: str
+ """
+
+ self._spot_in_use = spot_in_use
+
+ @property
+ def maintain_margin(self):
+ """Gets the maintain_margin of this MockRiskUnit. # noqa: E501
+
+ Maintenance margin # noqa: E501
+
+ :return: The maintain_margin of this MockRiskUnit. # noqa: E501
+ :rtype: str
+ """
+ return self._maintain_margin
+
+ @maintain_margin.setter
+ def maintain_margin(self, maintain_margin):
+ """Sets the maintain_margin of this MockRiskUnit.
+
+ Maintenance margin # noqa: E501
+
+ :param maintain_margin: The maintain_margin of this MockRiskUnit. # noqa: E501
+ :type: str
+ """
+
+ self._maintain_margin = maintain_margin
+
+ @property
+ def initial_margin(self):
+ """Gets the initial_margin of this MockRiskUnit. # noqa: E501
+
+ Initial margin # noqa: E501
+
+ :return: The initial_margin of this MockRiskUnit. # noqa: E501
+ :rtype: str
+ """
+ return self._initial_margin
+
+ @initial_margin.setter
+ def initial_margin(self, initial_margin):
+ """Sets the initial_margin of this MockRiskUnit.
+
+ Initial margin # noqa: E501
+
+ :param initial_margin: The initial_margin of this MockRiskUnit. # noqa: E501
+ :type: str
+ """
+
+ self._initial_margin = initial_margin
+
+ @property
+ def margin_result(self):
+ """Gets the margin_result of this MockRiskUnit. # noqa: E501
+
+ Margin result # noqa: E501
+
+ :return: The margin_result of this MockRiskUnit. # noqa: E501
+ :rtype: list[MockMarginResult]
+ """
+ return self._margin_result
+
+ @margin_result.setter
+ def margin_result(self, margin_result):
+ """Sets the margin_result of this MockRiskUnit.
+
+ Margin result # noqa: E501
+
+ :param margin_result: The margin_result of this MockRiskUnit. # noqa: E501
+ :type: list[MockMarginResult]
+ """
+
+ self._margin_result = margin_result
+
+ @property
+ def delta(self):
+ """Gets the delta of this MockRiskUnit. # noqa: E501
+
+ Total Delta of risk unit # noqa: E501
+
+ :return: The delta of this MockRiskUnit. # noqa: E501
+ :rtype: str
+ """
+ return self._delta
+
+ @delta.setter
+ def delta(self, delta):
+ """Sets the delta of this MockRiskUnit.
+
+ Total Delta of risk unit # noqa: E501
+
+ :param delta: The delta of this MockRiskUnit. # noqa: E501
+ :type: str
+ """
+
+ self._delta = delta
+
+ @property
+ def gamma(self):
+ """Gets the gamma of this MockRiskUnit. # noqa: E501
+
+ Total Gamma of risk unit # noqa: E501
+
+ :return: The gamma of this MockRiskUnit. # noqa: E501
+ :rtype: str
+ """
+ return self._gamma
+
+ @gamma.setter
+ def gamma(self, gamma):
+ """Sets the gamma of this MockRiskUnit.
+
+ Total Gamma of risk unit # noqa: E501
+
+ :param gamma: The gamma of this MockRiskUnit. # noqa: E501
+ :type: str
+ """
+
+ self._gamma = gamma
+
+ @property
+ def theta(self):
+ """Gets the theta of this MockRiskUnit. # noqa: E501
+
+ Total Theta of risk unit # noqa: E501
+
+ :return: The theta of this MockRiskUnit. # noqa: E501
+ :rtype: str
+ """
+ return self._theta
+
+ @theta.setter
+ def theta(self, theta):
+ """Sets the theta of this MockRiskUnit.
+
+ Total Theta of risk unit # noqa: E501
+
+ :param theta: The theta of this MockRiskUnit. # noqa: E501
+ :type: str
+ """
+
+ self._theta = theta
+
+ @property
+ def vega(self):
+ """Gets the vega of this MockRiskUnit. # noqa: E501
+
+ Total Vega of risk unit # noqa: E501
+
+ :return: The vega of this MockRiskUnit. # noqa: E501
+ :rtype: str
+ """
+ return self._vega
+
+ @vega.setter
+ def vega(self, vega):
+ """Sets the vega of this MockRiskUnit.
+
+ Total Vega of risk unit # noqa: E501
+
+ :param vega: The vega of this MockRiskUnit. # noqa: E501
+ :type: str
+ """
+
+ self._vega = vega
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MockRiskUnit):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MockRiskUnit):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/mock_spot_balance.py b/gate_api/models/mock_spot_balance.py
new file mode 100644
index 0000000..721cf0b
--- /dev/null
+++ b/gate_api/models/mock_spot_balance.py
@@ -0,0 +1,153 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MockSpotBalance(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'equity': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'equity': 'equity'
+ }
+
+ def __init__(self, currency=None, equity=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """MockSpotBalance - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._equity = None
+ self.discriminator = None
+
+ self.currency = currency
+ self.equity = equity
+
+ @property
+ def currency(self):
+ """Gets the currency of this MockSpotBalance. # noqa: E501
+
+ Currency name # noqa: E501
+
+ :return: The currency of this MockSpotBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this MockSpotBalance.
+
+ Currency name # noqa: E501
+
+ :param currency: The currency of this MockSpotBalance. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501
+ raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501
+
+ self._currency = currency
+
+ @property
+ def equity(self):
+ """Gets the equity of this MockSpotBalance. # noqa: E501
+
+ Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports BTC and ETH # noqa: E501
+
+ :return: The equity of this MockSpotBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._equity
+
+ @equity.setter
+ def equity(self, equity):
+ """Sets the equity of this MockSpotBalance.
+
+ Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports BTC and ETH # noqa: E501
+
+ :param equity: The equity of this MockSpotBalance. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and equity is None: # noqa: E501
+ raise ValueError("Invalid value for `equity`, must not be `None`") # noqa: E501
+
+ self._equity = equity
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MockSpotBalance):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MockSpotBalance):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/mock_spot_order.py b/gate_api/models/mock_spot_order.py
new file mode 100644
index 0000000..d8f70cb
--- /dev/null
+++ b/gate_api/models/mock_spot_order.py
@@ -0,0 +1,239 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MockSpotOrder(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency_pairs': 'str',
+ 'order_price': 'str',
+ 'count': 'str',
+ 'left': 'str',
+ 'type': 'str'
+ }
+
+ attribute_map = {
+ 'currency_pairs': 'currency_pairs',
+ 'order_price': 'order_price',
+ 'count': 'count',
+ 'left': 'left',
+ 'type': 'type'
+ }
+
+ def __init__(self, currency_pairs=None, order_price=None, count=None, left=None, type=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, Configuration) -> None
+ """MockSpotOrder - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency_pairs = None
+ self._order_price = None
+ self._count = None
+ self._left = None
+ self._type = None
+ self.discriminator = None
+
+ self.currency_pairs = currency_pairs
+ self.order_price = order_price
+ if count is not None:
+ self.count = count
+ self.left = left
+ self.type = type
+
+ @property
+ def currency_pairs(self):
+ """Gets the currency_pairs of this MockSpotOrder. # noqa: E501
+
+ Market # noqa: E501
+
+ :return: The currency_pairs of this MockSpotOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._currency_pairs
+
+ @currency_pairs.setter
+ def currency_pairs(self, currency_pairs):
+ """Sets the currency_pairs of this MockSpotOrder.
+
+ Market # noqa: E501
+
+ :param currency_pairs: The currency_pairs of this MockSpotOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and currency_pairs is None: # noqa: E501
+ raise ValueError("Invalid value for `currency_pairs`, must not be `None`") # noqa: E501
+
+ self._currency_pairs = currency_pairs
+
+ @property
+ def order_price(self):
+ """Gets the order_price of this MockSpotOrder. # noqa: E501
+
+ Price # noqa: E501
+
+ :return: The order_price of this MockSpotOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._order_price
+
+ @order_price.setter
+ def order_price(self, order_price):
+ """Sets the order_price of this MockSpotOrder.
+
+ Price # noqa: E501
+
+ :param order_price: The order_price of this MockSpotOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and order_price is None: # noqa: E501
+ raise ValueError("Invalid value for `order_price`, must not be `None`") # noqa: E501
+
+ self._order_price = order_price
+
+ @property
+ def count(self):
+ """Gets the count of this MockSpotOrder. # noqa: E501
+
+ Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports BTC and ETH Currently only supports three currencies: BTC, ETH # noqa: E501
+
+ :return: The count of this MockSpotOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._count
+
+ @count.setter
+ def count(self, count):
+ """Sets the count of this MockSpotOrder.
+
+ Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports BTC and ETH Currently only supports three currencies: BTC, ETH # noqa: E501
+
+ :param count: The count of this MockSpotOrder. # noqa: E501
+ :type: str
+ """
+
+ self._count = count
+
+ @property
+ def left(self):
+ """Gets the left of this MockSpotOrder. # noqa: E501
+
+ Unfilled quantity, involved in actual calculation # noqa: E501
+
+ :return: The left of this MockSpotOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._left
+
+ @left.setter
+ def left(self, left):
+ """Sets the left of this MockSpotOrder.
+
+ Unfilled quantity, involved in actual calculation # noqa: E501
+
+ :param left: The left of this MockSpotOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and left is None: # noqa: E501
+ raise ValueError("Invalid value for `left`, must not be `None`") # noqa: E501
+
+ self._left = left
+
+ @property
+ def type(self):
+ """Gets the type of this MockSpotOrder. # noqa: E501
+
+ Order type, sell - sell order, buy - buy order # noqa: E501
+
+ :return: The type of this MockSpotOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this MockSpotOrder.
+
+ Order type, sell - sell order, buy - buy order # noqa: E501
+
+ :param type: The type of this MockSpotOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501
+ raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
+
+ self._type = type
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MockSpotOrder):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MockSpotOrder):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/multi_chain_address_item.py b/gate_api/models/multi_chain_address_item.py
index 64149d1..a18243c 100644
--- a/gate_api/models/multi_chain_address_item.py
+++ b/gate_api/models/multi_chain_address_item.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -37,7 +37,7 @@ class MultiChainAddressItem(object):
'address': 'str',
'payment_id': 'str',
'payment_name': 'str',
- 'obtain_failed': 'int',
+ 'obtain_failed': 'int'
}
attribute_map = {
@@ -45,18 +45,10 @@ class MultiChainAddressItem(object):
'address': 'address',
'payment_id': 'payment_id',
'payment_name': 'payment_name',
- 'obtain_failed': 'obtain_failed',
+ 'obtain_failed': 'obtain_failed'
}
- def __init__(
- self,
- chain=None,
- address=None,
- payment_id=None,
- payment_name=None,
- obtain_failed=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, chain=None, address=None, payment_id=None, payment_name=None, obtain_failed=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, int, Configuration) -> None
"""MultiChainAddressItem - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -203,16 +195,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/multi_collateral_currency.py b/gate_api/models/multi_collateral_currency.py
new file mode 100644
index 0000000..95e5482
--- /dev/null
+++ b/gate_api/models/multi_collateral_currency.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MultiCollateralCurrency(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'loan_currencies': 'list[MultiLoanItem]',
+ 'collateral_currencies': 'list[MultiCollateralItem]'
+ }
+
+ attribute_map = {
+ 'loan_currencies': 'loan_currencies',
+ 'collateral_currencies': 'collateral_currencies'
+ }
+
+ def __init__(self, loan_currencies=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501
+ # type: (list[MultiLoanItem], list[MultiCollateralItem], Configuration) -> None
+ """MultiCollateralCurrency - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._loan_currencies = None
+ self._collateral_currencies = None
+ self.discriminator = None
+
+ if loan_currencies is not None:
+ self.loan_currencies = loan_currencies
+ if collateral_currencies is not None:
+ self.collateral_currencies = collateral_currencies
+
+ @property
+ def loan_currencies(self):
+ """Gets the loan_currencies of this MultiCollateralCurrency. # noqa: E501
+
+ List of supported borrowing currencies # noqa: E501
+
+ :return: The loan_currencies of this MultiCollateralCurrency. # noqa: E501
+ :rtype: list[MultiLoanItem]
+ """
+ return self._loan_currencies
+
+ @loan_currencies.setter
+ def loan_currencies(self, loan_currencies):
+ """Sets the loan_currencies of this MultiCollateralCurrency.
+
+ List of supported borrowing currencies # noqa: E501
+
+ :param loan_currencies: The loan_currencies of this MultiCollateralCurrency. # noqa: E501
+ :type: list[MultiLoanItem]
+ """
+
+ self._loan_currencies = loan_currencies
+
+ @property
+ def collateral_currencies(self):
+ """Gets the collateral_currencies of this MultiCollateralCurrency. # noqa: E501
+
+ List of supported collateral currencies # noqa: E501
+
+ :return: The collateral_currencies of this MultiCollateralCurrency. # noqa: E501
+ :rtype: list[MultiCollateralItem]
+ """
+ return self._collateral_currencies
+
+ @collateral_currencies.setter
+ def collateral_currencies(self, collateral_currencies):
+ """Sets the collateral_currencies of this MultiCollateralCurrency.
+
+ List of supported collateral currencies # noqa: E501
+
+ :param collateral_currencies: The collateral_currencies of this MultiCollateralCurrency. # noqa: E501
+ :type: list[MultiCollateralItem]
+ """
+
+ self._collateral_currencies = collateral_currencies
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MultiCollateralCurrency):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MultiCollateralCurrency):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/multi_collateral_item.py b/gate_api/models/multi_collateral_item.py
new file mode 100644
index 0000000..82cd1e4
--- /dev/null
+++ b/gate_api/models/multi_collateral_item.py
@@ -0,0 +1,179 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MultiCollateralItem(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'index_price': 'str',
+ 'discount': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'index_price': 'index_price',
+ 'discount': 'discount'
+ }
+
+ def __init__(self, currency=None, index_price=None, discount=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, Configuration) -> None
+ """MultiCollateralItem - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._index_price = None
+ self._discount = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if index_price is not None:
+ self.index_price = index_price
+ if discount is not None:
+ self.discount = discount
+
+ @property
+ def currency(self):
+ """Gets the currency of this MultiCollateralItem. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this MultiCollateralItem. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this MultiCollateralItem.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this MultiCollateralItem. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def index_price(self):
+ """Gets the index_price of this MultiCollateralItem. # noqa: E501
+
+ Currency Index Price # noqa: E501
+
+ :return: The index_price of this MultiCollateralItem. # noqa: E501
+ :rtype: str
+ """
+ return self._index_price
+
+ @index_price.setter
+ def index_price(self, index_price):
+ """Sets the index_price of this MultiCollateralItem.
+
+ Currency Index Price # noqa: E501
+
+ :param index_price: The index_price of this MultiCollateralItem. # noqa: E501
+ :type: str
+ """
+
+ self._index_price = index_price
+
+ @property
+ def discount(self):
+ """Gets the discount of this MultiCollateralItem. # noqa: E501
+
+ Discount # noqa: E501
+
+ :return: The discount of this MultiCollateralItem. # noqa: E501
+ :rtype: str
+ """
+ return self._discount
+
+ @discount.setter
+ def discount(self, discount):
+ """Sets the discount of this MultiCollateralItem.
+
+ Discount # noqa: E501
+
+ :param discount: The discount of this MultiCollateralItem. # noqa: E501
+ :type: str
+ """
+
+ self._discount = discount
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MultiCollateralItem):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MultiCollateralItem):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/multi_collateral_order.py b/gate_api/models/multi_collateral_order.py
new file mode 100644
index 0000000..24365fa
--- /dev/null
+++ b/gate_api/models/multi_collateral_order.py
@@ -0,0 +1,487 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MultiCollateralOrder(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'order_id': 'str',
+ 'order_type': 'str',
+ 'fixed_type': 'str',
+ 'fixed_rate': 'str',
+ 'expire_time': 'int',
+ 'auto_renew': 'bool',
+ 'auto_repay': 'bool',
+ 'current_ltv': 'str',
+ 'status': 'str',
+ 'borrow_time': 'int',
+ 'total_left_repay_usdt': 'str',
+ 'total_left_collateral_usdt': 'str',
+ 'borrow_currencies': 'list[BorrowCurrencyInfo]',
+ 'collateral_currencies': 'list[CollateralCurrencyInfo]'
+ }
+
+ attribute_map = {
+ 'order_id': 'order_id',
+ 'order_type': 'order_type',
+ 'fixed_type': 'fixed_type',
+ 'fixed_rate': 'fixed_rate',
+ 'expire_time': 'expire_time',
+ 'auto_renew': 'auto_renew',
+ 'auto_repay': 'auto_repay',
+ 'current_ltv': 'current_ltv',
+ 'status': 'status',
+ 'borrow_time': 'borrow_time',
+ 'total_left_repay_usdt': 'total_left_repay_usdt',
+ 'total_left_collateral_usdt': 'total_left_collateral_usdt',
+ 'borrow_currencies': 'borrow_currencies',
+ 'collateral_currencies': 'collateral_currencies'
+ }
+
+ def __init__(self, order_id=None, order_type=None, fixed_type=None, fixed_rate=None, expire_time=None, auto_renew=None, auto_repay=None, current_ltv=None, status=None, borrow_time=None, total_left_repay_usdt=None, total_left_collateral_usdt=None, borrow_currencies=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, int, bool, bool, str, str, int, str, str, list[BorrowCurrencyInfo], list[CollateralCurrencyInfo], Configuration) -> None
+ """MultiCollateralOrder - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._order_id = None
+ self._order_type = None
+ self._fixed_type = None
+ self._fixed_rate = None
+ self._expire_time = None
+ self._auto_renew = None
+ self._auto_repay = None
+ self._current_ltv = None
+ self._status = None
+ self._borrow_time = None
+ self._total_left_repay_usdt = None
+ self._total_left_collateral_usdt = None
+ self._borrow_currencies = None
+ self._collateral_currencies = None
+ self.discriminator = None
+
+ if order_id is not None:
+ self.order_id = order_id
+ if order_type is not None:
+ self.order_type = order_type
+ if fixed_type is not None:
+ self.fixed_type = fixed_type
+ if fixed_rate is not None:
+ self.fixed_rate = fixed_rate
+ if expire_time is not None:
+ self.expire_time = expire_time
+ if auto_renew is not None:
+ self.auto_renew = auto_renew
+ if auto_repay is not None:
+ self.auto_repay = auto_repay
+ if current_ltv is not None:
+ self.current_ltv = current_ltv
+ if status is not None:
+ self.status = status
+ if borrow_time is not None:
+ self.borrow_time = borrow_time
+ if total_left_repay_usdt is not None:
+ self.total_left_repay_usdt = total_left_repay_usdt
+ if total_left_collateral_usdt is not None:
+ self.total_left_collateral_usdt = total_left_collateral_usdt
+ if borrow_currencies is not None:
+ self.borrow_currencies = borrow_currencies
+ if collateral_currencies is not None:
+ self.collateral_currencies = collateral_currencies
+
+ @property
+ def order_id(self):
+ """Gets the order_id of this MultiCollateralOrder. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The order_id of this MultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._order_id
+
+ @order_id.setter
+ def order_id(self, order_id):
+ """Sets the order_id of this MultiCollateralOrder.
+
+ Order ID # noqa: E501
+
+ :param order_id: The order_id of this MultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+
+ self._order_id = order_id
+
+ @property
+ def order_type(self):
+ """Gets the order_type of this MultiCollateralOrder. # noqa: E501
+
+ current - current, fixed - fixed # noqa: E501
+
+ :return: The order_type of this MultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._order_type
+
+ @order_type.setter
+ def order_type(self, order_type):
+ """Sets the order_type of this MultiCollateralOrder.
+
+ current - current, fixed - fixed # noqa: E501
+
+ :param order_type: The order_type of this MultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+
+ self._order_type = order_type
+
+ @property
+ def fixed_type(self):
+ """Gets the fixed_type of this MultiCollateralOrder. # noqa: E501
+
+ Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days # noqa: E501
+
+ :return: The fixed_type of this MultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._fixed_type
+
+ @fixed_type.setter
+ def fixed_type(self, fixed_type):
+ """Sets the fixed_type of this MultiCollateralOrder.
+
+ Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days # noqa: E501
+
+ :param fixed_type: The fixed_type of this MultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+
+ self._fixed_type = fixed_type
+
+ @property
+ def fixed_rate(self):
+ """Gets the fixed_rate of this MultiCollateralOrder. # noqa: E501
+
+ Fixed interest rate # noqa: E501
+
+ :return: The fixed_rate of this MultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._fixed_rate
+
+ @fixed_rate.setter
+ def fixed_rate(self, fixed_rate):
+ """Sets the fixed_rate of this MultiCollateralOrder.
+
+ Fixed interest rate # noqa: E501
+
+ :param fixed_rate: The fixed_rate of this MultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+
+ self._fixed_rate = fixed_rate
+
+ @property
+ def expire_time(self):
+ """Gets the expire_time of this MultiCollateralOrder. # noqa: E501
+
+ Expiration time, timestamp, unit in seconds # noqa: E501
+
+ :return: The expire_time of this MultiCollateralOrder. # noqa: E501
+ :rtype: int
+ """
+ return self._expire_time
+
+ @expire_time.setter
+ def expire_time(self, expire_time):
+ """Sets the expire_time of this MultiCollateralOrder.
+
+ Expiration time, timestamp, unit in seconds # noqa: E501
+
+ :param expire_time: The expire_time of this MultiCollateralOrder. # noqa: E501
+ :type: int
+ """
+
+ self._expire_time = expire_time
+
+ @property
+ def auto_renew(self):
+ """Gets the auto_renew of this MultiCollateralOrder. # noqa: E501
+
+ Fixed interest rate, auto-renewal # noqa: E501
+
+ :return: The auto_renew of this MultiCollateralOrder. # noqa: E501
+ :rtype: bool
+ """
+ return self._auto_renew
+
+ @auto_renew.setter
+ def auto_renew(self, auto_renew):
+ """Sets the auto_renew of this MultiCollateralOrder.
+
+ Fixed interest rate, auto-renewal # noqa: E501
+
+ :param auto_renew: The auto_renew of this MultiCollateralOrder. # noqa: E501
+ :type: bool
+ """
+
+ self._auto_renew = auto_renew
+
+ @property
+ def auto_repay(self):
+ """Gets the auto_repay of this MultiCollateralOrder. # noqa: E501
+
+ Fixed interest rate, auto-repayment # noqa: E501
+
+ :return: The auto_repay of this MultiCollateralOrder. # noqa: E501
+ :rtype: bool
+ """
+ return self._auto_repay
+
+ @auto_repay.setter
+ def auto_repay(self, auto_repay):
+ """Sets the auto_repay of this MultiCollateralOrder.
+
+ Fixed interest rate, auto-repayment # noqa: E501
+
+ :param auto_repay: The auto_repay of this MultiCollateralOrder. # noqa: E501
+ :type: bool
+ """
+
+ self._auto_repay = auto_repay
+
+ @property
+ def current_ltv(self):
+ """Gets the current_ltv of this MultiCollateralOrder. # noqa: E501
+
+ Current collateralization rate # noqa: E501
+
+ :return: The current_ltv of this MultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._current_ltv
+
+ @current_ltv.setter
+ def current_ltv(self, current_ltv):
+ """Sets the current_ltv of this MultiCollateralOrder.
+
+ Current collateralization rate # noqa: E501
+
+ :param current_ltv: The current_ltv of this MultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+
+ self._current_ltv = current_ltv
+
+ @property
+ def status(self):
+ """Gets the status of this MultiCollateralOrder. # noqa: E501
+
+ Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed # noqa: E501
+
+ :return: The status of this MultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this MultiCollateralOrder.
+
+ Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed # noqa: E501
+
+ :param status: The status of this MultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+
+ self._status = status
+
+ @property
+ def borrow_time(self):
+ """Gets the borrow_time of this MultiCollateralOrder. # noqa: E501
+
+ Borrowing time, timestamp in seconds # noqa: E501
+
+ :return: The borrow_time of this MultiCollateralOrder. # noqa: E501
+ :rtype: int
+ """
+ return self._borrow_time
+
+ @borrow_time.setter
+ def borrow_time(self, borrow_time):
+ """Sets the borrow_time of this MultiCollateralOrder.
+
+ Borrowing time, timestamp in seconds # noqa: E501
+
+ :param borrow_time: The borrow_time of this MultiCollateralOrder. # noqa: E501
+ :type: int
+ """
+
+ self._borrow_time = borrow_time
+
+ @property
+ def total_left_repay_usdt(self):
+ """Gets the total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501
+
+ Total outstanding value converted to USDT # noqa: E501
+
+ :return: The total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._total_left_repay_usdt
+
+ @total_left_repay_usdt.setter
+ def total_left_repay_usdt(self, total_left_repay_usdt):
+ """Sets the total_left_repay_usdt of this MultiCollateralOrder.
+
+ Total outstanding value converted to USDT # noqa: E501
+
+ :param total_left_repay_usdt: The total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+
+ self._total_left_repay_usdt = total_left_repay_usdt
+
+ @property
+ def total_left_collateral_usdt(self):
+ """Gets the total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501
+
+ Total collateral value converted to USDT # noqa: E501
+
+ :return: The total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._total_left_collateral_usdt
+
+ @total_left_collateral_usdt.setter
+ def total_left_collateral_usdt(self, total_left_collateral_usdt):
+ """Sets the total_left_collateral_usdt of this MultiCollateralOrder.
+
+ Total collateral value converted to USDT # noqa: E501
+
+ :param total_left_collateral_usdt: The total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501
+ :type: str
+ """
+
+ self._total_left_collateral_usdt = total_left_collateral_usdt
+
+ @property
+ def borrow_currencies(self):
+ """Gets the borrow_currencies of this MultiCollateralOrder. # noqa: E501
+
+ Borrowing Currency List # noqa: E501
+
+ :return: The borrow_currencies of this MultiCollateralOrder. # noqa: E501
+ :rtype: list[BorrowCurrencyInfo]
+ """
+ return self._borrow_currencies
+
+ @borrow_currencies.setter
+ def borrow_currencies(self, borrow_currencies):
+ """Sets the borrow_currencies of this MultiCollateralOrder.
+
+ Borrowing Currency List # noqa: E501
+
+ :param borrow_currencies: The borrow_currencies of this MultiCollateralOrder. # noqa: E501
+ :type: list[BorrowCurrencyInfo]
+ """
+
+ self._borrow_currencies = borrow_currencies
+
+ @property
+ def collateral_currencies(self):
+ """Gets the collateral_currencies of this MultiCollateralOrder. # noqa: E501
+
+ Collateral Currency List # noqa: E501
+
+ :return: The collateral_currencies of this MultiCollateralOrder. # noqa: E501
+ :rtype: list[CollateralCurrencyInfo]
+ """
+ return self._collateral_currencies
+
+ @collateral_currencies.setter
+ def collateral_currencies(self, collateral_currencies):
+ """Sets the collateral_currencies of this MultiCollateralOrder.
+
+ Collateral Currency List # noqa: E501
+
+ :param collateral_currencies: The collateral_currencies of this MultiCollateralOrder. # noqa: E501
+ :type: list[CollateralCurrencyInfo]
+ """
+
+ self._collateral_currencies = collateral_currencies
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MultiCollateralOrder):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MultiCollateralOrder):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/multi_collateral_record.py b/gate_api/models/multi_collateral_record.py
new file mode 100644
index 0000000..a4bb4a3
--- /dev/null
+++ b/gate_api/models/multi_collateral_record.py
@@ -0,0 +1,291 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MultiCollateralRecord(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'order_id': 'int',
+ 'record_id': 'int',
+ 'before_ltv': 'str',
+ 'after_ltv': 'str',
+ 'operate_time': 'int',
+ 'borrow_currencies': 'list[MultiCollateralRecordCurrency]',
+ 'collateral_currencies': 'list[MultiCollateralRecordCurrency]'
+ }
+
+ attribute_map = {
+ 'order_id': 'order_id',
+ 'record_id': 'record_id',
+ 'before_ltv': 'before_ltv',
+ 'after_ltv': 'after_ltv',
+ 'operate_time': 'operate_time',
+ 'borrow_currencies': 'borrow_currencies',
+ 'collateral_currencies': 'collateral_currencies'
+ }
+
+ def __init__(self, order_id=None, record_id=None, before_ltv=None, after_ltv=None, operate_time=None, borrow_currencies=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, int, str, str, int, list[MultiCollateralRecordCurrency], list[MultiCollateralRecordCurrency], Configuration) -> None
+ """MultiCollateralRecord - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._order_id = None
+ self._record_id = None
+ self._before_ltv = None
+ self._after_ltv = None
+ self._operate_time = None
+ self._borrow_currencies = None
+ self._collateral_currencies = None
+ self.discriminator = None
+
+ if order_id is not None:
+ self.order_id = order_id
+ if record_id is not None:
+ self.record_id = record_id
+ if before_ltv is not None:
+ self.before_ltv = before_ltv
+ if after_ltv is not None:
+ self.after_ltv = after_ltv
+ if operate_time is not None:
+ self.operate_time = operate_time
+ if borrow_currencies is not None:
+ self.borrow_currencies = borrow_currencies
+ if collateral_currencies is not None:
+ self.collateral_currencies = collateral_currencies
+
+ @property
+ def order_id(self):
+ """Gets the order_id of this MultiCollateralRecord. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The order_id of this MultiCollateralRecord. # noqa: E501
+ :rtype: int
+ """
+ return self._order_id
+
+ @order_id.setter
+ def order_id(self, order_id):
+ """Sets the order_id of this MultiCollateralRecord.
+
+ Order ID # noqa: E501
+
+ :param order_id: The order_id of this MultiCollateralRecord. # noqa: E501
+ :type: int
+ """
+
+ self._order_id = order_id
+
+ @property
+ def record_id(self):
+ """Gets the record_id of this MultiCollateralRecord. # noqa: E501
+
+ Collateral record ID # noqa: E501
+
+ :return: The record_id of this MultiCollateralRecord. # noqa: E501
+ :rtype: int
+ """
+ return self._record_id
+
+ @record_id.setter
+ def record_id(self, record_id):
+ """Sets the record_id of this MultiCollateralRecord.
+
+ Collateral record ID # noqa: E501
+
+ :param record_id: The record_id of this MultiCollateralRecord. # noqa: E501
+ :type: int
+ """
+
+ self._record_id = record_id
+
+ @property
+ def before_ltv(self):
+ """Gets the before_ltv of this MultiCollateralRecord. # noqa: E501
+
+ Collateral ratio before adjustment # noqa: E501
+
+ :return: The before_ltv of this MultiCollateralRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._before_ltv
+
+ @before_ltv.setter
+ def before_ltv(self, before_ltv):
+ """Sets the before_ltv of this MultiCollateralRecord.
+
+ Collateral ratio before adjustment # noqa: E501
+
+ :param before_ltv: The before_ltv of this MultiCollateralRecord. # noqa: E501
+ :type: str
+ """
+
+ self._before_ltv = before_ltv
+
+ @property
+ def after_ltv(self):
+ """Gets the after_ltv of this MultiCollateralRecord. # noqa: E501
+
+ Collateral ratio before adjustment # noqa: E501
+
+ :return: The after_ltv of this MultiCollateralRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._after_ltv
+
+ @after_ltv.setter
+ def after_ltv(self, after_ltv):
+ """Sets the after_ltv of this MultiCollateralRecord.
+
+ Collateral ratio before adjustment # noqa: E501
+
+ :param after_ltv: The after_ltv of this MultiCollateralRecord. # noqa: E501
+ :type: str
+ """
+
+ self._after_ltv = after_ltv
+
+ @property
+ def operate_time(self):
+ """Gets the operate_time of this MultiCollateralRecord. # noqa: E501
+
+ Operation time, timestamp in seconds # noqa: E501
+
+ :return: The operate_time of this MultiCollateralRecord. # noqa: E501
+ :rtype: int
+ """
+ return self._operate_time
+
+ @operate_time.setter
+ def operate_time(self, operate_time):
+ """Sets the operate_time of this MultiCollateralRecord.
+
+ Operation time, timestamp in seconds # noqa: E501
+
+ :param operate_time: The operate_time of this MultiCollateralRecord. # noqa: E501
+ :type: int
+ """
+
+ self._operate_time = operate_time
+
+ @property
+ def borrow_currencies(self):
+ """Gets the borrow_currencies of this MultiCollateralRecord. # noqa: E501
+
+ Borrowing Currency List # noqa: E501
+
+ :return: The borrow_currencies of this MultiCollateralRecord. # noqa: E501
+ :rtype: list[MultiCollateralRecordCurrency]
+ """
+ return self._borrow_currencies
+
+ @borrow_currencies.setter
+ def borrow_currencies(self, borrow_currencies):
+ """Sets the borrow_currencies of this MultiCollateralRecord.
+
+ Borrowing Currency List # noqa: E501
+
+ :param borrow_currencies: The borrow_currencies of this MultiCollateralRecord. # noqa: E501
+ :type: list[MultiCollateralRecordCurrency]
+ """
+
+ self._borrow_currencies = borrow_currencies
+
+ @property
+ def collateral_currencies(self):
+ """Gets the collateral_currencies of this MultiCollateralRecord. # noqa: E501
+
+ Collateral Currency List # noqa: E501
+
+ :return: The collateral_currencies of this MultiCollateralRecord. # noqa: E501
+ :rtype: list[MultiCollateralRecordCurrency]
+ """
+ return self._collateral_currencies
+
+ @collateral_currencies.setter
+ def collateral_currencies(self, collateral_currencies):
+ """Sets the collateral_currencies of this MultiCollateralRecord.
+
+ Collateral Currency List # noqa: E501
+
+ :param collateral_currencies: The collateral_currencies of this MultiCollateralRecord. # noqa: E501
+ :type: list[MultiCollateralRecordCurrency]
+ """
+
+ self._collateral_currencies = collateral_currencies
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MultiCollateralRecord):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MultiCollateralRecord):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/multi_collateral_record_currency.py b/gate_api/models/multi_collateral_record_currency.py
new file mode 100644
index 0000000..c585d49
--- /dev/null
+++ b/gate_api/models/multi_collateral_record_currency.py
@@ -0,0 +1,263 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MultiCollateralRecordCurrency(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'index_price': 'str',
+ 'before_amount': 'str',
+ 'before_amount_usdt': 'str',
+ 'after_amount': 'str',
+ 'after_amount_usdt': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'index_price': 'index_price',
+ 'before_amount': 'before_amount',
+ 'before_amount_usdt': 'before_amount_usdt',
+ 'after_amount': 'after_amount',
+ 'after_amount_usdt': 'after_amount_usdt'
+ }
+
+ def __init__(self, currency=None, index_price=None, before_amount=None, before_amount_usdt=None, after_amount=None, after_amount_usdt=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, Configuration) -> None
+ """MultiCollateralRecordCurrency - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._index_price = None
+ self._before_amount = None
+ self._before_amount_usdt = None
+ self._after_amount = None
+ self._after_amount_usdt = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if index_price is not None:
+ self.index_price = index_price
+ if before_amount is not None:
+ self.before_amount = before_amount
+ if before_amount_usdt is not None:
+ self.before_amount_usdt = before_amount_usdt
+ if after_amount is not None:
+ self.after_amount = after_amount
+ if after_amount_usdt is not None:
+ self.after_amount_usdt = after_amount_usdt
+
+ @property
+ def currency(self):
+ """Gets the currency of this MultiCollateralRecordCurrency. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this MultiCollateralRecordCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this MultiCollateralRecordCurrency.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this MultiCollateralRecordCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def index_price(self):
+ """Gets the index_price of this MultiCollateralRecordCurrency. # noqa: E501
+
+ Currency Index Price # noqa: E501
+
+ :return: The index_price of this MultiCollateralRecordCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._index_price
+
+ @index_price.setter
+ def index_price(self, index_price):
+ """Sets the index_price of this MultiCollateralRecordCurrency.
+
+ Currency Index Price # noqa: E501
+
+ :param index_price: The index_price of this MultiCollateralRecordCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._index_price = index_price
+
+ @property
+ def before_amount(self):
+ """Gets the before_amount of this MultiCollateralRecordCurrency. # noqa: E501
+
+ Amount before the operation # noqa: E501
+
+ :return: The before_amount of this MultiCollateralRecordCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._before_amount
+
+ @before_amount.setter
+ def before_amount(self, before_amount):
+ """Sets the before_amount of this MultiCollateralRecordCurrency.
+
+ Amount before the operation # noqa: E501
+
+ :param before_amount: The before_amount of this MultiCollateralRecordCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._before_amount = before_amount
+
+ @property
+ def before_amount_usdt(self):
+ """Gets the before_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501
+
+ USDT Amount before the operation # noqa: E501
+
+ :return: The before_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._before_amount_usdt
+
+ @before_amount_usdt.setter
+ def before_amount_usdt(self, before_amount_usdt):
+ """Sets the before_amount_usdt of this MultiCollateralRecordCurrency.
+
+ USDT Amount before the operation # noqa: E501
+
+ :param before_amount_usdt: The before_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._before_amount_usdt = before_amount_usdt
+
+ @property
+ def after_amount(self):
+ """Gets the after_amount of this MultiCollateralRecordCurrency. # noqa: E501
+
+ Amount after the operation # noqa: E501
+
+ :return: The after_amount of this MultiCollateralRecordCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._after_amount
+
+ @after_amount.setter
+ def after_amount(self, after_amount):
+ """Sets the after_amount of this MultiCollateralRecordCurrency.
+
+ Amount after the operation # noqa: E501
+
+ :param after_amount: The after_amount of this MultiCollateralRecordCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._after_amount = after_amount
+
+ @property
+ def after_amount_usdt(self):
+ """Gets the after_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501
+
+ USDT Amount after the operation # noqa: E501
+
+ :return: The after_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._after_amount_usdt
+
+ @after_amount_usdt.setter
+ def after_amount_usdt(self, after_amount_usdt):
+ """Sets the after_amount_usdt of this MultiCollateralRecordCurrency.
+
+ USDT Amount after the operation # noqa: E501
+
+ :param after_amount_usdt: The after_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._after_amount_usdt = after_amount_usdt
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MultiCollateralRecordCurrency):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MultiCollateralRecordCurrency):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/multi_loan_item.py b/gate_api/models/multi_loan_item.py
new file mode 100644
index 0000000..02c2dd5
--- /dev/null
+++ b/gate_api/models/multi_loan_item.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MultiLoanItem(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'price': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'price': 'price'
+ }
+
+ def __init__(self, currency=None, price=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """MultiLoanItem - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._price = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if price is not None:
+ self.price = price
+
+ @property
+ def currency(self):
+ """Gets the currency of this MultiLoanItem. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this MultiLoanItem. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this MultiLoanItem.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this MultiLoanItem. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def price(self):
+ """Gets the price of this MultiLoanItem. # noqa: E501
+
+ Latest price of the currency # noqa: E501
+
+ :return: The price of this MultiLoanItem. # noqa: E501
+ :rtype: str
+ """
+ return self._price
+
+ @price.setter
+ def price(self, price):
+ """Sets the price of this MultiLoanItem.
+
+ Latest price of the currency # noqa: E501
+
+ :param price: The price of this MultiLoanItem. # noqa: E501
+ :type: str
+ """
+
+ self._price = price
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MultiLoanItem):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MultiLoanItem):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/multi_loan_repay_item.py b/gate_api/models/multi_loan_repay_item.py
new file mode 100644
index 0000000..40d09f8
--- /dev/null
+++ b/gate_api/models/multi_loan_repay_item.py
@@ -0,0 +1,180 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MultiLoanRepayItem(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'amount': 'str',
+ 'repaid_all': 'bool'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'amount': 'amount',
+ 'repaid_all': 'repaid_all'
+ }
+
+ def __init__(self, currency=None, amount=None, repaid_all=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, bool, Configuration) -> None
+ """MultiLoanRepayItem - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._amount = None
+ self._repaid_all = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if amount is not None:
+ self.amount = amount
+ self.repaid_all = repaid_all
+
+ @property
+ def currency(self):
+ """Gets the currency of this MultiLoanRepayItem. # noqa: E501
+
+ Repayment currency # noqa: E501
+
+ :return: The currency of this MultiLoanRepayItem. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this MultiLoanRepayItem.
+
+ Repayment currency # noqa: E501
+
+ :param currency: The currency of this MultiLoanRepayItem. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def amount(self):
+ """Gets the amount of this MultiLoanRepayItem. # noqa: E501
+
+ Size # noqa: E501
+
+ :return: The amount of this MultiLoanRepayItem. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this MultiLoanRepayItem.
+
+ Size # noqa: E501
+
+ :param amount: The amount of this MultiLoanRepayItem. # noqa: E501
+ :type: str
+ """
+
+ self._amount = amount
+
+ @property
+ def repaid_all(self):
+ """Gets the repaid_all of this MultiLoanRepayItem. # noqa: E501
+
+ Repayment method, set to true for full repayment, false for partial repayment # noqa: E501
+
+ :return: The repaid_all of this MultiLoanRepayItem. # noqa: E501
+ :rtype: bool
+ """
+ return self._repaid_all
+
+ @repaid_all.setter
+ def repaid_all(self, repaid_all):
+ """Sets the repaid_all of this MultiLoanRepayItem.
+
+ Repayment method, set to true for full repayment, false for partial repayment # noqa: E501
+
+ :param repaid_all: The repaid_all of this MultiLoanRepayItem. # noqa: E501
+ :type: bool
+ """
+ if self.local_vars_configuration.client_side_validation and repaid_all is None: # noqa: E501
+ raise ValueError("Invalid value for `repaid_all`, must not be `None`") # noqa: E501
+
+ self._repaid_all = repaid_all
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MultiLoanRepayItem):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MultiLoanRepayItem):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/multi_repay_record.py b/gate_api/models/multi_repay_record.py
new file mode 100644
index 0000000..82e18fc
--- /dev/null
+++ b/gate_api/models/multi_repay_record.py
@@ -0,0 +1,431 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MultiRepayRecord(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'order_id': 'int',
+ 'record_id': 'int',
+ 'init_ltv': 'str',
+ 'before_ltv': 'str',
+ 'after_ltv': 'str',
+ 'borrow_time': 'int',
+ 'repay_time': 'int',
+ 'borrow_currencies': 'list[RepayRecordCurrency]',
+ 'collateral_currencies': 'list[RepayRecordCurrency]',
+ 'repaid_currencies': 'list[RepayRecordRepaidCurrency]',
+ 'total_interest_list': 'list[RepayRecordTotalInterest]',
+ 'left_repay_interest_list': 'list[RepayRecordLeftInterest]'
+ }
+
+ attribute_map = {
+ 'order_id': 'order_id',
+ 'record_id': 'record_id',
+ 'init_ltv': 'init_ltv',
+ 'before_ltv': 'before_ltv',
+ 'after_ltv': 'after_ltv',
+ 'borrow_time': 'borrow_time',
+ 'repay_time': 'repay_time',
+ 'borrow_currencies': 'borrow_currencies',
+ 'collateral_currencies': 'collateral_currencies',
+ 'repaid_currencies': 'repaid_currencies',
+ 'total_interest_list': 'total_interest_list',
+ 'left_repay_interest_list': 'left_repay_interest_list'
+ }
+
+ def __init__(self, order_id=None, record_id=None, init_ltv=None, before_ltv=None, after_ltv=None, borrow_time=None, repay_time=None, borrow_currencies=None, collateral_currencies=None, repaid_currencies=None, total_interest_list=None, left_repay_interest_list=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, int, str, str, str, int, int, list[RepayRecordCurrency], list[RepayRecordCurrency], list[RepayRecordRepaidCurrency], list[RepayRecordTotalInterest], list[RepayRecordLeftInterest], Configuration) -> None
+ """MultiRepayRecord - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._order_id = None
+ self._record_id = None
+ self._init_ltv = None
+ self._before_ltv = None
+ self._after_ltv = None
+ self._borrow_time = None
+ self._repay_time = None
+ self._borrow_currencies = None
+ self._collateral_currencies = None
+ self._repaid_currencies = None
+ self._total_interest_list = None
+ self._left_repay_interest_list = None
+ self.discriminator = None
+
+ if order_id is not None:
+ self.order_id = order_id
+ if record_id is not None:
+ self.record_id = record_id
+ if init_ltv is not None:
+ self.init_ltv = init_ltv
+ if before_ltv is not None:
+ self.before_ltv = before_ltv
+ if after_ltv is not None:
+ self.after_ltv = after_ltv
+ if borrow_time is not None:
+ self.borrow_time = borrow_time
+ if repay_time is not None:
+ self.repay_time = repay_time
+ if borrow_currencies is not None:
+ self.borrow_currencies = borrow_currencies
+ if collateral_currencies is not None:
+ self.collateral_currencies = collateral_currencies
+ if repaid_currencies is not None:
+ self.repaid_currencies = repaid_currencies
+ if total_interest_list is not None:
+ self.total_interest_list = total_interest_list
+ if left_repay_interest_list is not None:
+ self.left_repay_interest_list = left_repay_interest_list
+
+ @property
+ def order_id(self):
+ """Gets the order_id of this MultiRepayRecord. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The order_id of this MultiRepayRecord. # noqa: E501
+ :rtype: int
+ """
+ return self._order_id
+
+ @order_id.setter
+ def order_id(self, order_id):
+ """Sets the order_id of this MultiRepayRecord.
+
+ Order ID # noqa: E501
+
+ :param order_id: The order_id of this MultiRepayRecord. # noqa: E501
+ :type: int
+ """
+
+ self._order_id = order_id
+
+ @property
+ def record_id(self):
+ """Gets the record_id of this MultiRepayRecord. # noqa: E501
+
+ Repayment record ID # noqa: E501
+
+ :return: The record_id of this MultiRepayRecord. # noqa: E501
+ :rtype: int
+ """
+ return self._record_id
+
+ @record_id.setter
+ def record_id(self, record_id):
+ """Sets the record_id of this MultiRepayRecord.
+
+ Repayment record ID # noqa: E501
+
+ :param record_id: The record_id of this MultiRepayRecord. # noqa: E501
+ :type: int
+ """
+
+ self._record_id = record_id
+
+ @property
+ def init_ltv(self):
+ """Gets the init_ltv of this MultiRepayRecord. # noqa: E501
+
+ Initial collateralization rate # noqa: E501
+
+ :return: The init_ltv of this MultiRepayRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._init_ltv
+
+ @init_ltv.setter
+ def init_ltv(self, init_ltv):
+ """Sets the init_ltv of this MultiRepayRecord.
+
+ Initial collateralization rate # noqa: E501
+
+ :param init_ltv: The init_ltv of this MultiRepayRecord. # noqa: E501
+ :type: str
+ """
+
+ self._init_ltv = init_ltv
+
+ @property
+ def before_ltv(self):
+ """Gets the before_ltv of this MultiRepayRecord. # noqa: E501
+
+ Ltv before the operation # noqa: E501
+
+ :return: The before_ltv of this MultiRepayRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._before_ltv
+
+ @before_ltv.setter
+ def before_ltv(self, before_ltv):
+ """Sets the before_ltv of this MultiRepayRecord.
+
+ Ltv before the operation # noqa: E501
+
+ :param before_ltv: The before_ltv of this MultiRepayRecord. # noqa: E501
+ :type: str
+ """
+
+ self._before_ltv = before_ltv
+
+ @property
+ def after_ltv(self):
+ """Gets the after_ltv of this MultiRepayRecord. # noqa: E501
+
+ Ltv after the operation # noqa: E501
+
+ :return: The after_ltv of this MultiRepayRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._after_ltv
+
+ @after_ltv.setter
+ def after_ltv(self, after_ltv):
+ """Sets the after_ltv of this MultiRepayRecord.
+
+ Ltv after the operation # noqa: E501
+
+ :param after_ltv: The after_ltv of this MultiRepayRecord. # noqa: E501
+ :type: str
+ """
+
+ self._after_ltv = after_ltv
+
+ @property
+ def borrow_time(self):
+ """Gets the borrow_time of this MultiRepayRecord. # noqa: E501
+
+ Borrowing time, timestamp in seconds # noqa: E501
+
+ :return: The borrow_time of this MultiRepayRecord. # noqa: E501
+ :rtype: int
+ """
+ return self._borrow_time
+
+ @borrow_time.setter
+ def borrow_time(self, borrow_time):
+ """Sets the borrow_time of this MultiRepayRecord.
+
+ Borrowing time, timestamp in seconds # noqa: E501
+
+ :param borrow_time: The borrow_time of this MultiRepayRecord. # noqa: E501
+ :type: int
+ """
+
+ self._borrow_time = borrow_time
+
+ @property
+ def repay_time(self):
+ """Gets the repay_time of this MultiRepayRecord. # noqa: E501
+
+ Repayment time, timestamp in seconds # noqa: E501
+
+ :return: The repay_time of this MultiRepayRecord. # noqa: E501
+ :rtype: int
+ """
+ return self._repay_time
+
+ @repay_time.setter
+ def repay_time(self, repay_time):
+ """Sets the repay_time of this MultiRepayRecord.
+
+ Repayment time, timestamp in seconds # noqa: E501
+
+ :param repay_time: The repay_time of this MultiRepayRecord. # noqa: E501
+ :type: int
+ """
+
+ self._repay_time = repay_time
+
+ @property
+ def borrow_currencies(self):
+ """Gets the borrow_currencies of this MultiRepayRecord. # noqa: E501
+
+ List of borrowing information # noqa: E501
+
+ :return: The borrow_currencies of this MultiRepayRecord. # noqa: E501
+ :rtype: list[RepayRecordCurrency]
+ """
+ return self._borrow_currencies
+
+ @borrow_currencies.setter
+ def borrow_currencies(self, borrow_currencies):
+ """Sets the borrow_currencies of this MultiRepayRecord.
+
+ List of borrowing information # noqa: E501
+
+ :param borrow_currencies: The borrow_currencies of this MultiRepayRecord. # noqa: E501
+ :type: list[RepayRecordCurrency]
+ """
+
+ self._borrow_currencies = borrow_currencies
+
+ @property
+ def collateral_currencies(self):
+ """Gets the collateral_currencies of this MultiRepayRecord. # noqa: E501
+
+ List of collateral information # noqa: E501
+
+ :return: The collateral_currencies of this MultiRepayRecord. # noqa: E501
+ :rtype: list[RepayRecordCurrency]
+ """
+ return self._collateral_currencies
+
+ @collateral_currencies.setter
+ def collateral_currencies(self, collateral_currencies):
+ """Sets the collateral_currencies of this MultiRepayRecord.
+
+ List of collateral information # noqa: E501
+
+ :param collateral_currencies: The collateral_currencies of this MultiRepayRecord. # noqa: E501
+ :type: list[RepayRecordCurrency]
+ """
+
+ self._collateral_currencies = collateral_currencies
+
+ @property
+ def repaid_currencies(self):
+ """Gets the repaid_currencies of this MultiRepayRecord. # noqa: E501
+
+ Repay Currency List # noqa: E501
+
+ :return: The repaid_currencies of this MultiRepayRecord. # noqa: E501
+ :rtype: list[RepayRecordRepaidCurrency]
+ """
+ return self._repaid_currencies
+
+ @repaid_currencies.setter
+ def repaid_currencies(self, repaid_currencies):
+ """Sets the repaid_currencies of this MultiRepayRecord.
+
+ Repay Currency List # noqa: E501
+
+ :param repaid_currencies: The repaid_currencies of this MultiRepayRecord. # noqa: E501
+ :type: list[RepayRecordRepaidCurrency]
+ """
+
+ self._repaid_currencies = repaid_currencies
+
+ @property
+ def total_interest_list(self):
+ """Gets the total_interest_list of this MultiRepayRecord. # noqa: E501
+
+ Total Interest List # noqa: E501
+
+ :return: The total_interest_list of this MultiRepayRecord. # noqa: E501
+ :rtype: list[RepayRecordTotalInterest]
+ """
+ return self._total_interest_list
+
+ @total_interest_list.setter
+ def total_interest_list(self, total_interest_list):
+ """Sets the total_interest_list of this MultiRepayRecord.
+
+ Total Interest List # noqa: E501
+
+ :param total_interest_list: The total_interest_list of this MultiRepayRecord. # noqa: E501
+ :type: list[RepayRecordTotalInterest]
+ """
+
+ self._total_interest_list = total_interest_list
+
+ @property
+ def left_repay_interest_list(self):
+ """Gets the left_repay_interest_list of this MultiRepayRecord. # noqa: E501
+
+ List of remaining interest to be repaid # noqa: E501
+
+ :return: The left_repay_interest_list of this MultiRepayRecord. # noqa: E501
+ :rtype: list[RepayRecordLeftInterest]
+ """
+ return self._left_repay_interest_list
+
+ @left_repay_interest_list.setter
+ def left_repay_interest_list(self, left_repay_interest_list):
+ """Sets the left_repay_interest_list of this MultiRepayRecord.
+
+ List of remaining interest to be repaid # noqa: E501
+
+ :param left_repay_interest_list: The left_repay_interest_list of this MultiRepayRecord. # noqa: E501
+ :type: list[RepayRecordLeftInterest]
+ """
+
+ self._left_repay_interest_list = left_repay_interest_list
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MultiRepayRecord):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MultiRepayRecord):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/multi_repay_resp.py b/gate_api/models/multi_repay_resp.py
new file mode 100644
index 0000000..bb2f880
--- /dev/null
+++ b/gate_api/models/multi_repay_resp.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class MultiRepayResp(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'order_id': 'int',
+ 'repaid_currencies': 'list[RepayCurrencyRes]'
+ }
+
+ attribute_map = {
+ 'order_id': 'order_id',
+ 'repaid_currencies': 'repaid_currencies'
+ }
+
+ def __init__(self, order_id=None, repaid_currencies=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, list[RepayCurrencyRes], Configuration) -> None
+ """MultiRepayResp - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._order_id = None
+ self._repaid_currencies = None
+ self.discriminator = None
+
+ if order_id is not None:
+ self.order_id = order_id
+ if repaid_currencies is not None:
+ self.repaid_currencies = repaid_currencies
+
+ @property
+ def order_id(self):
+ """Gets the order_id of this MultiRepayResp. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The order_id of this MultiRepayResp. # noqa: E501
+ :rtype: int
+ """
+ return self._order_id
+
+ @order_id.setter
+ def order_id(self, order_id):
+ """Sets the order_id of this MultiRepayResp.
+
+ Order ID # noqa: E501
+
+ :param order_id: The order_id of this MultiRepayResp. # noqa: E501
+ :type: int
+ """
+
+ self._order_id = order_id
+
+ @property
+ def repaid_currencies(self):
+ """Gets the repaid_currencies of this MultiRepayResp. # noqa: E501
+
+ Repay Currency List # noqa: E501
+
+ :return: The repaid_currencies of this MultiRepayResp. # noqa: E501
+ :rtype: list[RepayCurrencyRes]
+ """
+ return self._repaid_currencies
+
+ @repaid_currencies.setter
+ def repaid_currencies(self, repaid_currencies):
+ """Sets the repaid_currencies of this MultiRepayResp.
+
+ Repay Currency List # noqa: E501
+
+ :param repaid_currencies: The repaid_currencies of this MultiRepayResp. # noqa: E501
+ :type: list[RepayCurrencyRes]
+ """
+
+ self._repaid_currencies = repaid_currencies
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MultiRepayResp):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, MultiRepayResp):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/my_futures_trade.py b/gate_api/models/my_futures_trade.py
index 58a02ba..4066f32 100644
--- a/gate_api/models/my_futures_trade.py
+++ b/gate_api/models/my_futures_trade.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -38,11 +38,12 @@ class MyFuturesTrade(object):
'contract': 'str',
'order_id': 'str',
'size': 'int',
+ 'close_size': 'int',
'price': 'str',
'role': 'str',
'text': 'str',
'fee': 'str',
- 'point_fee': 'str',
+ 'point_fee': 'str'
}
attribute_map = {
@@ -51,28 +52,16 @@ class MyFuturesTrade(object):
'contract': 'contract',
'order_id': 'order_id',
'size': 'size',
+ 'close_size': 'close_size',
'price': 'price',
'role': 'role',
'text': 'text',
'fee': 'fee',
- 'point_fee': 'point_fee',
+ 'point_fee': 'point_fee'
}
- def __init__(
- self,
- id=None,
- create_time=None,
- contract=None,
- order_id=None,
- size=None,
- price=None,
- role=None,
- text=None,
- fee=None,
- point_fee=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, float, str, str, int, str, str, str, str, str, Configuration) -> None
+ def __init__(self, id=None, create_time=None, contract=None, order_id=None, size=None, close_size=None, price=None, role=None, text=None, fee=None, point_fee=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, float, str, str, int, int, str, str, str, str, str, Configuration) -> None
"""MyFuturesTrade - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -83,6 +72,7 @@ def __init__(
self._contract = None
self._order_id = None
self._size = None
+ self._close_size = None
self._price = None
self._role = None
self._text = None
@@ -100,6 +90,8 @@ def __init__(
self.order_id = order_id
if size is not None:
self.size = size
+ if close_size is not None:
+ self.close_size = close_size
if price is not None:
self.price = price
if role is not None:
@@ -115,7 +107,7 @@ def __init__(
def id(self):
"""Gets the id of this MyFuturesTrade. # noqa: E501
- Trade ID # noqa: E501
+ Fill ID # noqa: E501
:return: The id of this MyFuturesTrade. # noqa: E501
:rtype: int
@@ -126,7 +118,7 @@ def id(self):
def id(self, id):
"""Sets the id of this MyFuturesTrade.
- Trade ID # noqa: E501
+ Fill ID # noqa: E501
:param id: The id of this MyFuturesTrade. # noqa: E501
:type: int
@@ -138,7 +130,7 @@ def id(self, id):
def create_time(self):
"""Gets the create_time of this MyFuturesTrade. # noqa: E501
- Trading time # noqa: E501
+ Fill Time # noqa: E501
:return: The create_time of this MyFuturesTrade. # noqa: E501
:rtype: float
@@ -149,7 +141,7 @@ def create_time(self):
def create_time(self, create_time):
"""Sets the create_time of this MyFuturesTrade.
- Trading time # noqa: E501
+ Fill Time # noqa: E501
:param create_time: The create_time of this MyFuturesTrade. # noqa: E501
:type: float
@@ -184,7 +176,7 @@ def contract(self, contract):
def order_id(self):
"""Gets the order_id of this MyFuturesTrade. # noqa: E501
- Order ID related # noqa: E501
+ Related order ID # noqa: E501
:return: The order_id of this MyFuturesTrade. # noqa: E501
:rtype: str
@@ -195,7 +187,7 @@ def order_id(self):
def order_id(self, order_id):
"""Sets the order_id of this MyFuturesTrade.
- Order ID related # noqa: E501
+ Related order ID # noqa: E501
:param order_id: The order_id of this MyFuturesTrade. # noqa: E501
:type: str
@@ -226,11 +218,34 @@ def size(self, size):
self._size = size
+ @property
+ def close_size(self):
+ """Gets the close_size of this MyFuturesTrade. # noqa: E501
+
+ Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short position close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long position close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501
+
+ :return: The close_size of this MyFuturesTrade. # noqa: E501
+ :rtype: int
+ """
+ return self._close_size
+
+ @close_size.setter
+ def close_size(self, close_size):
+ """Sets the close_size of this MyFuturesTrade.
+
+ Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short position close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long position close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501
+
+ :param close_size: The close_size of this MyFuturesTrade. # noqa: E501
+ :type: int
+ """
+
+ self._close_size = close_size
+
@property
def price(self):
"""Gets the price of this MyFuturesTrade. # noqa: E501
- Trading price # noqa: E501
+ Fill Price # noqa: E501
:return: The price of this MyFuturesTrade. # noqa: E501
:rtype: str
@@ -241,7 +256,7 @@ def price(self):
def price(self, price):
"""Sets the price of this MyFuturesTrade.
- Trading price # noqa: E501
+ Fill Price # noqa: E501
:param price: The price of this MyFuturesTrade. # noqa: E501
:type: str
@@ -253,7 +268,7 @@ def price(self, price):
def role(self):
"""Gets the role of this MyFuturesTrade. # noqa: E501
- Trade role. Available values are `taker` and `maker` # noqa: E501
+ Trade role. taker - taker, maker - maker # noqa: E501
:return: The role of this MyFuturesTrade. # noqa: E501
:rtype: str
@@ -264,7 +279,7 @@ def role(self):
def role(self, role):
"""Sets the role of this MyFuturesTrade.
- Trade role. Available values are `taker` and `maker` # noqa: E501
+ Trade role. taker - taker, maker - maker # noqa: E501
:param role: The role of this MyFuturesTrade. # noqa: E501
:type: str
@@ -272,7 +287,8 @@ def role(self, role):
allowed_values = ["taker", "maker"] # noqa: E501
if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `role` ({0}), must be one of {1}".format(role, allowed_values) # noqa: E501
+ "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501
+ .format(role, allowed_values)
)
self._role = role
@@ -281,7 +297,7 @@ def role(self, role):
def text(self):
"""Gets the text of this MyFuturesTrade. # noqa: E501
- User defined information # noqa: E501
+ Order custom information # noqa: E501
:return: The text of this MyFuturesTrade. # noqa: E501
:rtype: str
@@ -292,7 +308,7 @@ def text(self):
def text(self, text):
"""Sets the text of this MyFuturesTrade.
- User defined information # noqa: E501
+ Order custom information # noqa: E501
:param text: The text of this MyFuturesTrade. # noqa: E501
:type: str
@@ -304,7 +320,7 @@ def text(self, text):
def fee(self):
"""Gets the fee of this MyFuturesTrade. # noqa: E501
- Fee deducted # noqa: E501
+ Trade fee # noqa: E501
:return: The fee of this MyFuturesTrade. # noqa: E501
:rtype: str
@@ -315,7 +331,7 @@ def fee(self):
def fee(self, fee):
"""Sets the fee of this MyFuturesTrade.
- Fee deducted # noqa: E501
+ Trade fee # noqa: E501
:param fee: The fee of this MyFuturesTrade. # noqa: E501
:type: str
@@ -327,7 +343,7 @@ def fee(self, fee):
def point_fee(self):
"""Gets the point_fee of this MyFuturesTrade. # noqa: E501
- Points used to deduct fee # noqa: E501
+ Points used to deduct trade fee # noqa: E501
:return: The point_fee of this MyFuturesTrade. # noqa: E501
:rtype: str
@@ -338,7 +354,7 @@ def point_fee(self):
def point_fee(self, point_fee):
"""Sets the point_fee of this MyFuturesTrade.
- Points used to deduct fee # noqa: E501
+ Points used to deduct trade fee # noqa: E501
:param point_fee: The point_fee of this MyFuturesTrade. # noqa: E501
:type: str
@@ -353,16 +369,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/my_futures_trade_time_range.py b/gate_api/models/my_futures_trade_time_range.py
index 6891e82..81e915b 100644
--- a/gate_api/models/my_futures_trade_time_range.py
+++ b/gate_api/models/my_futures_trade_time_range.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -38,11 +38,12 @@ class MyFuturesTradeTimeRange(object):
'contract': 'str',
'order_id': 'str',
'size': 'int',
+ 'close_size': 'int',
'price': 'str',
'role': 'str',
'text': 'str',
'fee': 'str',
- 'point_fee': 'str',
+ 'point_fee': 'str'
}
attribute_map = {
@@ -51,28 +52,16 @@ class MyFuturesTradeTimeRange(object):
'contract': 'contract',
'order_id': 'order_id',
'size': 'size',
+ 'close_size': 'close_size',
'price': 'price',
'role': 'role',
'text': 'text',
'fee': 'fee',
- 'point_fee': 'point_fee',
+ 'point_fee': 'point_fee'
}
- def __init__(
- self,
- trade_id=None,
- create_time=None,
- contract=None,
- order_id=None,
- size=None,
- price=None,
- role=None,
- text=None,
- fee=None,
- point_fee=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, float, str, str, int, str, str, str, str, str, Configuration) -> None
+ def __init__(self, trade_id=None, create_time=None, contract=None, order_id=None, size=None, close_size=None, price=None, role=None, text=None, fee=None, point_fee=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, float, str, str, int, int, str, str, str, str, str, Configuration) -> None
"""MyFuturesTradeTimeRange - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -83,6 +72,7 @@ def __init__(
self._contract = None
self._order_id = None
self._size = None
+ self._close_size = None
self._price = None
self._role = None
self._text = None
@@ -100,6 +90,8 @@ def __init__(
self.order_id = order_id
if size is not None:
self.size = size
+ if close_size is not None:
+ self.close_size = close_size
if price is not None:
self.price = price
if role is not None:
@@ -115,7 +107,7 @@ def __init__(
def trade_id(self):
"""Gets the trade_id of this MyFuturesTradeTimeRange. # noqa: E501
- Trade ID # noqa: E501
+ Fill ID # noqa: E501
:return: The trade_id of this MyFuturesTradeTimeRange. # noqa: E501
:rtype: str
@@ -126,7 +118,7 @@ def trade_id(self):
def trade_id(self, trade_id):
"""Sets the trade_id of this MyFuturesTradeTimeRange.
- Trade ID # noqa: E501
+ Fill ID # noqa: E501
:param trade_id: The trade_id of this MyFuturesTradeTimeRange. # noqa: E501
:type: str
@@ -138,7 +130,7 @@ def trade_id(self, trade_id):
def create_time(self):
"""Gets the create_time of this MyFuturesTradeTimeRange. # noqa: E501
- Trading time # noqa: E501
+ Fill Time # noqa: E501
:return: The create_time of this MyFuturesTradeTimeRange. # noqa: E501
:rtype: float
@@ -149,7 +141,7 @@ def create_time(self):
def create_time(self, create_time):
"""Sets the create_time of this MyFuturesTradeTimeRange.
- Trading time # noqa: E501
+ Fill Time # noqa: E501
:param create_time: The create_time of this MyFuturesTradeTimeRange. # noqa: E501
:type: float
@@ -184,7 +176,7 @@ def contract(self, contract):
def order_id(self):
"""Gets the order_id of this MyFuturesTradeTimeRange. # noqa: E501
- Order ID related # noqa: E501
+ Related order ID # noqa: E501
:return: The order_id of this MyFuturesTradeTimeRange. # noqa: E501
:rtype: str
@@ -195,7 +187,7 @@ def order_id(self):
def order_id(self, order_id):
"""Sets the order_id of this MyFuturesTradeTimeRange.
- Order ID related # noqa: E501
+ Related order ID # noqa: E501
:param order_id: The order_id of this MyFuturesTradeTimeRange. # noqa: E501
:type: str
@@ -226,11 +218,34 @@ def size(self, size):
self._size = size
+ @property
+ def close_size(self):
+ """Gets the close_size of this MyFuturesTradeTimeRange. # noqa: E501
+
+ Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short position close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long position close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501
+
+ :return: The close_size of this MyFuturesTradeTimeRange. # noqa: E501
+ :rtype: int
+ """
+ return self._close_size
+
+ @close_size.setter
+ def close_size(self, close_size):
+ """Sets the close_size of this MyFuturesTradeTimeRange.
+
+ Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short position close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long position close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501
+
+ :param close_size: The close_size of this MyFuturesTradeTimeRange. # noqa: E501
+ :type: int
+ """
+
+ self._close_size = close_size
+
@property
def price(self):
"""Gets the price of this MyFuturesTradeTimeRange. # noqa: E501
- Trading price # noqa: E501
+ Fill Price # noqa: E501
:return: The price of this MyFuturesTradeTimeRange. # noqa: E501
:rtype: str
@@ -241,7 +256,7 @@ def price(self):
def price(self, price):
"""Sets the price of this MyFuturesTradeTimeRange.
- Trading price # noqa: E501
+ Fill Price # noqa: E501
:param price: The price of this MyFuturesTradeTimeRange. # noqa: E501
:type: str
@@ -253,7 +268,7 @@ def price(self, price):
def role(self):
"""Gets the role of this MyFuturesTradeTimeRange. # noqa: E501
- Trade role. Available values are `taker` and `maker` # noqa: E501
+ Trade role. taker - taker, maker - maker # noqa: E501
:return: The role of this MyFuturesTradeTimeRange. # noqa: E501
:rtype: str
@@ -264,7 +279,7 @@ def role(self):
def role(self, role):
"""Sets the role of this MyFuturesTradeTimeRange.
- Trade role. Available values are `taker` and `maker` # noqa: E501
+ Trade role. taker - taker, maker - maker # noqa: E501
:param role: The role of this MyFuturesTradeTimeRange. # noqa: E501
:type: str
@@ -272,7 +287,8 @@ def role(self, role):
allowed_values = ["taker", "maker"] # noqa: E501
if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `role` ({0}), must be one of {1}".format(role, allowed_values) # noqa: E501
+ "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501
+ .format(role, allowed_values)
)
self._role = role
@@ -281,7 +297,7 @@ def role(self, role):
def text(self):
"""Gets the text of this MyFuturesTradeTimeRange. # noqa: E501
- User defined information # noqa: E501
+ Order custom information # noqa: E501
:return: The text of this MyFuturesTradeTimeRange. # noqa: E501
:rtype: str
@@ -292,7 +308,7 @@ def text(self):
def text(self, text):
"""Sets the text of this MyFuturesTradeTimeRange.
- User defined information # noqa: E501
+ Order custom information # noqa: E501
:param text: The text of this MyFuturesTradeTimeRange. # noqa: E501
:type: str
@@ -304,7 +320,7 @@ def text(self, text):
def fee(self):
"""Gets the fee of this MyFuturesTradeTimeRange. # noqa: E501
- Fee deducted # noqa: E501
+ Trade fee # noqa: E501
:return: The fee of this MyFuturesTradeTimeRange. # noqa: E501
:rtype: str
@@ -315,7 +331,7 @@ def fee(self):
def fee(self, fee):
"""Sets the fee of this MyFuturesTradeTimeRange.
- Fee deducted # noqa: E501
+ Trade fee # noqa: E501
:param fee: The fee of this MyFuturesTradeTimeRange. # noqa: E501
:type: str
@@ -327,7 +343,7 @@ def fee(self, fee):
def point_fee(self):
"""Gets the point_fee of this MyFuturesTradeTimeRange. # noqa: E501
- Points used to deduct fee # noqa: E501
+ Points used to deduct trade fee # noqa: E501
:return: The point_fee of this MyFuturesTradeTimeRange. # noqa: E501
:rtype: str
@@ -338,7 +354,7 @@ def point_fee(self):
def point_fee(self, point_fee):
"""Sets the point_fee of this MyFuturesTradeTimeRange.
- Points used to deduct fee # noqa: E501
+ Points used to deduct trade fee # noqa: E501
:param point_fee: The point_fee of this MyFuturesTradeTimeRange. # noqa: E501
:type: str
@@ -353,16 +369,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/open_orders.py b/gate_api/models/open_orders.py
index 0256f48..4d856f3 100644
--- a/gate_api/models/open_orders.py
+++ b/gate_api/models/open_orders.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,17 @@ class OpenOrders(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency_pair': 'str', 'total': 'int', 'orders': 'list[Order]'}
-
- attribute_map = {'currency_pair': 'currency_pair', 'total': 'total', 'orders': 'orders'}
+ openapi_types = {
+ 'currency_pair': 'str',
+ 'total': 'int',
+ 'orders': 'list[Order]'
+ }
+
+ attribute_map = {
+ 'currency_pair': 'currency_pair',
+ 'total': 'total',
+ 'orders': 'orders'
+ }
def __init__(self, currency_pair=None, total=None, orders=None, local_vars_configuration=None): # noqa: E501
# type: (str, int, list[Order], Configuration) -> None
@@ -82,7 +90,7 @@ def currency_pair(self, currency_pair):
def total(self):
"""Gets the total of this OpenOrders. # noqa: E501
- Total open orders in this currency pair # noqa: E501
+ Total number of open orders for this trading pair on the current page # noqa: E501
:return: The total of this OpenOrders. # noqa: E501
:rtype: int
@@ -93,7 +101,7 @@ def total(self):
def total(self, total):
"""Sets the total of this OpenOrders.
- Total open orders in this currency pair # noqa: E501
+ Total number of open orders for this trading pair on the current page # noqa: E501
:param total: The total of this OpenOrders. # noqa: E501
:type: int
@@ -129,16 +137,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_account.py b/gate_api/models/options_account.py
index a14c1aa..e05a45c 100644
--- a/gate_api/models/options_account.py
+++ b/gate_api/models/options_account.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -35,44 +35,49 @@ class OptionsAccount(object):
openapi_types = {
'user': 'int',
'total': 'str',
+ 'position_value': 'str',
+ 'equity': 'str',
'short_enabled': 'bool',
+ 'mmp_enabled': 'bool',
+ 'liq_triggered': 'bool',
+ 'margin_mode': 'int',
'unrealised_pnl': 'str',
'init_margin': 'str',
'maint_margin': 'str',
'order_margin': 'str',
+ 'ask_order_margin': 'str',
+ 'bid_order_margin': 'str',
'available': 'str',
'point': 'str',
'currency': 'str',
+ 'orders_limit': 'int',
+ 'position_notional_limit': 'int'
}
attribute_map = {
'user': 'user',
'total': 'total',
+ 'position_value': 'position_value',
+ 'equity': 'equity',
'short_enabled': 'short_enabled',
+ 'mmp_enabled': 'mmp_enabled',
+ 'liq_triggered': 'liq_triggered',
+ 'margin_mode': 'margin_mode',
'unrealised_pnl': 'unrealised_pnl',
'init_margin': 'init_margin',
'maint_margin': 'maint_margin',
'order_margin': 'order_margin',
+ 'ask_order_margin': 'ask_order_margin',
+ 'bid_order_margin': 'bid_order_margin',
'available': 'available',
'point': 'point',
'currency': 'currency',
+ 'orders_limit': 'orders_limit',
+ 'position_notional_limit': 'position_notional_limit'
}
- def __init__(
- self,
- user=None,
- total=None,
- short_enabled=None,
- unrealised_pnl=None,
- init_margin=None,
- maint_margin=None,
- order_margin=None,
- available=None,
- point=None,
- currency=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, str, bool, str, str, str, str, str, str, str, Configuration) -> None
+ def __init__(self, user=None, total=None, position_value=None, equity=None, short_enabled=None, mmp_enabled=None, liq_triggered=None, margin_mode=None, unrealised_pnl=None, init_margin=None, maint_margin=None, order_margin=None, ask_order_margin=None, bid_order_margin=None, available=None, point=None, currency=None, orders_limit=None, position_notional_limit=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, str, bool, bool, bool, int, str, str, str, str, str, str, str, str, str, int, int, Configuration) -> None
"""OptionsAccount - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -80,22 +85,41 @@ def __init__(
self._user = None
self._total = None
+ self._position_value = None
+ self._equity = None
self._short_enabled = None
+ self._mmp_enabled = None
+ self._liq_triggered = None
+ self._margin_mode = None
self._unrealised_pnl = None
self._init_margin = None
self._maint_margin = None
self._order_margin = None
+ self._ask_order_margin = None
+ self._bid_order_margin = None
self._available = None
self._point = None
self._currency = None
+ self._orders_limit = None
+ self._position_notional_limit = None
self.discriminator = None
if user is not None:
self.user = user
if total is not None:
self.total = total
+ if position_value is not None:
+ self.position_value = position_value
+ if equity is not None:
+ self.equity = equity
if short_enabled is not None:
self.short_enabled = short_enabled
+ if mmp_enabled is not None:
+ self.mmp_enabled = mmp_enabled
+ if liq_triggered is not None:
+ self.liq_triggered = liq_triggered
+ if margin_mode is not None:
+ self.margin_mode = margin_mode
if unrealised_pnl is not None:
self.unrealised_pnl = unrealised_pnl
if init_margin is not None:
@@ -104,12 +128,20 @@ def __init__(
self.maint_margin = maint_margin
if order_margin is not None:
self.order_margin = order_margin
+ if ask_order_margin is not None:
+ self.ask_order_margin = ask_order_margin
+ if bid_order_margin is not None:
+ self.bid_order_margin = bid_order_margin
if available is not None:
self.available = available
if point is not None:
self.point = point
if currency is not None:
self.currency = currency
+ if orders_limit is not None:
+ self.orders_limit = orders_limit
+ if position_notional_limit is not None:
+ self.position_notional_limit = position_notional_limit
@property
def user(self):
@@ -138,7 +170,7 @@ def user(self, user):
def total(self):
"""Gets the total of this OptionsAccount. # noqa: E501
- Total account balance # noqa: E501
+ Account Balance # noqa: E501
:return: The total of this OptionsAccount. # noqa: E501
:rtype: str
@@ -149,7 +181,7 @@ def total(self):
def total(self, total):
"""Sets the total of this OptionsAccount.
- Total account balance # noqa: E501
+ Account Balance # noqa: E501
:param total: The total of this OptionsAccount. # noqa: E501
:type: str
@@ -157,6 +189,52 @@ def total(self, total):
self._total = total
+ @property
+ def position_value(self):
+ """Gets the position_value of this OptionsAccount. # noqa: E501
+
+ Position value, long position value is positive, short position value is negative # noqa: E501
+
+ :return: The position_value of this OptionsAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._position_value
+
+ @position_value.setter
+ def position_value(self, position_value):
+ """Sets the position_value of this OptionsAccount.
+
+ Position value, long position value is positive, short position value is negative # noqa: E501
+
+ :param position_value: The position_value of this OptionsAccount. # noqa: E501
+ :type: str
+ """
+
+ self._position_value = position_value
+
+ @property
+ def equity(self):
+ """Gets the equity of this OptionsAccount. # noqa: E501
+
+ Account equity, the sum of account balance and position value # noqa: E501
+
+ :return: The equity of this OptionsAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._equity
+
+ @equity.setter
+ def equity(self, equity):
+ """Sets the equity of this OptionsAccount.
+
+ Account equity, the sum of account balance and position value # noqa: E501
+
+ :param equity: The equity of this OptionsAccount. # noqa: E501
+ :type: str
+ """
+
+ self._equity = equity
+
@property
def short_enabled(self):
"""Gets the short_enabled of this OptionsAccount. # noqa: E501
@@ -180,6 +258,81 @@ def short_enabled(self, short_enabled):
self._short_enabled = short_enabled
+ @property
+ def mmp_enabled(self):
+ """Gets the mmp_enabled of this OptionsAccount. # noqa: E501
+
+ Whether to enable MMP # noqa: E501
+
+ :return: The mmp_enabled of this OptionsAccount. # noqa: E501
+ :rtype: bool
+ """
+ return self._mmp_enabled
+
+ @mmp_enabled.setter
+ def mmp_enabled(self, mmp_enabled):
+ """Sets the mmp_enabled of this OptionsAccount.
+
+ Whether to enable MMP # noqa: E501
+
+ :param mmp_enabled: The mmp_enabled of this OptionsAccount. # noqa: E501
+ :type: bool
+ """
+
+ self._mmp_enabled = mmp_enabled
+
+ @property
+ def liq_triggered(self):
+ """Gets the liq_triggered of this OptionsAccount. # noqa: E501
+
+ Whether to trigger position liquidation # noqa: E501
+
+ :return: The liq_triggered of this OptionsAccount. # noqa: E501
+ :rtype: bool
+ """
+ return self._liq_triggered
+
+ @liq_triggered.setter
+ def liq_triggered(self, liq_triggered):
+ """Sets the liq_triggered of this OptionsAccount.
+
+ Whether to trigger position liquidation # noqa: E501
+
+ :param liq_triggered: The liq_triggered of this OptionsAccount. # noqa: E501
+ :type: bool
+ """
+
+ self._liq_triggered = liq_triggered
+
+ @property
+ def margin_mode(self):
+ """Gets the margin_mode of this OptionsAccount. # noqa: E501
+
+ | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 # noqa: E501
+
+ :return: The margin_mode of this OptionsAccount. # noqa: E501
+ :rtype: int
+ """
+ return self._margin_mode
+
+ @margin_mode.setter
+ def margin_mode(self, margin_mode):
+ """Sets the margin_mode of this OptionsAccount.
+
+ | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 # noqa: E501
+
+ :param margin_mode: The margin_mode of this OptionsAccount. # noqa: E501
+ :type: int
+ """
+ allowed_values = [0, 1, 2] # noqa: E501
+ if self.local_vars_configuration.client_side_validation and margin_mode not in allowed_values: # noqa: E501
+ raise ValueError(
+ "Invalid value for `margin_mode` ({0}), must be one of {1}" # noqa: E501
+ .format(margin_mode, allowed_values)
+ )
+
+ self._margin_mode = margin_mode
+
@property
def unrealised_pnl(self):
"""Gets the unrealised_pnl of this OptionsAccount. # noqa: E501
@@ -272,6 +425,52 @@ def order_margin(self, order_margin):
self._order_margin = order_margin
+ @property
+ def ask_order_margin(self):
+ """Gets the ask_order_margin of this OptionsAccount. # noqa: E501
+
+ Margin for outstanding sell orders # noqa: E501
+
+ :return: The ask_order_margin of this OptionsAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._ask_order_margin
+
+ @ask_order_margin.setter
+ def ask_order_margin(self, ask_order_margin):
+ """Sets the ask_order_margin of this OptionsAccount.
+
+ Margin for outstanding sell orders # noqa: E501
+
+ :param ask_order_margin: The ask_order_margin of this OptionsAccount. # noqa: E501
+ :type: str
+ """
+
+ self._ask_order_margin = ask_order_margin
+
+ @property
+ def bid_order_margin(self):
+ """Gets the bid_order_margin of this OptionsAccount. # noqa: E501
+
+ Margin for outstanding buy orders # noqa: E501
+
+ :return: The bid_order_margin of this OptionsAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._bid_order_margin
+
+ @bid_order_margin.setter
+ def bid_order_margin(self, bid_order_margin):
+ """Sets the bid_order_margin of this OptionsAccount.
+
+ Margin for outstanding buy orders # noqa: E501
+
+ :param bid_order_margin: The bid_order_margin of this OptionsAccount. # noqa: E501
+ :type: str
+ """
+
+ self._bid_order_margin = bid_order_margin
+
@property
def available(self):
"""Gets the available of this OptionsAccount. # noqa: E501
@@ -299,7 +498,7 @@ def available(self, available):
def point(self):
"""Gets the point of this OptionsAccount. # noqa: E501
- POINT amount # noqa: E501
+ Point card amount # noqa: E501
:return: The point of this OptionsAccount. # noqa: E501
:rtype: str
@@ -310,7 +509,7 @@ def point(self):
def point(self, point):
"""Sets the point of this OptionsAccount.
- POINT amount # noqa: E501
+ Point card amount # noqa: E501
:param point: The point of this OptionsAccount. # noqa: E501
:type: str
@@ -322,7 +521,7 @@ def point(self, point):
def currency(self):
"""Gets the currency of this OptionsAccount. # noqa: E501
- Settle currency # noqa: E501
+ Settlement currency # noqa: E501
:return: The currency of this OptionsAccount. # noqa: E501
:rtype: str
@@ -333,7 +532,7 @@ def currency(self):
def currency(self, currency):
"""Sets the currency of this OptionsAccount.
- Settle currency # noqa: E501
+ Settlement currency # noqa: E501
:param currency: The currency of this OptionsAccount. # noqa: E501
:type: str
@@ -341,6 +540,52 @@ def currency(self, currency):
self._currency = currency
+ @property
+ def orders_limit(self):
+ """Gets the orders_limit of this OptionsAccount. # noqa: E501
+
+ Maximum number of outstanding orders # noqa: E501
+
+ :return: The orders_limit of this OptionsAccount. # noqa: E501
+ :rtype: int
+ """
+ return self._orders_limit
+
+ @orders_limit.setter
+ def orders_limit(self, orders_limit):
+ """Sets the orders_limit of this OptionsAccount.
+
+ Maximum number of outstanding orders # noqa: E501
+
+ :param orders_limit: The orders_limit of this OptionsAccount. # noqa: E501
+ :type: int
+ """
+
+ self._orders_limit = orders_limit
+
+ @property
+ def position_notional_limit(self):
+ """Gets the position_notional_limit of this OptionsAccount. # noqa: E501
+
+ Notional value upper limit, including the nominal value of positions and outstanding orders # noqa: E501
+
+ :return: The position_notional_limit of this OptionsAccount. # noqa: E501
+ :rtype: int
+ """
+ return self._position_notional_limit
+
+ @position_notional_limit.setter
+ def position_notional_limit(self, position_notional_limit):
+ """Sets the position_notional_limit of this OptionsAccount.
+
+ Notional value upper limit, including the nominal value of positions and outstanding orders # noqa: E501
+
+ :param position_notional_limit: The position_notional_limit of this OptionsAccount. # noqa: E501
+ :type: int
+ """
+
+ self._position_notional_limit = position_notional_limit
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -348,16 +593,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_account_book.py b/gate_api/models/options_account_book.py
index e3a03cc..e2809e2 100644
--- a/gate_api/models/options_account_book.py
+++ b/gate_api/models/options_account_book.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,13 +32,23 @@ class OptionsAccountBook(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'time': 'float', 'change': 'str', 'balance': 'str', 'type': 'str', 'text': 'str'}
-
- attribute_map = {'time': 'time', 'change': 'change', 'balance': 'balance', 'type': 'type', 'text': 'text'}
-
- def __init__(
- self, time=None, change=None, balance=None, type=None, text=None, local_vars_configuration=None
- ): # noqa: E501
+ openapi_types = {
+ 'time': 'float',
+ 'change': 'str',
+ 'balance': 'str',
+ 'type': 'str',
+ 'text': 'str'
+ }
+
+ attribute_map = {
+ 'time': 'time',
+ 'change': 'change',
+ 'balance': 'balance',
+ 'type': 'type',
+ 'text': 'text'
+ }
+
+ def __init__(self, time=None, change=None, balance=None, type=None, text=None, local_vars_configuration=None): # noqa: E501
# type: (float, str, str, str, str, Configuration) -> None
"""OptionsAccountBook - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -136,7 +146,7 @@ def balance(self, balance):
def type(self):
"""Gets the type of this OptionsAccountBook. # noqa: E501
- Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501
+ Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501
:return: The type of this OptionsAccountBook. # noqa: E501
:rtype: str
@@ -147,7 +157,7 @@ def type(self):
def type(self, type):
"""Sets the type of this OptionsAccountBook.
- Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501
+ Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501
:param type: The type of this OptionsAccountBook. # noqa: E501
:type: str
@@ -159,7 +169,7 @@ def type(self, type):
def text(self):
"""Gets the text of this OptionsAccountBook. # noqa: E501
- custom text # noqa: E501
+ Remark # noqa: E501
:return: The text of this OptionsAccountBook. # noqa: E501
:rtype: str
@@ -170,7 +180,7 @@ def text(self):
def text(self, text):
"""Sets the text of this OptionsAccountBook.
- custom text # noqa: E501
+ Remark # noqa: E501
:param text: The text of this OptionsAccountBook. # noqa: E501
:type: str
@@ -185,16 +195,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_candlestick.py b/gate_api/models/options_candlestick.py
index 2a485a4..a41ffe9 100644
--- a/gate_api/models/options_candlestick.py
+++ b/gate_api/models/options_candlestick.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,23 @@ class OptionsCandlestick(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'t': 'float', 'v': 'int', 'c': 'str', 'h': 'str', 'l': 'str', 'o': 'str'}
-
- attribute_map = {'t': 't', 'v': 'v', 'c': 'c', 'h': 'h', 'l': 'l', 'o': 'o'}
+ openapi_types = {
+ 't': 'float',
+ 'v': 'int',
+ 'c': 'str',
+ 'h': 'str',
+ 'l': 'str',
+ 'o': 'str'
+ }
+
+ attribute_map = {
+ 't': 't',
+ 'v': 'v',
+ 'c': 'c',
+ 'h': 'h',
+ 'l': 'l',
+ 'o': 'o'
+ }
def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, local_vars_configuration=None): # noqa: E501
# type: (float, int, str, str, str, str, Configuration) -> None
@@ -209,16 +223,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_contract.py b/gate_api/models/options_contract.py
index f7b00a3..2aec77e 100644
--- a/gate_api/models/options_contract.py
+++ b/gate_api/models/options_contract.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -57,7 +57,7 @@ class OptionsContract(object):
'trade_id': 'int',
'trade_size': 'int',
'position_size': 'int',
- 'orders_limit': 'int',
+ 'orders_limit': 'int'
}
attribute_map = {
@@ -85,38 +85,10 @@ class OptionsContract(object):
'trade_id': 'trade_id',
'trade_size': 'trade_size',
'position_size': 'position_size',
- 'orders_limit': 'orders_limit',
+ 'orders_limit': 'orders_limit'
}
- def __init__(
- self,
- name=None,
- tag=None,
- create_time=None,
- expiration_time=None,
- is_call=None,
- multiplier=None,
- underlying=None,
- underlying_price=None,
- last_price=None,
- mark_price=None,
- index_price=None,
- maker_fee_rate=None,
- taker_fee_rate=None,
- order_price_round=None,
- mark_price_round=None,
- order_size_min=None,
- order_size_max=None,
- order_price_deviate=None,
- ref_discount_rate=None,
- ref_rebate_rate=None,
- orderbook_id=None,
- trade_id=None,
- trade_size=None,
- position_size=None,
- orders_limit=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, name=None, tag=None, create_time=None, expiration_time=None, is_call=None, multiplier=None, underlying=None, underlying_price=None, last_price=None, mark_price=None, index_price=None, maker_fee_rate=None, taker_fee_rate=None, order_price_round=None, mark_price_round=None, order_size_min=None, order_size_max=None, order_price_deviate=None, ref_discount_rate=None, ref_rebate_rate=None, orderbook_id=None, trade_id=None, trade_size=None, position_size=None, orders_limit=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, float, float, bool, str, str, str, str, str, str, str, str, str, str, int, int, str, str, str, int, int, int, int, int, Configuration) -> None
"""OptionsContract - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -228,7 +200,7 @@ def name(self, name):
def tag(self):
"""Gets the tag of this OptionsContract. # noqa: E501
- tag # noqa: E501
+ Tag # noqa: E501
:return: The tag of this OptionsContract. # noqa: E501
:rtype: str
@@ -239,7 +211,7 @@ def tag(self):
def tag(self, tag):
"""Sets the tag of this OptionsContract.
- tag # noqa: E501
+ Tag # noqa: E501
:param tag: The tag of this OptionsContract. # noqa: E501
:type: str
@@ -251,7 +223,7 @@ def tag(self, tag):
def create_time(self):
"""Gets the create_time of this OptionsContract. # noqa: E501
- Creation time # noqa: E501
+ Created time # noqa: E501
:return: The create_time of this OptionsContract. # noqa: E501
:rtype: float
@@ -262,7 +234,7 @@ def create_time(self):
def create_time(self, create_time):
"""Sets the create_time of this OptionsContract.
- Creation time # noqa: E501
+ Created time # noqa: E501
:param create_time: The create_time of this OptionsContract. # noqa: E501
:type: float
@@ -297,7 +269,7 @@ def expiration_time(self, expiration_time):
def is_call(self):
"""Gets the is_call of this OptionsContract. # noqa: E501
- `true` means call options, while `false` is put options # noqa: E501
+ `true` means call options, `false` means put options # noqa: E501
:return: The is_call of this OptionsContract. # noqa: E501
:rtype: bool
@@ -308,7 +280,7 @@ def is_call(self):
def is_call(self, is_call):
"""Sets the is_call of this OptionsContract.
- `true` means call options, while `false` is put options # noqa: E501
+ `true` means call options, `false` means put options # noqa: E501
:param is_call: The is_call of this OptionsContract. # noqa: E501
:type: bool
@@ -458,7 +430,7 @@ def index_price(self, index_price):
def maker_fee_rate(self):
"""Gets the maker_fee_rate of this OptionsContract. # noqa: E501
- Maker fee rate, where negative means rebate # noqa: E501
+ Maker fee rate, negative values indicate rebates # noqa: E501
:return: The maker_fee_rate of this OptionsContract. # noqa: E501
:rtype: str
@@ -469,7 +441,7 @@ def maker_fee_rate(self):
def maker_fee_rate(self, maker_fee_rate):
"""Sets the maker_fee_rate of this OptionsContract.
- Maker fee rate, where negative means rebate # noqa: E501
+ Maker fee rate, negative values indicate rebates # noqa: E501
:param maker_fee_rate: The maker_fee_rate of this OptionsContract. # noqa: E501
:type: str
@@ -550,7 +522,7 @@ def mark_price_round(self, mark_price_round):
def order_size_min(self):
"""Gets the order_size_min of this OptionsContract. # noqa: E501
- Minimum order size the contract allowed # noqa: E501
+ Minimum order size allowed by the contract # noqa: E501
:return: The order_size_min of this OptionsContract. # noqa: E501
:rtype: int
@@ -561,7 +533,7 @@ def order_size_min(self):
def order_size_min(self, order_size_min):
"""Sets the order_size_min of this OptionsContract.
- Minimum order size the contract allowed # noqa: E501
+ Minimum order size allowed by the contract # noqa: E501
:param order_size_min: The order_size_min of this OptionsContract. # noqa: E501
:type: int
@@ -573,7 +545,7 @@ def order_size_min(self, order_size_min):
def order_size_max(self):
"""Gets the order_size_max of this OptionsContract. # noqa: E501
- Maximum order size the contract allowed # noqa: E501
+ Maximum order size allowed by the contract # noqa: E501
:return: The order_size_max of this OptionsContract. # noqa: E501
:rtype: int
@@ -584,7 +556,7 @@ def order_size_max(self):
def order_size_max(self, order_size_max):
"""Sets the order_size_max of this OptionsContract.
- Maximum order size the contract allowed # noqa: E501
+ Maximum order size allowed by the contract # noqa: E501
:param order_size_max: The order_size_max of this OptionsContract. # noqa: E501
:type: int
@@ -596,7 +568,7 @@ def order_size_max(self, order_size_max):
def order_price_deviate(self):
"""Gets the order_price_deviate of this OptionsContract. # noqa: E501
- deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501
+ The positive and negative offset allowed between the order price and the current mark price, that `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501
:return: The order_price_deviate of this OptionsContract. # noqa: E501
:rtype: str
@@ -607,7 +579,7 @@ def order_price_deviate(self):
def order_price_deviate(self, order_price_deviate):
"""Sets the order_price_deviate of this OptionsContract.
- deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501
+ The positive and negative offset allowed between the order price and the current mark price, that `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501
:param order_price_deviate: The order_price_deviate of this OptionsContract. # noqa: E501
:type: str
@@ -619,7 +591,7 @@ def order_price_deviate(self, order_price_deviate):
def ref_discount_rate(self):
"""Gets the ref_discount_rate of this OptionsContract. # noqa: E501
- Referral fee rate discount # noqa: E501
+ Trading fee discount for referred users # noqa: E501
:return: The ref_discount_rate of this OptionsContract. # noqa: E501
:rtype: str
@@ -630,7 +602,7 @@ def ref_discount_rate(self):
def ref_discount_rate(self, ref_discount_rate):
"""Sets the ref_discount_rate of this OptionsContract.
- Referral fee rate discount # noqa: E501
+ Trading fee discount for referred users # noqa: E501
:param ref_discount_rate: The ref_discount_rate of this OptionsContract. # noqa: E501
:type: str
@@ -642,7 +614,7 @@ def ref_discount_rate(self, ref_discount_rate):
def ref_rebate_rate(self):
"""Gets the ref_rebate_rate of this OptionsContract. # noqa: E501
- Referrer commission rate # noqa: E501
+ Commission rate for referrers # noqa: E501
:return: The ref_rebate_rate of this OptionsContract. # noqa: E501
:rtype: str
@@ -653,7 +625,7 @@ def ref_rebate_rate(self):
def ref_rebate_rate(self, ref_rebate_rate):
"""Sets the ref_rebate_rate of this OptionsContract.
- Referrer commission rate # noqa: E501
+ Commission rate for referrers # noqa: E501
:param ref_rebate_rate: The ref_rebate_rate of this OptionsContract. # noqa: E501
:type: str
@@ -665,7 +637,7 @@ def ref_rebate_rate(self, ref_rebate_rate):
def orderbook_id(self):
"""Gets the orderbook_id of this OptionsContract. # noqa: E501
- Current orderbook ID # noqa: E501
+ Orderbook update ID # noqa: E501
:return: The orderbook_id of this OptionsContract. # noqa: E501
:rtype: int
@@ -676,7 +648,7 @@ def orderbook_id(self):
def orderbook_id(self, orderbook_id):
"""Sets the orderbook_id of this OptionsContract.
- Current orderbook ID # noqa: E501
+ Orderbook update ID # noqa: E501
:param orderbook_id: The orderbook_id of this OptionsContract. # noqa: E501
:type: int
@@ -711,7 +683,7 @@ def trade_id(self, trade_id):
def trade_size(self):
"""Gets the trade_size of this OptionsContract. # noqa: E501
- Historical accumulated trade size # noqa: E501
+ Historical cumulative trading volume # noqa: E501
:return: The trade_size of this OptionsContract. # noqa: E501
:rtype: int
@@ -722,7 +694,7 @@ def trade_size(self):
def trade_size(self, trade_size):
"""Sets the trade_size of this OptionsContract.
- Historical accumulated trade size # noqa: E501
+ Historical cumulative trading volume # noqa: E501
:param trade_size: The trade_size of this OptionsContract. # noqa: E501
:type: int
@@ -757,7 +729,7 @@ def position_size(self, position_size):
def orders_limit(self):
"""Gets the orders_limit of this OptionsContract. # noqa: E501
- Maximum number of open orders # noqa: E501
+ Maximum number of pending orders # noqa: E501
:return: The orders_limit of this OptionsContract. # noqa: E501
:rtype: int
@@ -768,7 +740,7 @@ def orders_limit(self):
def orders_limit(self, orders_limit):
"""Sets the orders_limit of this OptionsContract.
- Maximum number of open orders # noqa: E501
+ Maximum number of pending orders # noqa: E501
:param orders_limit: The orders_limit of this OptionsContract. # noqa: E501
:type: int
@@ -783,16 +755,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_mmp.py b/gate_api/models/options_mmp.py
new file mode 100644
index 0000000..5594392
--- /dev/null
+++ b/gate_api/models/options_mmp.py
@@ -0,0 +1,296 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class OptionsMMP(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'underlying': 'str',
+ 'window': 'int',
+ 'frozen_period': 'int',
+ 'qty_limit': 'str',
+ 'delta_limit': 'str',
+ 'trigger_time_ms': 'int',
+ 'frozen_until_ms': 'int'
+ }
+
+ attribute_map = {
+ 'underlying': 'underlying',
+ 'window': 'window',
+ 'frozen_period': 'frozen_period',
+ 'qty_limit': 'qty_limit',
+ 'delta_limit': 'delta_limit',
+ 'trigger_time_ms': 'trigger_time_ms',
+ 'frozen_until_ms': 'frozen_until_ms'
+ }
+
+ def __init__(self, underlying=None, window=None, frozen_period=None, qty_limit=None, delta_limit=None, trigger_time_ms=None, frozen_until_ms=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, int, int, str, str, int, int, Configuration) -> None
+ """OptionsMMP - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._underlying = None
+ self._window = None
+ self._frozen_period = None
+ self._qty_limit = None
+ self._delta_limit = None
+ self._trigger_time_ms = None
+ self._frozen_until_ms = None
+ self.discriminator = None
+
+ self.underlying = underlying
+ self.window = window
+ self.frozen_period = frozen_period
+ self.qty_limit = qty_limit
+ self.delta_limit = delta_limit
+ if trigger_time_ms is not None:
+ self.trigger_time_ms = trigger_time_ms
+ if frozen_until_ms is not None:
+ self.frozen_until_ms = frozen_until_ms
+
+ @property
+ def underlying(self):
+ """Gets the underlying of this OptionsMMP. # noqa: E501
+
+ Underlying # noqa: E501
+
+ :return: The underlying of this OptionsMMP. # noqa: E501
+ :rtype: str
+ """
+ return self._underlying
+
+ @underlying.setter
+ def underlying(self, underlying):
+ """Sets the underlying of this OptionsMMP.
+
+ Underlying # noqa: E501
+
+ :param underlying: The underlying of this OptionsMMP. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and underlying is None: # noqa: E501
+ raise ValueError("Invalid value for `underlying`, must not be `None`") # noqa: E501
+
+ self._underlying = underlying
+
+ @property
+ def window(self):
+ """Gets the window of this OptionsMMP. # noqa: E501
+
+ Time window (milliseconds), between 1-5000, 0 means disable MMP # noqa: E501
+
+ :return: The window of this OptionsMMP. # noqa: E501
+ :rtype: int
+ """
+ return self._window
+
+ @window.setter
+ def window(self, window):
+ """Sets the window of this OptionsMMP.
+
+ Time window (milliseconds), between 1-5000, 0 means disable MMP # noqa: E501
+
+ :param window: The window of this OptionsMMP. # noqa: E501
+ :type: int
+ """
+ if self.local_vars_configuration.client_side_validation and window is None: # noqa: E501
+ raise ValueError("Invalid value for `window`, must not be `None`") # noqa: E501
+
+ self._window = window
+
+ @property
+ def frozen_period(self):
+ """Gets the frozen_period of this OptionsMMP. # noqa: E501
+
+ Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze # noqa: E501
+
+ :return: The frozen_period of this OptionsMMP. # noqa: E501
+ :rtype: int
+ """
+ return self._frozen_period
+
+ @frozen_period.setter
+ def frozen_period(self, frozen_period):
+ """Sets the frozen_period of this OptionsMMP.
+
+ Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze # noqa: E501
+
+ :param frozen_period: The frozen_period of this OptionsMMP. # noqa: E501
+ :type: int
+ """
+ if self.local_vars_configuration.client_side_validation and frozen_period is None: # noqa: E501
+ raise ValueError("Invalid value for `frozen_period`, must not be `None`") # noqa: E501
+
+ self._frozen_period = frozen_period
+
+ @property
+ def qty_limit(self):
+ """Gets the qty_limit of this OptionsMMP. # noqa: E501
+
+ Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501
+
+ :return: The qty_limit of this OptionsMMP. # noqa: E501
+ :rtype: str
+ """
+ return self._qty_limit
+
+ @qty_limit.setter
+ def qty_limit(self, qty_limit):
+ """Sets the qty_limit of this OptionsMMP.
+
+ Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501
+
+ :param qty_limit: The qty_limit of this OptionsMMP. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and qty_limit is None: # noqa: E501
+ raise ValueError("Invalid value for `qty_limit`, must not be `None`") # noqa: E501
+
+ self._qty_limit = qty_limit
+
+ @property
+ def delta_limit(self):
+ """Gets the delta_limit of this OptionsMMP. # noqa: E501
+
+ Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501
+
+ :return: The delta_limit of this OptionsMMP. # noqa: E501
+ :rtype: str
+ """
+ return self._delta_limit
+
+ @delta_limit.setter
+ def delta_limit(self, delta_limit):
+ """Sets the delta_limit of this OptionsMMP.
+
+ Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501
+
+ :param delta_limit: The delta_limit of this OptionsMMP. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and delta_limit is None: # noqa: E501
+ raise ValueError("Invalid value for `delta_limit`, must not be `None`") # noqa: E501
+
+ self._delta_limit = delta_limit
+
+ @property
+ def trigger_time_ms(self):
+ """Gets the trigger_time_ms of this OptionsMMP. # noqa: E501
+
+ Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501
+
+ :return: The trigger_time_ms of this OptionsMMP. # noqa: E501
+ :rtype: int
+ """
+ return self._trigger_time_ms
+
+ @trigger_time_ms.setter
+ def trigger_time_ms(self, trigger_time_ms):
+ """Sets the trigger_time_ms of this OptionsMMP.
+
+ Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501
+
+ :param trigger_time_ms: The trigger_time_ms of this OptionsMMP. # noqa: E501
+ :type: int
+ """
+
+ self._trigger_time_ms = trigger_time_ms
+
+ @property
+ def frozen_until_ms(self):
+ """Gets the frozen_until_ms of this OptionsMMP. # noqa: E501
+
+ Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered # noqa: E501
+
+ :return: The frozen_until_ms of this OptionsMMP. # noqa: E501
+ :rtype: int
+ """
+ return self._frozen_until_ms
+
+ @frozen_until_ms.setter
+ def frozen_until_ms(self, frozen_until_ms):
+ """Sets the frozen_until_ms of this OptionsMMP.
+
+ Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered # noqa: E501
+
+ :param frozen_until_ms: The frozen_until_ms of this OptionsMMP. # noqa: E501
+ :type: int
+ """
+
+ self._frozen_until_ms = frozen_until_ms
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, OptionsMMP):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, OptionsMMP):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/options_mmp_reset.py b/gate_api/models/options_mmp_reset.py
new file mode 100644
index 0000000..78658ba
--- /dev/null
+++ b/gate_api/models/options_mmp_reset.py
@@ -0,0 +1,292 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class OptionsMMPReset(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'underlying': 'str',
+ 'window': 'int',
+ 'frozen_period': 'int',
+ 'qty_limit': 'str',
+ 'delta_limit': 'str',
+ 'trigger_time_ms': 'int',
+ 'frozen_until_ms': 'int'
+ }
+
+ attribute_map = {
+ 'underlying': 'underlying',
+ 'window': 'window',
+ 'frozen_period': 'frozen_period',
+ 'qty_limit': 'qty_limit',
+ 'delta_limit': 'delta_limit',
+ 'trigger_time_ms': 'trigger_time_ms',
+ 'frozen_until_ms': 'frozen_until_ms'
+ }
+
+ def __init__(self, underlying=None, window=None, frozen_period=None, qty_limit=None, delta_limit=None, trigger_time_ms=None, frozen_until_ms=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, int, int, str, str, int, int, Configuration) -> None
+ """OptionsMMPReset - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._underlying = None
+ self._window = None
+ self._frozen_period = None
+ self._qty_limit = None
+ self._delta_limit = None
+ self._trigger_time_ms = None
+ self._frozen_until_ms = None
+ self.discriminator = None
+
+ self.underlying = underlying
+ if window is not None:
+ self.window = window
+ if frozen_period is not None:
+ self.frozen_period = frozen_period
+ if qty_limit is not None:
+ self.qty_limit = qty_limit
+ if delta_limit is not None:
+ self.delta_limit = delta_limit
+ if trigger_time_ms is not None:
+ self.trigger_time_ms = trigger_time_ms
+ if frozen_until_ms is not None:
+ self.frozen_until_ms = frozen_until_ms
+
+ @property
+ def underlying(self):
+ """Gets the underlying of this OptionsMMPReset. # noqa: E501
+
+ Underlying # noqa: E501
+
+ :return: The underlying of this OptionsMMPReset. # noqa: E501
+ :rtype: str
+ """
+ return self._underlying
+
+ @underlying.setter
+ def underlying(self, underlying):
+ """Sets the underlying of this OptionsMMPReset.
+
+ Underlying # noqa: E501
+
+ :param underlying: The underlying of this OptionsMMPReset. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and underlying is None: # noqa: E501
+ raise ValueError("Invalid value for `underlying`, must not be `None`") # noqa: E501
+
+ self._underlying = underlying
+
+ @property
+ def window(self):
+ """Gets the window of this OptionsMMPReset. # noqa: E501
+
+ Time window (milliseconds), between 1-5000, 0 means disable MMP # noqa: E501
+
+ :return: The window of this OptionsMMPReset. # noqa: E501
+ :rtype: int
+ """
+ return self._window
+
+ @window.setter
+ def window(self, window):
+ """Sets the window of this OptionsMMPReset.
+
+ Time window (milliseconds), between 1-5000, 0 means disable MMP # noqa: E501
+
+ :param window: The window of this OptionsMMPReset. # noqa: E501
+ :type: int
+ """
+
+ self._window = window
+
+ @property
+ def frozen_period(self):
+ """Gets the frozen_period of this OptionsMMPReset. # noqa: E501
+
+ Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze # noqa: E501
+
+ :return: The frozen_period of this OptionsMMPReset. # noqa: E501
+ :rtype: int
+ """
+ return self._frozen_period
+
+ @frozen_period.setter
+ def frozen_period(self, frozen_period):
+ """Sets the frozen_period of this OptionsMMPReset.
+
+ Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze # noqa: E501
+
+ :param frozen_period: The frozen_period of this OptionsMMPReset. # noqa: E501
+ :type: int
+ """
+
+ self._frozen_period = frozen_period
+
+ @property
+ def qty_limit(self):
+ """Gets the qty_limit of this OptionsMMPReset. # noqa: E501
+
+ Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501
+
+ :return: The qty_limit of this OptionsMMPReset. # noqa: E501
+ :rtype: str
+ """
+ return self._qty_limit
+
+ @qty_limit.setter
+ def qty_limit(self, qty_limit):
+ """Sets the qty_limit of this OptionsMMPReset.
+
+ Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501
+
+ :param qty_limit: The qty_limit of this OptionsMMPReset. # noqa: E501
+ :type: str
+ """
+
+ self._qty_limit = qty_limit
+
+ @property
+ def delta_limit(self):
+ """Gets the delta_limit of this OptionsMMPReset. # noqa: E501
+
+ Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501
+
+ :return: The delta_limit of this OptionsMMPReset. # noqa: E501
+ :rtype: str
+ """
+ return self._delta_limit
+
+ @delta_limit.setter
+ def delta_limit(self, delta_limit):
+ """Sets the delta_limit of this OptionsMMPReset.
+
+ Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501
+
+ :param delta_limit: The delta_limit of this OptionsMMPReset. # noqa: E501
+ :type: str
+ """
+
+ self._delta_limit = delta_limit
+
+ @property
+ def trigger_time_ms(self):
+ """Gets the trigger_time_ms of this OptionsMMPReset. # noqa: E501
+
+ Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501
+
+ :return: The trigger_time_ms of this OptionsMMPReset. # noqa: E501
+ :rtype: int
+ """
+ return self._trigger_time_ms
+
+ @trigger_time_ms.setter
+ def trigger_time_ms(self, trigger_time_ms):
+ """Sets the trigger_time_ms of this OptionsMMPReset.
+
+ Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501
+
+ :param trigger_time_ms: The trigger_time_ms of this OptionsMMPReset. # noqa: E501
+ :type: int
+ """
+
+ self._trigger_time_ms = trigger_time_ms
+
+ @property
+ def frozen_until_ms(self):
+ """Gets the frozen_until_ms of this OptionsMMPReset. # noqa: E501
+
+ Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered # noqa: E501
+
+ :return: The frozen_until_ms of this OptionsMMPReset. # noqa: E501
+ :rtype: int
+ """
+ return self._frozen_until_ms
+
+ @frozen_until_ms.setter
+ def frozen_until_ms(self, frozen_until_ms):
+ """Sets the frozen_until_ms of this OptionsMMPReset.
+
+ Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered # noqa: E501
+
+ :param frozen_until_ms: The frozen_until_ms of this OptionsMMPReset. # noqa: E501
+ :type: int
+ """
+
+ self._frozen_until_ms = frozen_until_ms
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, OptionsMMPReset):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, OptionsMMPReset):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/options_my_settlements.py b/gate_api/models/options_my_settlements.py
index d5f4f9f..24db92e 100644
--- a/gate_api/models/options_my_settlements.py
+++ b/gate_api/models/options_my_settlements.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -41,7 +41,7 @@ class OptionsMySettlements(object):
'size': 'int',
'settle_profit': 'str',
'fee': 'str',
- 'realised_pnl': 'str',
+ 'realised_pnl': 'str'
}
attribute_map = {
@@ -53,22 +53,10 @@ class OptionsMySettlements(object):
'size': 'size',
'settle_profit': 'settle_profit',
'fee': 'fee',
- 'realised_pnl': 'realised_pnl',
+ 'realised_pnl': 'realised_pnl'
}
- def __init__(
- self,
- time=None,
- underlying=None,
- contract=None,
- strike_price=None,
- settle_price=None,
- size=None,
- settle_profit=None,
- fee=None,
- realised_pnl=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, time=None, underlying=None, contract=None, strike_price=None, settle_price=None, size=None, settle_profit=None, fee=None, realised_pnl=None, local_vars_configuration=None): # noqa: E501
# type: (float, str, str, str, str, int, str, str, str, Configuration) -> None
"""OptionsMySettlements - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -224,7 +212,7 @@ def settle_price(self, settle_price):
def size(self):
"""Gets the size of this OptionsMySettlements. # noqa: E501
- Size # noqa: E501
+ Settlement size # noqa: E501
:return: The size of this OptionsMySettlements. # noqa: E501
:rtype: int
@@ -235,7 +223,7 @@ def size(self):
def size(self, size):
"""Sets the size of this OptionsMySettlements.
- Size # noqa: E501
+ Settlement size # noqa: E501
:param size: The size of this OptionsMySettlements. # noqa: E501
:type: int
@@ -270,7 +258,7 @@ def settle_profit(self, settle_profit):
def fee(self):
"""Gets the fee of this OptionsMySettlements. # noqa: E501
- Fee (quote currency) # noqa: E501
+ Settlement fee (quote currency) # noqa: E501
:return: The fee of this OptionsMySettlements. # noqa: E501
:rtype: str
@@ -281,7 +269,7 @@ def fee(self):
def fee(self, fee):
"""Sets the fee of this OptionsMySettlements.
- Fee (quote currency) # noqa: E501
+ Settlement fee (quote currency) # noqa: E501
:param fee: The fee of this OptionsMySettlements. # noqa: E501
:type: str
@@ -293,7 +281,7 @@ def fee(self, fee):
def realised_pnl(self):
"""Gets the realised_pnl of this OptionsMySettlements. # noqa: E501
- The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) # noqa: E501
+ Accumulated profit and loss from opening positions, including premium, fees, settlement profit, etc. (quote currency) # noqa: E501
:return: The realised_pnl of this OptionsMySettlements. # noqa: E501
:rtype: str
@@ -304,7 +292,7 @@ def realised_pnl(self):
def realised_pnl(self, realised_pnl):
"""Sets the realised_pnl of this OptionsMySettlements.
- The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) # noqa: E501
+ Accumulated profit and loss from opening positions, including premium, fees, settlement profit, etc. (quote currency) # noqa: E501
:param realised_pnl: The realised_pnl of this OptionsMySettlements. # noqa: E501
:type: str
@@ -319,16 +307,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_my_trade.py b/gate_api/models/options_my_trade.py
index 3126207..55435f0 100644
--- a/gate_api/models/options_my_trade.py
+++ b/gate_api/models/options_my_trade.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -40,7 +40,7 @@ class OptionsMyTrade(object):
'size': 'int',
'price': 'str',
'underlying_price': 'str',
- 'role': 'str',
+ 'role': 'str'
}
attribute_map = {
@@ -51,21 +51,10 @@ class OptionsMyTrade(object):
'size': 'size',
'price': 'price',
'underlying_price': 'underlying_price',
- 'role': 'role',
+ 'role': 'role'
}
- def __init__(
- self,
- id=None,
- create_time=None,
- contract=None,
- order_id=None,
- size=None,
- price=None,
- underlying_price=None,
- role=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, id=None, create_time=None, contract=None, order_id=None, size=None, price=None, underlying_price=None, role=None, local_vars_configuration=None): # noqa: E501
# type: (int, float, str, int, int, str, str, str, Configuration) -> None
"""OptionsMyTrade - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -103,7 +92,7 @@ def __init__(
def id(self):
"""Gets the id of this OptionsMyTrade. # noqa: E501
- Trade ID # noqa: E501
+ Fill ID # noqa: E501
:return: The id of this OptionsMyTrade. # noqa: E501
:rtype: int
@@ -114,7 +103,7 @@ def id(self):
def id(self, id):
"""Sets the id of this OptionsMyTrade.
- Trade ID # noqa: E501
+ Fill ID # noqa: E501
:param id: The id of this OptionsMyTrade. # noqa: E501
:type: int
@@ -126,7 +115,7 @@ def id(self, id):
def create_time(self):
"""Gets the create_time of this OptionsMyTrade. # noqa: E501
- Trading time # noqa: E501
+ Fill Time # noqa: E501
:return: The create_time of this OptionsMyTrade. # noqa: E501
:rtype: float
@@ -137,7 +126,7 @@ def create_time(self):
def create_time(self, create_time):
"""Sets the create_time of this OptionsMyTrade.
- Trading time # noqa: E501
+ Fill Time # noqa: E501
:param create_time: The create_time of this OptionsMyTrade. # noqa: E501
:type: float
@@ -172,7 +161,7 @@ def contract(self, contract):
def order_id(self):
"""Gets the order_id of this OptionsMyTrade. # noqa: E501
- Order ID related # noqa: E501
+ Related order ID # noqa: E501
:return: The order_id of this OptionsMyTrade. # noqa: E501
:rtype: int
@@ -183,7 +172,7 @@ def order_id(self):
def order_id(self, order_id):
"""Sets the order_id of this OptionsMyTrade.
- Order ID related # noqa: E501
+ Related order ID # noqa: E501
:param order_id: The order_id of this OptionsMyTrade. # noqa: E501
:type: int
@@ -218,7 +207,7 @@ def size(self, size):
def price(self):
"""Gets the price of this OptionsMyTrade. # noqa: E501
- Trading price (quote currency) # noqa: E501
+ Trade price (quote currency) # noqa: E501
:return: The price of this OptionsMyTrade. # noqa: E501
:rtype: str
@@ -229,7 +218,7 @@ def price(self):
def price(self, price):
"""Sets the price of this OptionsMyTrade.
- Trading price (quote currency) # noqa: E501
+ Trade price (quote currency) # noqa: E501
:param price: The price of this OptionsMyTrade. # noqa: E501
:type: str
@@ -264,7 +253,7 @@ def underlying_price(self, underlying_price):
def role(self):
"""Gets the role of this OptionsMyTrade. # noqa: E501
- Trade role. Available values are `taker` and `maker` # noqa: E501
+ Trade role. taker - taker, maker - maker # noqa: E501
:return: The role of this OptionsMyTrade. # noqa: E501
:rtype: str
@@ -275,7 +264,7 @@ def role(self):
def role(self, role):
"""Sets the role of this OptionsMyTrade.
- Trade role. Available values are `taker` and `maker` # noqa: E501
+ Trade role. taker - taker, maker - maker # noqa: E501
:param role: The role of this OptionsMyTrade. # noqa: E501
:type: str
@@ -283,7 +272,8 @@ def role(self, role):
allowed_values = ["taker", "maker"] # noqa: E501
if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `role` ({0}), must be one of {1}".format(role, allowed_values) # noqa: E501
+ "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501
+ .format(role, allowed_values)
)
self._role = role
@@ -295,16 +285,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_order.py b/gate_api/models/options_order.py
index e02eafc..1f28133 100644
--- a/gate_api/models/options_order.py
+++ b/gate_api/models/options_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -48,6 +48,8 @@ class OptionsOrder(object):
'reduce_only': 'bool',
'is_reduce_only': 'bool',
'is_liq': 'bool',
+ 'mmp': 'bool',
+ 'is_mmp': 'bool',
'tif': 'str',
'left': 'int',
'fill_price': 'str',
@@ -55,7 +57,7 @@ class OptionsOrder(object):
'tkfr': 'str',
'mkfr': 'str',
'refu': 'int',
- 'refr': 'str',
+ 'refr': 'str'
}
attribute_map = {
@@ -74,6 +76,8 @@ class OptionsOrder(object):
'reduce_only': 'reduce_only',
'is_reduce_only': 'is_reduce_only',
'is_liq': 'is_liq',
+ 'mmp': 'mmp',
+ 'is_mmp': 'is_mmp',
'tif': 'tif',
'left': 'left',
'fill_price': 'fill_price',
@@ -81,37 +85,11 @@ class OptionsOrder(object):
'tkfr': 'tkfr',
'mkfr': 'mkfr',
'refu': 'refu',
- 'refr': 'refr',
+ 'refr': 'refr'
}
- def __init__(
- self,
- id=None,
- user=None,
- create_time=None,
- finish_time=None,
- finish_as=None,
- status=None,
- contract=None,
- size=None,
- iceberg=None,
- price=None,
- close=False,
- is_close=None,
- reduce_only=False,
- is_reduce_only=None,
- is_liq=None,
- tif='gtc',
- left=None,
- fill_price=None,
- text=None,
- tkfr=None,
- mkfr=None,
- refu=None,
- refr=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, Configuration) -> None
+ def __init__(self, id=None, user=None, create_time=None, finish_time=None, finish_as=None, status=None, contract=None, size=None, iceberg=None, price=None, close=False, is_close=None, reduce_only=False, is_reduce_only=None, is_liq=None, mmp=False, is_mmp=None, tif='gtc', left=None, fill_price=None, text=None, tkfr=None, mkfr=None, refu=None, refr=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, Configuration) -> None
"""OptionsOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -132,6 +110,8 @@ def __init__(
self._reduce_only = None
self._is_reduce_only = None
self._is_liq = None
+ self._mmp = None
+ self._is_mmp = None
self._tif = None
self._left = None
self._fill_price = None
@@ -170,6 +150,10 @@ def __init__(
self.is_reduce_only = is_reduce_only
if is_liq is not None:
self.is_liq = is_liq
+ if mmp is not None:
+ self.mmp = mmp
+ if is_mmp is not None:
+ self.is_mmp = is_mmp
if tif is not None:
self.tif = tif
if left is not None:
@@ -283,7 +267,7 @@ def finish_time(self, finish_time):
def finish_as(self):
"""Gets the finish_as of this OptionsOrder. # noqa: E501
- 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 # noqa: E501
+ Order finish reason: - filled: Fully filled - cancelled: User cancelled - liquidated: Cancelled due to liquidation - ioc: Not immediately fully filled due to IOC time-in-force setting - auto_deleveraged: Cancelled due to auto-deleveraging - reduce_only: Cancelled due to position increase while reduce-only is set - position_closed: Cancelled because the position was closed - reduce_out: Only reduce positions by excluding hard-to-fill orders - mmp_cancelled: Cancelled by MMP # noqa: E501
:return: The finish_as of this OptionsOrder. # noqa: E501
:rtype: str
@@ -294,26 +278,16 @@ def finish_as(self):
def finish_as(self, finish_as):
"""Sets the finish_as of this OptionsOrder.
- 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 # noqa: E501
+ Order finish reason: - filled: Fully filled - cancelled: User cancelled - liquidated: Cancelled due to liquidation - ioc: Not immediately fully filled due to IOC time-in-force setting - auto_deleveraged: Cancelled due to auto-deleveraging - reduce_only: Cancelled due to position increase while reduce-only is set - position_closed: Cancelled because the position was closed - reduce_out: Only reduce positions by excluding hard-to-fill orders - mmp_cancelled: Cancelled by MMP # noqa: E501
:param finish_as: The finish_as of this OptionsOrder. # noqa: E501
:type: str
"""
- allowed_values = [
- "filled",
- "cancelled",
- "liquidated",
- "ioc",
- "auto_deleveraged",
- "reduce_only",
- "position_closed",
- "reduce_out",
- ] # noqa: E501
+ allowed_values = ["filled", "cancelled", "liquidated", "ioc", "auto_deleveraged", "reduce_only", "position_closed", "reduce_out", "mmp_cancelled"] # noqa: E501
if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `finish_as` ({0}), must be one of {1}".format( # noqa: E501
- finish_as, allowed_values
- )
+ "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501
+ .format(finish_as, allowed_values)
)
self._finish_as = finish_as
@@ -322,7 +296,7 @@ def finish_as(self, finish_as):
def status(self):
"""Gets the status of this OptionsOrder. # noqa: E501
- Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501
+ Order status - `open`: Pending - `finished`: Completed # noqa: E501
:return: The status of this OptionsOrder. # noqa: E501
:rtype: str
@@ -333,7 +307,7 @@ def status(self):
def status(self, status):
"""Sets the status of this OptionsOrder.
- Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501
+ Order status - `open`: Pending - `finished`: Completed # noqa: E501
:param status: The status of this OptionsOrder. # noqa: E501
:type: str
@@ -341,7 +315,8 @@ def status(self, status):
allowed_values = ["open", "finished"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values) # noqa: E501
+ "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
+ .format(status, allowed_values)
)
self._status = status
@@ -350,7 +325,7 @@ def status(self, status):
def contract(self):
"""Gets the contract of this OptionsOrder. # noqa: E501
- Contract name # noqa: E501
+ Options identifier # noqa: E501
:return: The contract of this OptionsOrder. # noqa: E501
:rtype: str
@@ -361,7 +336,7 @@ def contract(self):
def contract(self, contract):
"""Sets the contract of this OptionsOrder.
- Contract name # noqa: E501
+ Options identifier # noqa: E501
:param contract: The contract of this OptionsOrder. # noqa: E501
:type: str
@@ -375,7 +350,7 @@ def contract(self, contract):
def size(self):
"""Gets the size of this OptionsOrder. # noqa: E501
- Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501
+ Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. # noqa: E501
:return: The size of this OptionsOrder. # noqa: E501
:rtype: int
@@ -386,7 +361,7 @@ def size(self):
def size(self, size):
"""Sets the size of this OptionsOrder.
- Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501
+ Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. # noqa: E501
:param size: The size of this OptionsOrder. # noqa: E501
:type: int
@@ -400,7 +375,7 @@ def size(self, size):
def iceberg(self):
"""Gets the iceberg of this OptionsOrder. # noqa: E501
- Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501
+ Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. # noqa: E501
:return: The iceberg of this OptionsOrder. # noqa: E501
:rtype: int
@@ -411,7 +386,7 @@ def iceberg(self):
def iceberg(self, iceberg):
"""Sets the iceberg of this OptionsOrder.
- Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501
+ Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. # noqa: E501
:param iceberg: The iceberg of this OptionsOrder. # noqa: E501
:type: int
@@ -423,7 +398,7 @@ def iceberg(self, iceberg):
def price(self):
"""Gets the price of this OptionsOrder. # noqa: E501
- Order price. 0 for market order with `tif` set as `ioc` (USDT) # noqa: E501
+ Order price. Price of 0 with `tif` set as `ioc` represents market order (quote currency) # noqa: E501
:return: The price of this OptionsOrder. # noqa: E501
:rtype: str
@@ -434,7 +409,7 @@ def price(self):
def price(self, price):
"""Sets the price of this OptionsOrder.
- Order price. 0 for market order with `tif` set as `ioc` (USDT) # noqa: E501
+ Order price. Price of 0 with `tif` set as `ioc` represents market order (quote currency) # noqa: E501
:param price: The price of this OptionsOrder. # noqa: E501
:type: str
@@ -557,11 +532,57 @@ def is_liq(self, is_liq):
self._is_liq = is_liq
+ @property
+ def mmp(self):
+ """Gets the mmp of this OptionsOrder. # noqa: E501
+
+ When set to true, it is an MMP order # noqa: E501
+
+ :return: The mmp of this OptionsOrder. # noqa: E501
+ :rtype: bool
+ """
+ return self._mmp
+
+ @mmp.setter
+ def mmp(self, mmp):
+ """Sets the mmp of this OptionsOrder.
+
+ When set to true, it is an MMP order # noqa: E501
+
+ :param mmp: The mmp of this OptionsOrder. # noqa: E501
+ :type: bool
+ """
+
+ self._mmp = mmp
+
+ @property
+ def is_mmp(self):
+ """Gets the is_mmp of this OptionsOrder. # noqa: E501
+
+ Whether it is an MMP order. Corresponds to `mmp` in the request # noqa: E501
+
+ :return: The is_mmp of this OptionsOrder. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_mmp
+
+ @is_mmp.setter
+ def is_mmp(self, is_mmp):
+ """Sets the is_mmp of this OptionsOrder.
+
+ Whether it is an MMP order. Corresponds to `mmp` in the request # noqa: E501
+
+ :param is_mmp: The is_mmp of this OptionsOrder. # noqa: E501
+ :type: bool
+ """
+
+ self._is_mmp = is_mmp
+
@property
def tif(self):
"""Gets the tif of this OptionsOrder. # noqa: E501
- Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee # noqa: E501
+ Time in force strategy. Market orders currently only support IOC mode - gtc: Good Till Cancelled - ioc: Immediate Or Cancelled, execute immediately or cancel, taker only - poc: Pending Or Cancelled, passive order, maker only # noqa: E501
:return: The tif of this OptionsOrder. # noqa: E501
:rtype: str
@@ -572,7 +593,7 @@ def tif(self):
def tif(self, tif):
"""Sets the tif of this OptionsOrder.
- Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee # noqa: E501
+ Time in force strategy. Market orders currently only support IOC mode - gtc: Good Till Cancelled - ioc: Immediate Or Cancelled, execute immediately or cancel, taker only - poc: Pending Or Cancelled, passive order, maker only # noqa: E501
:param tif: The tif of this OptionsOrder. # noqa: E501
:type: str
@@ -580,7 +601,8 @@ def tif(self, tif):
allowed_values = ["gtc", "ioc", "poc"] # noqa: E501
if self.local_vars_configuration.client_side_validation and tif not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `tif` ({0}), must be one of {1}".format(tif, allowed_values) # noqa: E501
+ "Invalid value for `tif` ({0}), must be one of {1}" # noqa: E501
+ .format(tif, allowed_values)
)
self._tif = tif
@@ -589,7 +611,7 @@ def tif(self, tif):
def left(self):
"""Gets the left of this OptionsOrder. # noqa: E501
- Size left to be traded # noqa: E501
+ Unfilled quantity # noqa: E501
:return: The left of this OptionsOrder. # noqa: E501
:rtype: int
@@ -600,7 +622,7 @@ def left(self):
def left(self, left):
"""Sets the left of this OptionsOrder.
- Size left to be traded # noqa: E501
+ Unfilled quantity # noqa: E501
:param left: The left of this OptionsOrder. # noqa: E501
:type: int
@@ -612,7 +634,7 @@ def left(self, left):
def fill_price(self):
"""Gets the fill_price of this OptionsOrder. # noqa: E501
- Fill price of the order # noqa: E501
+ Fill price # noqa: E501
:return: The fill_price of this OptionsOrder. # noqa: E501
:rtype: str
@@ -623,7 +645,7 @@ def fill_price(self):
def fill_price(self, fill_price):
"""Sets the fill_price of this OptionsOrder.
- Fill price of the order # noqa: E501
+ Fill price # noqa: E501
:param fill_price: The fill_price of this OptionsOrder. # noqa: E501
:type: str
@@ -704,7 +726,7 @@ def mkfr(self, mkfr):
def refu(self):
"""Gets the refu of this OptionsOrder. # noqa: E501
- Reference user ID # noqa: E501
+ Referrer user ID # noqa: E501
:return: The refu of this OptionsOrder. # noqa: E501
:rtype: int
@@ -715,7 +737,7 @@ def refu(self):
def refu(self, refu):
"""Sets the refu of this OptionsOrder.
- Reference user ID # noqa: E501
+ Referrer user ID # noqa: E501
:param refu: The refu of this OptionsOrder. # noqa: E501
:type: int
@@ -753,16 +775,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_position.py b/gate_api/models/options_position.py
index c4c61c5..b20a575 100644
--- a/gate_api/models/options_position.py
+++ b/gate_api/models/options_position.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -48,7 +48,7 @@ class OptionsPosition(object):
'delta': 'str',
'gamma': 'str',
'vega': 'str',
- 'theta': 'str',
+ 'theta': 'str'
}
attribute_map = {
@@ -67,29 +67,10 @@ class OptionsPosition(object):
'delta': 'delta',
'gamma': 'gamma',
'vega': 'vega',
- 'theta': 'theta',
+ 'theta': 'theta'
}
- def __init__(
- self,
- user=None,
- underlying=None,
- underlying_price=None,
- contract=None,
- size=None,
- entry_price=None,
- mark_price=None,
- mark_iv=None,
- realised_pnl=None,
- unrealised_pnl=None,
- pending_orders=None,
- close_order=None,
- delta=None,
- gamma=None,
- vega=None,
- theta=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, user=None, underlying=None, underlying_price=None, contract=None, size=None, entry_price=None, mark_price=None, mark_iv=None, realised_pnl=None, unrealised_pnl=None, pending_orders=None, close_order=None, delta=None, gamma=None, vega=None, theta=None, local_vars_configuration=None): # noqa: E501
# type: (int, str, str, str, int, str, str, str, str, str, int, OptionsPositionCloseOrder, str, str, str, str, Configuration) -> None
"""OptionsPosition - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -242,7 +223,7 @@ def contract(self, contract):
def size(self):
"""Gets the size of this OptionsPosition. # noqa: E501
- Position size (contract size) # noqa: E501
+ Position size (contract quantity) # noqa: E501
:return: The size of this OptionsPosition. # noqa: E501
:rtype: int
@@ -253,7 +234,7 @@ def size(self):
def size(self, size):
"""Sets the size of this OptionsPosition.
- Position size (contract size) # noqa: E501
+ Position size (contract quantity) # noqa: E501
:param size: The size of this OptionsPosition. # noqa: E501
:type: int
@@ -334,7 +315,7 @@ def mark_iv(self, mark_iv):
def realised_pnl(self):
"""Gets the realised_pnl of this OptionsPosition. # noqa: E501
- Realized PNL # noqa: E501
+ Realized PnL # noqa: E501
:return: The realised_pnl of this OptionsPosition. # noqa: E501
:rtype: str
@@ -345,7 +326,7 @@ def realised_pnl(self):
def realised_pnl(self, realised_pnl):
"""Sets the realised_pnl of this OptionsPosition.
- Realized PNL # noqa: E501
+ Realized PnL # noqa: E501
:param realised_pnl: The realised_pnl of this OptionsPosition. # noqa: E501
:type: str
@@ -380,7 +361,7 @@ def unrealised_pnl(self, unrealised_pnl):
def pending_orders(self):
"""Gets the pending_orders of this OptionsPosition. # noqa: E501
- Current open orders # noqa: E501
+ Current pending order quantity # noqa: E501
:return: The pending_orders of this OptionsPosition. # noqa: E501
:rtype: int
@@ -391,7 +372,7 @@ def pending_orders(self):
def pending_orders(self, pending_orders):
"""Sets the pending_orders of this OptionsPosition.
- Current open orders # noqa: E501
+ Current pending order quantity # noqa: E501
:param pending_orders: The pending_orders of this OptionsPosition. # noqa: E501
:type: int
@@ -424,7 +405,7 @@ def close_order(self, close_order):
def delta(self):
"""Gets the delta of this OptionsPosition. # noqa: E501
- Delta # noqa: E501
+ Greek letter delta # noqa: E501
:return: The delta of this OptionsPosition. # noqa: E501
:rtype: str
@@ -435,7 +416,7 @@ def delta(self):
def delta(self, delta):
"""Sets the delta of this OptionsPosition.
- Delta # noqa: E501
+ Greek letter delta # noqa: E501
:param delta: The delta of this OptionsPosition. # noqa: E501
:type: str
@@ -447,7 +428,7 @@ def delta(self, delta):
def gamma(self):
"""Gets the gamma of this OptionsPosition. # noqa: E501
- Gamma # noqa: E501
+ Greek letter gamma # noqa: E501
:return: The gamma of this OptionsPosition. # noqa: E501
:rtype: str
@@ -458,7 +439,7 @@ def gamma(self):
def gamma(self, gamma):
"""Sets the gamma of this OptionsPosition.
- Gamma # noqa: E501
+ Greek letter gamma # noqa: E501
:param gamma: The gamma of this OptionsPosition. # noqa: E501
:type: str
@@ -470,7 +451,7 @@ def gamma(self, gamma):
def vega(self):
"""Gets the vega of this OptionsPosition. # noqa: E501
- Vega # noqa: E501
+ Greek letter vega # noqa: E501
:return: The vega of this OptionsPosition. # noqa: E501
:rtype: str
@@ -481,7 +462,7 @@ def vega(self):
def vega(self, vega):
"""Sets the vega of this OptionsPosition.
- Vega # noqa: E501
+ Greek letter vega # noqa: E501
:param vega: The vega of this OptionsPosition. # noqa: E501
:type: str
@@ -493,7 +474,7 @@ def vega(self, vega):
def theta(self):
"""Gets the theta of this OptionsPosition. # noqa: E501
- Theta # noqa: E501
+ Greek letter theta # noqa: E501
:return: The theta of this OptionsPosition. # noqa: E501
:rtype: str
@@ -504,7 +485,7 @@ def theta(self):
def theta(self, theta):
"""Sets the theta of this OptionsPosition.
- Theta # noqa: E501
+ Greek letter theta # noqa: E501
:param theta: The theta of this OptionsPosition. # noqa: E501
:type: str
@@ -519,16 +500,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_position_close.py b/gate_api/models/options_position_close.py
index fdcce2b..2cc0fbb 100644
--- a/gate_api/models/options_position_close.py
+++ b/gate_api/models/options_position_close.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -38,7 +38,7 @@ class OptionsPositionClose(object):
'side': 'str',
'pnl': 'str',
'text': 'str',
- 'settle_size': 'str',
+ 'settle_size': 'str'
}
attribute_map = {
@@ -47,12 +47,10 @@ class OptionsPositionClose(object):
'side': 'side',
'pnl': 'pnl',
'text': 'text',
- 'settle_size': 'settle_size',
+ 'settle_size': 'settle_size'
}
- def __init__(
- self, time=None, contract=None, side=None, pnl=None, text=None, settle_size=None, local_vars_configuration=None
- ): # noqa: E501
+ def __init__(self, time=None, contract=None, side=None, pnl=None, text=None, settle_size=None, local_vars_configuration=None): # noqa: E501
# type: (float, str, str, str, str, str, Configuration) -> None
"""OptionsPositionClose - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -130,7 +128,7 @@ def contract(self, contract):
def side(self):
"""Gets the side of this OptionsPositionClose. # noqa: E501
- Position side, long or short # noqa: E501
+ Position side - `long`: Long position - `short`: Short position # noqa: E501
:return: The side of this OptionsPositionClose. # noqa: E501
:rtype: str
@@ -141,7 +139,7 @@ def side(self):
def side(self, side):
"""Sets the side of this OptionsPositionClose.
- Position side, long or short # noqa: E501
+ Position side - `long`: Long position - `short`: Short position # noqa: E501
:param side: The side of this OptionsPositionClose. # noqa: E501
:type: str
@@ -149,7 +147,8 @@ def side(self, side):
allowed_values = ["long", "short"] # noqa: E501
if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `side` ({0}), must be one of {1}".format(side, allowed_values) # noqa: E501
+ "Invalid value for `side` ({0}), must be one of {1}" # noqa: E501
+ .format(side, allowed_values)
)
self._side = side
@@ -158,7 +157,7 @@ def side(self, side):
def pnl(self):
"""Gets the pnl of this OptionsPositionClose. # noqa: E501
- PNL # noqa: E501
+ PnL # noqa: E501
:return: The pnl of this OptionsPositionClose. # noqa: E501
:rtype: str
@@ -169,7 +168,7 @@ def pnl(self):
def pnl(self, pnl):
"""Sets the pnl of this OptionsPositionClose.
- PNL # noqa: E501
+ PnL # noqa: E501
:param pnl: The pnl of this OptionsPositionClose. # noqa: E501
:type: str
@@ -181,7 +180,7 @@ def pnl(self, pnl):
def text(self):
"""Gets the text of this OptionsPositionClose. # noqa: E501
- Text of close order # noqa: E501
+ Source of close order. See `order.text` field for specific values # noqa: E501
:return: The text of this OptionsPositionClose. # noqa: E501
:rtype: str
@@ -192,7 +191,7 @@ def text(self):
def text(self, text):
"""Sets the text of this OptionsPositionClose.
- Text of close order # noqa: E501
+ Source of close order. See `order.text` field for specific values # noqa: E501
:param text: The text of this OptionsPositionClose. # noqa: E501
:type: str
@@ -204,7 +203,7 @@ def text(self, text):
def settle_size(self):
"""Gets the settle_size of this OptionsPositionClose. # noqa: E501
- settlement size # noqa: E501
+ Settlement size # noqa: E501
:return: The settle_size of this OptionsPositionClose. # noqa: E501
:rtype: str
@@ -215,7 +214,7 @@ def settle_size(self):
def settle_size(self, settle_size):
"""Sets the settle_size of this OptionsPositionClose.
- settlement size # noqa: E501
+ Settlement size # noqa: E501
:param settle_size: The settle_size of this OptionsPositionClose. # noqa: E501
:type: str
@@ -230,16 +229,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_position_close_order.py b/gate_api/models/options_position_close_order.py
index 1a50f65..31449b1 100644
--- a/gate_api/models/options_position_close_order.py
+++ b/gate_api/models/options_position_close_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,17 @@ class OptionsPositionCloseOrder(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'id': 'int', 'price': 'str', 'is_liq': 'bool'}
-
- attribute_map = {'id': 'id', 'price': 'price', 'is_liq': 'is_liq'}
+ openapi_types = {
+ 'id': 'int',
+ 'price': 'str',
+ 'is_liq': 'bool'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'price': 'price',
+ 'is_liq': 'is_liq'
+ }
def __init__(self, id=None, price=None, is_liq=None, local_vars_configuration=None): # noqa: E501
# type: (int, str, bool, Configuration) -> None
@@ -59,7 +67,7 @@ def __init__(self, id=None, price=None, is_liq=None, local_vars_configuration=No
def id(self):
"""Gets the id of this OptionsPositionCloseOrder. # noqa: E501
- Close order ID # noqa: E501
+ Order ID # noqa: E501
:return: The id of this OptionsPositionCloseOrder. # noqa: E501
:rtype: int
@@ -70,7 +78,7 @@ def id(self):
def id(self, id):
"""Sets the id of this OptionsPositionCloseOrder.
- Close order ID # noqa: E501
+ Order ID # noqa: E501
:param id: The id of this OptionsPositionCloseOrder. # noqa: E501
:type: int
@@ -82,7 +90,7 @@ def id(self, id):
def price(self):
"""Gets the price of this OptionsPositionCloseOrder. # noqa: E501
- Close order price (quote currency) # noqa: E501
+ Order price (quote currency) # noqa: E501
:return: The price of this OptionsPositionCloseOrder. # noqa: E501
:rtype: str
@@ -93,7 +101,7 @@ def price(self):
def price(self, price):
"""Sets the price of this OptionsPositionCloseOrder.
- Close order price (quote currency) # noqa: E501
+ Order price (quote currency) # noqa: E501
:param price: The price of this OptionsPositionCloseOrder. # noqa: E501
:type: str
@@ -105,7 +113,7 @@ def price(self, price):
def is_liq(self):
"""Gets the is_liq of this OptionsPositionCloseOrder. # noqa: E501
- Is the close order from liquidation # noqa: E501
+ Whether the close order is from liquidation # noqa: E501
:return: The is_liq of this OptionsPositionCloseOrder. # noqa: E501
:rtype: bool
@@ -116,7 +124,7 @@ def is_liq(self):
def is_liq(self, is_liq):
"""Sets the is_liq of this OptionsPositionCloseOrder.
- Is the close order from liquidation # noqa: E501
+ Whether the close order is from liquidation # noqa: E501
:param is_liq: The is_liq of this OptionsPositionCloseOrder. # noqa: E501
:type: bool
@@ -131,16 +139,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_settlement.py b/gate_api/models/options_settlement.py
index 3fdfafa..d199ae4 100644
--- a/gate_api/models/options_settlement.py
+++ b/gate_api/models/options_settlement.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -38,7 +38,7 @@ class OptionsSettlement(object):
'profit': 'str',
'fee': 'str',
'strike_price': 'str',
- 'settle_price': 'str',
+ 'settle_price': 'str'
}
attribute_map = {
@@ -47,19 +47,10 @@ class OptionsSettlement(object):
'profit': 'profit',
'fee': 'fee',
'strike_price': 'strike_price',
- 'settle_price': 'settle_price',
+ 'settle_price': 'settle_price'
}
- def __init__(
- self,
- time=None,
- contract=None,
- profit=None,
- fee=None,
- strike_price=None,
- settle_price=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, time=None, contract=None, profit=None, fee=None, strike_price=None, settle_price=None, local_vars_configuration=None): # noqa: E501
# type: (float, str, str, str, str, str, Configuration) -> None
"""OptionsSettlement - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -91,7 +82,7 @@ def __init__(
def time(self):
"""Gets the time of this OptionsSettlement. # noqa: E501
- Last changed time of configuration # noqa: E501
+ Last configuration update time # noqa: E501
:return: The time of this OptionsSettlement. # noqa: E501
:rtype: float
@@ -102,7 +93,7 @@ def time(self):
def time(self, time):
"""Sets the time of this OptionsSettlement.
- Last changed time of configuration # noqa: E501
+ Last configuration update time # noqa: E501
:param time: The time of this OptionsSettlement. # noqa: E501
:type: float
@@ -137,7 +128,7 @@ def contract(self, contract):
def profit(self):
"""Gets the profit of this OptionsSettlement. # noqa: E501
- Settlement profit per size (quote currency) # noqa: E501
+ Settlement profit per contract (quote currency) # noqa: E501
:return: The profit of this OptionsSettlement. # noqa: E501
:rtype: str
@@ -148,7 +139,7 @@ def profit(self):
def profit(self, profit):
"""Sets the profit of this OptionsSettlement.
- Settlement profit per size (quote currency) # noqa: E501
+ Settlement profit per contract (quote currency) # noqa: E501
:param profit: The profit of this OptionsSettlement. # noqa: E501
:type: str
@@ -160,7 +151,7 @@ def profit(self, profit):
def fee(self):
"""Gets the fee of this OptionsSettlement. # noqa: E501
- Settlement fee per size (quote currency) # noqa: E501
+ Settlement fee per contract (quote currency) # noqa: E501
:return: The fee of this OptionsSettlement. # noqa: E501
:rtype: str
@@ -171,7 +162,7 @@ def fee(self):
def fee(self, fee):
"""Sets the fee of this OptionsSettlement.
- Settlement fee per size (quote currency) # noqa: E501
+ Settlement fee per contract (quote currency) # noqa: E501
:param fee: The fee of this OptionsSettlement. # noqa: E501
:type: str
@@ -232,16 +223,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_ticker.py b/gate_api/models/options_ticker.py
index a8cb497..8a645f8 100644
--- a/gate_api/models/options_ticker.py
+++ b/gate_api/models/options_ticker.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -50,7 +50,7 @@ class OptionsTicker(object):
'gamma': 'str',
'vega': 'str',
'theta': 'str',
- 'rho': 'str',
+ 'rho': 'str'
}
attribute_map = {
@@ -71,31 +71,10 @@ class OptionsTicker(object):
'gamma': 'gamma',
'vega': 'vega',
'theta': 'theta',
- 'rho': 'rho',
+ 'rho': 'rho'
}
- def __init__(
- self,
- name=None,
- last_price=None,
- mark_price=None,
- index_price=None,
- ask1_size=None,
- ask1_price=None,
- bid1_size=None,
- bid1_price=None,
- position_size=None,
- mark_iv=None,
- bid_iv=None,
- ask_iv=None,
- leverage=None,
- delta=None,
- gamma=None,
- vega=None,
- theta=None,
- rho=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, name=None, last_price=None, mark_price=None, index_price=None, ask1_size=None, ask1_price=None, bid1_size=None, bid1_price=None, position_size=None, mark_iv=None, bid_iv=None, ask_iv=None, leverage=None, delta=None, gamma=None, vega=None, theta=None, rho=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, int, str, int, str, int, str, str, str, str, str, str, str, str, str, Configuration) -> None
"""OptionsTicker - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -186,7 +165,7 @@ def name(self, name):
def last_price(self):
"""Gets the last_price of this OptionsTicker. # noqa: E501
- Last trading price (quote currency) # noqa: E501
+ Last trade price (quote currency) # noqa: E501
:return: The last_price of this OptionsTicker. # noqa: E501
:rtype: str
@@ -197,7 +176,7 @@ def last_price(self):
def last_price(self, last_price):
"""Sets the last_price of this OptionsTicker.
- Last trading price (quote currency) # noqa: E501
+ Last trade price (quote currency) # noqa: E501
:param last_price: The last_price of this OptionsTicker. # noqa: E501
:type: str
@@ -462,7 +441,7 @@ def leverage(self, leverage):
def delta(self):
"""Gets the delta of this OptionsTicker. # noqa: E501
- Delta # noqa: E501
+ Greek letter delta # noqa: E501
:return: The delta of this OptionsTicker. # noqa: E501
:rtype: str
@@ -473,7 +452,7 @@ def delta(self):
def delta(self, delta):
"""Sets the delta of this OptionsTicker.
- Delta # noqa: E501
+ Greek letter delta # noqa: E501
:param delta: The delta of this OptionsTicker. # noqa: E501
:type: str
@@ -485,7 +464,7 @@ def delta(self, delta):
def gamma(self):
"""Gets the gamma of this OptionsTicker. # noqa: E501
- Gamma # noqa: E501
+ Greek letter gamma # noqa: E501
:return: The gamma of this OptionsTicker. # noqa: E501
:rtype: str
@@ -496,7 +475,7 @@ def gamma(self):
def gamma(self, gamma):
"""Sets the gamma of this OptionsTicker.
- Gamma # noqa: E501
+ Greek letter gamma # noqa: E501
:param gamma: The gamma of this OptionsTicker. # noqa: E501
:type: str
@@ -508,7 +487,7 @@ def gamma(self, gamma):
def vega(self):
"""Gets the vega of this OptionsTicker. # noqa: E501
- Vega # noqa: E501
+ Greek letter vega # noqa: E501
:return: The vega of this OptionsTicker. # noqa: E501
:rtype: str
@@ -519,7 +498,7 @@ def vega(self):
def vega(self, vega):
"""Sets the vega of this OptionsTicker.
- Vega # noqa: E501
+ Greek letter vega # noqa: E501
:param vega: The vega of this OptionsTicker. # noqa: E501
:type: str
@@ -531,7 +510,7 @@ def vega(self, vega):
def theta(self):
"""Gets the theta of this OptionsTicker. # noqa: E501
- Theta # noqa: E501
+ Greek letter theta # noqa: E501
:return: The theta of this OptionsTicker. # noqa: E501
:rtype: str
@@ -542,7 +521,7 @@ def theta(self):
def theta(self, theta):
"""Sets the theta of this OptionsTicker.
- Theta # noqa: E501
+ Greek letter theta # noqa: E501
:param theta: The theta of this OptionsTicker. # noqa: E501
:type: str
@@ -580,16 +559,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_underlying.py b/gate_api/models/options_underlying.py
index b6ef3b0..89abb3f 100644
--- a/gate_api/models/options_underlying.py
+++ b/gate_api/models/options_underlying.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class OptionsUnderlying(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'name': 'str', 'index_price': 'str'}
+ openapi_types = {
+ 'name': 'str',
+ 'index_price': 'str'
+ }
- attribute_map = {'name': 'name', 'index_price': 'index_price'}
+ attribute_map = {
+ 'name': 'name',
+ 'index_price': 'index_price'
+ }
def __init__(self, name=None, index_price=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, Configuration) -> None
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/options_underlying_ticker.py b/gate_api/models/options_underlying_ticker.py
index 3438cae..8ce402e 100644
--- a/gate_api/models/options_underlying_ticker.py
+++ b/gate_api/models/options_underlying_ticker.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,17 @@ class OptionsUnderlyingTicker(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'trade_put': 'int', 'trade_call': 'int', 'index_price': 'str'}
-
- attribute_map = {'trade_put': 'trade_put', 'trade_call': 'trade_call', 'index_price': 'index_price'}
+ openapi_types = {
+ 'trade_put': 'int',
+ 'trade_call': 'int',
+ 'index_price': 'str'
+ }
+
+ attribute_map = {
+ 'trade_put': 'trade_put',
+ 'trade_call': 'trade_call',
+ 'index_price': 'index_price'
+ }
def __init__(self, trade_put=None, trade_call=None, index_price=None, local_vars_configuration=None): # noqa: E501
# type: (int, int, str, Configuration) -> None
@@ -131,16 +139,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/order.py b/gate_api/models/order.py
index b9aefdf..7555321 100644
--- a/gate_api/models/order.py
+++ b/gate_api/models/order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -52,6 +52,7 @@ class Order(object):
'auto_borrow': 'bool',
'auto_repay': 'bool',
'left': 'str',
+ 'filled_amount': 'str',
'fill_price': 'str',
'filled_total': 'str',
'avg_deal_price': 'str',
@@ -67,6 +68,7 @@ class Order(object):
'stp_id': 'int',
'stp_act': 'str',
'finish_as': 'str',
+ 'action_mode': 'str'
}
attribute_map = {
@@ -89,6 +91,7 @@ class Order(object):
'auto_borrow': 'auto_borrow',
'auto_repay': 'auto_repay',
'left': 'left',
+ 'filled_amount': 'filled_amount',
'fill_price': 'fill_price',
'filled_total': 'filled_total',
'avg_deal_price': 'avg_deal_price',
@@ -104,47 +107,11 @@ class Order(object):
'stp_id': 'stp_id',
'stp_act': 'stp_act',
'finish_as': 'finish_as',
+ 'action_mode': 'action_mode'
}
- def __init__(
- self,
- id=None,
- text=None,
- amend_text=None,
- create_time=None,
- update_time=None,
- create_time_ms=None,
- update_time_ms=None,
- status=None,
- currency_pair=None,
- type='limit',
- account='spot',
- side=None,
- amount=None,
- price=None,
- time_in_force='gtc',
- iceberg=None,
- auto_borrow=None,
- auto_repay=None,
- left=None,
- fill_price=None,
- filled_total=None,
- avg_deal_price=None,
- fee=None,
- fee_currency=None,
- point_fee=None,
- gt_fee=None,
- gt_maker_fee=None,
- gt_taker_fee=None,
- gt_discount=None,
- rebated_fee=None,
- rebated_fee_currency=None,
- stp_id=None,
- stp_act=None,
- finish_as=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, int, int, str, str, str, str, str, str, str, str, str, bool, bool, str, str, str, str, str, str, str, str, str, str, bool, str, str, int, str, str, Configuration) -> None
+ def __init__(self, id=None, text=None, amend_text=None, create_time=None, update_time=None, create_time_ms=None, update_time_ms=None, status=None, currency_pair=None, type='limit', account='spot', side=None, amount=None, price=None, time_in_force='gtc', iceberg=None, auto_borrow=None, auto_repay=None, left=None, filled_amount=None, fill_price=None, filled_total=None, avg_deal_price=None, fee=None, fee_currency=None, point_fee=None, gt_fee=None, gt_maker_fee=None, gt_taker_fee=None, gt_discount=None, rebated_fee=None, rebated_fee_currency=None, stp_id=None, stp_act=None, finish_as=None, action_mode=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, int, int, str, str, str, str, str, str, str, str, str, bool, bool, str, str, str, str, str, str, str, str, str, str, str, bool, str, str, int, str, str, str, Configuration) -> None
"""Order - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -169,6 +136,7 @@ def __init__(
self._auto_borrow = None
self._auto_repay = None
self._left = None
+ self._filled_amount = None
self._fill_price = None
self._filled_total = None
self._avg_deal_price = None
@@ -184,6 +152,7 @@ def __init__(
self._stp_id = None
self._stp_act = None
self._finish_as = None
+ self._action_mode = None
self.discriminator = None
if id is not None:
@@ -221,6 +190,8 @@ def __init__(
self.auto_repay = auto_repay
if left is not None:
self.left = left
+ if filled_amount is not None:
+ self.filled_amount = filled_amount
if fill_price is not None:
self.fill_price = fill_price
if filled_total is not None:
@@ -251,6 +222,8 @@ def __init__(
self.stp_act = stp_act
if finish_as is not None:
self.finish_as = finish_as
+ if action_mode is not None:
+ self.action_mode = action_mode
@property
def id(self):
@@ -436,7 +409,8 @@ def status(self, status):
allowed_values = ["open", "closed", "cancelled"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values) # noqa: E501
+ "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
+ .format(status, allowed_values)
)
self._status = status
@@ -470,7 +444,7 @@ def currency_pair(self, currency_pair):
def type(self):
"""Gets the type of this Order. # noqa: E501
- Order Type - limit : Limit Order - market : Market Order # noqa: E501
+ Order Type - limit : Limit Order - market : Market Order # noqa: E501
:return: The type of this Order. # noqa: E501
:rtype: str
@@ -481,7 +455,7 @@ def type(self):
def type(self, type):
"""Sets the type of this Order.
- Order Type - limit : Limit Order - market : Market Order # noqa: E501
+ Order Type - limit : Limit Order - market : Market Order # noqa: E501
:param type: The type of this Order. # noqa: E501
:type: str
@@ -489,7 +463,8 @@ def type(self, type):
allowed_values = ["limit", "market"] # noqa: E501
if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `type` ({0}), must be one of {1}".format(type, allowed_values) # noqa: E501
+ "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
+ .format(type, allowed_values)
)
self._type = type
@@ -498,7 +473,7 @@ def type(self, type):
def account(self):
"""Gets the account of this Order. # noqa: E501
- Account type. spot - use spot account; margin - use margin account; cross_margin - use cross margin account. Portfolio margin account must set to `cross-margin` # noqa: E501
+ Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501
:return: The account of this Order. # noqa: E501
:rtype: str
@@ -509,16 +484,11 @@ def account(self):
def account(self, account):
"""Sets the account of this Order.
- Account type. spot - use spot account; margin - use margin account; cross_margin - use cross margin account. Portfolio margin account must set to `cross-margin` # noqa: E501
+ Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501
:param account: The account of this Order. # noqa: E501
:type: str
"""
- allowed_values = ["spot", "margin", "cross_margin"] # noqa: E501
- if self.local_vars_configuration.client_side_validation and account not in allowed_values: # noqa: E501
- raise ValueError(
- "Invalid value for `account` ({0}), must be one of {1}".format(account, allowed_values) # noqa: E501
- )
self._account = account
@@ -526,7 +496,7 @@ def account(self, account):
def side(self):
"""Gets the side of this Order. # noqa: E501
- Order side # noqa: E501
+ Buy or sell order # noqa: E501
:return: The side of this Order. # noqa: E501
:rtype: str
@@ -537,7 +507,7 @@ def side(self):
def side(self, side):
"""Sets the side of this Order.
- Order side # noqa: E501
+ Buy or sell order # noqa: E501
:param side: The side of this Order. # noqa: E501
:type: str
@@ -547,7 +517,8 @@ def side(self, side):
allowed_values = ["buy", "sell"] # noqa: E501
if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `side` ({0}), must be one of {1}".format(side, allowed_values) # noqa: E501
+ "Invalid value for `side` ({0}), must be one of {1}" # noqa: E501
+ .format(side, allowed_values)
)
self._side = side
@@ -556,7 +527,7 @@ def side(self, side):
def amount(self):
"""Gets the amount of this Order. # noqa: E501
- When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501
+ Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` # noqa: E501
:return: The amount of this Order. # noqa: E501
:rtype: str
@@ -567,7 +538,7 @@ def amount(self):
def amount(self, amount):
"""Sets the amount of this Order.
- When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501
+ Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` # noqa: E501
:param amount: The amount of this Order. # noqa: E501
:type: str
@@ -581,7 +552,7 @@ def amount(self, amount):
def price(self):
"""Gets the price of this Order. # noqa: E501
- Price can't be empty when `type`= `limit` # noqa: E501
+ Trading price, required when `type`=`limit` # noqa: E501
:return: The price of this Order. # noqa: E501
:rtype: str
@@ -592,7 +563,7 @@ def price(self):
def price(self, price):
"""Sets the price of this Order.
- Price can't be empty when `type`= `limit` # noqa: E501
+ Trading price, required when `type`=`limit` # noqa: E501
:param price: The price of this Order. # noqa: E501
:type: str
@@ -623,9 +594,8 @@ def time_in_force(self, time_in_force):
allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501
if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `time_in_force` ({0}), must be one of {1}".format( # noqa: E501
- time_in_force, allowed_values
- )
+ "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501
+ .format(time_in_force, allowed_values)
)
self._time_in_force = time_in_force
@@ -634,7 +604,7 @@ def time_in_force(self, time_in_force):
def iceberg(self):
"""Gets the iceberg of this Order. # noqa: E501
- Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501
+ Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported # noqa: E501
:return: The iceberg of this Order. # noqa: E501
:rtype: str
@@ -645,7 +615,7 @@ def iceberg(self):
def iceberg(self, iceberg):
"""Sets the iceberg of this Order.
- Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501
+ Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported # noqa: E501
:param iceberg: The iceberg of this Order. # noqa: E501
:type: str
@@ -657,7 +627,7 @@ def iceberg(self, iceberg):
def auto_borrow(self):
"""Gets the auto_borrow of this Order. # noqa: E501
- Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501
+ Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough # noqa: E501
:return: The auto_borrow of this Order. # noqa: E501
:rtype: bool
@@ -668,7 +638,7 @@ def auto_borrow(self):
def auto_borrow(self, auto_borrow):
"""Sets the auto_borrow of this Order.
- Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501
+ Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough # noqa: E501
:param auto_borrow: The auto_borrow of this Order. # noqa: E501
:type: bool
@@ -680,7 +650,7 @@ def auto_borrow(self, auto_borrow):
def auto_repay(self):
"""Gets the auto_repay of this Order. # noqa: E501
- 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. # noqa: E501
+ 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` can be both set to true in one order # noqa: E501
:return: The auto_repay of this Order. # noqa: E501
:rtype: bool
@@ -691,7 +661,7 @@ def auto_repay(self):
def auto_repay(self, auto_repay):
"""Sets the auto_repay of this Order.
- 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. # noqa: E501
+ 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` can be both set to true in one order # noqa: E501
:param auto_repay: The auto_repay of this Order. # noqa: E501
:type: bool
@@ -722,6 +692,29 @@ def left(self, left):
self._left = left
+ @property
+ def filled_amount(self):
+ """Gets the filled_amount of this Order. # noqa: E501
+
+ Amount filled # noqa: E501
+
+ :return: The filled_amount of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._filled_amount
+
+ @filled_amount.setter
+ def filled_amount(self, filled_amount):
+ """Sets the filled_amount of this Order.
+
+ Amount filled # noqa: E501
+
+ :param filled_amount: The filled_amount of this Order. # noqa: E501
+ :type: str
+ """
+
+ self._filled_amount = filled_amount
+
@property
def fill_price(self):
"""Gets the fill_price of this Order. # noqa: E501
@@ -887,7 +880,7 @@ def gt_fee(self, gt_fee):
def gt_maker_fee(self):
"""Gets the gt_maker_fee of this Order. # noqa: E501
- GT used to deduct maker fee # noqa: E501
+ GT amount used to deduct maker fee # noqa: E501
:return: The gt_maker_fee of this Order. # noqa: E501
:rtype: str
@@ -898,7 +891,7 @@ def gt_maker_fee(self):
def gt_maker_fee(self, gt_maker_fee):
"""Sets the gt_maker_fee of this Order.
- GT used to deduct maker fee # noqa: E501
+ GT amount used to deduct maker fee # noqa: E501
:param gt_maker_fee: The gt_maker_fee of this Order. # noqa: E501
:type: str
@@ -910,7 +903,7 @@ def gt_maker_fee(self, gt_maker_fee):
def gt_taker_fee(self):
"""Gets the gt_taker_fee of this Order. # noqa: E501
- GT used to deduct taker fee # noqa: E501
+ GT amount used to deduct taker fee # noqa: E501
:return: The gt_taker_fee of this Order. # noqa: E501
:rtype: str
@@ -921,7 +914,7 @@ def gt_taker_fee(self):
def gt_taker_fee(self, gt_taker_fee):
"""Sets the gt_taker_fee of this Order.
- GT used to deduct taker fee # noqa: E501
+ GT amount used to deduct taker fee # noqa: E501
:param gt_taker_fee: The gt_taker_fee of this Order. # noqa: E501
:type: str
@@ -933,7 +926,7 @@ def gt_taker_fee(self, gt_taker_fee):
def gt_discount(self):
"""Gets the gt_discount of this Order. # noqa: E501
- Whether GT fee discount is used # noqa: E501
+ Whether GT fee deduction is enabled # noqa: E501
:return: The gt_discount of this Order. # noqa: E501
:rtype: bool
@@ -944,7 +937,7 @@ def gt_discount(self):
def gt_discount(self, gt_discount):
"""Sets the gt_discount of this Order.
- Whether GT fee discount is used # noqa: E501
+ Whether GT fee deduction is enabled # noqa: E501
:param gt_discount: The gt_discount of this Order. # noqa: E501
:type: bool
@@ -1025,7 +1018,7 @@ def stp_id(self, stp_id):
def stp_act(self):
"""Gets the stp_act of this Order. # noqa: E501
- 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 # noqa: E501
+ Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention 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 # noqa: E501
:return: The stp_act of this Order. # noqa: E501
:rtype: str
@@ -1036,7 +1029,7 @@ def stp_act(self):
def stp_act(self, stp_act):
"""Sets the stp_act of this Order.
- 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 # noqa: E501
+ Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention 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 # noqa: E501
:param stp_act: The stp_act of this Order. # noqa: E501
:type: str
@@ -1044,7 +1037,8 @@ def stp_act(self, stp_act):
allowed_values = ["cn", "co", "cb", "-"] # noqa: E501
if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `stp_act` ({0}), must be one of {1}".format(stp_act, allowed_values) # noqa: E501
+ "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501
+ .format(stp_act, allowed_values)
)
self._stp_act = stp_act
@@ -1053,7 +1047,7 @@ def stp_act(self, stp_act):
def finish_as(self):
"""Gets the finish_as of this Order. # noqa: E501
- 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 # noqa: E501
+ Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown # noqa: E501
:return: The finish_as of this Order. # noqa: E501
:rtype: str
@@ -1064,21 +1058,43 @@ def finish_as(self):
def finish_as(self, finish_as):
"""Sets the finish_as of this Order.
- 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 # noqa: E501
+ Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown # noqa: E501
:param finish_as: The finish_as of this Order. # noqa: E501
:type: str
"""
- allowed_values = ["open", "filled", "cancelled", "ioc", "stp"] # noqa: E501
+ allowed_values = ["open", "filled", "cancelled", "liquidate_cancelled", "depth_not_enough", "trader_not_enough", "small", "ioc", "poc", "fok", "stp", "unknown"] # noqa: E501
if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `finish_as` ({0}), must be one of {1}".format( # noqa: E501
- finish_as, allowed_values
- )
+ "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501
+ .format(finish_as, allowed_values)
)
self._finish_as = finish_as
+ @property
+ def action_mode(self):
+ """Gets the action_mode of this Order. # noqa: E501
+
+ 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) # noqa: E501
+
+ :return: The action_mode of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._action_mode
+
+ @action_mode.setter
+ def action_mode(self, action_mode):
+ """Sets the action_mode of this Order.
+
+ 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) # noqa: E501
+
+ :param action_mode: The action_mode of this Order. # noqa: E501
+ :type: str
+ """
+
+ self._action_mode = action_mode
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -1086,16 +1102,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/order_book.py b/gate_api/models/order_book.py
index d6862bd..a469fe7 100644
--- a/gate_api/models/order_book.py
+++ b/gate_api/models/order_book.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -37,14 +37,18 @@ class OrderBook(object):
'current': 'int',
'update': 'int',
'asks': 'list[list[str]]',
- 'bids': 'list[list[str]]',
+ 'bids': 'list[list[str]]'
}
- attribute_map = {'id': 'id', 'current': 'current', 'update': 'update', 'asks': 'asks', 'bids': 'bids'}
+ attribute_map = {
+ 'id': 'id',
+ 'current': 'current',
+ 'update': 'update',
+ 'asks': 'asks',
+ 'bids': 'bids'
+ }
- def __init__(
- self, id=None, current=None, update=None, asks=None, bids=None, local_vars_configuration=None
- ): # noqa: E501
+ def __init__(self, id=None, current=None, update=None, asks=None, bids=None, local_vars_configuration=None): # noqa: E501
# type: (int, int, int, list[list[str]], list[list[str]], Configuration) -> None
"""OrderBook - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -140,7 +144,7 @@ def update(self, update):
def asks(self):
"""Gets the asks of this OrderBook. # noqa: E501
- Asks order depth # noqa: E501
+ Ask Depth # noqa: E501
:return: The asks of this OrderBook. # noqa: E501
:rtype: list[list[str]]
@@ -151,7 +155,7 @@ def asks(self):
def asks(self, asks):
"""Sets the asks of this OrderBook.
- Asks order depth # noqa: E501
+ Ask Depth # noqa: E501
:param asks: The asks of this OrderBook. # noqa: E501
:type: list[list[str]]
@@ -165,7 +169,7 @@ def asks(self, asks):
def bids(self):
"""Gets the bids of this OrderBook. # noqa: E501
- Bids order depth # noqa: E501
+ Bid Depth # noqa: E501
:return: The bids of this OrderBook. # noqa: E501
:rtype: list[list[str]]
@@ -176,7 +180,7 @@ def bids(self):
def bids(self, bids):
"""Sets the bids of this OrderBook.
- Bids order depth # noqa: E501
+ Bid Depth # noqa: E501
:param bids: The bids of this OrderBook. # noqa: E501
:type: list[list[str]]
@@ -193,16 +197,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/portfolio_spot_orders.py b/gate_api/models/order_cancel.py
similarity index 54%
rename from gate_api/models/portfolio_spot_orders.py
rename to gate_api/models/order_cancel.py
index e4d0abe..ba1457e 100644
--- a/gate_api/models/portfolio_spot_orders.py
+++ b/gate_api/models/order_cancel.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@
from gate_api.configuration import Configuration
-class PortfolioSpotOrders(object):
+class OrderCancel(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -36,6 +36,9 @@ class PortfolioSpotOrders(object):
'id': 'str',
'text': 'str',
'amend_text': 'str',
+ 'succeeded': 'bool',
+ 'label': 'str',
+ 'message': 'str',
'create_time': 'str',
'update_time': 'str',
'create_time_ms': 'int',
@@ -43,6 +46,7 @@ class PortfolioSpotOrders(object):
'status': 'str',
'currency_pair': 'str',
'type': 'str',
+ 'account': 'str',
'side': 'str',
'amount': 'str',
'price': 'str',
@@ -51,6 +55,7 @@ class PortfolioSpotOrders(object):
'auto_borrow': 'bool',
'auto_repay': 'bool',
'left': 'str',
+ 'filled_amount': 'str',
'fill_price': 'str',
'filled_total': 'str',
'avg_deal_price': 'str',
@@ -66,12 +71,16 @@ class PortfolioSpotOrders(object):
'stp_id': 'int',
'stp_act': 'str',
'finish_as': 'str',
+ 'action_mode': 'str'
}
attribute_map = {
'id': 'id',
'text': 'text',
'amend_text': 'amend_text',
+ 'succeeded': 'succeeded',
+ 'label': 'label',
+ 'message': 'message',
'create_time': 'create_time',
'update_time': 'update_time',
'create_time_ms': 'create_time_ms',
@@ -79,6 +88,7 @@ class PortfolioSpotOrders(object):
'status': 'status',
'currency_pair': 'currency_pair',
'type': 'type',
+ 'account': 'account',
'side': 'side',
'amount': 'amount',
'price': 'price',
@@ -87,6 +97,7 @@ class PortfolioSpotOrders(object):
'auto_borrow': 'auto_borrow',
'auto_repay': 'auto_repay',
'left': 'left',
+ 'filled_amount': 'filled_amount',
'fill_price': 'fill_price',
'filled_total': 'filled_total',
'avg_deal_price': 'avg_deal_price',
@@ -102,47 +113,12 @@ class PortfolioSpotOrders(object):
'stp_id': 'stp_id',
'stp_act': 'stp_act',
'finish_as': 'finish_as',
+ 'action_mode': 'action_mode'
}
- def __init__(
- self,
- id=None,
- text=None,
- amend_text=None,
- create_time=None,
- update_time=None,
- create_time_ms=None,
- update_time_ms=None,
- status=None,
- currency_pair=None,
- type='limit',
- side=None,
- amount=None,
- price=None,
- time_in_force='gtc',
- iceberg=None,
- auto_borrow=None,
- auto_repay=None,
- left=None,
- fill_price=None,
- filled_total=None,
- avg_deal_price=None,
- fee=None,
- fee_currency=None,
- point_fee=None,
- gt_fee=None,
- gt_maker_fee=None,
- gt_taker_fee=None,
- gt_discount=None,
- rebated_fee=None,
- rebated_fee_currency=None,
- stp_id=None,
- stp_act=None,
- finish_as=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, int, int, str, str, str, str, str, str, str, str, bool, bool, str, str, str, str, str, str, str, str, str, str, bool, str, str, int, str, str, Configuration) -> None
- """PortfolioSpotOrders - a model defined in OpenAPI""" # noqa: E501
+ def __init__(self, id=None, text=None, amend_text=None, succeeded=None, label=None, message=None, create_time=None, update_time=None, create_time_ms=None, update_time_ms=None, status=None, currency_pair=None, type='limit', account='spot', side=None, amount=None, price=None, time_in_force='gtc', iceberg=None, auto_borrow=None, auto_repay=None, left=None, filled_amount=None, fill_price=None, filled_total=None, avg_deal_price=None, fee=None, fee_currency=None, point_fee=None, gt_fee=None, gt_maker_fee=None, gt_taker_fee=None, gt_discount=None, rebated_fee=None, rebated_fee_currency=None, stp_id=None, stp_act=None, finish_as=None, action_mode=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, bool, str, str, str, str, int, int, str, str, str, str, str, str, str, str, str, bool, bool, str, str, str, str, str, str, str, str, str, str, str, bool, str, str, int, str, str, str, Configuration) -> None
+ """OrderCancel - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -150,6 +126,9 @@ def __init__(
self._id = None
self._text = None
self._amend_text = None
+ self._succeeded = None
+ self._label = None
+ self._message = None
self._create_time = None
self._update_time = None
self._create_time_ms = None
@@ -157,6 +136,7 @@ def __init__(
self._status = None
self._currency_pair = None
self._type = None
+ self._account = None
self._side = None
self._amount = None
self._price = None
@@ -165,6 +145,7 @@ def __init__(
self._auto_borrow = None
self._auto_repay = None
self._left = None
+ self._filled_amount = None
self._fill_price = None
self._filled_total = None
self._avg_deal_price = None
@@ -180,6 +161,7 @@ def __init__(
self._stp_id = None
self._stp_act = None
self._finish_as = None
+ self._action_mode = None
self.discriminator = None
if id is not None:
@@ -188,6 +170,12 @@ def __init__(
self.text = text
if amend_text is not None:
self.amend_text = amend_text
+ if succeeded is not None:
+ self.succeeded = succeeded
+ if label is not None:
+ self.label = label
+ if message is not None:
+ self.message = message
if create_time is not None:
self.create_time = create_time
if update_time is not None:
@@ -201,6 +189,8 @@ def __init__(
self.currency_pair = currency_pair
if type is not None:
self.type = type
+ if account is not None:
+ self.account = account
self.side = side
self.amount = amount
if price is not None:
@@ -215,6 +205,8 @@ def __init__(
self.auto_repay = auto_repay
if left is not None:
self.left = left
+ if filled_amount is not None:
+ self.filled_amount = filled_amount
if fill_price is not None:
self.fill_price = fill_price
if filled_total is not None:
@@ -245,25 +237,27 @@ def __init__(
self.stp_act = stp_act
if finish_as is not None:
self.finish_as = finish_as
+ if action_mode is not None:
+ self.action_mode = action_mode
@property
def id(self):
- """Gets the id of this PortfolioSpotOrders. # noqa: E501
+ """Gets the id of this OrderCancel. # noqa: E501
Order ID # noqa: E501
- :return: The id of this PortfolioSpotOrders. # noqa: E501
+ :return: The id of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._id
@id.setter
def id(self, id):
- """Sets the id of this PortfolioSpotOrders.
+ """Sets the id of this OrderCancel.
Order ID # noqa: E501
- :param id: The id of this PortfolioSpotOrders. # noqa: E501
+ :param id: The id of this OrderCancel. # noqa: E501
:type: str
"""
@@ -271,22 +265,22 @@ def id(self, id):
@property
def text(self):
- """Gets the text of this PortfolioSpotOrders. # noqa: E501
+ """Gets the text of this OrderCancel. # noqa: E501
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(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501
- :return: The text of this PortfolioSpotOrders. # noqa: E501
+ :return: The text of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._text
@text.setter
def text(self, text):
- """Sets the text of this PortfolioSpotOrders.
+ """Sets the text of this OrderCancel.
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(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501
- :param text: The text of this PortfolioSpotOrders. # noqa: E501
+ :param text: The text of this OrderCancel. # noqa: E501
:type: str
"""
@@ -294,45 +288,114 @@ def text(self, text):
@property
def amend_text(self):
- """Gets the amend_text of this PortfolioSpotOrders. # noqa: E501
+ """Gets the amend_text of this OrderCancel. # noqa: E501
The custom data that the user remarked when amending the order # noqa: E501
- :return: The amend_text of this PortfolioSpotOrders. # noqa: E501
+ :return: The amend_text of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._amend_text
@amend_text.setter
def amend_text(self, amend_text):
- """Sets the amend_text of this PortfolioSpotOrders.
+ """Sets the amend_text of this OrderCancel.
The custom data that the user remarked when amending the order # noqa: E501
- :param amend_text: The amend_text of this PortfolioSpotOrders. # noqa: E501
+ :param amend_text: The amend_text of this OrderCancel. # noqa: E501
:type: str
"""
self._amend_text = amend_text
+ @property
+ def succeeded(self):
+ """Gets the succeeded of this OrderCancel. # noqa: E501
+
+ Request execution result # noqa: E501
+
+ :return: The succeeded of this OrderCancel. # noqa: E501
+ :rtype: bool
+ """
+ return self._succeeded
+
+ @succeeded.setter
+ def succeeded(self, succeeded):
+ """Sets the succeeded of this OrderCancel.
+
+ Request execution result # noqa: E501
+
+ :param succeeded: The succeeded of this OrderCancel. # noqa: E501
+ :type: bool
+ """
+
+ self._succeeded = succeeded
+
+ @property
+ def label(self):
+ """Gets the label of this OrderCancel. # noqa: E501
+
+ Error label, if any, otherwise an empty string # noqa: E501
+
+ :return: The label of this OrderCancel. # noqa: E501
+ :rtype: str
+ """
+ return self._label
+
+ @label.setter
+ def label(self, label):
+ """Sets the label of this OrderCancel.
+
+ Error label, if any, otherwise an empty string # noqa: E501
+
+ :param label: The label of this OrderCancel. # noqa: E501
+ :type: str
+ """
+
+ self._label = label
+
+ @property
+ def message(self):
+ """Gets the message of this OrderCancel. # noqa: E501
+
+ Detailed error message, if any, otherwise an empty string # noqa: E501
+
+ :return: The message of this OrderCancel. # noqa: E501
+ :rtype: str
+ """
+ return self._message
+
+ @message.setter
+ def message(self, message):
+ """Sets the message of this OrderCancel.
+
+ Detailed error message, if any, otherwise an empty string # noqa: E501
+
+ :param message: The message of this OrderCancel. # noqa: E501
+ :type: str
+ """
+
+ self._message = message
+
@property
def create_time(self):
- """Gets the create_time of this PortfolioSpotOrders. # noqa: E501
+ """Gets the create_time of this OrderCancel. # noqa: E501
Creation time of order # noqa: E501
- :return: The create_time of this PortfolioSpotOrders. # noqa: E501
+ :return: The create_time of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._create_time
@create_time.setter
def create_time(self, create_time):
- """Sets the create_time of this PortfolioSpotOrders.
+ """Sets the create_time of this OrderCancel.
Creation time of order # noqa: E501
- :param create_time: The create_time of this PortfolioSpotOrders. # noqa: E501
+ :param create_time: The create_time of this OrderCancel. # noqa: E501
:type: str
"""
@@ -340,22 +403,22 @@ def create_time(self, create_time):
@property
def update_time(self):
- """Gets the update_time of this PortfolioSpotOrders. # noqa: E501
+ """Gets the update_time of this OrderCancel. # noqa: E501
Last modification time of order # noqa: E501
- :return: The update_time of this PortfolioSpotOrders. # noqa: E501
+ :return: The update_time of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._update_time
@update_time.setter
def update_time(self, update_time):
- """Sets the update_time of this PortfolioSpotOrders.
+ """Sets the update_time of this OrderCancel.
Last modification time of order # noqa: E501
- :param update_time: The update_time of this PortfolioSpotOrders. # noqa: E501
+ :param update_time: The update_time of this OrderCancel. # noqa: E501
:type: str
"""
@@ -363,22 +426,22 @@ def update_time(self, update_time):
@property
def create_time_ms(self):
- """Gets the create_time_ms of this PortfolioSpotOrders. # noqa: E501
+ """Gets the create_time_ms of this OrderCancel. # noqa: E501
Creation time of order (in milliseconds) # noqa: E501
- :return: The create_time_ms of this PortfolioSpotOrders. # noqa: E501
+ :return: The create_time_ms of this OrderCancel. # noqa: E501
:rtype: int
"""
return self._create_time_ms
@create_time_ms.setter
def create_time_ms(self, create_time_ms):
- """Sets the create_time_ms of this PortfolioSpotOrders.
+ """Sets the create_time_ms of this OrderCancel.
Creation time of order (in milliseconds) # noqa: E501
- :param create_time_ms: The create_time_ms of this PortfolioSpotOrders. # noqa: E501
+ :param create_time_ms: The create_time_ms of this OrderCancel. # noqa: E501
:type: int
"""
@@ -386,22 +449,22 @@ def create_time_ms(self, create_time_ms):
@property
def update_time_ms(self):
- """Gets the update_time_ms of this PortfolioSpotOrders. # noqa: E501
+ """Gets the update_time_ms of this OrderCancel. # noqa: E501
Last modification time of order (in milliseconds) # noqa: E501
- :return: The update_time_ms of this PortfolioSpotOrders. # noqa: E501
+ :return: The update_time_ms of this OrderCancel. # noqa: E501
:rtype: int
"""
return self._update_time_ms
@update_time_ms.setter
def update_time_ms(self, update_time_ms):
- """Sets the update_time_ms of this PortfolioSpotOrders.
+ """Sets the update_time_ms of this OrderCancel.
Last modification time of order (in milliseconds) # noqa: E501
- :param update_time_ms: The update_time_ms of this PortfolioSpotOrders. # noqa: E501
+ :param update_time_ms: The update_time_ms of this OrderCancel. # noqa: E501
:type: int
"""
@@ -409,50 +472,51 @@ def update_time_ms(self, update_time_ms):
@property
def status(self):
- """Gets the status of this PortfolioSpotOrders. # noqa: E501
+ """Gets the status of this OrderCancel. # noqa: E501
Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501
- :return: The status of this PortfolioSpotOrders. # noqa: E501
+ :return: The status of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._status
@status.setter
def status(self, status):
- """Sets the status of this PortfolioSpotOrders.
+ """Sets the status of this OrderCancel.
Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501
- :param status: The status of this PortfolioSpotOrders. # noqa: E501
+ :param status: The status of this OrderCancel. # noqa: E501
:type: str
"""
allowed_values = ["open", "closed", "cancelled"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values) # noqa: E501
+ "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
+ .format(status, allowed_values)
)
self._status = status
@property
def currency_pair(self):
- """Gets the currency_pair of this PortfolioSpotOrders. # noqa: E501
+ """Gets the currency_pair of this OrderCancel. # noqa: E501
Currency pair # noqa: E501
- :return: The currency_pair of this PortfolioSpotOrders. # noqa: E501
+ :return: The currency_pair of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._currency_pair
@currency_pair.setter
def currency_pair(self, currency_pair):
- """Sets the currency_pair of this PortfolioSpotOrders.
+ """Sets the currency_pair of this OrderCancel.
Currency pair # noqa: E501
- :param currency_pair: The currency_pair of this PortfolioSpotOrders. # noqa: E501
+ :param currency_pair: The currency_pair of this OrderCancel. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501
@@ -462,50 +526,74 @@ def currency_pair(self, currency_pair):
@property
def type(self):
- """Gets the type of this PortfolioSpotOrders. # noqa: E501
+ """Gets the type of this OrderCancel. # noqa: E501
- Order Type - limit : Limit Order - market : Market Order # noqa: E501
+ Order Type - limit : Limit Order - market : Market Order # noqa: E501
- :return: The type of this PortfolioSpotOrders. # noqa: E501
+ :return: The type of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._type
@type.setter
def type(self, type):
- """Sets the type of this PortfolioSpotOrders.
+ """Sets the type of this OrderCancel.
- Order Type - limit : Limit Order - market : Market Order # noqa: E501
+ Order Type - limit : Limit Order - market : Market Order # noqa: E501
- :param type: The type of this PortfolioSpotOrders. # noqa: E501
+ :param type: The type of this OrderCancel. # noqa: E501
:type: str
"""
allowed_values = ["limit", "market"] # noqa: E501
if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `type` ({0}), must be one of {1}".format(type, allowed_values) # noqa: E501
+ "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
+ .format(type, allowed_values)
)
self._type = type
+ @property
+ def account(self):
+ """Gets the account of this OrderCancel. # noqa: E501
+
+ Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501
+
+ :return: The account of this OrderCancel. # noqa: E501
+ :rtype: str
+ """
+ return self._account
+
+ @account.setter
+ def account(self, account):
+ """Sets the account of this OrderCancel.
+
+ Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501
+
+ :param account: The account of this OrderCancel. # noqa: E501
+ :type: str
+ """
+
+ self._account = account
+
@property
def side(self):
- """Gets the side of this PortfolioSpotOrders. # noqa: E501
+ """Gets the side of this OrderCancel. # noqa: E501
- Order side # noqa: E501
+ Buy or sell order # noqa: E501
- :return: The side of this PortfolioSpotOrders. # noqa: E501
+ :return: The side of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._side
@side.setter
def side(self, side):
- """Sets the side of this PortfolioSpotOrders.
+ """Sets the side of this OrderCancel.
- Order side # noqa: E501
+ Buy or sell order # noqa: E501
- :param side: The side of this PortfolioSpotOrders. # noqa: E501
+ :param side: The side of this OrderCancel. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501
@@ -513,29 +601,30 @@ def side(self, side):
allowed_values = ["buy", "sell"] # noqa: E501
if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `side` ({0}), must be one of {1}".format(side, allowed_values) # noqa: E501
+ "Invalid value for `side` ({0}), must be one of {1}" # noqa: E501
+ .format(side, allowed_values)
)
self._side = side
@property
def amount(self):
- """Gets the amount of this PortfolioSpotOrders. # noqa: E501
+ """Gets the amount of this OrderCancel. # noqa: E501
- When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501
+ Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` # noqa: E501
- :return: The amount of this PortfolioSpotOrders. # noqa: E501
+ :return: The amount of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._amount
@amount.setter
def amount(self, amount):
- """Sets the amount of this PortfolioSpotOrders.
+ """Sets the amount of this OrderCancel.
- When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501
+ Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` # noqa: E501
- :param amount: The amount of this PortfolioSpotOrders. # noqa: E501
+ :param amount: The amount of this OrderCancel. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501
@@ -545,22 +634,22 @@ def amount(self, amount):
@property
def price(self):
- """Gets the price of this PortfolioSpotOrders. # noqa: E501
+ """Gets the price of this OrderCancel. # noqa: E501
- Price can't be empty when `type`= `limit` # noqa: E501
+ Trading price, required when `type`=`limit` # noqa: E501
- :return: The price of this PortfolioSpotOrders. # noqa: E501
+ :return: The price of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._price
@price.setter
def price(self, price):
- """Sets the price of this PortfolioSpotOrders.
+ """Sets the price of this OrderCancel.
- Price can't be empty when `type`= `limit` # noqa: E501
+ Trading price, required when `type`=`limit` # noqa: E501
- :param price: The price of this PortfolioSpotOrders. # noqa: E501
+ :param price: The price of this OrderCancel. # noqa: E501
:type: str
"""
@@ -568,52 +657,51 @@ def price(self, price):
@property
def time_in_force(self):
- """Gets the time_in_force of this PortfolioSpotOrders. # noqa: E501
+ """Gets the time_in_force of this OrderCancel. # noqa: E501
Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501
- :return: The time_in_force of this PortfolioSpotOrders. # noqa: E501
+ :return: The time_in_force of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._time_in_force
@time_in_force.setter
def time_in_force(self, time_in_force):
- """Sets the time_in_force of this PortfolioSpotOrders.
+ """Sets the time_in_force of this OrderCancel.
Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501
- :param time_in_force: The time_in_force of this PortfolioSpotOrders. # noqa: E501
+ :param time_in_force: The time_in_force of this OrderCancel. # noqa: E501
:type: str
"""
allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501
if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `time_in_force` ({0}), must be one of {1}".format( # noqa: E501
- time_in_force, allowed_values
- )
+ "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501
+ .format(time_in_force, allowed_values)
)
self._time_in_force = time_in_force
@property
def iceberg(self):
- """Gets the iceberg of this PortfolioSpotOrders. # noqa: E501
+ """Gets the iceberg of this OrderCancel. # noqa: E501
- Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501
+ Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported # noqa: E501
- :return: The iceberg of this PortfolioSpotOrders. # noqa: E501
+ :return: The iceberg of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._iceberg
@iceberg.setter
def iceberg(self, iceberg):
- """Sets the iceberg of this PortfolioSpotOrders.
+ """Sets the iceberg of this OrderCancel.
- Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501
+ Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported # noqa: E501
- :param iceberg: The iceberg of this PortfolioSpotOrders. # noqa: E501
+ :param iceberg: The iceberg of this OrderCancel. # noqa: E501
:type: str
"""
@@ -621,22 +709,22 @@ def iceberg(self, iceberg):
@property
def auto_borrow(self):
- """Gets the auto_borrow of this PortfolioSpotOrders. # noqa: E501
+ """Gets the auto_borrow of this OrderCancel. # noqa: E501
- Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501
+ Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough # noqa: E501
- :return: The auto_borrow of this PortfolioSpotOrders. # noqa: E501
+ :return: The auto_borrow of this OrderCancel. # noqa: E501
:rtype: bool
"""
return self._auto_borrow
@auto_borrow.setter
def auto_borrow(self, auto_borrow):
- """Sets the auto_borrow of this PortfolioSpotOrders.
+ """Sets the auto_borrow of this OrderCancel.
- Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501
+ Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough # noqa: E501
- :param auto_borrow: The auto_borrow of this PortfolioSpotOrders. # noqa: E501
+ :param auto_borrow: The auto_borrow of this OrderCancel. # noqa: E501
:type: bool
"""
@@ -644,22 +732,22 @@ def auto_borrow(self, auto_borrow):
@property
def auto_repay(self):
- """Gets the auto_repay of this PortfolioSpotOrders. # noqa: E501
+ """Gets the auto_repay of this OrderCancel. # noqa: E501
- Enable or disable automatic repayment for automatic borrow loan. Default is disabled. Note that: `auto_borrow` and `auto_repay` cannot be both set to true in one order. # noqa: E501
+ 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` can be both set to true in one order # noqa: E501
- :return: The auto_repay of this PortfolioSpotOrders. # noqa: E501
+ :return: The auto_repay of this OrderCancel. # noqa: E501
:rtype: bool
"""
return self._auto_repay
@auto_repay.setter
def auto_repay(self, auto_repay):
- """Sets the auto_repay of this PortfolioSpotOrders.
+ """Sets the auto_repay of this OrderCancel.
- Enable or disable automatic repayment for automatic borrow loan. Default is disabled. Note that: `auto_borrow` and `auto_repay` cannot be both set to true in one order. # noqa: E501
+ 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` can be both set to true in one order # noqa: E501
- :param auto_repay: The auto_repay of this PortfolioSpotOrders. # noqa: E501
+ :param auto_repay: The auto_repay of this OrderCancel. # noqa: E501
:type: bool
"""
@@ -667,45 +755,68 @@ def auto_repay(self, auto_repay):
@property
def left(self):
- """Gets the left of this PortfolioSpotOrders. # noqa: E501
+ """Gets the left of this OrderCancel. # noqa: E501
Amount left to fill # noqa: E501
- :return: The left of this PortfolioSpotOrders. # noqa: E501
+ :return: The left of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._left
@left.setter
def left(self, left):
- """Sets the left of this PortfolioSpotOrders.
+ """Sets the left of this OrderCancel.
Amount left to fill # noqa: E501
- :param left: The left of this PortfolioSpotOrders. # noqa: E501
+ :param left: The left of this OrderCancel. # noqa: E501
:type: str
"""
self._left = left
+ @property
+ def filled_amount(self):
+ """Gets the filled_amount of this OrderCancel. # noqa: E501
+
+ Amount filled # noqa: E501
+
+ :return: The filled_amount of this OrderCancel. # noqa: E501
+ :rtype: str
+ """
+ return self._filled_amount
+
+ @filled_amount.setter
+ def filled_amount(self, filled_amount):
+ """Sets the filled_amount of this OrderCancel.
+
+ Amount filled # noqa: E501
+
+ :param filled_amount: The filled_amount of this OrderCancel. # noqa: E501
+ :type: str
+ """
+
+ self._filled_amount = filled_amount
+
@property
def fill_price(self):
- """Gets the fill_price of this PortfolioSpotOrders. # noqa: E501
+ """Gets the fill_price of this OrderCancel. # noqa: E501
Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501
- :return: The fill_price of this PortfolioSpotOrders. # noqa: E501
+ :return: The fill_price of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._fill_price
@fill_price.setter
def fill_price(self, fill_price):
- """Sets the fill_price of this PortfolioSpotOrders.
+ """Sets the fill_price of this OrderCancel.
Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501
- :param fill_price: The fill_price of this PortfolioSpotOrders. # noqa: E501
+ :param fill_price: The fill_price of this OrderCancel. # noqa: E501
:type: str
"""
@@ -713,22 +824,22 @@ def fill_price(self, fill_price):
@property
def filled_total(self):
- """Gets the filled_total of this PortfolioSpotOrders. # noqa: E501
+ """Gets the filled_total of this OrderCancel. # noqa: E501
Total filled in quote currency # noqa: E501
- :return: The filled_total of this PortfolioSpotOrders. # noqa: E501
+ :return: The filled_total of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._filled_total
@filled_total.setter
def filled_total(self, filled_total):
- """Sets the filled_total of this PortfolioSpotOrders.
+ """Sets the filled_total of this OrderCancel.
Total filled in quote currency # noqa: E501
- :param filled_total: The filled_total of this PortfolioSpotOrders. # noqa: E501
+ :param filled_total: The filled_total of this OrderCancel. # noqa: E501
:type: str
"""
@@ -736,22 +847,22 @@ def filled_total(self, filled_total):
@property
def avg_deal_price(self):
- """Gets the avg_deal_price of this PortfolioSpotOrders. # noqa: E501
+ """Gets the avg_deal_price of this OrderCancel. # noqa: E501
Average fill price # noqa: E501
- :return: The avg_deal_price of this PortfolioSpotOrders. # noqa: E501
+ :return: The avg_deal_price of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._avg_deal_price
@avg_deal_price.setter
def avg_deal_price(self, avg_deal_price):
- """Sets the avg_deal_price of this PortfolioSpotOrders.
+ """Sets the avg_deal_price of this OrderCancel.
Average fill price # noqa: E501
- :param avg_deal_price: The avg_deal_price of this PortfolioSpotOrders. # noqa: E501
+ :param avg_deal_price: The avg_deal_price of this OrderCancel. # noqa: E501
:type: str
"""
@@ -759,22 +870,22 @@ def avg_deal_price(self, avg_deal_price):
@property
def fee(self):
- """Gets the fee of this PortfolioSpotOrders. # noqa: E501
+ """Gets the fee of this OrderCancel. # noqa: E501
Fee deducted # noqa: E501
- :return: The fee of this PortfolioSpotOrders. # noqa: E501
+ :return: The fee of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._fee
@fee.setter
def fee(self, fee):
- """Sets the fee of this PortfolioSpotOrders.
+ """Sets the fee of this OrderCancel.
Fee deducted # noqa: E501
- :param fee: The fee of this PortfolioSpotOrders. # noqa: E501
+ :param fee: The fee of this OrderCancel. # noqa: E501
:type: str
"""
@@ -782,22 +893,22 @@ def fee(self, fee):
@property
def fee_currency(self):
- """Gets the fee_currency of this PortfolioSpotOrders. # noqa: E501
+ """Gets the fee_currency of this OrderCancel. # noqa: E501
Fee currency unit # noqa: E501
- :return: The fee_currency of this PortfolioSpotOrders. # noqa: E501
+ :return: The fee_currency of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._fee_currency
@fee_currency.setter
def fee_currency(self, fee_currency):
- """Sets the fee_currency of this PortfolioSpotOrders.
+ """Sets the fee_currency of this OrderCancel.
Fee currency unit # noqa: E501
- :param fee_currency: The fee_currency of this PortfolioSpotOrders. # noqa: E501
+ :param fee_currency: The fee_currency of this OrderCancel. # noqa: E501
:type: str
"""
@@ -805,22 +916,22 @@ def fee_currency(self, fee_currency):
@property
def point_fee(self):
- """Gets the point_fee of this PortfolioSpotOrders. # noqa: E501
+ """Gets the point_fee of this OrderCancel. # noqa: E501
Points used to deduct fee # noqa: E501
- :return: The point_fee of this PortfolioSpotOrders. # noqa: E501
+ :return: The point_fee of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._point_fee
@point_fee.setter
def point_fee(self, point_fee):
- """Sets the point_fee of this PortfolioSpotOrders.
+ """Sets the point_fee of this OrderCancel.
Points used to deduct fee # noqa: E501
- :param point_fee: The point_fee of this PortfolioSpotOrders. # noqa: E501
+ :param point_fee: The point_fee of this OrderCancel. # noqa: E501
:type: str
"""
@@ -828,22 +939,22 @@ def point_fee(self, point_fee):
@property
def gt_fee(self):
- """Gets the gt_fee of this PortfolioSpotOrders. # noqa: E501
+ """Gets the gt_fee of this OrderCancel. # noqa: E501
GT used to deduct fee # noqa: E501
- :return: The gt_fee of this PortfolioSpotOrders. # noqa: E501
+ :return: The gt_fee of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._gt_fee
@gt_fee.setter
def gt_fee(self, gt_fee):
- """Sets the gt_fee of this PortfolioSpotOrders.
+ """Sets the gt_fee of this OrderCancel.
GT used to deduct fee # noqa: E501
- :param gt_fee: The gt_fee of this PortfolioSpotOrders. # noqa: E501
+ :param gt_fee: The gt_fee of this OrderCancel. # noqa: E501
:type: str
"""
@@ -851,22 +962,22 @@ def gt_fee(self, gt_fee):
@property
def gt_maker_fee(self):
- """Gets the gt_maker_fee of this PortfolioSpotOrders. # noqa: E501
+ """Gets the gt_maker_fee of this OrderCancel. # noqa: E501
- GT used to deduct maker fee # noqa: E501
+ GT amount used to deduct maker fee # noqa: E501
- :return: The gt_maker_fee of this PortfolioSpotOrders. # noqa: E501
+ :return: The gt_maker_fee of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._gt_maker_fee
@gt_maker_fee.setter
def gt_maker_fee(self, gt_maker_fee):
- """Sets the gt_maker_fee of this PortfolioSpotOrders.
+ """Sets the gt_maker_fee of this OrderCancel.
- GT used to deduct maker fee # noqa: E501
+ GT amount used to deduct maker fee # noqa: E501
- :param gt_maker_fee: The gt_maker_fee of this PortfolioSpotOrders. # noqa: E501
+ :param gt_maker_fee: The gt_maker_fee of this OrderCancel. # noqa: E501
:type: str
"""
@@ -874,22 +985,22 @@ def gt_maker_fee(self, gt_maker_fee):
@property
def gt_taker_fee(self):
- """Gets the gt_taker_fee of this PortfolioSpotOrders. # noqa: E501
+ """Gets the gt_taker_fee of this OrderCancel. # noqa: E501
- GT used to deduct taker fee # noqa: E501
+ GT amount used to deduct taker fee # noqa: E501
- :return: The gt_taker_fee of this PortfolioSpotOrders. # noqa: E501
+ :return: The gt_taker_fee of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._gt_taker_fee
@gt_taker_fee.setter
def gt_taker_fee(self, gt_taker_fee):
- """Sets the gt_taker_fee of this PortfolioSpotOrders.
+ """Sets the gt_taker_fee of this OrderCancel.
- GT used to deduct taker fee # noqa: E501
+ GT amount used to deduct taker fee # noqa: E501
- :param gt_taker_fee: The gt_taker_fee of this PortfolioSpotOrders. # noqa: E501
+ :param gt_taker_fee: The gt_taker_fee of this OrderCancel. # noqa: E501
:type: str
"""
@@ -897,22 +1008,22 @@ def gt_taker_fee(self, gt_taker_fee):
@property
def gt_discount(self):
- """Gets the gt_discount of this PortfolioSpotOrders. # noqa: E501
+ """Gets the gt_discount of this OrderCancel. # noqa: E501
- Whether GT fee discount is used # noqa: E501
+ Whether GT fee deduction is enabled # noqa: E501
- :return: The gt_discount of this PortfolioSpotOrders. # noqa: E501
+ :return: The gt_discount of this OrderCancel. # noqa: E501
:rtype: bool
"""
return self._gt_discount
@gt_discount.setter
def gt_discount(self, gt_discount):
- """Sets the gt_discount of this PortfolioSpotOrders.
+ """Sets the gt_discount of this OrderCancel.
- Whether GT fee discount is used # noqa: E501
+ Whether GT fee deduction is enabled # noqa: E501
- :param gt_discount: The gt_discount of this PortfolioSpotOrders. # noqa: E501
+ :param gt_discount: The gt_discount of this OrderCancel. # noqa: E501
:type: bool
"""
@@ -920,22 +1031,22 @@ def gt_discount(self, gt_discount):
@property
def rebated_fee(self):
- """Gets the rebated_fee of this PortfolioSpotOrders. # noqa: E501
+ """Gets the rebated_fee of this OrderCancel. # noqa: E501
Rebated fee # noqa: E501
- :return: The rebated_fee of this PortfolioSpotOrders. # noqa: E501
+ :return: The rebated_fee of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._rebated_fee
@rebated_fee.setter
def rebated_fee(self, rebated_fee):
- """Sets the rebated_fee of this PortfolioSpotOrders.
+ """Sets the rebated_fee of this OrderCancel.
Rebated fee # noqa: E501
- :param rebated_fee: The rebated_fee of this PortfolioSpotOrders. # noqa: E501
+ :param rebated_fee: The rebated_fee of this OrderCancel. # noqa: E501
:type: str
"""
@@ -943,22 +1054,22 @@ def rebated_fee(self, rebated_fee):
@property
def rebated_fee_currency(self):
- """Gets the rebated_fee_currency of this PortfolioSpotOrders. # noqa: E501
+ """Gets the rebated_fee_currency of this OrderCancel. # noqa: E501
Rebated fee currency unit # noqa: E501
- :return: The rebated_fee_currency of this PortfolioSpotOrders. # noqa: E501
+ :return: The rebated_fee_currency of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._rebated_fee_currency
@rebated_fee_currency.setter
def rebated_fee_currency(self, rebated_fee_currency):
- """Sets the rebated_fee_currency of this PortfolioSpotOrders.
+ """Sets the rebated_fee_currency of this OrderCancel.
Rebated fee currency unit # noqa: E501
- :param rebated_fee_currency: The rebated_fee_currency of this PortfolioSpotOrders. # noqa: E501
+ :param rebated_fee_currency: The rebated_fee_currency of this OrderCancel. # noqa: E501
:type: str
"""
@@ -966,22 +1077,22 @@ def rebated_fee_currency(self, rebated_fee_currency):
@property
def stp_id(self):
- """Gets the stp_id of this PortfolioSpotOrders. # noqa: E501
+ """Gets the stp_id of this OrderCancel. # noqa: E501
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` # noqa: E501
- :return: The stp_id of this PortfolioSpotOrders. # noqa: E501
+ :return: The stp_id of this OrderCancel. # noqa: E501
:rtype: int
"""
return self._stp_id
@stp_id.setter
def stp_id(self, stp_id):
- """Sets the stp_id of this PortfolioSpotOrders.
+ """Sets the stp_id of this OrderCancel.
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` # noqa: E501
- :param stp_id: The stp_id of this PortfolioSpotOrders. # noqa: E501
+ :param stp_id: The stp_id of this OrderCancel. # noqa: E501
:type: int
"""
@@ -989,62 +1100,85 @@ def stp_id(self, stp_id):
@property
def stp_act(self):
- """Gets the stp_act of this PortfolioSpotOrders. # noqa: E501
+ """Gets the stp_act of this OrderCancel. # noqa: E501
- 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 # noqa: E501
+ Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention 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 # noqa: E501
- :return: The stp_act of this PortfolioSpotOrders. # noqa: E501
+ :return: The stp_act of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._stp_act
@stp_act.setter
def stp_act(self, stp_act):
- """Sets the stp_act of this PortfolioSpotOrders.
+ """Sets the stp_act of this OrderCancel.
- 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 # noqa: E501
+ Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention 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 # noqa: E501
- :param stp_act: The stp_act of this PortfolioSpotOrders. # noqa: E501
+ :param stp_act: The stp_act of this OrderCancel. # noqa: E501
:type: str
"""
allowed_values = ["cn", "co", "cb", "-"] # noqa: E501
if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `stp_act` ({0}), must be one of {1}".format(stp_act, allowed_values) # noqa: E501
+ "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501
+ .format(stp_act, allowed_values)
)
self._stp_act = stp_act
@property
def finish_as(self):
- """Gets the finish_as of this PortfolioSpotOrders. # noqa: E501
+ """Gets the finish_as of this OrderCancel. # noqa: E501
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 # noqa: E501
- :return: The finish_as of this PortfolioSpotOrders. # noqa: E501
+ :return: The finish_as of this OrderCancel. # noqa: E501
:rtype: str
"""
return self._finish_as
@finish_as.setter
def finish_as(self, finish_as):
- """Sets the finish_as of this PortfolioSpotOrders.
+ """Sets the finish_as of this OrderCancel.
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 # noqa: E501
- :param finish_as: The finish_as of this PortfolioSpotOrders. # noqa: E501
+ :param finish_as: The finish_as of this OrderCancel. # noqa: E501
:type: str
"""
allowed_values = ["open", "filled", "cancelled", "ioc", "stp"] # noqa: E501
if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `finish_as` ({0}), must be one of {1}".format( # noqa: E501
- finish_as, allowed_values
- )
+ "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501
+ .format(finish_as, allowed_values)
)
self._finish_as = finish_as
+ @property
+ def action_mode(self):
+ """Gets the action_mode of this OrderCancel. # noqa: E501
+
+ 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) # noqa: E501
+
+ :return: The action_mode of this OrderCancel. # noqa: E501
+ :rtype: str
+ """
+ return self._action_mode
+
+ @action_mode.setter
+ def action_mode(self, action_mode):
+ """Sets the action_mode of this OrderCancel.
+
+ 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) # noqa: E501
+
+ :param action_mode: The action_mode of this OrderCancel. # noqa: E501
+ :type: str
+ """
+
+ self._action_mode = action_mode
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -1052,16 +1186,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
@@ -1077,14 +1213,14 @@ def __repr__(self):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, PortfolioSpotOrders):
+ if not isinstance(other, OrderCancel):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, PortfolioSpotOrders):
+ if not isinstance(other, OrderCancel):
return True
return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/order_patch.py b/gate_api/models/order_patch.py
index b968cd2..8e59035 100644
--- a/gate_api/models/order_patch.py
+++ b/gate_api/models/order_patch.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,34 +32,103 @@ class OrderPatch(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'amount': 'str', 'price': 'str', 'amend_text': 'str'}
-
- attribute_map = {'amount': 'amount', 'price': 'price', 'amend_text': 'amend_text'}
-
- def __init__(self, amount=None, price=None, amend_text=None, local_vars_configuration=None): # noqa: E501
- # type: (str, str, str, Configuration) -> None
+ openapi_types = {
+ 'currency_pair': 'str',
+ 'account': 'str',
+ 'amount': 'str',
+ 'price': 'str',
+ 'amend_text': 'str',
+ 'action_mode': 'str'
+ }
+
+ attribute_map = {
+ 'currency_pair': 'currency_pair',
+ 'account': 'account',
+ 'amount': 'amount',
+ 'price': 'price',
+ 'amend_text': 'amend_text',
+ 'action_mode': 'action_mode'
+ }
+
+ def __init__(self, currency_pair=None, account=None, amount=None, price=None, amend_text=None, action_mode=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, Configuration) -> None
"""OrderPatch - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
+ self._currency_pair = None
+ self._account = None
self._amount = None
self._price = None
self._amend_text = None
+ self._action_mode = None
self.discriminator = None
+ if currency_pair is not None:
+ self.currency_pair = currency_pair
+ if account is not None:
+ self.account = account
if amount is not None:
self.amount = amount
if price is not None:
self.price = price
if amend_text is not None:
self.amend_text = amend_text
+ if action_mode is not None:
+ self.action_mode = action_mode
+
+ @property
+ def currency_pair(self):
+ """Gets the currency_pair of this OrderPatch. # noqa: E501
+
+ Currency pair # noqa: E501
+
+ :return: The currency_pair of this OrderPatch. # noqa: E501
+ :rtype: str
+ """
+ return self._currency_pair
+
+ @currency_pair.setter
+ def currency_pair(self, currency_pair):
+ """Sets the currency_pair of this OrderPatch.
+
+ Currency pair # noqa: E501
+
+ :param currency_pair: The currency_pair of this OrderPatch. # noqa: E501
+ :type: str
+ """
+
+ self._currency_pair = currency_pair
+
+ @property
+ def account(self):
+ """Gets the account of this OrderPatch. # noqa: E501
+
+ Specify query account # noqa: E501
+
+ :return: The account of this OrderPatch. # noqa: E501
+ :rtype: str
+ """
+ return self._account
+
+ @account.setter
+ def account(self, account):
+ """Sets the account of this OrderPatch.
+
+ Specify query account # noqa: E501
+
+ :param account: The account of this OrderPatch. # noqa: E501
+ :type: str
+ """
+
+ self._account = account
@property
def amount(self):
"""Gets the amount of this OrderPatch. # noqa: E501
- New order amount. `amount` and `price` must specify one of them # noqa: E501
+ Trading quantity. Either `amount` or `price` must be specified # noqa: E501
:return: The amount of this OrderPatch. # noqa: E501
:rtype: str
@@ -70,7 +139,7 @@ def amount(self):
def amount(self, amount):
"""Sets the amount of this OrderPatch.
- New order amount. `amount` and `price` must specify one of them # noqa: E501
+ Trading quantity. Either `amount` or `price` must be specified # noqa: E501
:param amount: The amount of this OrderPatch. # noqa: E501
:type: str
@@ -82,7 +151,7 @@ def amount(self, amount):
def price(self):
"""Gets the price of this OrderPatch. # noqa: E501
- New order price. `amount` and `Price` must specify one of them\" # noqa: E501
+ Trading price. Either `amount` or `price` must be specified # noqa: E501
:return: The price of this OrderPatch. # noqa: E501
:rtype: str
@@ -93,7 +162,7 @@ def price(self):
def price(self, price):
"""Sets the price of this OrderPatch.
- New order price. `amount` and `Price` must specify one of them\" # noqa: E501
+ Trading price. Either `amount` or `price` must be specified # noqa: E501
:param price: The price of this OrderPatch. # noqa: E501
:type: str
@@ -105,7 +174,7 @@ def price(self, price):
def amend_text(self):
"""Gets the amend_text of this OrderPatch. # noqa: E501
- Custom info during amending order # noqa: E501
+ Custom info during order amendment # noqa: E501
:return: The amend_text of this OrderPatch. # noqa: E501
:rtype: str
@@ -116,16 +185,40 @@ def amend_text(self):
def amend_text(self, amend_text):
"""Sets the amend_text of this OrderPatch.
- Custom info during amending order # noqa: E501
+ Custom info during order amendment # noqa: E501
:param amend_text: The amend_text of this OrderPatch. # noqa: E501
:type: str
"""
- if self.local_vars_configuration.client_side_validation and amend_text is not None and len(amend_text) > 31:
+ if (self.local_vars_configuration.client_side_validation and
+ amend_text is not None and len(amend_text) > 31):
raise ValueError("Invalid value for `amend_text`, length must be less than or equal to `31`") # noqa: E501
self._amend_text = amend_text
+ @property
+ def action_mode(self):
+ """Gets the action_mode of this OrderPatch. # noqa: E501
+
+ 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) # noqa: E501
+
+ :return: The action_mode of this OrderPatch. # noqa: E501
+ :rtype: str
+ """
+ return self._action_mode
+
+ @action_mode.setter
+ def action_mode(self, action_mode):
+ """Sets the action_mode of this OrderPatch.
+
+ 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) # noqa: E501
+
+ :param action_mode: The action_mode of this OrderPatch. # noqa: E501
+ :type: str
+ """
+
+ self._action_mode = action_mode
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -133,16 +226,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/order_resp.py b/gate_api/models/order_resp.py
index b66c897..c95612a 100644
--- a/gate_api/models/order_resp.py
+++ b/gate_api/models/order_resp.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,13 @@ class OrderResp(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'order_id': 'int'}
+ openapi_types = {
+ 'order_id': 'int'
+ }
- attribute_map = {'order_id': 'order_id'}
+ attribute_map = {
+ 'order_id': 'order_id'
+ }
def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501
# type: (int, Configuration) -> None
@@ -53,7 +57,7 @@ def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501
def order_id(self):
"""Gets the order_id of this OrderResp. # noqa: E501
- 订单id # noqa: E501
+ Order ID # noqa: E501
:return: The order_id of this OrderResp. # noqa: E501
:rtype: int
@@ -64,7 +68,7 @@ def order_id(self):
def order_id(self, order_id):
"""Sets the order_id of this OrderResp.
- 订单id # noqa: E501
+ Order ID # noqa: E501
:param order_id: The order_id of this OrderResp. # noqa: E501
:type: int
@@ -79,16 +83,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/partner_commission_history.py b/gate_api/models/partner_commission_history.py
new file mode 100644
index 0000000..77c0d2f
--- /dev/null
+++ b/gate_api/models/partner_commission_history.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class PartnerCommissionHistory(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'total': 'int',
+ 'list': 'list[AgencyCommission]'
+ }
+
+ attribute_map = {
+ 'total': 'total',
+ 'list': 'list'
+ }
+
+ def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, list[AgencyCommission], Configuration) -> None
+ """PartnerCommissionHistory - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._total = None
+ self._list = None
+ self.discriminator = None
+
+ if total is not None:
+ self.total = total
+ if list is not None:
+ self.list = list
+
+ @property
+ def total(self):
+ """Gets the total of this PartnerCommissionHistory. # noqa: E501
+
+ Total # noqa: E501
+
+ :return: The total of this PartnerCommissionHistory. # noqa: E501
+ :rtype: int
+ """
+ return self._total
+
+ @total.setter
+ def total(self, total):
+ """Sets the total of this PartnerCommissionHistory.
+
+ Total # noqa: E501
+
+ :param total: The total of this PartnerCommissionHistory. # noqa: E501
+ :type: int
+ """
+
+ self._total = total
+
+ @property
+ def list(self):
+ """Gets the list of this PartnerCommissionHistory. # noqa: E501
+
+ List of commission history # noqa: E501
+
+ :return: The list of this PartnerCommissionHistory. # noqa: E501
+ :rtype: list[AgencyCommission]
+ """
+ return self._list
+
+ @list.setter
+ def list(self, list):
+ """Sets the list of this PartnerCommissionHistory.
+
+ List of commission history # noqa: E501
+
+ :param list: The list of this PartnerCommissionHistory. # noqa: E501
+ :type: list[AgencyCommission]
+ """
+
+ self._list = list
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, PartnerCommissionHistory):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, PartnerCommissionHistory):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/partner_sub.py b/gate_api/models/partner_sub.py
new file mode 100644
index 0000000..c82d656
--- /dev/null
+++ b/gate_api/models/partner_sub.py
@@ -0,0 +1,179 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class PartnerSub(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'user_id': 'int',
+ 'user_join_time': 'int',
+ 'type': 'int'
+ }
+
+ attribute_map = {
+ 'user_id': 'user_id',
+ 'user_join_time': 'user_join_time',
+ 'type': 'type'
+ }
+
+ def __init__(self, user_id=None, user_join_time=None, type=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, int, int, Configuration) -> None
+ """PartnerSub - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._user_id = None
+ self._user_join_time = None
+ self._type = None
+ self.discriminator = None
+
+ if user_id is not None:
+ self.user_id = user_id
+ if user_join_time is not None:
+ self.user_join_time = user_join_time
+ if type is not None:
+ self.type = type
+
+ @property
+ def user_id(self):
+ """Gets the user_id of this PartnerSub. # noqa: E501
+
+ User ID # noqa: E501
+
+ :return: The user_id of this PartnerSub. # noqa: E501
+ :rtype: int
+ """
+ return self._user_id
+
+ @user_id.setter
+ def user_id(self, user_id):
+ """Sets the user_id of this PartnerSub.
+
+ User ID # noqa: E501
+
+ :param user_id: The user_id of this PartnerSub. # noqa: E501
+ :type: int
+ """
+
+ self._user_id = user_id
+
+ @property
+ def user_join_time(self):
+ """Gets the user_join_time of this PartnerSub. # noqa: E501
+
+ Time when user joined the system, Unix timestamp in seconds # noqa: E501
+
+ :return: The user_join_time of this PartnerSub. # noqa: E501
+ :rtype: int
+ """
+ return self._user_join_time
+
+ @user_join_time.setter
+ def user_join_time(self, user_join_time):
+ """Sets the user_join_time of this PartnerSub.
+
+ Time when user joined the system, Unix timestamp in seconds # noqa: E501
+
+ :param user_join_time: The user_join_time of this PartnerSub. # noqa: E501
+ :type: int
+ """
+
+ self._user_join_time = user_join_time
+
+ @property
+ def type(self):
+ """Gets the type of this PartnerSub. # noqa: E501
+
+ Type (1-Sub-agent 2-Indirect direct customer 3-Direct direct customer) # noqa: E501
+
+ :return: The type of this PartnerSub. # noqa: E501
+ :rtype: int
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this PartnerSub.
+
+ Type (1-Sub-agent 2-Indirect direct customer 3-Direct direct customer) # noqa: E501
+
+ :param type: The type of this PartnerSub. # noqa: E501
+ :type: int
+ """
+
+ self._type = type
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, PartnerSub):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, PartnerSub):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/partner_sub_list.py b/gate_api/models/partner_sub_list.py
new file mode 100644
index 0000000..9dec1e4
--- /dev/null
+++ b/gate_api/models/partner_sub_list.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class PartnerSubList(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'total': 'int',
+ 'list': 'list[PartnerSub]'
+ }
+
+ attribute_map = {
+ 'total': 'total',
+ 'list': 'list'
+ }
+
+ def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, list[PartnerSub], Configuration) -> None
+ """PartnerSubList - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._total = None
+ self._list = None
+ self.discriminator = None
+
+ if total is not None:
+ self.total = total
+ if list is not None:
+ self.list = list
+
+ @property
+ def total(self):
+ """Gets the total of this PartnerSubList. # noqa: E501
+
+ Total # noqa: E501
+
+ :return: The total of this PartnerSubList. # noqa: E501
+ :rtype: int
+ """
+ return self._total
+
+ @total.setter
+ def total(self, total):
+ """Sets the total of this PartnerSubList.
+
+ Total # noqa: E501
+
+ :param total: The total of this PartnerSubList. # noqa: E501
+ :type: int
+ """
+
+ self._total = total
+
+ @property
+ def list(self):
+ """Gets the list of this PartnerSubList. # noqa: E501
+
+ Subordinate list # noqa: E501
+
+ :return: The list of this PartnerSubList. # noqa: E501
+ :rtype: list[PartnerSub]
+ """
+ return self._list
+
+ @list.setter
+ def list(self, list):
+ """Sets the list of this PartnerSubList.
+
+ Subordinate list # noqa: E501
+
+ :param list: The list of this PartnerSubList. # noqa: E501
+ :type: list[PartnerSub]
+ """
+
+ self._list = list
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, PartnerSubList):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, PartnerSubList):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/partner_transaction_history.py b/gate_api/models/partner_transaction_history.py
new file mode 100644
index 0000000..3939e41
--- /dev/null
+++ b/gate_api/models/partner_transaction_history.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class PartnerTransactionHistory(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'total': 'int',
+ 'list': 'list[AgencyTransaction]'
+ }
+
+ attribute_map = {
+ 'total': 'total',
+ 'list': 'list'
+ }
+
+ def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, list[AgencyTransaction], Configuration) -> None
+ """PartnerTransactionHistory - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._total = None
+ self._list = None
+ self.discriminator = None
+
+ if total is not None:
+ self.total = total
+ if list is not None:
+ self.list = list
+
+ @property
+ def total(self):
+ """Gets the total of this PartnerTransactionHistory. # noqa: E501
+
+ Total # noqa: E501
+
+ :return: The total of this PartnerTransactionHistory. # noqa: E501
+ :rtype: int
+ """
+ return self._total
+
+ @total.setter
+ def total(self, total):
+ """Sets the total of this PartnerTransactionHistory.
+
+ Total # noqa: E501
+
+ :param total: The total of this PartnerTransactionHistory. # noqa: E501
+ :type: int
+ """
+
+ self._total = total
+
+ @property
+ def list(self):
+ """Gets the list of this PartnerTransactionHistory. # noqa: E501
+
+ List of transaction history # noqa: E501
+
+ :return: The list of this PartnerTransactionHistory. # noqa: E501
+ :rtype: list[AgencyTransaction]
+ """
+ return self._list
+
+ @list.setter
+ def list(self, list):
+ """Sets the list of this PartnerTransactionHistory.
+
+ List of transaction history # noqa: E501
+
+ :param list: The list of this PartnerTransactionHistory. # noqa: E501
+ :type: list[AgencyTransaction]
+ """
+
+ self._list = list
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, PartnerTransactionHistory):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, PartnerTransactionHistory):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/patch_uni_lend.py b/gate_api/models/patch_uni_lend.py
index e09bc13..82e3a19 100644
--- a/gate_api/models/patch_uni_lend.py
+++ b/gate_api/models/patch_uni_lend.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class PatchUniLend(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'min_rate': 'str'}
+ openapi_types = {
+ 'currency': 'str',
+ 'min_rate': 'str'
+ }
- attribute_map = {'currency': 'currency', 'min_rate': 'min_rate'}
+ attribute_map = {
+ 'currency': 'currency',
+ 'min_rate': 'min_rate'
+ }
def __init__(self, currency=None, min_rate=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, Configuration) -> None
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/place_dual_investment_order.py b/gate_api/models/place_dual_investment_order.py
new file mode 100644
index 0000000..46346c1
--- /dev/null
+++ b/gate_api/models/place_dual_investment_order.py
@@ -0,0 +1,181 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class PlaceDualInvestmentOrder(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'plan_id': 'str',
+ 'amount': 'str',
+ 'text': 'str'
+ }
+
+ attribute_map = {
+ 'plan_id': 'plan_id',
+ 'amount': 'amount',
+ 'text': 'text'
+ }
+
+ def __init__(self, plan_id=None, amount=None, text=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, Configuration) -> None
+ """PlaceDualInvestmentOrder - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._plan_id = None
+ self._amount = None
+ self._text = None
+ self.discriminator = None
+
+ self.plan_id = plan_id
+ self.amount = amount
+ if text is not None:
+ self.text = text
+
+ @property
+ def plan_id(self):
+ """Gets the plan_id of this PlaceDualInvestmentOrder. # noqa: E501
+
+ Product ID # noqa: E501
+
+ :return: The plan_id of this PlaceDualInvestmentOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._plan_id
+
+ @plan_id.setter
+ def plan_id(self, plan_id):
+ """Sets the plan_id of this PlaceDualInvestmentOrder.
+
+ Product ID # noqa: E501
+
+ :param plan_id: The plan_id of this PlaceDualInvestmentOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and plan_id is None: # noqa: E501
+ raise ValueError("Invalid value for `plan_id`, must not be `None`") # noqa: E501
+
+ self._plan_id = plan_id
+
+ @property
+ def amount(self):
+ """Gets the amount of this PlaceDualInvestmentOrder. # noqa: E501
+
+ Subscription amount, mutually exclusive with copies field # noqa: E501
+
+ :return: The amount of this PlaceDualInvestmentOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this PlaceDualInvestmentOrder.
+
+ Subscription amount, mutually exclusive with copies field # noqa: E501
+
+ :param amount: The amount of this PlaceDualInvestmentOrder. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501
+ raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501
+
+ self._amount = amount
+
+ @property
+ def text(self):
+ """Gets the text of this PlaceDualInvestmentOrder. # noqa: E501
+
+ Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501
+
+ :return: The text of this PlaceDualInvestmentOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._text
+
+ @text.setter
+ def text(self, text):
+ """Sets the text of this PlaceDualInvestmentOrder.
+
+ Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501
+
+ :param text: The text of this PlaceDualInvestmentOrder. # noqa: E501
+ :type: str
+ """
+
+ self._text = text
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, PlaceDualInvestmentOrder):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, PlaceDualInvestmentOrder):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/portfolio_account.py b/gate_api/models/portfolio_account.py
deleted file mode 100644
index cc877a5..0000000
--- a/gate_api/models/portfolio_account.py
+++ /dev/null
@@ -1,558 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class PortfolioAccount(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'user_id': 'int',
- 'refresh_time': 'int',
- 'locked': 'bool',
- 'balances': 'dict(str, PortfolioMarginBalance)',
- 'total': 'str',
- 'borrowed': 'str',
- 'interest': 'str',
- 'total_initial_margin': 'str',
- 'total_margin_balance': 'str',
- 'total_maintenance_margin': 'str',
- 'total_initial_margin_rate': 'str',
- 'total_maintenance_margin_rate': 'str',
- 'total_available_margin': 'str',
- 'portfolio_margin_total': 'str',
- 'portfolio_margin_total_liab': 'str',
- 'portfolio_margin_total_equity': 'str',
- }
-
- attribute_map = {
- 'user_id': 'user_id',
- 'refresh_time': 'refresh_time',
- 'locked': 'locked',
- 'balances': 'balances',
- 'total': 'total',
- 'borrowed': 'borrowed',
- 'interest': 'interest',
- 'total_initial_margin': 'total_initial_margin',
- 'total_margin_balance': 'total_margin_balance',
- 'total_maintenance_margin': 'total_maintenance_margin',
- 'total_initial_margin_rate': 'total_initial_margin_rate',
- 'total_maintenance_margin_rate': 'total_maintenance_margin_rate',
- 'total_available_margin': 'total_available_margin',
- 'portfolio_margin_total': 'portfolio_margin_total',
- 'portfolio_margin_total_liab': 'portfolio_margin_total_liab',
- 'portfolio_margin_total_equity': 'portfolio_margin_total_equity',
- }
-
- def __init__(
- self,
- user_id=None,
- refresh_time=None,
- locked=None,
- balances=None,
- total=None,
- borrowed=None,
- interest=None,
- total_initial_margin=None,
- total_margin_balance=None,
- total_maintenance_margin=None,
- total_initial_margin_rate=None,
- total_maintenance_margin_rate=None,
- total_available_margin=None,
- portfolio_margin_total=None,
- portfolio_margin_total_liab=None,
- portfolio_margin_total_equity=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, int, bool, dict(str, PortfolioMarginBalance), str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None
- """PortfolioAccount - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._user_id = None
- self._refresh_time = None
- self._locked = None
- self._balances = None
- self._total = None
- self._borrowed = None
- self._interest = None
- self._total_initial_margin = None
- self._total_margin_balance = None
- self._total_maintenance_margin = None
- self._total_initial_margin_rate = None
- self._total_maintenance_margin_rate = None
- self._total_available_margin = None
- self._portfolio_margin_total = None
- self._portfolio_margin_total_liab = None
- self._portfolio_margin_total_equity = None
- self.discriminator = None
-
- if user_id is not None:
- self.user_id = user_id
- if refresh_time is not None:
- self.refresh_time = refresh_time
- if locked is not None:
- self.locked = locked
- if balances is not None:
- self.balances = balances
- if total is not None:
- self.total = total
- if borrowed is not None:
- self.borrowed = borrowed
- if interest is not None:
- self.interest = interest
- if total_initial_margin is not None:
- self.total_initial_margin = total_initial_margin
- if total_margin_balance is not None:
- self.total_margin_balance = total_margin_balance
- if total_maintenance_margin is not None:
- self.total_maintenance_margin = total_maintenance_margin
- if total_initial_margin_rate is not None:
- self.total_initial_margin_rate = total_initial_margin_rate
- if total_maintenance_margin_rate is not None:
- self.total_maintenance_margin_rate = total_maintenance_margin_rate
- if total_available_margin is not None:
- self.total_available_margin = total_available_margin
- if portfolio_margin_total is not None:
- self.portfolio_margin_total = portfolio_margin_total
- if portfolio_margin_total_liab is not None:
- self.portfolio_margin_total_liab = portfolio_margin_total_liab
- if portfolio_margin_total_equity is not None:
- self.portfolio_margin_total_equity = portfolio_margin_total_equity
-
- @property
- def user_id(self):
- """Gets the user_id of this PortfolioAccount. # noqa: E501
-
- User ID # noqa: E501
-
- :return: The user_id of this PortfolioAccount. # noqa: E501
- :rtype: int
- """
- return self._user_id
-
- @user_id.setter
- def user_id(self, user_id):
- """Sets the user_id of this PortfolioAccount.
-
- User ID # noqa: E501
-
- :param user_id: The user_id of this PortfolioAccount. # noqa: E501
- :type: int
- """
-
- self._user_id = user_id
-
- @property
- def refresh_time(self):
- """Gets the refresh_time of this PortfolioAccount. # noqa: E501
-
- Time of the most recent refresh # noqa: E501
-
- :return: The refresh_time of this PortfolioAccount. # noqa: E501
- :rtype: int
- """
- return self._refresh_time
-
- @refresh_time.setter
- def refresh_time(self, refresh_time):
- """Sets the refresh_time of this PortfolioAccount.
-
- Time of the most recent refresh # noqa: E501
-
- :param refresh_time: The refresh_time of this PortfolioAccount. # noqa: E501
- :type: int
- """
-
- self._refresh_time = refresh_time
-
- @property
- def locked(self):
- """Gets the locked of this PortfolioAccount. # noqa: E501
-
- Whether account is locked # noqa: E501
-
- :return: The locked of this PortfolioAccount. # noqa: E501
- :rtype: bool
- """
- return self._locked
-
- @locked.setter
- def locked(self, locked):
- """Sets the locked of this PortfolioAccount.
-
- Whether account is locked # noqa: E501
-
- :param locked: The locked of this PortfolioAccount. # noqa: E501
- :type: bool
- """
-
- self._locked = locked
-
- @property
- def balances(self):
- """Gets the balances of this PortfolioAccount. # noqa: E501
-
-
- :return: The balances of this PortfolioAccount. # noqa: E501
- :rtype: dict(str, PortfolioMarginBalance)
- """
- return self._balances
-
- @balances.setter
- def balances(self, balances):
- """Sets the balances of this PortfolioAccount.
-
-
- :param balances: The balances of this PortfolioAccount. # noqa: E501
- :type: dict(str, PortfolioMarginBalance)
- """
-
- self._balances = balances
-
- @property
- def total(self):
- """Gets the total of this PortfolioAccount. # noqa: E501
-
- Total account value in USDT, i.e., the sum of all currencies' # noqa: E501
-
- :return: The total of this PortfolioAccount. # noqa: E501
- :rtype: str
- """
- return self._total
-
- @total.setter
- def total(self, total):
- """Sets the total of this PortfolioAccount.
-
- Total account value in USDT, i.e., the sum of all currencies' # noqa: E501
-
- :param total: The total of this PortfolioAccount. # noqa: E501
- :type: str
- """
-
- self._total = total
-
- @property
- def borrowed(self):
- """Gets the borrowed of this PortfolioAccount. # noqa: E501
-
- Total borrowed value in USDT, i.e., the sum of all currencies # noqa: E501
-
- :return: The borrowed of this PortfolioAccount. # noqa: E501
- :rtype: str
- """
- return self._borrowed
-
- @borrowed.setter
- def borrowed(self, borrowed):
- """Sets the borrowed of this PortfolioAccount.
-
- Total borrowed value in USDT, i.e., the sum of all currencies # noqa: E501
-
- :param borrowed: The borrowed of this PortfolioAccount. # noqa: E501
- :type: str
- """
-
- self._borrowed = borrowed
-
- @property
- def interest(self):
- """Gets the interest of this PortfolioAccount. # noqa: E501
-
- Total unpaid interests in USDT, i.e., the sum of all currencies # noqa: E501
-
- :return: The interest of this PortfolioAccount. # noqa: E501
- :rtype: str
- """
- return self._interest
-
- @interest.setter
- def interest(self, interest):
- """Sets the interest of this PortfolioAccount.
-
- Total unpaid interests in USDT, i.e., the sum of all currencies # noqa: E501
-
- :param interest: The interest of this PortfolioAccount. # noqa: E501
- :type: str
- """
-
- self._interest = interest
-
- @property
- def total_initial_margin(self):
- """Gets the total_initial_margin of this PortfolioAccount. # noqa: E501
-
- Total initial margin # noqa: E501
-
- :return: The total_initial_margin of this PortfolioAccount. # noqa: E501
- :rtype: str
- """
- return self._total_initial_margin
-
- @total_initial_margin.setter
- def total_initial_margin(self, total_initial_margin):
- """Sets the total_initial_margin of this PortfolioAccount.
-
- Total initial margin # noqa: E501
-
- :param total_initial_margin: The total_initial_margin of this PortfolioAccount. # noqa: E501
- :type: str
- """
-
- self._total_initial_margin = total_initial_margin
-
- @property
- def total_margin_balance(self):
- """Gets the total_margin_balance of this PortfolioAccount. # noqa: E501
-
- Total margin balance # noqa: E501
-
- :return: The total_margin_balance of this PortfolioAccount. # noqa: E501
- :rtype: str
- """
- return self._total_margin_balance
-
- @total_margin_balance.setter
- def total_margin_balance(self, total_margin_balance):
- """Sets the total_margin_balance of this PortfolioAccount.
-
- Total margin balance # noqa: E501
-
- :param total_margin_balance: The total_margin_balance of this PortfolioAccount. # noqa: E501
- :type: str
- """
-
- self._total_margin_balance = total_margin_balance
-
- @property
- def total_maintenance_margin(self):
- """Gets the total_maintenance_margin of this PortfolioAccount. # noqa: E501
-
- Total maintenance margin # noqa: E501
-
- :return: The total_maintenance_margin of this PortfolioAccount. # noqa: E501
- :rtype: str
- """
- return self._total_maintenance_margin
-
- @total_maintenance_margin.setter
- def total_maintenance_margin(self, total_maintenance_margin):
- """Sets the total_maintenance_margin of this PortfolioAccount.
-
- Total maintenance margin # noqa: E501
-
- :param total_maintenance_margin: The total_maintenance_margin of this PortfolioAccount. # noqa: E501
- :type: str
- """
-
- self._total_maintenance_margin = total_maintenance_margin
-
- @property
- def total_initial_margin_rate(self):
- """Gets the total_initial_margin_rate of this PortfolioAccount. # noqa: E501
-
- Total initial margin rate # noqa: E501
-
- :return: The total_initial_margin_rate of this PortfolioAccount. # noqa: E501
- :rtype: str
- """
- return self._total_initial_margin_rate
-
- @total_initial_margin_rate.setter
- def total_initial_margin_rate(self, total_initial_margin_rate):
- """Sets the total_initial_margin_rate of this PortfolioAccount.
-
- Total initial margin rate # noqa: E501
-
- :param total_initial_margin_rate: The total_initial_margin_rate of this PortfolioAccount. # noqa: E501
- :type: str
- """
-
- self._total_initial_margin_rate = total_initial_margin_rate
-
- @property
- def total_maintenance_margin_rate(self):
- """Gets the total_maintenance_margin_rate of this PortfolioAccount. # noqa: E501
-
- Total maintenance margin rate # noqa: E501
-
- :return: The total_maintenance_margin_rate of this PortfolioAccount. # noqa: E501
- :rtype: str
- """
- return self._total_maintenance_margin_rate
-
- @total_maintenance_margin_rate.setter
- def total_maintenance_margin_rate(self, total_maintenance_margin_rate):
- """Sets the total_maintenance_margin_rate of this PortfolioAccount.
-
- Total maintenance margin rate # noqa: E501
-
- :param total_maintenance_margin_rate: The total_maintenance_margin_rate of this PortfolioAccount. # noqa: E501
- :type: str
- """
-
- self._total_maintenance_margin_rate = total_maintenance_margin_rate
-
- @property
- def total_available_margin(self):
- """Gets the total_available_margin of this PortfolioAccount. # noqa: E501
-
- Total available margin # noqa: E501
-
- :return: The total_available_margin of this PortfolioAccount. # noqa: E501
- :rtype: str
- """
- return self._total_available_margin
-
- @total_available_margin.setter
- def total_available_margin(self, total_available_margin):
- """Sets the total_available_margin of this PortfolioAccount.
-
- Total available margin # noqa: E501
-
- :param total_available_margin: The total_available_margin of this PortfolioAccount. # noqa: E501
- :type: str
- """
-
- self._total_available_margin = total_available_margin
-
- @property
- def portfolio_margin_total(self):
- """Gets the portfolio_margin_total of this PortfolioAccount. # noqa: E501
-
- Total amount of the portfolio margin account # noqa: E501
-
- :return: The portfolio_margin_total of this PortfolioAccount. # noqa: E501
- :rtype: str
- """
- return self._portfolio_margin_total
-
- @portfolio_margin_total.setter
- def portfolio_margin_total(self, portfolio_margin_total):
- """Sets the portfolio_margin_total of this PortfolioAccount.
-
- Total amount of the portfolio margin account # noqa: E501
-
- :param portfolio_margin_total: The portfolio_margin_total of this PortfolioAccount. # noqa: E501
- :type: str
- """
-
- self._portfolio_margin_total = portfolio_margin_total
-
- @property
- def portfolio_margin_total_liab(self):
- """Gets the portfolio_margin_total_liab of this PortfolioAccount. # noqa: E501
-
- Total liabilities of the portfolio margin account # noqa: E501
-
- :return: The portfolio_margin_total_liab of this PortfolioAccount. # noqa: E501
- :rtype: str
- """
- return self._portfolio_margin_total_liab
-
- @portfolio_margin_total_liab.setter
- def portfolio_margin_total_liab(self, portfolio_margin_total_liab):
- """Sets the portfolio_margin_total_liab of this PortfolioAccount.
-
- Total liabilities of the portfolio margin account # noqa: E501
-
- :param portfolio_margin_total_liab: The portfolio_margin_total_liab of this PortfolioAccount. # noqa: E501
- :type: str
- """
-
- self._portfolio_margin_total_liab = portfolio_margin_total_liab
-
- @property
- def portfolio_margin_total_equity(self):
- """Gets the portfolio_margin_total_equity of this PortfolioAccount. # noqa: E501
-
- Total equity of the portfolio margin account # noqa: E501
-
- :return: The portfolio_margin_total_equity of this PortfolioAccount. # noqa: E501
- :rtype: str
- """
- return self._portfolio_margin_total_equity
-
- @portfolio_margin_total_equity.setter
- def portfolio_margin_total_equity(self, portfolio_margin_total_equity):
- """Sets the portfolio_margin_total_equity of this PortfolioAccount.
-
- Total equity of the portfolio margin account # noqa: E501
-
- :param portfolio_margin_total_equity: The portfolio_margin_total_equity of this PortfolioAccount. # noqa: E501
- :type: str
- """
-
- self._portfolio_margin_total_equity = portfolio_margin_total_equity
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, PortfolioAccount):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, PortfolioAccount):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/portfolio_loan_record.py b/gate_api/models/portfolio_loan_record.py
deleted file mode 100644
index 6b47684..0000000
--- a/gate_api/models/portfolio_loan_record.py
+++ /dev/null
@@ -1,299 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class PortfolioLoanRecord(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'id': 'int',
- 'type': 'str',
- 'repayment_type': 'str',
- 'currency_pair': 'str',
- 'currency': 'str',
- 'amount': 'str',
- 'create_time': 'int',
- }
-
- attribute_map = {
- 'id': 'id',
- 'type': 'type',
- 'repayment_type': 'repayment_type',
- 'currency_pair': 'currency_pair',
- 'currency': 'currency',
- 'amount': 'amount',
- 'create_time': 'create_time',
- }
-
- def __init__(
- self,
- id=None,
- type=None,
- repayment_type=None,
- currency_pair=None,
- currency=None,
- amount=None,
- create_time=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, str, str, str, str, str, int, Configuration) -> None
- """PortfolioLoanRecord - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._id = None
- self._type = None
- self._repayment_type = None
- self._currency_pair = None
- self._currency = None
- self._amount = None
- self._create_time = None
- self.discriminator = None
-
- if id is not None:
- self.id = id
- if type is not None:
- self.type = type
- if repayment_type is not None:
- self.repayment_type = repayment_type
- if currency_pair is not None:
- self.currency_pair = currency_pair
- if currency is not None:
- self.currency = currency
- if amount is not None:
- self.amount = amount
- if create_time is not None:
- self.create_time = create_time
-
- @property
- def id(self):
- """Gets the id of this PortfolioLoanRecord. # noqa: E501
-
- id # noqa: E501
-
- :return: The id of this PortfolioLoanRecord. # noqa: E501
- :rtype: int
- """
- return self._id
-
- @id.setter
- def id(self, id):
- """Sets the id of this PortfolioLoanRecord.
-
- id # noqa: E501
-
- :param id: The id of this PortfolioLoanRecord. # noqa: E501
- :type: int
- """
-
- self._id = id
-
- @property
- def type(self):
- """Gets the type of this PortfolioLoanRecord. # noqa: E501
-
- type: borrow - borrow, repay - repay # noqa: E501
-
- :return: The type of this PortfolioLoanRecord. # noqa: E501
- :rtype: str
- """
- return self._type
-
- @type.setter
- def type(self, type):
- """Sets the type of this PortfolioLoanRecord.
-
- type: borrow - borrow, repay - repay # noqa: E501
-
- :param type: The type of this PortfolioLoanRecord. # noqa: E501
- :type: str
- """
-
- self._type = type
-
- @property
- def repayment_type(self):
- """Gets the repayment_type of this PortfolioLoanRecord. # noqa: E501
-
- 还款类型 , none - 无还款类型, manual_repay - 手动还款 , auto_repay - 自动还款, cancel_auto_repay - 撤单后自动还款 # noqa: E501
-
- :return: The repayment_type of this PortfolioLoanRecord. # noqa: E501
- :rtype: str
- """
- return self._repayment_type
-
- @repayment_type.setter
- def repayment_type(self, repayment_type):
- """Sets the repayment_type of this PortfolioLoanRecord.
-
- 还款类型 , none - 无还款类型, manual_repay - 手动还款 , auto_repay - 自动还款, cancel_auto_repay - 撤单后自动还款 # noqa: E501
-
- :param repayment_type: The repayment_type of this PortfolioLoanRecord. # noqa: E501
- :type: str
- """
-
- self._repayment_type = repayment_type
-
- @property
- def currency_pair(self):
- """Gets the currency_pair of this PortfolioLoanRecord. # noqa: E501
-
- Currency pair # noqa: E501
-
- :return: The currency_pair of this PortfolioLoanRecord. # noqa: E501
- :rtype: str
- """
- return self._currency_pair
-
- @currency_pair.setter
- def currency_pair(self, currency_pair):
- """Sets the currency_pair of this PortfolioLoanRecord.
-
- Currency pair # noqa: E501
-
- :param currency_pair: The currency_pair of this PortfolioLoanRecord. # noqa: E501
- :type: str
- """
-
- self._currency_pair = currency_pair
-
- @property
- def currency(self):
- """Gets the currency of this PortfolioLoanRecord. # noqa: E501
-
- Currency # noqa: E501
-
- :return: The currency of this PortfolioLoanRecord. # noqa: E501
- :rtype: str
- """
- return self._currency
-
- @currency.setter
- def currency(self, currency):
- """Sets the currency of this PortfolioLoanRecord.
-
- Currency # noqa: E501
-
- :param currency: The currency of this PortfolioLoanRecord. # noqa: E501
- :type: str
- """
-
- self._currency = currency
-
- @property
- def amount(self):
- """Gets the amount of this PortfolioLoanRecord. # noqa: E501
-
- The amount of lending or repaying # noqa: E501
-
- :return: The amount of this PortfolioLoanRecord. # noqa: E501
- :rtype: str
- """
- return self._amount
-
- @amount.setter
- def amount(self, amount):
- """Sets the amount of this PortfolioLoanRecord.
-
- The amount of lending or repaying # noqa: E501
-
- :param amount: The amount of this PortfolioLoanRecord. # noqa: E501
- :type: str
- """
-
- self._amount = amount
-
- @property
- def create_time(self):
- """Gets the create_time of this PortfolioLoanRecord. # noqa: E501
-
- Created time # noqa: E501
-
- :return: The create_time of this PortfolioLoanRecord. # noqa: E501
- :rtype: int
- """
- return self._create_time
-
- @create_time.setter
- def create_time(self, create_time):
- """Sets the create_time of this PortfolioLoanRecord.
-
- Created time # noqa: E501
-
- :param create_time: The create_time of this PortfolioLoanRecord. # noqa: E501
- :type: int
- """
-
- self._create_time = create_time
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, PortfolioLoanRecord):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, PortfolioLoanRecord):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/portfolio_margin_balance.py b/gate_api/models/portfolio_margin_balance.py
deleted file mode 100644
index 285d863..0000000
--- a/gate_api/models/portfolio_margin_balance.py
+++ /dev/null
@@ -1,357 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class PortfolioMarginBalance(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'available': 'str',
- 'freeze': 'str',
- 'borrowed': 'str',
- 'interest': 'str',
- 'negative_liab': 'str',
- 'futures_pos_liab': 'str',
- 'equity': 'str',
- 'total_freeze': 'str',
- 'total_liab': 'str',
- }
-
- attribute_map = {
- 'available': 'available',
- 'freeze': 'freeze',
- 'borrowed': 'borrowed',
- 'interest': 'interest',
- 'negative_liab': 'negative_liab',
- 'futures_pos_liab': 'futures_pos_liab',
- 'equity': 'equity',
- 'total_freeze': 'total_freeze',
- 'total_liab': 'total_liab',
- }
-
- def __init__(
- self,
- available=None,
- freeze=None,
- borrowed=None,
- interest=None,
- negative_liab=None,
- futures_pos_liab=None,
- equity=None,
- total_freeze=None,
- total_liab=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, str, str, Configuration) -> None
- """PortfolioMarginBalance - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._available = None
- self._freeze = None
- self._borrowed = None
- self._interest = None
- self._negative_liab = None
- self._futures_pos_liab = None
- self._equity = None
- self._total_freeze = None
- self._total_liab = None
- self.discriminator = None
-
- if available is not None:
- self.available = available
- if freeze is not None:
- self.freeze = freeze
- if borrowed is not None:
- self.borrowed = borrowed
- if interest is not None:
- self.interest = interest
- if negative_liab is not None:
- self.negative_liab = negative_liab
- if futures_pos_liab is not None:
- self.futures_pos_liab = futures_pos_liab
- if equity is not None:
- self.equity = equity
- if total_freeze is not None:
- self.total_freeze = total_freeze
- if total_liab is not None:
- self.total_liab = total_liab
-
- @property
- def available(self):
- """Gets the available of this PortfolioMarginBalance. # noqa: E501
-
- Available amount # noqa: E501
-
- :return: The available of this PortfolioMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._available
-
- @available.setter
- def available(self, available):
- """Sets the available of this PortfolioMarginBalance.
-
- Available amount # noqa: E501
-
- :param available: The available of this PortfolioMarginBalance. # noqa: E501
- :type: str
- """
-
- self._available = available
-
- @property
- def freeze(self):
- """Gets the freeze of this PortfolioMarginBalance. # noqa: E501
-
- Locked amount # noqa: E501
-
- :return: The freeze of this PortfolioMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._freeze
-
- @freeze.setter
- def freeze(self, freeze):
- """Sets the freeze of this PortfolioMarginBalance.
-
- Locked amount # noqa: E501
-
- :param freeze: The freeze of this PortfolioMarginBalance. # noqa: E501
- :type: str
- """
-
- self._freeze = freeze
-
- @property
- def borrowed(self):
- """Gets the borrowed of this PortfolioMarginBalance. # noqa: E501
-
- Borrowed amount # noqa: E501
-
- :return: The borrowed of this PortfolioMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._borrowed
-
- @borrowed.setter
- def borrowed(self, borrowed):
- """Sets the borrowed of this PortfolioMarginBalance.
-
- Borrowed amount # noqa: E501
-
- :param borrowed: The borrowed of this PortfolioMarginBalance. # noqa: E501
- :type: str
- """
-
- self._borrowed = borrowed
-
- @property
- def interest(self):
- """Gets the interest of this PortfolioMarginBalance. # noqa: E501
-
- Unpaid interests # noqa: E501
-
- :return: The interest of this PortfolioMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._interest
-
- @interest.setter
- def interest(self, interest):
- """Sets the interest of this PortfolioMarginBalance.
-
- Unpaid interests # noqa: E501
-
- :param interest: The interest of this PortfolioMarginBalance. # noqa: E501
- :type: str
- """
-
- self._interest = interest
-
- @property
- def negative_liab(self):
- """Gets the negative_liab of this PortfolioMarginBalance. # noqa: E501
-
- Negative Liabilities # noqa: E501
-
- :return: The negative_liab of this PortfolioMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._negative_liab
-
- @negative_liab.setter
- def negative_liab(self, negative_liab):
- """Sets the negative_liab of this PortfolioMarginBalance.
-
- Negative Liabilities # noqa: E501
-
- :param negative_liab: The negative_liab of this PortfolioMarginBalance. # noqa: E501
- :type: str
- """
-
- self._negative_liab = negative_liab
-
- @property
- def futures_pos_liab(self):
- """Gets the futures_pos_liab of this PortfolioMarginBalance. # noqa: E501
-
- Borrowing to Open Positions in Futures # noqa: E501
-
- :return: The futures_pos_liab of this PortfolioMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._futures_pos_liab
-
- @futures_pos_liab.setter
- def futures_pos_liab(self, futures_pos_liab):
- """Sets the futures_pos_liab of this PortfolioMarginBalance.
-
- Borrowing to Open Positions in Futures # noqa: E501
-
- :param futures_pos_liab: The futures_pos_liab of this PortfolioMarginBalance. # noqa: E501
- :type: str
- """
-
- self._futures_pos_liab = futures_pos_liab
-
- @property
- def equity(self):
- """Gets the equity of this PortfolioMarginBalance. # noqa: E501
-
- Equity # noqa: E501
-
- :return: The equity of this PortfolioMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._equity
-
- @equity.setter
- def equity(self, equity):
- """Sets the equity of this PortfolioMarginBalance.
-
- Equity # noqa: E501
-
- :param equity: The equity of this PortfolioMarginBalance. # noqa: E501
- :type: str
- """
-
- self._equity = equity
-
- @property
- def total_freeze(self):
- """Gets the total_freeze of this PortfolioMarginBalance. # noqa: E501
-
- Total freeze # noqa: E501
-
- :return: The total_freeze of this PortfolioMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._total_freeze
-
- @total_freeze.setter
- def total_freeze(self, total_freeze):
- """Sets the total_freeze of this PortfolioMarginBalance.
-
- Total freeze # noqa: E501
-
- :param total_freeze: The total_freeze of this PortfolioMarginBalance. # noqa: E501
- :type: str
- """
-
- self._total_freeze = total_freeze
-
- @property
- def total_liab(self):
- """Gets the total_liab of this PortfolioMarginBalance. # noqa: E501
-
- Total liabilities # noqa: E501
-
- :return: The total_liab of this PortfolioMarginBalance. # noqa: E501
- :rtype: str
- """
- return self._total_liab
-
- @total_liab.setter
- def total_liab(self, total_liab):
- """Sets the total_liab of this PortfolioMarginBalance.
-
- Total liabilities # noqa: E501
-
- :param total_liab: The total_liab of this PortfolioMarginBalance. # noqa: E501
- :type: str
- """
-
- self._total_liab = total_liab
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, PortfolioMarginBalance):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, PortfolioMarginBalance):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/position.py b/gate_api/models/position.py
index 71c84cf..2951397 100644
--- a/gate_api/models/position.py
+++ b/gate_api/models/position.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -49,6 +49,9 @@ class Position(object):
'maintenance_margin': 'str',
'unrealised_pnl': 'str',
'realised_pnl': 'str',
+ 'pnl_pnl': 'str',
+ 'pnl_fund': 'str',
+ 'pnl_fee': 'str',
'history_pnl': 'str',
'last_close_pnl': 'str',
'realised_point': 'str',
@@ -59,6 +62,11 @@ class Position(object):
'mode': 'str',
'cross_leverage_limit': 'str',
'update_time': 'int',
+ 'update_id': 'int',
+ 'open_time': 'int',
+ 'risk_limit_table': 'str',
+ 'average_maintenance_rate': 'str',
+ 'pid': 'int'
}
attribute_map = {
@@ -78,6 +86,9 @@ class Position(object):
'maintenance_margin': 'maintenance_margin',
'unrealised_pnl': 'unrealised_pnl',
'realised_pnl': 'realised_pnl',
+ 'pnl_pnl': 'pnl_pnl',
+ 'pnl_fund': 'pnl_fund',
+ 'pnl_fee': 'pnl_fee',
'history_pnl': 'history_pnl',
'last_close_pnl': 'last_close_pnl',
'realised_point': 'realised_point',
@@ -88,39 +99,15 @@ class Position(object):
'mode': 'mode',
'cross_leverage_limit': 'cross_leverage_limit',
'update_time': 'update_time',
+ 'update_id': 'update_id',
+ 'open_time': 'open_time',
+ 'risk_limit_table': 'risk_limit_table',
+ 'average_maintenance_rate': 'average_maintenance_rate',
+ 'pid': 'pid'
}
- def __init__(
- self,
- user=None,
- contract=None,
- size=None,
- leverage=None,
- risk_limit=None,
- leverage_max=None,
- maintenance_rate=None,
- value=None,
- margin=None,
- entry_price=None,
- liq_price=None,
- mark_price=None,
- initial_margin=None,
- maintenance_margin=None,
- unrealised_pnl=None,
- realised_pnl=None,
- history_pnl=None,
- last_close_pnl=None,
- realised_point=None,
- history_point=None,
- adl_ranking=None,
- pending_orders=None,
- close_order=None,
- mode=None,
- cross_leverage_limit=None,
- update_time=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, str, int, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, PositionCloseOrder, str, str, int, Configuration) -> None
+ def __init__(self, user=None, contract=None, size=None, leverage=None, risk_limit=None, leverage_max=None, maintenance_rate=None, value=None, margin=None, entry_price=None, liq_price=None, mark_price=None, initial_margin=None, maintenance_margin=None, unrealised_pnl=None, realised_pnl=None, pnl_pnl=None, pnl_fund=None, pnl_fee=None, history_pnl=None, last_close_pnl=None, realised_point=None, history_point=None, adl_ranking=None, pending_orders=None, close_order=None, mode=None, cross_leverage_limit=None, update_time=None, update_id=None, open_time=None, risk_limit_table=None, average_maintenance_rate=None, pid=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, int, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, PositionCloseOrder, str, str, int, int, int, str, str, int, Configuration) -> None
"""Position - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -142,6 +129,9 @@ def __init__(
self._maintenance_margin = None
self._unrealised_pnl = None
self._realised_pnl = None
+ self._pnl_pnl = None
+ self._pnl_fund = None
+ self._pnl_fee = None
self._history_pnl = None
self._last_close_pnl = None
self._realised_point = None
@@ -152,6 +142,11 @@ def __init__(
self._mode = None
self._cross_leverage_limit = None
self._update_time = None
+ self._update_id = None
+ self._open_time = None
+ self._risk_limit_table = None
+ self._average_maintenance_rate = None
+ self._pid = None
self.discriminator = None
if user is not None:
@@ -186,6 +181,12 @@ def __init__(
self.unrealised_pnl = unrealised_pnl
if realised_pnl is not None:
self.realised_pnl = realised_pnl
+ if pnl_pnl is not None:
+ self.pnl_pnl = pnl_pnl
+ if pnl_fund is not None:
+ self.pnl_fund = pnl_fund
+ if pnl_fee is not None:
+ self.pnl_fee = pnl_fee
if history_pnl is not None:
self.history_pnl = history_pnl
if last_close_pnl is not None:
@@ -205,6 +206,16 @@ def __init__(
self.cross_leverage_limit = cross_leverage_limit
if update_time is not None:
self.update_time = update_time
+ if update_id is not None:
+ self.update_id = update_id
+ if open_time is not None:
+ self.open_time = open_time
+ if risk_limit_table is not None:
+ self.risk_limit_table = risk_limit_table
+ if average_maintenance_rate is not None:
+ self.average_maintenance_rate = average_maintenance_rate
+ if pid is not None:
+ self.pid = pid
@property
def user(self):
@@ -555,7 +566,7 @@ def unrealised_pnl(self, unrealised_pnl):
def realised_pnl(self):
"""Gets the realised_pnl of this Position. # noqa: E501
- Realized PNL # noqa: E501
+ Realized PnL # noqa: E501
:return: The realised_pnl of this Position. # noqa: E501
:rtype: str
@@ -566,7 +577,7 @@ def realised_pnl(self):
def realised_pnl(self, realised_pnl):
"""Sets the realised_pnl of this Position.
- Realized PNL # noqa: E501
+ Realized PnL # noqa: E501
:param realised_pnl: The realised_pnl of this Position. # noqa: E501
:type: str
@@ -574,11 +585,80 @@ def realised_pnl(self, realised_pnl):
self._realised_pnl = realised_pnl
+ @property
+ def pnl_pnl(self):
+ """Gets the pnl_pnl of this Position. # noqa: E501
+
+ Realized PNL - Position P/L # noqa: E501
+
+ :return: The pnl_pnl of this Position. # noqa: E501
+ :rtype: str
+ """
+ return self._pnl_pnl
+
+ @pnl_pnl.setter
+ def pnl_pnl(self, pnl_pnl):
+ """Sets the pnl_pnl of this Position.
+
+ Realized PNL - Position P/L # noqa: E501
+
+ :param pnl_pnl: The pnl_pnl of this Position. # noqa: E501
+ :type: str
+ """
+
+ self._pnl_pnl = pnl_pnl
+
+ @property
+ def pnl_fund(self):
+ """Gets the pnl_fund of this Position. # noqa: E501
+
+ Realized PNL - Funding Fees # noqa: E501
+
+ :return: The pnl_fund of this Position. # noqa: E501
+ :rtype: str
+ """
+ return self._pnl_fund
+
+ @pnl_fund.setter
+ def pnl_fund(self, pnl_fund):
+ """Sets the pnl_fund of this Position.
+
+ Realized PNL - Funding Fees # noqa: E501
+
+ :param pnl_fund: The pnl_fund of this Position. # noqa: E501
+ :type: str
+ """
+
+ self._pnl_fund = pnl_fund
+
+ @property
+ def pnl_fee(self):
+ """Gets the pnl_fee of this Position. # noqa: E501
+
+ Realized PNL - Transaction Fees # noqa: E501
+
+ :return: The pnl_fee of this Position. # noqa: E501
+ :rtype: str
+ """
+ return self._pnl_fee
+
+ @pnl_fee.setter
+ def pnl_fee(self, pnl_fee):
+ """Sets the pnl_fee of this Position.
+
+ Realized PNL - Transaction Fees # noqa: E501
+
+ :param pnl_fee: The pnl_fee of this Position. # noqa: E501
+ :type: str
+ """
+
+ self._pnl_fee = pnl_fee
+
@property
def history_pnl(self):
"""Gets the history_pnl of this Position. # noqa: E501
- History realized PNL # noqa: E501
+ Total realized PnL from closed positions # noqa: E501
:return: The history_pnl of this Position. # noqa: E501
:rtype: str
@@ -589,7 +669,7 @@ def history_pnl(self):
def history_pnl(self, history_pnl):
"""Sets the history_pnl of this Position.
- History realized PNL # noqa: E501
+ Total realized PnL from closed positions # noqa: E501
:param history_pnl: The history_pnl of this Position. # noqa: E501
:type: str
@@ -693,7 +773,7 @@ def adl_ranking(self, adl_ranking):
def pending_orders(self):
"""Gets the pending_orders of this Position. # noqa: E501
- Current open orders # noqa: E501
+ Current pending order quantity # noqa: E501
:return: The pending_orders of this Position. # noqa: E501
:rtype: int
@@ -704,7 +784,7 @@ def pending_orders(self):
def pending_orders(self, pending_orders):
"""Sets the pending_orders of this Position.
- Current open orders # noqa: E501
+ Current pending order quantity # noqa: E501
:param pending_orders: The pending_orders of this Position. # noqa: E501
:type: int
@@ -737,7 +817,7 @@ def close_order(self, close_order):
def mode(self):
"""Gets the mode of this Position. # noqa: E501
- Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode # noqa: E501
+ Position mode, including: - `single`: Single position mode - `dual_long`: Long position in dual position mode - `dual_short`: Short position in dual position mode # noqa: E501
:return: The mode of this Position. # noqa: E501
:rtype: str
@@ -748,7 +828,7 @@ def mode(self):
def mode(self, mode):
"""Sets the mode of this Position.
- Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode # noqa: E501
+ Position mode, including: - `single`: Single position mode - `dual_long`: Long position in dual position mode - `dual_short`: Short position in dual position mode # noqa: E501
:param mode: The mode of this Position. # noqa: E501
:type: str
@@ -756,7 +836,8 @@ def mode(self, mode):
allowed_values = ["single", "dual_long", "dual_short"] # noqa: E501
if self.local_vars_configuration.client_side_validation and mode not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `mode` ({0}), must be one of {1}".format(mode, allowed_values) # noqa: E501
+ "Invalid value for `mode` ({0}), must be one of {1}" # noqa: E501
+ .format(mode, allowed_values)
)
self._mode = mode
@@ -765,7 +846,7 @@ def mode(self, mode):
def cross_leverage_limit(self):
"""Gets the cross_leverage_limit of this Position. # noqa: E501
- Cross margin leverage(valid only when `leverage` is 0) # noqa: E501
+ Cross margin leverage (valid only when `leverage` is 0) # noqa: E501
:return: The cross_leverage_limit of this Position. # noqa: E501
:rtype: str
@@ -776,7 +857,7 @@ def cross_leverage_limit(self):
def cross_leverage_limit(self, cross_leverage_limit):
"""Sets the cross_leverage_limit of this Position.
- Cross margin leverage(valid only when `leverage` is 0) # noqa: E501
+ Cross margin leverage (valid only when `leverage` is 0) # noqa: E501
:param cross_leverage_limit: The cross_leverage_limit of this Position. # noqa: E501
:type: str
@@ -807,6 +888,121 @@ def update_time(self, update_time):
self._update_time = update_time
+ @property
+ def update_id(self):
+ """Gets the update_id of this Position. # noqa: E501
+
+ Update ID. The value increments by 1 each time the position is updated # noqa: E501
+
+ :return: The update_id of this Position. # noqa: E501
+ :rtype: int
+ """
+ return self._update_id
+
+ @update_id.setter
+ def update_id(self, update_id):
+ """Sets the update_id of this Position.
+
+ Update ID. The value increments by 1 each time the position is updated # noqa: E501
+
+ :param update_id: The update_id of this Position. # noqa: E501
+ :type: int
+ """
+
+ self._update_id = update_id
+
+ @property
+ def open_time(self):
+ """Gets the open_time of this Position. # noqa: E501
+
+ First Open Time # noqa: E501
+
+ :return: The open_time of this Position. # noqa: E501
+ :rtype: int
+ """
+ return self._open_time
+
+ @open_time.setter
+ def open_time(self, open_time):
+ """Sets the open_time of this Position.
+
+ First Open Time # noqa: E501
+
+ :param open_time: The open_time of this Position. # noqa: E501
+ :type: int
+ """
+
+ self._open_time = open_time
+
+ @property
+ def risk_limit_table(self):
+ """Gets the risk_limit_table of this Position. # noqa: E501
+
+ Risk limit table ID # noqa: E501
+
+ :return: The risk_limit_table of this Position. # noqa: E501
+ :rtype: str
+ """
+ return self._risk_limit_table
+
+ @risk_limit_table.setter
+ def risk_limit_table(self, risk_limit_table):
+ """Sets the risk_limit_table of this Position.
+
+ Risk limit table ID # noqa: E501
+
+ :param risk_limit_table: The risk_limit_table of this Position. # noqa: E501
+ :type: str
+ """
+
+ self._risk_limit_table = risk_limit_table
+
+ @property
+ def average_maintenance_rate(self):
+ """Gets the average_maintenance_rate of this Position. # noqa: E501
+
+ Average maintenance margin rate # noqa: E501
+
+ :return: The average_maintenance_rate of this Position. # noqa: E501
+ :rtype: str
+ """
+ return self._average_maintenance_rate
+
+ @average_maintenance_rate.setter
+ def average_maintenance_rate(self, average_maintenance_rate):
+ """Sets the average_maintenance_rate of this Position.
+
+ Average maintenance margin rate # noqa: E501
+
+ :param average_maintenance_rate: The average_maintenance_rate of this Position. # noqa: E501
+ :type: str
+ """
+
+ self._average_maintenance_rate = average_maintenance_rate
+
+ @property
+ def pid(self):
+ """Gets the pid of this Position. # noqa: E501
+
+ Sub-account position ID # noqa: E501
+
+ :return: The pid of this Position. # noqa: E501
+ :rtype: int
+ """
+ return self._pid
+
+ @pid.setter
+ def pid(self, pid):
+ """Sets the pid of this Position.
+
+ Sub-account position ID # noqa: E501
+
+ :param pid: The pid of this Position. # noqa: E501
+ :type: int
+ """
+
+ self._pid = pid
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -814,16 +1010,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/position_close.py b/gate_api/models/position_close.py
index 3efdfa4..3ab116d 100644
--- a/gate_api/models/position_close.py
+++ b/gate_api/models/position_close.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,14 +32,40 @@ class PositionClose(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'time': 'float', 'contract': 'str', 'side': 'str', 'pnl': 'str', 'text': 'str'}
-
- attribute_map = {'time': 'time', 'contract': 'contract', 'side': 'side', 'pnl': 'pnl', 'text': 'text'}
-
- def __init__(
- self, time=None, contract=None, side=None, pnl=None, text=None, local_vars_configuration=None
- ): # noqa: E501
- # type: (float, str, str, str, str, Configuration) -> None
+ openapi_types = {
+ 'time': 'float',
+ 'contract': 'str',
+ 'side': 'str',
+ 'pnl': 'str',
+ 'pnl_pnl': 'str',
+ 'pnl_fund': 'str',
+ 'pnl_fee': 'str',
+ 'text': 'str',
+ 'max_size': 'str',
+ 'accum_size': 'str',
+ 'first_open_time': 'int',
+ 'long_price': 'str',
+ 'short_price': 'str'
+ }
+
+ attribute_map = {
+ 'time': 'time',
+ 'contract': 'contract',
+ 'side': 'side',
+ 'pnl': 'pnl',
+ 'pnl_pnl': 'pnl_pnl',
+ 'pnl_fund': 'pnl_fund',
+ 'pnl_fee': 'pnl_fee',
+ 'text': 'text',
+ 'max_size': 'max_size',
+ 'accum_size': 'accum_size',
+ 'first_open_time': 'first_open_time',
+ 'long_price': 'long_price',
+ 'short_price': 'short_price'
+ }
+
+ def __init__(self, time=None, contract=None, side=None, pnl=None, pnl_pnl=None, pnl_fund=None, pnl_fee=None, text=None, max_size=None, accum_size=None, first_open_time=None, long_price=None, short_price=None, local_vars_configuration=None): # noqa: E501
+ # type: (float, str, str, str, str, str, str, str, str, str, int, str, str, Configuration) -> None
"""PositionClose - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -49,7 +75,15 @@ def __init__(
self._contract = None
self._side = None
self._pnl = None
+ self._pnl_pnl = None
+ self._pnl_fund = None
+ self._pnl_fee = None
self._text = None
+ self._max_size = None
+ self._accum_size = None
+ self._first_open_time = None
+ self._long_price = None
+ self._short_price = None
self.discriminator = None
if time is not None:
@@ -60,8 +94,24 @@ def __init__(
self.side = side
if pnl is not None:
self.pnl = pnl
+ if pnl_pnl is not None:
+ self.pnl_pnl = pnl_pnl
+ if pnl_fund is not None:
+ self.pnl_fund = pnl_fund
+ if pnl_fee is not None:
+ self.pnl_fee = pnl_fee
if text is not None:
self.text = text
+ if max_size is not None:
+ self.max_size = max_size
+ if accum_size is not None:
+ self.accum_size = accum_size
+ if first_open_time is not None:
+ self.first_open_time = first_open_time
+ if long_price is not None:
+ self.long_price = long_price
+ if short_price is not None:
+ self.short_price = short_price
@property
def time(self):
@@ -113,7 +163,7 @@ def contract(self, contract):
def side(self):
"""Gets the side of this PositionClose. # noqa: E501
- Position side, long or short # noqa: E501
+ Position side - `long`: Long position - `short`: Short position # noqa: E501
:return: The side of this PositionClose. # noqa: E501
:rtype: str
@@ -124,7 +174,7 @@ def side(self):
def side(self, side):
"""Sets the side of this PositionClose.
- Position side, long or short # noqa: E501
+ Position side - `long`: Long position - `short`: Short position # noqa: E501
:param side: The side of this PositionClose. # noqa: E501
:type: str
@@ -132,7 +182,8 @@ def side(self, side):
allowed_values = ["long", "short"] # noqa: E501
if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `side` ({0}), must be one of {1}".format(side, allowed_values) # noqa: E501
+ "Invalid value for `side` ({0}), must be one of {1}" # noqa: E501
+ .format(side, allowed_values)
)
self._side = side
@@ -141,7 +192,7 @@ def side(self, side):
def pnl(self):
"""Gets the pnl of this PositionClose. # noqa: E501
- PNL # noqa: E501
+ PnL # noqa: E501
:return: The pnl of this PositionClose. # noqa: E501
:rtype: str
@@ -152,7 +203,7 @@ def pnl(self):
def pnl(self, pnl):
"""Sets the pnl of this PositionClose.
- PNL # noqa: E501
+ PnL # noqa: E501
:param pnl: The pnl of this PositionClose. # noqa: E501
:type: str
@@ -160,11 +211,80 @@ def pnl(self, pnl):
self._pnl = pnl
+ @property
+ def pnl_pnl(self):
+ """Gets the pnl_pnl of this PositionClose. # noqa: E501
+
+ PNL - Position P/L # noqa: E501
+
+ :return: The pnl_pnl of this PositionClose. # noqa: E501
+ :rtype: str
+ """
+ return self._pnl_pnl
+
+ @pnl_pnl.setter
+ def pnl_pnl(self, pnl_pnl):
+ """Sets the pnl_pnl of this PositionClose.
+
+ PNL - Position P/L # noqa: E501
+
+ :param pnl_pnl: The pnl_pnl of this PositionClose. # noqa: E501
+ :type: str
+ """
+
+ self._pnl_pnl = pnl_pnl
+
+ @property
+ def pnl_fund(self):
+ """Gets the pnl_fund of this PositionClose. # noqa: E501
+
+ PNL - Funding Fees # noqa: E501
+
+ :return: The pnl_fund of this PositionClose. # noqa: E501
+ :rtype: str
+ """
+ return self._pnl_fund
+
+ @pnl_fund.setter
+ def pnl_fund(self, pnl_fund):
+ """Sets the pnl_fund of this PositionClose.
+
+ PNL - Funding Fees # noqa: E501
+
+ :param pnl_fund: The pnl_fund of this PositionClose. # noqa: E501
+ :type: str
+ """
+
+ self._pnl_fund = pnl_fund
+
+ @property
+ def pnl_fee(self):
+ """Gets the pnl_fee of this PositionClose. # noqa: E501
+
+ PNL - Transaction Fees # noqa: E501
+
+ :return: The pnl_fee of this PositionClose. # noqa: E501
+ :rtype: str
+ """
+ return self._pnl_fee
+
+ @pnl_fee.setter
+ def pnl_fee(self, pnl_fee):
+ """Sets the pnl_fee of this PositionClose.
+
+ PNL - Transaction Fees # noqa: E501
+
+ :param pnl_fee: The pnl_fee of this PositionClose. # noqa: E501
+ :type: str
+ """
+
+ self._pnl_fee = pnl_fee
+
@property
def text(self):
"""Gets the text of this PositionClose. # noqa: E501
- Text of close order # noqa: E501
+ Source of close order. See `order.text` field for specific values # noqa: E501
:return: The text of this PositionClose. # noqa: E501
:rtype: str
@@ -175,7 +295,7 @@ def text(self):
def text(self, text):
"""Sets the text of this PositionClose.
- Text of close order # noqa: E501
+ Source of close order. See `order.text` field for specific values # noqa: E501
:param text: The text of this PositionClose. # noqa: E501
:type: str
@@ -183,6 +303,121 @@ def text(self, text):
self._text = text
+ @property
+ def max_size(self):
+ """Gets the max_size of this PositionClose. # noqa: E501
+
+ Max Trade Size # noqa: E501
+
+ :return: The max_size of this PositionClose. # noqa: E501
+ :rtype: str
+ """
+ return self._max_size
+
+ @max_size.setter
+ def max_size(self, max_size):
+ """Sets the max_size of this PositionClose.
+
+ Max Trade Size # noqa: E501
+
+ :param max_size: The max_size of this PositionClose. # noqa: E501
+ :type: str
+ """
+
+ self._max_size = max_size
+
+ @property
+ def accum_size(self):
+ """Gets the accum_size of this PositionClose. # noqa: E501
+
+ Cumulative closed position volume # noqa: E501
+
+ :return: The accum_size of this PositionClose. # noqa: E501
+ :rtype: str
+ """
+ return self._accum_size
+
+ @accum_size.setter
+ def accum_size(self, accum_size):
+ """Sets the accum_size of this PositionClose.
+
+ Cumulative closed position volume # noqa: E501
+
+ :param accum_size: The accum_size of this PositionClose. # noqa: E501
+ :type: str
+ """
+
+ self._accum_size = accum_size
+
+ @property
+ def first_open_time(self):
+ """Gets the first_open_time of this PositionClose. # noqa: E501
+
+ First Open Time # noqa: E501
+
+ :return: The first_open_time of this PositionClose. # noqa: E501
+ :rtype: int
+ """
+ return self._first_open_time
+
+ @first_open_time.setter
+ def first_open_time(self, first_open_time):
+ """Sets the first_open_time of this PositionClose.
+
+ First Open Time # noqa: E501
+
+ :param first_open_time: The first_open_time of this PositionClose. # noqa: E501
+ :type: int
+ """
+
+ self._first_open_time = first_open_time
+
+ @property
+ def long_price(self):
+ """Gets the long_price of this PositionClose. # noqa: E501
+
+ When side is 'long', it indicates the opening average price; when side is 'short', it indicates the closing average price # noqa: E501
+
+ :return: The long_price of this PositionClose. # noqa: E501
+ :rtype: str
+ """
+ return self._long_price
+
+ @long_price.setter
+ def long_price(self, long_price):
+ """Sets the long_price of this PositionClose.
+
+ When side is 'long', it indicates the opening average price; when side is 'short', it indicates the closing average price # noqa: E501
+
+ :param long_price: The long_price of this PositionClose. # noqa: E501
+ :type: str
+ """
+
+ self._long_price = long_price
+
+ @property
+ def short_price(self):
+ """Gets the short_price of this PositionClose. # noqa: E501
+
+ When side is 'long', it indicates the closing average price; when side is 'short', it indicates the opening average price # noqa: E501
+
+ :return: The short_price of this PositionClose. # noqa: E501
+ :rtype: str
+ """
+ return self._short_price
+
+ @short_price.setter
+ def short_price(self, short_price):
+ """Sets the short_price of this PositionClose.
+
+ When side is 'long', it indicates the closing average price; when side is 'short', it indicates the opening average price # noqa: E501
+
+ :param short_price: The short_price of this PositionClose. # noqa: E501
+ :type: str
+ """
+
+ self._short_price = short_price
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -190,16 +425,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/position_close_order.py b/gate_api/models/position_close_order.py
index 9e2781e..575f3cd 100644
--- a/gate_api/models/position_close_order.py
+++ b/gate_api/models/position_close_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,17 @@ class PositionCloseOrder(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'id': 'int', 'price': 'str', 'is_liq': 'bool'}
-
- attribute_map = {'id': 'id', 'price': 'price', 'is_liq': 'is_liq'}
+ openapi_types = {
+ 'id': 'int',
+ 'price': 'str',
+ 'is_liq': 'bool'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'price': 'price',
+ 'is_liq': 'is_liq'
+ }
def __init__(self, id=None, price=None, is_liq=None, local_vars_configuration=None): # noqa: E501
# type: (int, str, bool, Configuration) -> None
@@ -59,7 +67,7 @@ def __init__(self, id=None, price=None, is_liq=None, local_vars_configuration=No
def id(self):
"""Gets the id of this PositionCloseOrder. # noqa: E501
- Close order ID # noqa: E501
+ Order ID # noqa: E501
:return: The id of this PositionCloseOrder. # noqa: E501
:rtype: int
@@ -70,7 +78,7 @@ def id(self):
def id(self, id):
"""Sets the id of this PositionCloseOrder.
- Close order ID # noqa: E501
+ Order ID # noqa: E501
:param id: The id of this PositionCloseOrder. # noqa: E501
:type: int
@@ -82,7 +90,7 @@ def id(self, id):
def price(self):
"""Gets the price of this PositionCloseOrder. # noqa: E501
- Close order price # noqa: E501
+ Order price # noqa: E501
:return: The price of this PositionCloseOrder. # noqa: E501
:rtype: str
@@ -93,7 +101,7 @@ def price(self):
def price(self, price):
"""Sets the price of this PositionCloseOrder.
- Close order price # noqa: E501
+ Order price # noqa: E501
:param price: The price of this PositionCloseOrder. # noqa: E501
:type: str
@@ -105,7 +113,7 @@ def price(self, price):
def is_liq(self):
"""Gets the is_liq of this PositionCloseOrder. # noqa: E501
- Is the close order from liquidation # noqa: E501
+ Whether the close order is from liquidation # noqa: E501
:return: The is_liq of this PositionCloseOrder. # noqa: E501
:rtype: bool
@@ -116,7 +124,7 @@ def is_liq(self):
def is_liq(self, is_liq):
"""Sets the is_liq of this PositionCloseOrder.
- Is the close order from liquidation # noqa: E501
+ Whether the close order is from liquidation # noqa: E501
:param is_liq: The is_liq of this PositionCloseOrder. # noqa: E501
:type: bool
@@ -131,16 +139,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/profit_loss_range.py b/gate_api/models/profit_loss_range.py
new file mode 100644
index 0000000..9f6b1e0
--- /dev/null
+++ b/gate_api/models/profit_loss_range.py
@@ -0,0 +1,179 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class ProfitLossRange(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'price_percentage': 'str',
+ 'implied_volatility_percentage': 'str',
+ 'profit_loss': 'str'
+ }
+
+ attribute_map = {
+ 'price_percentage': 'price_percentage',
+ 'implied_volatility_percentage': 'implied_volatility_percentage',
+ 'profit_loss': 'profit_loss'
+ }
+
+ def __init__(self, price_percentage=None, implied_volatility_percentage=None, profit_loss=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, Configuration) -> None
+ """ProfitLossRange - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._price_percentage = None
+ self._implied_volatility_percentage = None
+ self._profit_loss = None
+ self.discriminator = None
+
+ if price_percentage is not None:
+ self.price_percentage = price_percentage
+ if implied_volatility_percentage is not None:
+ self.implied_volatility_percentage = implied_volatility_percentage
+ if profit_loss is not None:
+ self.profit_loss = profit_loss
+
+ @property
+ def price_percentage(self):
+ """Gets the price_percentage of this ProfitLossRange. # noqa: E501
+
+ Percentage change in price # noqa: E501
+
+ :return: The price_percentage of this ProfitLossRange. # noqa: E501
+ :rtype: str
+ """
+ return self._price_percentage
+
+ @price_percentage.setter
+ def price_percentage(self, price_percentage):
+ """Sets the price_percentage of this ProfitLossRange.
+
+ Percentage change in price # noqa: E501
+
+ :param price_percentage: The price_percentage of this ProfitLossRange. # noqa: E501
+ :type: str
+ """
+
+ self._price_percentage = price_percentage
+
+ @property
+ def implied_volatility_percentage(self):
+ """Gets the implied_volatility_percentage of this ProfitLossRange. # noqa: E501
+
+ Percentage change in implied volatility # noqa: E501
+
+ :return: The implied_volatility_percentage of this ProfitLossRange. # noqa: E501
+ :rtype: str
+ """
+ return self._implied_volatility_percentage
+
+ @implied_volatility_percentage.setter
+ def implied_volatility_percentage(self, implied_volatility_percentage):
+ """Sets the implied_volatility_percentage of this ProfitLossRange.
+
+ Percentage change in implied volatility # noqa: E501
+
+ :param implied_volatility_percentage: The implied_volatility_percentage of this ProfitLossRange. # noqa: E501
+ :type: str
+ """
+
+ self._implied_volatility_percentage = implied_volatility_percentage
+
+ @property
+ def profit_loss(self):
+ """Gets the profit_loss of this ProfitLossRange. # noqa: E501
+
+ PnL # noqa: E501
+
+ :return: The profit_loss of this ProfitLossRange. # noqa: E501
+ :rtype: str
+ """
+ return self._profit_loss
+
+ @profit_loss.setter
+ def profit_loss(self, profit_loss):
+ """Sets the profit_loss of this ProfitLossRange.
+
+ PnL # noqa: E501
+
+ :param profit_loss: The profit_loss of this ProfitLossRange. # noqa: E501
+ :type: str
+ """
+
+ self._profit_loss = profit_loss
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ProfitLossRange):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, ProfitLossRange):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/rebate_user_info.py b/gate_api/models/rebate_user_info.py
new file mode 100644
index 0000000..c93d182
--- /dev/null
+++ b/gate_api/models/rebate_user_info.py
@@ -0,0 +1,123 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class RebateUserInfo(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'invite_uid': 'int'
+ }
+
+ attribute_map = {
+ 'invite_uid': 'invite_uid'
+ }
+
+ def __init__(self, invite_uid=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, Configuration) -> None
+ """RebateUserInfo - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._invite_uid = None
+ self.discriminator = None
+
+ if invite_uid is not None:
+ self.invite_uid = invite_uid
+
+ @property
+ def invite_uid(self):
+ """Gets the invite_uid of this RebateUserInfo. # noqa: E501
+
+ My inviter's UID # noqa: E501
+
+ :return: The invite_uid of this RebateUserInfo. # noqa: E501
+ :rtype: int
+ """
+ return self._invite_uid
+
+ @invite_uid.setter
+ def invite_uid(self, invite_uid):
+ """Sets the invite_uid of this RebateUserInfo.
+
+ My inviter's UID # noqa: E501
+
+ :param invite_uid: The invite_uid of this RebateUserInfo. # noqa: E501
+ :type: int
+ """
+
+ self._invite_uid = invite_uid
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, RebateUserInfo):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, RebateUserInfo):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/repay_currency_res.py b/gate_api/models/repay_currency_res.py
new file mode 100644
index 0000000..f818b19
--- /dev/null
+++ b/gate_api/models/repay_currency_res.py
@@ -0,0 +1,263 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class RepayCurrencyRes(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'succeeded': 'bool',
+ 'label': 'str',
+ 'message': 'str',
+ 'currency': 'str',
+ 'repaid_principal': 'str',
+ 'repaid_interest': 'str'
+ }
+
+ attribute_map = {
+ 'succeeded': 'succeeded',
+ 'label': 'label',
+ 'message': 'message',
+ 'currency': 'currency',
+ 'repaid_principal': 'repaid_principal',
+ 'repaid_interest': 'repaid_interest'
+ }
+
+ def __init__(self, succeeded=None, label=None, message=None, currency=None, repaid_principal=None, repaid_interest=None, local_vars_configuration=None): # noqa: E501
+ # type: (bool, str, str, str, str, str, Configuration) -> None
+ """RepayCurrencyRes - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._succeeded = None
+ self._label = None
+ self._message = None
+ self._currency = None
+ self._repaid_principal = None
+ self._repaid_interest = None
+ self.discriminator = None
+
+ if succeeded is not None:
+ self.succeeded = succeeded
+ if label is not None:
+ self.label = label
+ if message is not None:
+ self.message = message
+ if currency is not None:
+ self.currency = currency
+ if repaid_principal is not None:
+ self.repaid_principal = repaid_principal
+ if repaid_interest is not None:
+ self.repaid_interest = repaid_interest
+
+ @property
+ def succeeded(self):
+ """Gets the succeeded of this RepayCurrencyRes. # noqa: E501
+
+ Whether the repayment was successful # noqa: E501
+
+ :return: The succeeded of this RepayCurrencyRes. # noqa: E501
+ :rtype: bool
+ """
+ return self._succeeded
+
+ @succeeded.setter
+ def succeeded(self, succeeded):
+ """Sets the succeeded of this RepayCurrencyRes.
+
+ Whether the repayment was successful # noqa: E501
+
+ :param succeeded: The succeeded of this RepayCurrencyRes. # noqa: E501
+ :type: bool
+ """
+
+ self._succeeded = succeeded
+
+ @property
+ def label(self):
+ """Gets the label of this RepayCurrencyRes. # noqa: E501
+
+ Error identifier for failed operations; empty when successful # noqa: E501
+
+ :return: The label of this RepayCurrencyRes. # noqa: E501
+ :rtype: str
+ """
+ return self._label
+
+ @label.setter
+ def label(self, label):
+ """Sets the label of this RepayCurrencyRes.
+
+ Error identifier for failed operations; empty when successful # noqa: E501
+
+ :param label: The label of this RepayCurrencyRes. # noqa: E501
+ :type: str
+ """
+
+ self._label = label
+
+ @property
+ def message(self):
+ """Gets the message of this RepayCurrencyRes. # noqa: E501
+
+ Error description for failed operations; empty when successful # noqa: E501
+
+ :return: The message of this RepayCurrencyRes. # noqa: E501
+ :rtype: str
+ """
+ return self._message
+
+ @message.setter
+ def message(self, message):
+ """Sets the message of this RepayCurrencyRes.
+
+ Error description for failed operations; empty when successful # noqa: E501
+
+ :param message: The message of this RepayCurrencyRes. # noqa: E501
+ :type: str
+ """
+
+ self._message = message
+
+ @property
+ def currency(self):
+ """Gets the currency of this RepayCurrencyRes. # noqa: E501
+
+ Repayment currency # noqa: E501
+
+ :return: The currency of this RepayCurrencyRes. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this RepayCurrencyRes.
+
+ Repayment currency # noqa: E501
+
+ :param currency: The currency of this RepayCurrencyRes. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def repaid_principal(self):
+ """Gets the repaid_principal of this RepayCurrencyRes. # noqa: E501
+
+ Principal # noqa: E501
+
+ :return: The repaid_principal of this RepayCurrencyRes. # noqa: E501
+ :rtype: str
+ """
+ return self._repaid_principal
+
+ @repaid_principal.setter
+ def repaid_principal(self, repaid_principal):
+ """Sets the repaid_principal of this RepayCurrencyRes.
+
+ Principal # noqa: E501
+
+ :param repaid_principal: The repaid_principal of this RepayCurrencyRes. # noqa: E501
+ :type: str
+ """
+
+ self._repaid_principal = repaid_principal
+
+ @property
+ def repaid_interest(self):
+ """Gets the repaid_interest of this RepayCurrencyRes. # noqa: E501
+
+ Principal # noqa: E501
+
+ :return: The repaid_interest of this RepayCurrencyRes. # noqa: E501
+ :rtype: str
+ """
+ return self._repaid_interest
+
+ @repaid_interest.setter
+ def repaid_interest(self, repaid_interest):
+ """Sets the repaid_interest of this RepayCurrencyRes.
+
+ Principal # noqa: E501
+
+ :param repaid_interest: The repaid_interest of this RepayCurrencyRes. # noqa: E501
+ :type: str
+ """
+
+ self._repaid_interest = repaid_interest
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, RepayCurrencyRes):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, RepayCurrencyRes):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/repay_loan.py b/gate_api/models/repay_loan.py
index 0e3af38..f8d97d6 100644
--- a/gate_api/models/repay_loan.py
+++ b/gate_api/models/repay_loan.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,17 @@ class RepayLoan(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'order_id': 'int', 'repay_amount': 'str', 'repaid_all': 'bool'}
-
- attribute_map = {'order_id': 'order_id', 'repay_amount': 'repay_amount', 'repaid_all': 'repaid_all'}
+ openapi_types = {
+ 'order_id': 'int',
+ 'repay_amount': 'str',
+ 'repaid_all': 'bool'
+ }
+
+ attribute_map = {
+ 'order_id': 'order_id',
+ 'repay_amount': 'repay_amount',
+ 'repaid_all': 'repaid_all'
+ }
def __init__(self, order_id=None, repay_amount=None, repaid_all=None, local_vars_configuration=None): # noqa: E501
# type: (int, str, bool, Configuration) -> None
@@ -56,7 +64,7 @@ def __init__(self, order_id=None, repay_amount=None, repaid_all=None, local_vars
def order_id(self):
"""Gets the order_id of this RepayLoan. # noqa: E501
- 订单id # noqa: E501
+ Order ID # noqa: E501
:return: The order_id of this RepayLoan. # noqa: E501
:rtype: int
@@ -67,7 +75,7 @@ def order_id(self):
def order_id(self, order_id):
"""Sets the order_id of this RepayLoan.
- 订单id # noqa: E501
+ Order ID # noqa: E501
:param order_id: The order_id of this RepayLoan. # noqa: E501
:type: int
@@ -81,7 +89,7 @@ def order_id(self, order_id):
def repay_amount(self):
"""Gets the repay_amount of this RepayLoan. # noqa: E501
- 还款数量,部分还款时候是必须 # noqa: E501
+ Repayment amount, it is mandatory when making partial repayments # noqa: E501
:return: The repay_amount of this RepayLoan. # noqa: E501
:rtype: str
@@ -92,7 +100,7 @@ def repay_amount(self):
def repay_amount(self, repay_amount):
"""Sets the repay_amount of this RepayLoan.
- 还款数量,部分还款时候是必须 # noqa: E501
+ Repayment amount, it is mandatory when making partial repayments # noqa: E501
:param repay_amount: The repay_amount of this RepayLoan. # noqa: E501
:type: str
@@ -106,7 +114,7 @@ def repay_amount(self, repay_amount):
def repaid_all(self):
"""Gets the repaid_all of this RepayLoan. # noqa: E501
- 还款方式, 为`true`时全部还款, 为`false`时部分还款; 当为`false`部分还款时,不允许repay_amount参数大于用户剩余待还 # noqa: E501
+ Repayment method, set to `true` for full repayment, and `false` for partial repayment; When partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. # noqa: E501
:return: The repaid_all of this RepayLoan. # noqa: E501
:rtype: bool
@@ -117,7 +125,7 @@ def repaid_all(self):
def repaid_all(self, repaid_all):
"""Sets the repaid_all of this RepayLoan.
- 还款方式, 为`true`时全部还款, 为`false`时部分还款; 当为`false`部分还款时,不允许repay_amount参数大于用户剩余待还 # noqa: E501
+ Repayment method, set to `true` for full repayment, and `false` for partial repayment; When partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. # noqa: E501
:param repaid_all: The repaid_all of this RepayLoan. # noqa: E501
:type: bool
@@ -134,16 +142,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/repay_multi_loan.py b/gate_api/models/repay_multi_loan.py
new file mode 100644
index 0000000..20c2385
--- /dev/null
+++ b/gate_api/models/repay_multi_loan.py
@@ -0,0 +1,153 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class RepayMultiLoan(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'order_id': 'int',
+ 'repay_items': 'list[MultiLoanRepayItem]'
+ }
+
+ attribute_map = {
+ 'order_id': 'order_id',
+ 'repay_items': 'repay_items'
+ }
+
+ def __init__(self, order_id=None, repay_items=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, list[MultiLoanRepayItem], Configuration) -> None
+ """RepayMultiLoan - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._order_id = None
+ self._repay_items = None
+ self.discriminator = None
+
+ self.order_id = order_id
+ self.repay_items = repay_items
+
+ @property
+ def order_id(self):
+ """Gets the order_id of this RepayMultiLoan. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The order_id of this RepayMultiLoan. # noqa: E501
+ :rtype: int
+ """
+ return self._order_id
+
+ @order_id.setter
+ def order_id(self, order_id):
+ """Sets the order_id of this RepayMultiLoan.
+
+ Order ID # noqa: E501
+
+ :param order_id: The order_id of this RepayMultiLoan. # noqa: E501
+ :type: int
+ """
+ if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501
+ raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501
+
+ self._order_id = order_id
+
+ @property
+ def repay_items(self):
+ """Gets the repay_items of this RepayMultiLoan. # noqa: E501
+
+ Repay Currency Item # noqa: E501
+
+ :return: The repay_items of this RepayMultiLoan. # noqa: E501
+ :rtype: list[MultiLoanRepayItem]
+ """
+ return self._repay_items
+
+ @repay_items.setter
+ def repay_items(self, repay_items):
+ """Sets the repay_items of this RepayMultiLoan.
+
+ Repay Currency Item # noqa: E501
+
+ :param repay_items: The repay_items of this RepayMultiLoan. # noqa: E501
+ :type: list[MultiLoanRepayItem]
+ """
+ if self.local_vars_configuration.client_side_validation and repay_items is None: # noqa: E501
+ raise ValueError("Invalid value for `repay_items`, must not be `None`") # noqa: E501
+
+ self._repay_items = repay_items
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, RepayMultiLoan):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, RepayMultiLoan):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/repay_record.py b/gate_api/models/repay_record.py
index b1a4f51..faef08c 100644
--- a/gate_api/models/repay_record.py
+++ b/gate_api/models/repay_record.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -45,7 +45,7 @@ class RepayRecord(object):
'before_left_principal': 'str',
'after_left_principal': 'str',
'before_left_collateral': 'str',
- 'after_left_collateral': 'str',
+ 'after_left_collateral': 'str'
}
attribute_map = {
@@ -61,26 +61,10 @@ class RepayRecord(object):
'before_left_principal': 'before_left_principal',
'after_left_principal': 'after_left_principal',
'before_left_collateral': 'before_left_collateral',
- 'after_left_collateral': 'after_left_collateral',
+ 'after_left_collateral': 'after_left_collateral'
}
- def __init__(
- self,
- order_id=None,
- record_id=None,
- repaid_amount=None,
- borrow_currency=None,
- collateral_currency=None,
- init_ltv=None,
- borrow_time=None,
- repay_time=None,
- total_interest=None,
- before_left_principal=None,
- after_left_principal=None,
- before_left_collateral=None,
- after_left_collateral=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, order_id=None, record_id=None, repaid_amount=None, borrow_currency=None, collateral_currency=None, init_ltv=None, borrow_time=None, repay_time=None, total_interest=None, before_left_principal=None, after_left_principal=None, before_left_collateral=None, after_left_collateral=None, local_vars_configuration=None): # noqa: E501
# type: (int, int, str, str, str, str, int, int, str, str, str, str, str, Configuration) -> None
"""RepayRecord - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -133,7 +117,7 @@ def __init__(
def order_id(self):
"""Gets the order_id of this RepayRecord. # noqa: E501
- 订单id # noqa: E501
+ Order ID # noqa: E501
:return: The order_id of this RepayRecord. # noqa: E501
:rtype: int
@@ -144,7 +128,7 @@ def order_id(self):
def order_id(self, order_id):
"""Sets the order_id of this RepayRecord.
- 订单id # noqa: E501
+ Order ID # noqa: E501
:param order_id: The order_id of this RepayRecord. # noqa: E501
:type: int
@@ -156,7 +140,7 @@ def order_id(self, order_id):
def record_id(self):
"""Gets the record_id of this RepayRecord. # noqa: E501
- 还款记录 id # noqa: E501
+ Repayment record ID # noqa: E501
:return: The record_id of this RepayRecord. # noqa: E501
:rtype: int
@@ -167,7 +151,7 @@ def record_id(self):
def record_id(self, record_id):
"""Sets the record_id of this RepayRecord.
- 还款记录 id # noqa: E501
+ Repayment record ID # noqa: E501
:param record_id: The record_id of this RepayRecord. # noqa: E501
:type: int
@@ -202,7 +186,7 @@ def repaid_amount(self, repaid_amount):
def borrow_currency(self):
"""Gets the borrow_currency of this RepayRecord. # noqa: E501
- 借款币种 # noqa: E501
+ Borrowed currency # noqa: E501
:return: The borrow_currency of this RepayRecord. # noqa: E501
:rtype: str
@@ -213,7 +197,7 @@ def borrow_currency(self):
def borrow_currency(self, borrow_currency):
"""Sets the borrow_currency of this RepayRecord.
- 借款币种 # noqa: E501
+ Borrowed currency # noqa: E501
:param borrow_currency: The borrow_currency of this RepayRecord. # noqa: E501
:type: str
@@ -225,7 +209,7 @@ def borrow_currency(self, borrow_currency):
def collateral_currency(self):
"""Gets the collateral_currency of this RepayRecord. # noqa: E501
- 质押币种 # noqa: E501
+ Collateral currency # noqa: E501
:return: The collateral_currency of this RepayRecord. # noqa: E501
:rtype: str
@@ -236,7 +220,7 @@ def collateral_currency(self):
def collateral_currency(self, collateral_currency):
"""Sets the collateral_currency of this RepayRecord.
- 质押币种 # noqa: E501
+ Collateral currency # noqa: E501
:param collateral_currency: The collateral_currency of this RepayRecord. # noqa: E501
:type: str
@@ -248,7 +232,7 @@ def collateral_currency(self, collateral_currency):
def init_ltv(self):
"""Gets the init_ltv of this RepayRecord. # noqa: E501
- 初始质押率 # noqa: E501
+ Initial collateralization rate # noqa: E501
:return: The init_ltv of this RepayRecord. # noqa: E501
:rtype: str
@@ -259,7 +243,7 @@ def init_ltv(self):
def init_ltv(self, init_ltv):
"""Sets the init_ltv of this RepayRecord.
- 初始质押率 # noqa: E501
+ Initial collateralization rate # noqa: E501
:param init_ltv: The init_ltv of this RepayRecord. # noqa: E501
:type: str
@@ -271,7 +255,7 @@ def init_ltv(self, init_ltv):
def borrow_time(self):
"""Gets the borrow_time of this RepayRecord. # noqa: E501
- 借款时间,时间戳 # noqa: E501
+ Borrowing time, timestamp # noqa: E501
:return: The borrow_time of this RepayRecord. # noqa: E501
:rtype: int
@@ -282,7 +266,7 @@ def borrow_time(self):
def borrow_time(self, borrow_time):
"""Sets the borrow_time of this RepayRecord.
- 借款时间,时间戳 # noqa: E501
+ Borrowing time, timestamp # noqa: E501
:param borrow_time: The borrow_time of this RepayRecord. # noqa: E501
:type: int
@@ -294,7 +278,7 @@ def borrow_time(self, borrow_time):
def repay_time(self):
"""Gets the repay_time of this RepayRecord. # noqa: E501
- 还款时间,时间戳 # noqa: E501
+ Repayment time, timestamp # noqa: E501
:return: The repay_time of this RepayRecord. # noqa: E501
:rtype: int
@@ -305,7 +289,7 @@ def repay_time(self):
def repay_time(self, repay_time):
"""Sets the repay_time of this RepayRecord.
- 还款时间,时间戳 # noqa: E501
+ Repayment time, timestamp # noqa: E501
:param repay_time: The repay_time of this RepayRecord. # noqa: E501
:type: int
@@ -317,7 +301,7 @@ def repay_time(self, repay_time):
def total_interest(self):
"""Gets the total_interest of this RepayRecord. # noqa: E501
- 总计息 # noqa: E501
+ Total interest # noqa: E501
:return: The total_interest of this RepayRecord. # noqa: E501
:rtype: str
@@ -328,7 +312,7 @@ def total_interest(self):
def total_interest(self, total_interest):
"""Sets the total_interest of this RepayRecord.
- 总计息 # noqa: E501
+ Total interest # noqa: E501
:param total_interest: The total_interest of this RepayRecord. # noqa: E501
:type: str
@@ -340,7 +324,7 @@ def total_interest(self, total_interest):
def before_left_principal(self):
"""Gets the before_left_principal of this RepayRecord. # noqa: E501
- 还款前待还本金 # noqa: E501
+ Principal to be repaid before repayment # noqa: E501
:return: The before_left_principal of this RepayRecord. # noqa: E501
:rtype: str
@@ -351,7 +335,7 @@ def before_left_principal(self):
def before_left_principal(self, before_left_principal):
"""Sets the before_left_principal of this RepayRecord.
- 还款前待还本金 # noqa: E501
+ Principal to be repaid before repayment # noqa: E501
:param before_left_principal: The before_left_principal of this RepayRecord. # noqa: E501
:type: str
@@ -363,7 +347,7 @@ def before_left_principal(self, before_left_principal):
def after_left_principal(self):
"""Gets the after_left_principal of this RepayRecord. # noqa: E501
- 还款后待还本金 # noqa: E501
+ Principal to be repaid after repayment # noqa: E501
:return: The after_left_principal of this RepayRecord. # noqa: E501
:rtype: str
@@ -374,7 +358,7 @@ def after_left_principal(self):
def after_left_principal(self, after_left_principal):
"""Sets the after_left_principal of this RepayRecord.
- 还款后待还本金 # noqa: E501
+ Principal to be repaid after repayment # noqa: E501
:param after_left_principal: The after_left_principal of this RepayRecord. # noqa: E501
:type: str
@@ -386,7 +370,7 @@ def after_left_principal(self, after_left_principal):
def before_left_collateral(self):
"""Gets the before_left_collateral of this RepayRecord. # noqa: E501
- 还款前质押物数量 # noqa: E501
+ Collateral amount before repayment # noqa: E501
:return: The before_left_collateral of this RepayRecord. # noqa: E501
:rtype: str
@@ -397,7 +381,7 @@ def before_left_collateral(self):
def before_left_collateral(self, before_left_collateral):
"""Sets the before_left_collateral of this RepayRecord.
- 还款前质押物数量 # noqa: E501
+ Collateral amount before repayment # noqa: E501
:param before_left_collateral: The before_left_collateral of this RepayRecord. # noqa: E501
:type: str
@@ -409,7 +393,7 @@ def before_left_collateral(self, before_left_collateral):
def after_left_collateral(self):
"""Gets the after_left_collateral of this RepayRecord. # noqa: E501
- 还款后质押物数量 # noqa: E501
+ Collateral amount after repayment # noqa: E501
:return: The after_left_collateral of this RepayRecord. # noqa: E501
:rtype: str
@@ -420,7 +404,7 @@ def after_left_collateral(self):
def after_left_collateral(self, after_left_collateral):
"""Sets the after_left_collateral of this RepayRecord.
- 还款后质押物数量 # noqa: E501
+ Collateral amount after repayment # noqa: E501
:param after_left_collateral: The after_left_collateral of this RepayRecord. # noqa: E501
:type: str
@@ -435,16 +419,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/repay_record_currency.py b/gate_api/models/repay_record_currency.py
new file mode 100644
index 0000000..1f175bc
--- /dev/null
+++ b/gate_api/models/repay_record_currency.py
@@ -0,0 +1,263 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class RepayRecordCurrency(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'index_price': 'str',
+ 'before_amount': 'str',
+ 'before_amount_usdt': 'str',
+ 'after_amount': 'str',
+ 'after_amount_usdt': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'index_price': 'index_price',
+ 'before_amount': 'before_amount',
+ 'before_amount_usdt': 'before_amount_usdt',
+ 'after_amount': 'after_amount',
+ 'after_amount_usdt': 'after_amount_usdt'
+ }
+
+ def __init__(self, currency=None, index_price=None, before_amount=None, before_amount_usdt=None, after_amount=None, after_amount_usdt=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, Configuration) -> None
+ """RepayRecordCurrency - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._index_price = None
+ self._before_amount = None
+ self._before_amount_usdt = None
+ self._after_amount = None
+ self._after_amount_usdt = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if index_price is not None:
+ self.index_price = index_price
+ if before_amount is not None:
+ self.before_amount = before_amount
+ if before_amount_usdt is not None:
+ self.before_amount_usdt = before_amount_usdt
+ if after_amount is not None:
+ self.after_amount = after_amount
+ if after_amount_usdt is not None:
+ self.after_amount_usdt = after_amount_usdt
+
+ @property
+ def currency(self):
+ """Gets the currency of this RepayRecordCurrency. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this RepayRecordCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this RepayRecordCurrency.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this RepayRecordCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def index_price(self):
+ """Gets the index_price of this RepayRecordCurrency. # noqa: E501
+
+ Currency Index Price # noqa: E501
+
+ :return: The index_price of this RepayRecordCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._index_price
+
+ @index_price.setter
+ def index_price(self, index_price):
+ """Sets the index_price of this RepayRecordCurrency.
+
+ Currency Index Price # noqa: E501
+
+ :param index_price: The index_price of this RepayRecordCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._index_price = index_price
+
+ @property
+ def before_amount(self):
+ """Gets the before_amount of this RepayRecordCurrency. # noqa: E501
+
+ Amount before the operation # noqa: E501
+
+ :return: The before_amount of this RepayRecordCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._before_amount
+
+ @before_amount.setter
+ def before_amount(self, before_amount):
+ """Sets the before_amount of this RepayRecordCurrency.
+
+ Amount before the operation # noqa: E501
+
+ :param before_amount: The before_amount of this RepayRecordCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._before_amount = before_amount
+
+ @property
+ def before_amount_usdt(self):
+ """Gets the before_amount_usdt of this RepayRecordCurrency. # noqa: E501
+
+ USDT Amount before the operation # noqa: E501
+
+ :return: The before_amount_usdt of this RepayRecordCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._before_amount_usdt
+
+ @before_amount_usdt.setter
+ def before_amount_usdt(self, before_amount_usdt):
+ """Sets the before_amount_usdt of this RepayRecordCurrency.
+
+ USDT Amount before the operation # noqa: E501
+
+ :param before_amount_usdt: The before_amount_usdt of this RepayRecordCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._before_amount_usdt = before_amount_usdt
+
+ @property
+ def after_amount(self):
+ """Gets the after_amount of this RepayRecordCurrency. # noqa: E501
+
+ Amount after the operation # noqa: E501
+
+ :return: The after_amount of this RepayRecordCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._after_amount
+
+ @after_amount.setter
+ def after_amount(self, after_amount):
+ """Sets the after_amount of this RepayRecordCurrency.
+
+ Amount after the operation # noqa: E501
+
+ :param after_amount: The after_amount of this RepayRecordCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._after_amount = after_amount
+
+ @property
+ def after_amount_usdt(self):
+ """Gets the after_amount_usdt of this RepayRecordCurrency. # noqa: E501
+
+ USDT Amount after the operation # noqa: E501
+
+ :return: The after_amount_usdt of this RepayRecordCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._after_amount_usdt
+
+ @after_amount_usdt.setter
+ def after_amount_usdt(self, after_amount_usdt):
+ """Sets the after_amount_usdt of this RepayRecordCurrency.
+
+ USDT Amount after the operation # noqa: E501
+
+ :param after_amount_usdt: The after_amount_usdt of this RepayRecordCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._after_amount_usdt = after_amount_usdt
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, RepayRecordCurrency):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, RepayRecordCurrency):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/repay_record_left_interest.py b/gate_api/models/repay_record_left_interest.py
new file mode 100644
index 0000000..604dd12
--- /dev/null
+++ b/gate_api/models/repay_record_left_interest.py
@@ -0,0 +1,263 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class RepayRecordLeftInterest(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'index_price': 'str',
+ 'before_amount': 'str',
+ 'before_amount_usdt': 'str',
+ 'after_amount': 'str',
+ 'after_amount_usdt': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'index_price': 'index_price',
+ 'before_amount': 'before_amount',
+ 'before_amount_usdt': 'before_amount_usdt',
+ 'after_amount': 'after_amount',
+ 'after_amount_usdt': 'after_amount_usdt'
+ }
+
+ def __init__(self, currency=None, index_price=None, before_amount=None, before_amount_usdt=None, after_amount=None, after_amount_usdt=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, Configuration) -> None
+ """RepayRecordLeftInterest - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._index_price = None
+ self._before_amount = None
+ self._before_amount_usdt = None
+ self._after_amount = None
+ self._after_amount_usdt = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if index_price is not None:
+ self.index_price = index_price
+ if before_amount is not None:
+ self.before_amount = before_amount
+ if before_amount_usdt is not None:
+ self.before_amount_usdt = before_amount_usdt
+ if after_amount is not None:
+ self.after_amount = after_amount
+ if after_amount_usdt is not None:
+ self.after_amount_usdt = after_amount_usdt
+
+ @property
+ def currency(self):
+ """Gets the currency of this RepayRecordLeftInterest. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this RepayRecordLeftInterest. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this RepayRecordLeftInterest.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this RepayRecordLeftInterest. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def index_price(self):
+ """Gets the index_price of this RepayRecordLeftInterest. # noqa: E501
+
+ Currency Index Price # noqa: E501
+
+ :return: The index_price of this RepayRecordLeftInterest. # noqa: E501
+ :rtype: str
+ """
+ return self._index_price
+
+ @index_price.setter
+ def index_price(self, index_price):
+ """Sets the index_price of this RepayRecordLeftInterest.
+
+ Currency Index Price # noqa: E501
+
+ :param index_price: The index_price of this RepayRecordLeftInterest. # noqa: E501
+ :type: str
+ """
+
+ self._index_price = index_price
+
+ @property
+ def before_amount(self):
+ """Gets the before_amount of this RepayRecordLeftInterest. # noqa: E501
+
+ Interest amount before repayment # noqa: E501
+
+ :return: The before_amount of this RepayRecordLeftInterest. # noqa: E501
+ :rtype: str
+ """
+ return self._before_amount
+
+ @before_amount.setter
+ def before_amount(self, before_amount):
+ """Sets the before_amount of this RepayRecordLeftInterest.
+
+ Interest amount before repayment # noqa: E501
+
+ :param before_amount: The before_amount of this RepayRecordLeftInterest. # noqa: E501
+ :type: str
+ """
+
+ self._before_amount = before_amount
+
+ @property
+ def before_amount_usdt(self):
+ """Gets the before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501
+
+ Converted value of interest before repayment in USDT # noqa: E501
+
+ :return: The before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501
+ :rtype: str
+ """
+ return self._before_amount_usdt
+
+ @before_amount_usdt.setter
+ def before_amount_usdt(self, before_amount_usdt):
+ """Sets the before_amount_usdt of this RepayRecordLeftInterest.
+
+ Converted value of interest before repayment in USDT # noqa: E501
+
+ :param before_amount_usdt: The before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501
+ :type: str
+ """
+
+ self._before_amount_usdt = before_amount_usdt
+
+ @property
+ def after_amount(self):
+ """Gets the after_amount of this RepayRecordLeftInterest. # noqa: E501
+
+ Interest amount after repayment # noqa: E501
+
+ :return: The after_amount of this RepayRecordLeftInterest. # noqa: E501
+ :rtype: str
+ """
+ return self._after_amount
+
+ @after_amount.setter
+ def after_amount(self, after_amount):
+ """Sets the after_amount of this RepayRecordLeftInterest.
+
+ Interest amount after repayment # noqa: E501
+
+ :param after_amount: The after_amount of this RepayRecordLeftInterest. # noqa: E501
+ :type: str
+ """
+
+ self._after_amount = after_amount
+
+ @property
+ def after_amount_usdt(self):
+ """Gets the after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501
+
+ Converted value of interest after repayment in USDT # noqa: E501
+
+ :return: The after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501
+ :rtype: str
+ """
+ return self._after_amount_usdt
+
+ @after_amount_usdt.setter
+ def after_amount_usdt(self, after_amount_usdt):
+ """Sets the after_amount_usdt of this RepayRecordLeftInterest.
+
+ Converted value of interest after repayment in USDT # noqa: E501
+
+ :param after_amount_usdt: The after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501
+ :type: str
+ """
+
+ self._after_amount_usdt = after_amount_usdt
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, RepayRecordLeftInterest):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, RepayRecordLeftInterest):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/repay_record_repaid_currency.py b/gate_api/models/repay_record_repaid_currency.py
new file mode 100644
index 0000000..5aa54fd
--- /dev/null
+++ b/gate_api/models/repay_record_repaid_currency.py
@@ -0,0 +1,263 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class RepayRecordRepaidCurrency(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'index_price': 'str',
+ 'repaid_amount': 'str',
+ 'repaid_principal': 'str',
+ 'repaid_interest': 'str',
+ 'repaid_amount_usdt': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'index_price': 'index_price',
+ 'repaid_amount': 'repaid_amount',
+ 'repaid_principal': 'repaid_principal',
+ 'repaid_interest': 'repaid_interest',
+ 'repaid_amount_usdt': 'repaid_amount_usdt'
+ }
+
+ def __init__(self, currency=None, index_price=None, repaid_amount=None, repaid_principal=None, repaid_interest=None, repaid_amount_usdt=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, Configuration) -> None
+ """RepayRecordRepaidCurrency - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._index_price = None
+ self._repaid_amount = None
+ self._repaid_principal = None
+ self._repaid_interest = None
+ self._repaid_amount_usdt = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if index_price is not None:
+ self.index_price = index_price
+ if repaid_amount is not None:
+ self.repaid_amount = repaid_amount
+ if repaid_principal is not None:
+ self.repaid_principal = repaid_principal
+ if repaid_interest is not None:
+ self.repaid_interest = repaid_interest
+ if repaid_amount_usdt is not None:
+ self.repaid_amount_usdt = repaid_amount_usdt
+
+ @property
+ def currency(self):
+ """Gets the currency of this RepayRecordRepaidCurrency. # noqa: E501
+
+ Repayment currency # noqa: E501
+
+ :return: The currency of this RepayRecordRepaidCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this RepayRecordRepaidCurrency.
+
+ Repayment currency # noqa: E501
+
+ :param currency: The currency of this RepayRecordRepaidCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def index_price(self):
+ """Gets the index_price of this RepayRecordRepaidCurrency. # noqa: E501
+
+ Currency Index Price # noqa: E501
+
+ :return: The index_price of this RepayRecordRepaidCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._index_price
+
+ @index_price.setter
+ def index_price(self, index_price):
+ """Sets the index_price of this RepayRecordRepaidCurrency.
+
+ Currency Index Price # noqa: E501
+
+ :param index_price: The index_price of this RepayRecordRepaidCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._index_price = index_price
+
+ @property
+ def repaid_amount(self):
+ """Gets the repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501
+
+ Repayment amount # noqa: E501
+
+ :return: The repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._repaid_amount
+
+ @repaid_amount.setter
+ def repaid_amount(self, repaid_amount):
+ """Sets the repaid_amount of this RepayRecordRepaidCurrency.
+
+ Repayment amount # noqa: E501
+
+ :param repaid_amount: The repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._repaid_amount = repaid_amount
+
+ @property
+ def repaid_principal(self):
+ """Gets the repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501
+
+ Principal # noqa: E501
+
+ :return: The repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._repaid_principal
+
+ @repaid_principal.setter
+ def repaid_principal(self, repaid_principal):
+ """Sets the repaid_principal of this RepayRecordRepaidCurrency.
+
+ Principal # noqa: E501
+
+ :param repaid_principal: The repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._repaid_principal = repaid_principal
+
+ @property
+ def repaid_interest(self):
+ """Gets the repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501
+
+ Interest # noqa: E501
+
+ :return: The repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._repaid_interest
+
+ @repaid_interest.setter
+ def repaid_interest(self, repaid_interest):
+ """Sets the repaid_interest of this RepayRecordRepaidCurrency.
+
+ Interest # noqa: E501
+
+ :param repaid_interest: The repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._repaid_interest = repaid_interest
+
+ @property
+ def repaid_amount_usdt(self):
+ """Gets the repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501
+
+ Repayment amount converted to USDT # noqa: E501
+
+ :return: The repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._repaid_amount_usdt
+
+ @repaid_amount_usdt.setter
+ def repaid_amount_usdt(self, repaid_amount_usdt):
+ """Sets the repaid_amount_usdt of this RepayRecordRepaidCurrency.
+
+ Repayment amount converted to USDT # noqa: E501
+
+ :param repaid_amount_usdt: The repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._repaid_amount_usdt = repaid_amount_usdt
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, RepayRecordRepaidCurrency):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, RepayRecordRepaidCurrency):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/repay_record_total_interest.py b/gate_api/models/repay_record_total_interest.py
new file mode 100644
index 0000000..11e31c4
--- /dev/null
+++ b/gate_api/models/repay_record_total_interest.py
@@ -0,0 +1,207 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class RepayRecordTotalInterest(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'index_price': 'str',
+ 'amount': 'str',
+ 'amount_usdt': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'index_price': 'index_price',
+ 'amount': 'amount',
+ 'amount_usdt': 'amount_usdt'
+ }
+
+ def __init__(self, currency=None, index_price=None, amount=None, amount_usdt=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, Configuration) -> None
+ """RepayRecordTotalInterest - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._index_price = None
+ self._amount = None
+ self._amount_usdt = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if index_price is not None:
+ self.index_price = index_price
+ if amount is not None:
+ self.amount = amount
+ if amount_usdt is not None:
+ self.amount_usdt = amount_usdt
+
+ @property
+ def currency(self):
+ """Gets the currency of this RepayRecordTotalInterest. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this RepayRecordTotalInterest. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this RepayRecordTotalInterest.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this RepayRecordTotalInterest. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def index_price(self):
+ """Gets the index_price of this RepayRecordTotalInterest. # noqa: E501
+
+ Currency Index Price # noqa: E501
+
+ :return: The index_price of this RepayRecordTotalInterest. # noqa: E501
+ :rtype: str
+ """
+ return self._index_price
+
+ @index_price.setter
+ def index_price(self, index_price):
+ """Sets the index_price of this RepayRecordTotalInterest.
+
+ Currency Index Price # noqa: E501
+
+ :param index_price: The index_price of this RepayRecordTotalInterest. # noqa: E501
+ :type: str
+ """
+
+ self._index_price = index_price
+
+ @property
+ def amount(self):
+ """Gets the amount of this RepayRecordTotalInterest. # noqa: E501
+
+ Interest Amount # noqa: E501
+
+ :return: The amount of this RepayRecordTotalInterest. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this RepayRecordTotalInterest.
+
+ Interest Amount # noqa: E501
+
+ :param amount: The amount of this RepayRecordTotalInterest. # noqa: E501
+ :type: str
+ """
+
+ self._amount = amount
+
+ @property
+ def amount_usdt(self):
+ """Gets the amount_usdt of this RepayRecordTotalInterest. # noqa: E501
+
+ Interest amount converted to USDT # noqa: E501
+
+ :return: The amount_usdt of this RepayRecordTotalInterest. # noqa: E501
+ :rtype: str
+ """
+ return self._amount_usdt
+
+ @amount_usdt.setter
+ def amount_usdt(self, amount_usdt):
+ """Sets the amount_usdt of this RepayRecordTotalInterest.
+
+ Interest amount converted to USDT # noqa: E501
+
+ :param amount_usdt: The amount_usdt of this RepayRecordTotalInterest. # noqa: E501
+ :type: str
+ """
+
+ self._amount_usdt = amount_usdt
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, RepayRecordTotalInterest):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, RepayRecordTotalInterest):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/repay_request.py b/gate_api/models/repay_request.py
deleted file mode 100644
index 7a8af15..0000000
--- a/gate_api/models/repay_request.py
+++ /dev/null
@@ -1,205 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class RepayRequest(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {'currency_pair': 'str', 'currency': 'str', 'mode': 'str', 'amount': 'str'}
-
- attribute_map = {'currency_pair': 'currency_pair', 'currency': 'currency', 'mode': 'mode', 'amount': 'amount'}
-
- def __init__(
- self, currency_pair=None, currency=None, mode=None, amount=None, local_vars_configuration=None
- ): # noqa: E501
- # type: (str, str, str, str, Configuration) -> None
- """RepayRequest - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._currency_pair = None
- self._currency = None
- self._mode = None
- self._amount = None
- self.discriminator = None
-
- self.currency_pair = currency_pair
- self.currency = currency
- self.mode = mode
- if amount is not None:
- self.amount = amount
-
- @property
- def currency_pair(self):
- """Gets the currency_pair of this RepayRequest. # noqa: E501
-
- Currency pair # noqa: E501
-
- :return: The currency_pair of this RepayRequest. # noqa: E501
- :rtype: str
- """
- return self._currency_pair
-
- @currency_pair.setter
- def currency_pair(self, currency_pair):
- """Sets the currency_pair of this RepayRequest.
-
- Currency pair # noqa: E501
-
- :param currency_pair: The currency_pair of this RepayRequest. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501
- raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501
-
- self._currency_pair = currency_pair
-
- @property
- def currency(self):
- """Gets the currency of this RepayRequest. # noqa: E501
-
- Loan currency # noqa: E501
-
- :return: The currency of this RepayRequest. # noqa: E501
- :rtype: str
- """
- return self._currency
-
- @currency.setter
- def currency(self, currency):
- """Sets the currency of this RepayRequest.
-
- Loan currency # noqa: E501
-
- :param currency: The currency of this RepayRequest. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501
- raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501
-
- self._currency = currency
-
- @property
- def mode(self):
- """Gets the mode of this RepayRequest. # noqa: E501
-
- Repay mode. all - repay all; partial - repay only some portion # noqa: E501
-
- :return: The mode of this RepayRequest. # noqa: E501
- :rtype: str
- """
- return self._mode
-
- @mode.setter
- def mode(self, mode):
- """Sets the mode of this RepayRequest.
-
- Repay mode. all - repay all; partial - repay only some portion # noqa: E501
-
- :param mode: The mode of this RepayRequest. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and mode is None: # noqa: E501
- raise ValueError("Invalid value for `mode`, must not be `None`") # noqa: E501
- allowed_values = ["all", "partial"] # noqa: E501
- if self.local_vars_configuration.client_side_validation and mode not in allowed_values: # noqa: E501
- raise ValueError(
- "Invalid value for `mode` ({0}), must be one of {1}".format(mode, allowed_values) # noqa: E501
- )
-
- self._mode = mode
-
- @property
- def amount(self):
- """Gets the amount of this RepayRequest. # noqa: E501
-
- Repay amount. Required in `partial` mode # noqa: E501
-
- :return: The amount of this RepayRequest. # noqa: E501
- :rtype: str
- """
- return self._amount
-
- @amount.setter
- def amount(self, amount):
- """Sets the amount of this RepayRequest.
-
- Repay amount. Required in `partial` mode # noqa: E501
-
- :param amount: The amount of this RepayRequest. # noqa: E501
- :type: str
- """
-
- self._amount = amount
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, RepayRequest):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, RepayRequest):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/repay_resp.py b/gate_api/models/repay_resp.py
index 1816fda..f35f6bc 100644
--- a/gate_api/models/repay_resp.py
+++ b/gate_api/models/repay_resp.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class RepayResp(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'repaid_principal': 'str', 'repaid_interest': 'str'}
+ openapi_types = {
+ 'repaid_principal': 'str',
+ 'repaid_interest': 'str'
+ }
- attribute_map = {'repaid_principal': 'repaid_principal', 'repaid_interest': 'repaid_interest'}
+ attribute_map = {
+ 'repaid_principal': 'repaid_principal',
+ 'repaid_interest': 'repaid_interest'
+ }
def __init__(self, repaid_principal=None, repaid_interest=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, Configuration) -> None
@@ -56,7 +62,7 @@ def __init__(self, repaid_principal=None, repaid_interest=None, local_vars_confi
def repaid_principal(self):
"""Gets the repaid_principal of this RepayResp. # noqa: E501
- 本金 # noqa: E501
+ Principal # noqa: E501
:return: The repaid_principal of this RepayResp. # noqa: E501
:rtype: str
@@ -67,7 +73,7 @@ def repaid_principal(self):
def repaid_principal(self, repaid_principal):
"""Sets the repaid_principal of this RepayResp.
- 本金 # noqa: E501
+ Principal # noqa: E501
:param repaid_principal: The repaid_principal of this RepayResp. # noqa: E501
:type: str
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/repayment.py b/gate_api/models/repayment.py
deleted file mode 100644
index 16ce9d1..0000000
--- a/gate_api/models/repayment.py
+++ /dev/null
@@ -1,197 +0,0 @@
-# coding: utf-8
-
-"""
- Gate API v4
-
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
-
- Contact: support@mail.gate.io
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from gate_api.configuration import Configuration
-
-
-class Repayment(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {'id': 'str', 'create_time': 'str', 'principal': 'str', 'interest': 'str'}
-
- attribute_map = {'id': 'id', 'create_time': 'create_time', 'principal': 'principal', 'interest': 'interest'}
-
- def __init__(
- self, id=None, create_time=None, principal=None, interest=None, local_vars_configuration=None
- ): # noqa: E501
- # type: (str, str, str, str, Configuration) -> None
- """Repayment - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._id = None
- self._create_time = None
- self._principal = None
- self._interest = None
- self.discriminator = None
-
- if id is not None:
- self.id = id
- if create_time is not None:
- self.create_time = create_time
- if principal is not None:
- self.principal = principal
- if interest is not None:
- self.interest = interest
-
- @property
- def id(self):
- """Gets the id of this Repayment. # noqa: E501
-
- Loan record ID # noqa: E501
-
- :return: The id of this Repayment. # noqa: E501
- :rtype: str
- """
- return self._id
-
- @id.setter
- def id(self, id):
- """Sets the id of this Repayment.
-
- Loan record ID # noqa: E501
-
- :param id: The id of this Repayment. # noqa: E501
- :type: str
- """
-
- self._id = id
-
- @property
- def create_time(self):
- """Gets the create_time of this Repayment. # noqa: E501
-
- Repayment time # noqa: E501
-
- :return: The create_time of this Repayment. # noqa: E501
- :rtype: str
- """
- return self._create_time
-
- @create_time.setter
- def create_time(self, create_time):
- """Sets the create_time of this Repayment.
-
- Repayment time # noqa: E501
-
- :param create_time: The create_time of this Repayment. # noqa: E501
- :type: str
- """
-
- self._create_time = create_time
-
- @property
- def principal(self):
- """Gets the principal of this Repayment. # noqa: E501
-
- Repaid principal # noqa: E501
-
- :return: The principal of this Repayment. # noqa: E501
- :rtype: str
- """
- return self._principal
-
- @principal.setter
- def principal(self, principal):
- """Sets the principal of this Repayment.
-
- Repaid principal # noqa: E501
-
- :param principal: The principal of this Repayment. # noqa: E501
- :type: str
- """
-
- self._principal = principal
-
- @property
- def interest(self):
- """Gets the interest of this Repayment. # noqa: E501
-
- Repaid interest # noqa: E501
-
- :return: The interest of this Repayment. # noqa: E501
- :rtype: str
- """
- return self._interest
-
- @interest.setter
- def interest(self, interest):
- """Sets the interest of this Repayment.
-
- Repaid interest # noqa: E501
-
- :param interest: The interest of this Repayment. # noqa: E501
- :type: str
- """
-
- self._interest = interest
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, Repayment):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, Repayment):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/risk_units.py b/gate_api/models/risk_units.py
new file mode 100644
index 0000000..9ab5a17
--- /dev/null
+++ b/gate_api/models/risk_units.py
@@ -0,0 +1,319 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class RiskUnits(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'symbol': 'str',
+ 'spot_in_use': 'str',
+ 'maintain_margin': 'str',
+ 'initial_margin': 'str',
+ 'delta': 'str',
+ 'gamma': 'str',
+ 'theta': 'str',
+ 'vega': 'str'
+ }
+
+ attribute_map = {
+ 'symbol': 'symbol',
+ 'spot_in_use': 'spot_in_use',
+ 'maintain_margin': 'maintain_margin',
+ 'initial_margin': 'initial_margin',
+ 'delta': 'delta',
+ 'gamma': 'gamma',
+ 'theta': 'theta',
+ 'vega': 'vega'
+ }
+
+ def __init__(self, symbol=None, spot_in_use=None, maintain_margin=None, initial_margin=None, delta=None, gamma=None, theta=None, vega=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, Configuration) -> None
+ """RiskUnits - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._symbol = None
+ self._spot_in_use = None
+ self._maintain_margin = None
+ self._initial_margin = None
+ self._delta = None
+ self._gamma = None
+ self._theta = None
+ self._vega = None
+ self.discriminator = None
+
+ if symbol is not None:
+ self.symbol = symbol
+ if spot_in_use is not None:
+ self.spot_in_use = spot_in_use
+ if maintain_margin is not None:
+ self.maintain_margin = maintain_margin
+ if initial_margin is not None:
+ self.initial_margin = initial_margin
+ if delta is not None:
+ self.delta = delta
+ if gamma is not None:
+ self.gamma = gamma
+ if theta is not None:
+ self.theta = theta
+ if vega is not None:
+ self.vega = vega
+
+ @property
+ def symbol(self):
+ """Gets the symbol of this RiskUnits. # noqa: E501
+
+ Risk unit flag # noqa: E501
+
+ :return: The symbol of this RiskUnits. # noqa: E501
+ :rtype: str
+ """
+ return self._symbol
+
+ @symbol.setter
+ def symbol(self, symbol):
+ """Sets the symbol of this RiskUnits.
+
+ Risk unit flag # noqa: E501
+
+ :param symbol: The symbol of this RiskUnits. # noqa: E501
+ :type: str
+ """
+
+ self._symbol = symbol
+
+ @property
+ def spot_in_use(self):
+ """Gets the spot_in_use of this RiskUnits. # noqa: E501
+
+ Spot hedging occupied amount # noqa: E501
+
+ :return: The spot_in_use of this RiskUnits. # noqa: E501
+ :rtype: str
+ """
+ return self._spot_in_use
+
+ @spot_in_use.setter
+ def spot_in_use(self, spot_in_use):
+ """Sets the spot_in_use of this RiskUnits.
+
+ Spot hedging occupied amount # noqa: E501
+
+ :param spot_in_use: The spot_in_use of this RiskUnits. # noqa: E501
+ :type: str
+ """
+
+ self._spot_in_use = spot_in_use
+
+ @property
+ def maintain_margin(self):
+ """Gets the maintain_margin of this RiskUnits. # noqa: E501
+
+ Maintenance margin for risk unit # noqa: E501
+
+ :return: The maintain_margin of this RiskUnits. # noqa: E501
+ :rtype: str
+ """
+ return self._maintain_margin
+
+ @maintain_margin.setter
+ def maintain_margin(self, maintain_margin):
+ """Sets the maintain_margin of this RiskUnits.
+
+ Maintenance margin for risk unit # noqa: E501
+
+ :param maintain_margin: The maintain_margin of this RiskUnits. # noqa: E501
+ :type: str
+ """
+
+ self._maintain_margin = maintain_margin
+
+ @property
+ def initial_margin(self):
+ """Gets the initial_margin of this RiskUnits. # noqa: E501
+
+ Initial margin for risk unit # noqa: E501
+
+ :return: The initial_margin of this RiskUnits. # noqa: E501
+ :rtype: str
+ """
+ return self._initial_margin
+
+ @initial_margin.setter
+ def initial_margin(self, initial_margin):
+ """Sets the initial_margin of this RiskUnits.
+
+ Initial margin for risk unit # noqa: E501
+
+ :param initial_margin: The initial_margin of this RiskUnits. # noqa: E501
+ :type: str
+ """
+
+ self._initial_margin = initial_margin
+
+ @property
+ def delta(self):
+ """Gets the delta of this RiskUnits. # noqa: E501
+
+ Total Delta of risk unit # noqa: E501
+
+ :return: The delta of this RiskUnits. # noqa: E501
+ :rtype: str
+ """
+ return self._delta
+
+ @delta.setter
+ def delta(self, delta):
+ """Sets the delta of this RiskUnits.
+
+ Total Delta of risk unit # noqa: E501
+
+ :param delta: The delta of this RiskUnits. # noqa: E501
+ :type: str
+ """
+
+ self._delta = delta
+
+ @property
+ def gamma(self):
+ """Gets the gamma of this RiskUnits. # noqa: E501
+
+ Total Gamma of risk unit # noqa: E501
+
+ :return: The gamma of this RiskUnits. # noqa: E501
+ :rtype: str
+ """
+ return self._gamma
+
+ @gamma.setter
+ def gamma(self, gamma):
+ """Sets the gamma of this RiskUnits.
+
+ Total Gamma of risk unit # noqa: E501
+
+ :param gamma: The gamma of this RiskUnits. # noqa: E501
+ :type: str
+ """
+
+ self._gamma = gamma
+
+ @property
+ def theta(self):
+ """Gets the theta of this RiskUnits. # noqa: E501
+
+ Total Theta of risk unit # noqa: E501
+
+ :return: The theta of this RiskUnits. # noqa: E501
+ :rtype: str
+ """
+ return self._theta
+
+ @theta.setter
+ def theta(self, theta):
+ """Sets the theta of this RiskUnits.
+
+ Total Theta of risk unit # noqa: E501
+
+ :param theta: The theta of this RiskUnits. # noqa: E501
+ :type: str
+ """
+
+ self._theta = theta
+
+ @property
+ def vega(self):
+ """Gets the vega of this RiskUnits. # noqa: E501
+
+ Total Vega of risk unit # noqa: E501
+
+ :return: The vega of this RiskUnits. # noqa: E501
+ :rtype: str
+ """
+ return self._vega
+
+ @vega.setter
+ def vega(self, vega):
+ """Sets the vega of this RiskUnits.
+
+ Total Vega of risk unit # noqa: E501
+
+ :param vega: The vega of this RiskUnits. # noqa: E501
+ :type: str
+ """
+
+ self._vega = vega
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, RiskUnits):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, RiskUnits):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/saved_address.py b/gate_api/models/saved_address.py
index 6a65cff..d82f14d 100644
--- a/gate_api/models/saved_address.py
+++ b/gate_api/models/saved_address.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -38,7 +38,7 @@ class SavedAddress(object):
'address': 'str',
'name': 'str',
'tag': 'str',
- 'verified': 'str',
+ 'verified': 'str'
}
attribute_map = {
@@ -47,12 +47,10 @@ class SavedAddress(object):
'address': 'address',
'name': 'name',
'tag': 'tag',
- 'verified': 'verified',
+ 'verified': 'verified'
}
- def __init__(
- self, currency=None, chain=None, address=None, name=None, tag=None, verified=None, local_vars_configuration=None
- ): # noqa: E501
+ def __init__(self, currency=None, chain=None, address=None, name=None, tag=None, verified=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, str, str, Configuration) -> None
"""SavedAddress - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -225,16 +223,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/small_balance.py b/gate_api/models/small_balance.py
new file mode 100644
index 0000000..a31cd14
--- /dev/null
+++ b/gate_api/models/small_balance.py
@@ -0,0 +1,207 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class SmallBalance(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'available_balance': 'str',
+ 'estimated_as_btc': 'str',
+ 'convertible_to_gt': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'available_balance': 'available_balance',
+ 'estimated_as_btc': 'estimated_as_btc',
+ 'convertible_to_gt': 'convertible_to_gt'
+ }
+
+ def __init__(self, currency=None, available_balance=None, estimated_as_btc=None, convertible_to_gt=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, Configuration) -> None
+ """SmallBalance - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._available_balance = None
+ self._estimated_as_btc = None
+ self._convertible_to_gt = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if available_balance is not None:
+ self.available_balance = available_balance
+ if estimated_as_btc is not None:
+ self.estimated_as_btc = estimated_as_btc
+ if convertible_to_gt is not None:
+ self.convertible_to_gt = convertible_to_gt
+
+ @property
+ def currency(self):
+ """Gets the currency of this SmallBalance. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this SmallBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this SmallBalance.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this SmallBalance. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def available_balance(self):
+ """Gets the available_balance of this SmallBalance. # noqa: E501
+
+ Available balance # noqa: E501
+
+ :return: The available_balance of this SmallBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._available_balance
+
+ @available_balance.setter
+ def available_balance(self, available_balance):
+ """Sets the available_balance of this SmallBalance.
+
+ Available balance # noqa: E501
+
+ :param available_balance: The available_balance of this SmallBalance. # noqa: E501
+ :type: str
+ """
+
+ self._available_balance = available_balance
+
+ @property
+ def estimated_as_btc(self):
+ """Gets the estimated_as_btc of this SmallBalance. # noqa: E501
+
+ Estimated as BTC # noqa: E501
+
+ :return: The estimated_as_btc of this SmallBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._estimated_as_btc
+
+ @estimated_as_btc.setter
+ def estimated_as_btc(self, estimated_as_btc):
+ """Sets the estimated_as_btc of this SmallBalance.
+
+ Estimated as BTC # noqa: E501
+
+ :param estimated_as_btc: The estimated_as_btc of this SmallBalance. # noqa: E501
+ :type: str
+ """
+
+ self._estimated_as_btc = estimated_as_btc
+
+ @property
+ def convertible_to_gt(self):
+ """Gets the convertible_to_gt of this SmallBalance. # noqa: E501
+
+ Estimated conversion to GT # noqa: E501
+
+ :return: The convertible_to_gt of this SmallBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._convertible_to_gt
+
+ @convertible_to_gt.setter
+ def convertible_to_gt(self, convertible_to_gt):
+ """Sets the convertible_to_gt of this SmallBalance.
+
+ Estimated conversion to GT # noqa: E501
+
+ :param convertible_to_gt: The convertible_to_gt of this SmallBalance. # noqa: E501
+ :type: str
+ """
+
+ self._convertible_to_gt = convertible_to_gt
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, SmallBalance):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, SmallBalance):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/small_balance_history.py b/gate_api/models/small_balance_history.py
new file mode 100644
index 0000000..da3a1d3
--- /dev/null
+++ b/gate_api/models/small_balance_history.py
@@ -0,0 +1,235 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class SmallBalanceHistory(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'str',
+ 'currency': 'str',
+ 'amount': 'str',
+ 'gt_amount': 'str',
+ 'create_time': 'int'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'currency': 'currency',
+ 'amount': 'amount',
+ 'gt_amount': 'gt_amount',
+ 'create_time': 'create_time'
+ }
+
+ def __init__(self, id=None, currency=None, amount=None, gt_amount=None, create_time=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, int, Configuration) -> None
+ """SmallBalanceHistory - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._id = None
+ self._currency = None
+ self._amount = None
+ self._gt_amount = None
+ self._create_time = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if currency is not None:
+ self.currency = currency
+ if amount is not None:
+ self.amount = amount
+ if gt_amount is not None:
+ self.gt_amount = gt_amount
+ if create_time is not None:
+ self.create_time = create_time
+
+ @property
+ def id(self):
+ """Gets the id of this SmallBalanceHistory. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The id of this SmallBalanceHistory. # noqa: E501
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this SmallBalanceHistory.
+
+ Order ID # noqa: E501
+
+ :param id: The id of this SmallBalanceHistory. # noqa: E501
+ :type: str
+ """
+
+ self._id = id
+
+ @property
+ def currency(self):
+ """Gets the currency of this SmallBalanceHistory. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this SmallBalanceHistory. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this SmallBalanceHistory.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this SmallBalanceHistory. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def amount(self):
+ """Gets the amount of this SmallBalanceHistory. # noqa: E501
+
+ Swap Amount # noqa: E501
+
+ :return: The amount of this SmallBalanceHistory. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this SmallBalanceHistory.
+
+ Swap Amount # noqa: E501
+
+ :param amount: The amount of this SmallBalanceHistory. # noqa: E501
+ :type: str
+ """
+
+ self._amount = amount
+
+ @property
+ def gt_amount(self):
+ """Gets the gt_amount of this SmallBalanceHistory. # noqa: E501
+
+ GT amount # noqa: E501
+
+ :return: The gt_amount of this SmallBalanceHistory. # noqa: E501
+ :rtype: str
+ """
+ return self._gt_amount
+
+ @gt_amount.setter
+ def gt_amount(self, gt_amount):
+ """Sets the gt_amount of this SmallBalanceHistory.
+
+ GT amount # noqa: E501
+
+ :param gt_amount: The gt_amount of this SmallBalanceHistory. # noqa: E501
+ :type: str
+ """
+
+ self._gt_amount = gt_amount
+
+ @property
+ def create_time(self):
+ """Gets the create_time of this SmallBalanceHistory. # noqa: E501
+
+ Exchange time (in seconds) # noqa: E501
+
+ :return: The create_time of this SmallBalanceHistory. # noqa: E501
+ :rtype: int
+ """
+ return self._create_time
+
+ @create_time.setter
+ def create_time(self, create_time):
+ """Sets the create_time of this SmallBalanceHistory.
+
+ Exchange time (in seconds) # noqa: E501
+
+ :param create_time: The create_time of this SmallBalanceHistory. # noqa: E501
+ :type: int
+ """
+
+ self._create_time = create_time
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, SmallBalanceHistory):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, SmallBalanceHistory):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/spot_account.py b/gate_api/models/spot_account.py
index 8d3ec33..e4f1aba 100644
--- a/gate_api/models/spot_account.py
+++ b/gate_api/models/spot_account.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,12 +32,22 @@ class SpotAccount(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'available': 'str', 'locked': 'str'}
-
- attribute_map = {'currency': 'currency', 'available': 'available', 'locked': 'locked'}
-
- def __init__(self, currency=None, available=None, locked=None, local_vars_configuration=None): # noqa: E501
- # type: (str, str, str, Configuration) -> None
+ openapi_types = {
+ 'currency': 'str',
+ 'available': 'str',
+ 'locked': 'str',
+ 'update_id': 'int'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'available': 'available',
+ 'locked': 'locked',
+ 'update_id': 'update_id'
+ }
+
+ def __init__(self, currency=None, available=None, locked=None, update_id=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, int, Configuration) -> None
"""SpotAccount - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -46,6 +56,7 @@ def __init__(self, currency=None, available=None, locked=None, local_vars_config
self._currency = None
self._available = None
self._locked = None
+ self._update_id = None
self.discriminator = None
if currency is not None:
@@ -54,6 +65,8 @@ def __init__(self, currency=None, available=None, locked=None, local_vars_config
self.available = available
if locked is not None:
self.locked = locked
+ if update_id is not None:
+ self.update_id = update_id
@property
def currency(self):
@@ -124,6 +137,29 @@ def locked(self, locked):
self._locked = locked
+ @property
+ def update_id(self):
+ """Gets the update_id of this SpotAccount. # noqa: E501
+
+ Version number # noqa: E501
+
+ :return: The update_id of this SpotAccount. # noqa: E501
+ :rtype: int
+ """
+ return self._update_id
+
+ @update_id.setter
+ def update_id(self, update_id):
+ """Sets the update_id of this SpotAccount.
+
+ Version number # noqa: E501
+
+ :param update_id: The update_id of this SpotAccount. # noqa: E501
+ :type: int
+ """
+
+ self._update_id = update_id
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -131,16 +167,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/spot_account_book.py b/gate_api/models/spot_account_book.py
index 422e77a..081b281 100644
--- a/gate_api/models/spot_account_book.py
+++ b/gate_api/models/spot_account_book.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,7 +32,16 @@ class SpotAccountBook(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'id': 'str', 'time': 'int', 'currency': 'str', 'change': 'str', 'balance': 'str', 'type': 'str'}
+ openapi_types = {
+ 'id': 'str',
+ 'time': 'int',
+ 'currency': 'str',
+ 'change': 'str',
+ 'balance': 'str',
+ 'type': 'str',
+ 'code': 'str',
+ 'text': 'str'
+ }
attribute_map = {
'id': 'id',
@@ -41,12 +50,12 @@ class SpotAccountBook(object):
'change': 'change',
'balance': 'balance',
'type': 'type',
+ 'code': 'code',
+ 'text': 'text'
}
- def __init__(
- self, id=None, time=None, currency=None, change=None, balance=None, type=None, local_vars_configuration=None
- ): # noqa: E501
- # type: (str, int, str, str, str, str, Configuration) -> None
+ def __init__(self, id=None, time=None, currency=None, change=None, balance=None, type=None, code=None, text=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, int, str, str, str, str, str, str, Configuration) -> None
"""SpotAccountBook - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -58,6 +67,8 @@ def __init__(
self._change = None
self._balance = None
self._type = None
+ self._code = None
+ self._text = None
self.discriminator = None
if id is not None:
@@ -72,6 +83,10 @@ def __init__(
self.balance = balance
if type is not None:
self.type = type
+ if code is not None:
+ self.code = code
+ if text is not None:
+ self.text = text
@property
def id(self):
@@ -192,7 +207,7 @@ def balance(self, balance):
def type(self):
"""Gets the type of this SpotAccountBook. # noqa: E501
- Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501
+ Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501
:return: The type of this SpotAccountBook. # noqa: E501
:rtype: str
@@ -203,7 +218,7 @@ def type(self):
def type(self, type):
"""Sets the type of this SpotAccountBook.
- Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501
+ Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501
:param type: The type of this SpotAccountBook. # noqa: E501
:type: str
@@ -211,6 +226,52 @@ def type(self, type):
self._type = type
+ @property
+ def code(self):
+ """Gets the code of this SpotAccountBook. # noqa: E501
+
+ Account change code, see [Asset Record Code] (Asset Record Code) # noqa: E501
+
+ :return: The code of this SpotAccountBook. # noqa: E501
+ :rtype: str
+ """
+ return self._code
+
+ @code.setter
+ def code(self, code):
+ """Sets the code of this SpotAccountBook.
+
+ Account change code, see [Asset Record Code] (Asset Record Code) # noqa: E501
+
+ :param code: The code of this SpotAccountBook. # noqa: E501
+ :type: str
+ """
+
+ self._code = code
+
+ @property
+ def text(self):
+ """Gets the text of this SpotAccountBook. # noqa: E501
+
+ Additional information # noqa: E501
+
+ :return: The text of this SpotAccountBook. # noqa: E501
+ :rtype: str
+ """
+ return self._text
+
+ @text.setter
+ def text(self, text):
+ """Sets the text of this SpotAccountBook.
+
+ Additional information # noqa: E501
+
+ :param text: The text of this SpotAccountBook. # noqa: E501
+ :type: str
+ """
+
+ self._text = text
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -218,16 +279,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/spot_currency_chain.py b/gate_api/models/spot_currency_chain.py
new file mode 100644
index 0000000..7dc9a48
--- /dev/null
+++ b/gate_api/models/spot_currency_chain.py
@@ -0,0 +1,235 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class SpotCurrencyChain(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'name': 'str',
+ 'addr': 'str',
+ 'withdraw_disabled': 'bool',
+ 'withdraw_delayed': 'bool',
+ 'deposit_disabled': 'bool'
+ }
+
+ attribute_map = {
+ 'name': 'name',
+ 'addr': 'addr',
+ 'withdraw_disabled': 'withdraw_disabled',
+ 'withdraw_delayed': 'withdraw_delayed',
+ 'deposit_disabled': 'deposit_disabled'
+ }
+
+ def __init__(self, name=None, addr=None, withdraw_disabled=None, withdraw_delayed=None, deposit_disabled=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, bool, bool, bool, Configuration) -> None
+ """SpotCurrencyChain - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._name = None
+ self._addr = None
+ self._withdraw_disabled = None
+ self._withdraw_delayed = None
+ self._deposit_disabled = None
+ self.discriminator = None
+
+ if name is not None:
+ self.name = name
+ if addr is not None:
+ self.addr = addr
+ if withdraw_disabled is not None:
+ self.withdraw_disabled = withdraw_disabled
+ if withdraw_delayed is not None:
+ self.withdraw_delayed = withdraw_delayed
+ if deposit_disabled is not None:
+ self.deposit_disabled = deposit_disabled
+
+ @property
+ def name(self):
+ """Gets the name of this SpotCurrencyChain. # noqa: E501
+
+ Blockchain name # noqa: E501
+
+ :return: The name of this SpotCurrencyChain. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this SpotCurrencyChain.
+
+ Blockchain name # noqa: E501
+
+ :param name: The name of this SpotCurrencyChain. # noqa: E501
+ :type: str
+ """
+
+ self._name = name
+
+ @property
+ def addr(self):
+ """Gets the addr of this SpotCurrencyChain. # noqa: E501
+
+ token address # noqa: E501
+
+ :return: The addr of this SpotCurrencyChain. # noqa: E501
+ :rtype: str
+ """
+ return self._addr
+
+ @addr.setter
+ def addr(self, addr):
+ """Sets the addr of this SpotCurrencyChain.
+
+ token address # noqa: E501
+
+ :param addr: The addr of this SpotCurrencyChain. # noqa: E501
+ :type: str
+ """
+
+ self._addr = addr
+
+ @property
+ def withdraw_disabled(self):
+ """Gets the withdraw_disabled of this SpotCurrencyChain. # noqa: E501
+
+ Whether currency's withdrawal is disabled # noqa: E501
+
+ :return: The withdraw_disabled of this SpotCurrencyChain. # noqa: E501
+ :rtype: bool
+ """
+ return self._withdraw_disabled
+
+ @withdraw_disabled.setter
+ def withdraw_disabled(self, withdraw_disabled):
+ """Sets the withdraw_disabled of this SpotCurrencyChain.
+
+ Whether currency's withdrawal is disabled # noqa: E501
+
+ :param withdraw_disabled: The withdraw_disabled of this SpotCurrencyChain. # noqa: E501
+ :type: bool
+ """
+
+ self._withdraw_disabled = withdraw_disabled
+
+ @property
+ def withdraw_delayed(self):
+ """Gets the withdraw_delayed of this SpotCurrencyChain. # noqa: E501
+
+ Whether currency's withdrawal is delayed # noqa: E501
+
+ :return: The withdraw_delayed of this SpotCurrencyChain. # noqa: E501
+ :rtype: bool
+ """
+ return self._withdraw_delayed
+
+ @withdraw_delayed.setter
+ def withdraw_delayed(self, withdraw_delayed):
+ """Sets the withdraw_delayed of this SpotCurrencyChain.
+
+ Whether currency's withdrawal is delayed # noqa: E501
+
+ :param withdraw_delayed: The withdraw_delayed of this SpotCurrencyChain. # noqa: E501
+ :type: bool
+ """
+
+ self._withdraw_delayed = withdraw_delayed
+
+ @property
+ def deposit_disabled(self):
+ """Gets the deposit_disabled of this SpotCurrencyChain. # noqa: E501
+
+ Whether currency's deposit is disabled # noqa: E501
+
+ :return: The deposit_disabled of this SpotCurrencyChain. # noqa: E501
+ :rtype: bool
+ """
+ return self._deposit_disabled
+
+ @deposit_disabled.setter
+ def deposit_disabled(self, deposit_disabled):
+ """Sets the deposit_disabled of this SpotCurrencyChain.
+
+ Whether currency's deposit is disabled # noqa: E501
+
+ :param deposit_disabled: The deposit_disabled of this SpotCurrencyChain. # noqa: E501
+ :type: bool
+ """
+
+ self._deposit_disabled = deposit_disabled
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, SpotCurrencyChain):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, SpotCurrencyChain):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/spot_fee.py b/gate_api/models/spot_fee.py
index fea2ac1..0d5327c 100644
--- a/gate_api/models/spot_fee.py
+++ b/gate_api/models/spot_fee.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -42,6 +42,7 @@ class SpotFee(object):
'loan_fee': 'str',
'point_type': 'str',
'currency_pair': 'str',
+ 'debit_fee': 'int'
}
attribute_map = {
@@ -54,22 +55,11 @@ class SpotFee(object):
'loan_fee': 'loan_fee',
'point_type': 'point_type',
'currency_pair': 'currency_pair',
+ 'debit_fee': 'debit_fee'
}
- def __init__(
- self,
- user_id=None,
- taker_fee=None,
- maker_fee=None,
- gt_discount=None,
- gt_taker_fee=None,
- gt_maker_fee=None,
- loan_fee=None,
- point_type=None,
- currency_pair=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, str, str, bool, str, str, str, str, str, Configuration) -> None
+ def __init__(self, user_id=None, taker_fee=None, maker_fee=None, gt_discount=None, gt_taker_fee=None, gt_maker_fee=None, loan_fee=None, point_type=None, currency_pair=None, debit_fee=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, bool, str, str, str, str, str, int, Configuration) -> None
"""SpotFee - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -84,6 +74,7 @@ def __init__(
self._loan_fee = None
self._point_type = None
self._currency_pair = None
+ self._debit_fee = None
self.discriminator = None
if user_id is not None:
@@ -104,6 +95,8 @@ def __init__(
self.point_type = point_type
if currency_pair is not None:
self.currency_pair = currency_pair
+ if debit_fee is not None:
+ self.debit_fee = debit_fee
@property
def user_id(self):
@@ -178,7 +171,7 @@ def maker_fee(self, maker_fee):
def gt_discount(self):
"""Gets the gt_discount of this SpotFee. # noqa: E501
- If GT deduction is enabled # noqa: E501
+ Whether GT deduction discount is enabled # noqa: E501
:return: The gt_discount of this SpotFee. # noqa: E501
:rtype: bool
@@ -189,7 +182,7 @@ def gt_discount(self):
def gt_discount(self, gt_discount):
"""Sets the gt_discount of this SpotFee.
- If GT deduction is enabled # noqa: E501
+ Whether GT deduction discount is enabled # noqa: E501
:param gt_discount: The gt_discount of this SpotFee. # noqa: E501
:type: bool
@@ -224,7 +217,7 @@ def gt_taker_fee(self, gt_taker_fee):
def gt_maker_fee(self):
"""Gets the gt_maker_fee of this SpotFee. # noqa: E501
- Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501
+ Maker fee rate with GT deduction. Returns 0 if GT deduction is disabled # noqa: E501
:return: The gt_maker_fee of this SpotFee. # noqa: E501
:rtype: str
@@ -235,7 +228,7 @@ def gt_maker_fee(self):
def gt_maker_fee(self, gt_maker_fee):
"""Sets the gt_maker_fee of this SpotFee.
- Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501
+ Maker fee rate with GT deduction. Returns 0 if GT deduction is disabled # noqa: E501
:param gt_maker_fee: The gt_maker_fee of this SpotFee. # noqa: E501
:type: str
@@ -270,7 +263,7 @@ def loan_fee(self, loan_fee):
def point_type(self):
"""Gets the point_type of this SpotFee. # noqa: E501
- Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501
+ Point card type: 0 - Original version, 1 - New version since 202009 # noqa: E501
:return: The point_type of this SpotFee. # noqa: E501
:rtype: str
@@ -281,7 +274,7 @@ def point_type(self):
def point_type(self, point_type):
"""Sets the point_type of this SpotFee.
- Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501
+ Point card type: 0 - Original version, 1 - New version since 202009 # noqa: E501
:param point_type: The point_type of this SpotFee. # noqa: E501
:type: str
@@ -312,6 +305,29 @@ def currency_pair(self, currency_pair):
self._currency_pair = currency_pair
+ @property
+ def debit_fee(self):
+ """Gets the debit_fee of this SpotFee. # noqa: E501
+
+ Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates # noqa: E501
+
+ :return: The debit_fee of this SpotFee. # noqa: E501
+ :rtype: int
+ """
+ return self._debit_fee
+
+ @debit_fee.setter
+ def debit_fee(self, debit_fee):
+ """Sets the debit_fee of this SpotFee.
+
+ Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates # noqa: E501
+
+ :param debit_fee: The debit_fee of this SpotFee. # noqa: E501
+ :type: int
+ """
+
+ self._debit_fee = debit_fee
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -319,16 +335,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/spot_insurance_history.py b/gate_api/models/spot_insurance_history.py
new file mode 100644
index 0000000..249bc6d
--- /dev/null
+++ b/gate_api/models/spot_insurance_history.py
@@ -0,0 +1,179 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class SpotInsuranceHistory(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'balance': 'str',
+ 'time': 'int'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'balance': 'balance',
+ 'time': 'time'
+ }
+
+ def __init__(self, currency=None, balance=None, time=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, int, Configuration) -> None
+ """SpotInsuranceHistory - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._balance = None
+ self._time = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if balance is not None:
+ self.balance = balance
+ if time is not None:
+ self.time = time
+
+ @property
+ def currency(self):
+ """Gets the currency of this SpotInsuranceHistory. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this SpotInsuranceHistory. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this SpotInsuranceHistory.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this SpotInsuranceHistory. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def balance(self):
+ """Gets the balance of this SpotInsuranceHistory. # noqa: E501
+
+ Balance # noqa: E501
+
+ :return: The balance of this SpotInsuranceHistory. # noqa: E501
+ :rtype: str
+ """
+ return self._balance
+
+ @balance.setter
+ def balance(self, balance):
+ """Sets the balance of this SpotInsuranceHistory.
+
+ Balance # noqa: E501
+
+ :param balance: The balance of this SpotInsuranceHistory. # noqa: E501
+ :type: str
+ """
+
+ self._balance = balance
+
+ @property
+ def time(self):
+ """Gets the time of this SpotInsuranceHistory. # noqa: E501
+
+ Creation time, timestamp, milliseconds # noqa: E501
+
+ :return: The time of this SpotInsuranceHistory. # noqa: E501
+ :rtype: int
+ """
+ return self._time
+
+ @time.setter
+ def time(self, time):
+ """Sets the time of this SpotInsuranceHistory.
+
+ Creation time, timestamp, milliseconds # noqa: E501
+
+ :param time: The time of this SpotInsuranceHistory. # noqa: E501
+ :type: int
+ """
+
+ self._time = time
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, SpotInsuranceHistory):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, SpotInsuranceHistory):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/spot_price_put_order.py b/gate_api/models/spot_price_put_order.py
index 49e1635..72cfa78 100644
--- a/gate_api/models/spot_price_put_order.py
+++ b/gate_api/models/spot_price_put_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -39,6 +39,9 @@ class SpotPricePutOrder(object):
'amount': 'str',
'account': 'str',
'time_in_force': 'str',
+ 'auto_borrow': 'bool',
+ 'auto_repay': 'bool',
+ 'text': 'str'
}
attribute_map = {
@@ -48,19 +51,13 @@ class SpotPricePutOrder(object):
'amount': 'amount',
'account': 'account',
'time_in_force': 'time_in_force',
+ 'auto_borrow': 'auto_borrow',
+ 'auto_repay': 'auto_repay',
+ 'text': 'text'
}
- def __init__(
- self,
- type='limit',
- side=None,
- price=None,
- amount=None,
- account='normal',
- time_in_force='gtc',
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, Configuration) -> None
+ def __init__(self, type='limit', side=None, price=None, amount=None, account='normal', time_in_force='gtc', auto_borrow=False, auto_repay=False, text=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, bool, bool, str, Configuration) -> None
"""SpotPricePutOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -72,6 +69,9 @@ def __init__(
self._amount = None
self._account = None
self._time_in_force = None
+ self._auto_borrow = None
+ self._auto_repay = None
+ self._text = None
self.discriminator = None
if type is not None:
@@ -82,12 +82,18 @@ def __init__(
self.account = account
if time_in_force is not None:
self.time_in_force = time_in_force
+ if auto_borrow is not None:
+ self.auto_borrow = auto_borrow
+ if auto_repay is not None:
+ self.auto_repay = auto_repay
+ if text is not None:
+ self.text = text
@property
def type(self):
"""Gets the type of this SpotPricePutOrder. # noqa: E501
- Order type, default to `limit` # noqa: E501
+ Order type,default to `limit` - limit : Limit Order - market : Market Order # noqa: E501
:return: The type of this SpotPricePutOrder. # noqa: E501
:rtype: str
@@ -98,11 +104,17 @@ def type(self):
def type(self, type):
"""Sets the type of this SpotPricePutOrder.
- Order type, default to `limit` # noqa: E501
+ Order type,default to `limit` - limit : Limit Order - market : Market Order # noqa: E501
:param type: The type of this SpotPricePutOrder. # noqa: E501
:type: str
"""
+ allowed_values = ["limit", "market"] # noqa: E501
+ if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
+ raise ValueError(
+ "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
+ .format(type, allowed_values)
+ )
self._type = type
@@ -131,7 +143,8 @@ def side(self, side):
allowed_values = ["buy", "sell"] # noqa: E501
if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `side` ({0}), must be one of {1}".format(side, allowed_values) # noqa: E501
+ "Invalid value for `side` ({0}), must be one of {1}" # noqa: E501
+ .format(side, allowed_values)
)
self._side = side
@@ -165,7 +178,7 @@ def price(self, price):
def amount(self):
"""Gets the amount of this SpotPricePutOrder. # noqa: E501
- Order amount # noqa: E501
+ Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` # noqa: E501
:return: The amount of this SpotPricePutOrder. # noqa: E501
:rtype: str
@@ -176,7 +189,7 @@ def amount(self):
def amount(self, amount):
"""Sets the amount of this SpotPricePutOrder.
- Order amount # noqa: E501
+ Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` # noqa: E501
:param amount: The amount of this SpotPricePutOrder. # noqa: E501
:type: str
@@ -190,7 +203,7 @@ def amount(self, amount):
def account(self):
"""Gets the account of this SpotPricePutOrder. # noqa: E501
- Trading account type. Portfolio margin account must set to `cross_margin` - normal: spot trading - margin: margin trading - cross_margin: cross_margin trading # noqa: E501
+ Trading account type. Unified account must be set to `unified` - normal: spot trading - margin: margin trading - unified: unified account # noqa: E501
:return: The account of this SpotPricePutOrder. # noqa: E501
:rtype: str
@@ -201,17 +214,18 @@ def account(self):
def account(self, account):
"""Sets the account of this SpotPricePutOrder.
- Trading account type. Portfolio margin account must set to `cross_margin` - normal: spot trading - margin: margin trading - cross_margin: cross_margin trading # noqa: E501
+ Trading account type. Unified account must be set to `unified` - normal: spot trading - margin: margin trading - unified: unified account # noqa: E501
:param account: The account of this SpotPricePutOrder. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and account is None: # noqa: E501
raise ValueError("Invalid value for `account`, must not be `None`") # noqa: E501
- allowed_values = ["normal", "margin", "cross_margin"] # noqa: E501
+ allowed_values = ["normal", "margin", "unified"] # noqa: E501
if self.local_vars_configuration.client_side_validation and account not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `account` ({0}), must be one of {1}".format(account, allowed_values) # noqa: E501
+ "Invalid value for `account` ({0}), must be one of {1}" # noqa: E501
+ .format(account, allowed_values)
)
self._account = account
@@ -239,13 +253,81 @@ def time_in_force(self, time_in_force):
allowed_values = ["gtc", "ioc"] # noqa: E501
if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `time_in_force` ({0}), must be one of {1}".format( # noqa: E501
- time_in_force, allowed_values
- )
+ "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501
+ .format(time_in_force, allowed_values)
)
self._time_in_force = time_in_force
+ @property
+ def auto_borrow(self):
+ """Gets the auto_borrow of this SpotPricePutOrder. # noqa: E501
+
+ Whether to borrow coins automatically # noqa: E501
+
+ :return: The auto_borrow of this SpotPricePutOrder. # noqa: E501
+ :rtype: bool
+ """
+ return self._auto_borrow
+
+ @auto_borrow.setter
+ def auto_borrow(self, auto_borrow):
+ """Sets the auto_borrow of this SpotPricePutOrder.
+
+ Whether to borrow coins automatically # noqa: E501
+
+ :param auto_borrow: The auto_borrow of this SpotPricePutOrder. # noqa: E501
+ :type: bool
+ """
+
+ self._auto_borrow = auto_borrow
+
+ @property
+ def auto_repay(self):
+ """Gets the auto_repay of this SpotPricePutOrder. # noqa: E501
+
+ Whether to repay the loan automatically # noqa: E501
+
+ :return: The auto_repay of this SpotPricePutOrder. # noqa: E501
+ :rtype: bool
+ """
+ return self._auto_repay
+
+ @auto_repay.setter
+ def auto_repay(self, auto_repay):
+ """Sets the auto_repay of this SpotPricePutOrder.
+
+ Whether to repay the loan automatically # noqa: E501
+
+ :param auto_repay: The auto_repay of this SpotPricePutOrder. # noqa: E501
+ :type: bool
+ """
+
+ self._auto_repay = auto_repay
+
+ @property
+ def text(self):
+ """Gets the text of this SpotPricePutOrder. # noqa: E501
+
+ The source of the order, including: - web: Web - api: API call - app: Mobile app # noqa: E501
+
+ :return: The text of this SpotPricePutOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._text
+
+ @text.setter
+ def text(self, text):
+ """Sets the text of this SpotPricePutOrder.
+
+ The source of the order, including: - web: Web - api: API call - app: Mobile app # noqa: E501
+
+ :param text: The text of this SpotPricePutOrder. # noqa: E501
+ :type: str
+ """
+
+ self._text = text
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -253,16 +335,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/spot_price_trigger.py b/gate_api/models/spot_price_trigger.py
index 7fd8c54..5e49da6 100644
--- a/gate_api/models/spot_price_trigger.py
+++ b/gate_api/models/spot_price_trigger.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,17 @@ class SpotPriceTrigger(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'price': 'str', 'rule': 'str', 'expiration': 'int'}
-
- attribute_map = {'price': 'price', 'rule': 'rule', 'expiration': 'expiration'}
+ openapi_types = {
+ 'price': 'str',
+ 'rule': 'str',
+ 'expiration': 'int'
+ }
+
+ attribute_map = {
+ 'price': 'price',
+ 'rule': 'rule',
+ 'expiration': 'expiration'
+ }
def __init__(self, price=None, rule=None, expiration=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, int, Configuration) -> None
@@ -81,7 +89,7 @@ def price(self, price):
def rule(self):
"""Gets the rule of this SpotPriceTrigger. # noqa: E501
- Price trigger condition - >=: triggered when market price larger than or equal to `price` field - <=: triggered when market price less than or equal to `price` field # noqa: E501
+ Price trigger condition - `>=`: triggered when market price is greater than or equal to `price` - `<=`: triggered when market price is less than or equal to `price` # noqa: E501
:return: The rule of this SpotPriceTrigger. # noqa: E501
:rtype: str
@@ -92,7 +100,7 @@ def rule(self):
def rule(self, rule):
"""Sets the rule of this SpotPriceTrigger.
- Price trigger condition - >=: triggered when market price larger than or equal to `price` field - <=: triggered when market price less than or equal to `price` field # noqa: E501
+ Price trigger condition - `>=`: triggered when market price is greater than or equal to `price` - `<=`: triggered when market price is less than or equal to `price` # noqa: E501
:param rule: The rule of this SpotPriceTrigger. # noqa: E501
:type: str
@@ -102,7 +110,8 @@ def rule(self, rule):
allowed_values = [">=", "<="] # noqa: E501
if self.local_vars_configuration.client_side_validation and rule not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `rule` ({0}), must be one of {1}".format(rule, allowed_values) # noqa: E501
+ "Invalid value for `rule` ({0}), must be one of {1}" # noqa: E501
+ .format(rule, allowed_values)
)
self._rule = rule
@@ -111,7 +120,7 @@ def rule(self, rule):
def expiration(self):
"""Gets the expiration of this SpotPriceTrigger. # noqa: E501
- How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501
+ Maximum wait time for trigger condition (in seconds). Order will be cancelled if timeout # noqa: E501
:return: The expiration of this SpotPriceTrigger. # noqa: E501
:rtype: int
@@ -122,7 +131,7 @@ def expiration(self):
def expiration(self, expiration):
"""Sets the expiration of this SpotPriceTrigger.
- How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501
+ Maximum wait time for trigger condition (in seconds). Order will be cancelled if timeout # noqa: E501
:param expiration: The expiration of this SpotPriceTrigger. # noqa: E501
:type: int
@@ -139,16 +148,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/spot_price_triggered_order.py b/gate_api/models/spot_price_triggered_order.py
index 0b63129..69e14df 100644
--- a/gate_api/models/spot_price_triggered_order.py
+++ b/gate_api/models/spot_price_triggered_order.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -42,7 +42,7 @@ class SpotPriceTriggeredOrder(object):
'ftime': 'int',
'fired_order_id': 'int',
'status': 'str',
- 'reason': 'str',
+ 'reason': 'str'
}
attribute_map = {
@@ -55,23 +55,10 @@ class SpotPriceTriggeredOrder(object):
'ftime': 'ftime',
'fired_order_id': 'fired_order_id',
'status': 'status',
- 'reason': 'reason',
+ 'reason': 'reason'
}
- def __init__(
- self,
- trigger=None,
- put=None,
- id=None,
- user=None,
- market=None,
- ctime=None,
- ftime=None,
- fired_order_id=None,
- status=None,
- reason=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, trigger=None, put=None, id=None, user=None, market=None, ctime=None, ftime=None, fired_order_id=None, status=None, reason=None, local_vars_configuration=None): # noqa: E501
# type: (SpotPriceTrigger, SpotPricePutOrder, int, int, str, int, int, int, str, str, Configuration) -> None
"""SpotPriceTriggeredOrder - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -204,7 +191,7 @@ def user(self, user):
def market(self):
"""Gets the market of this SpotPriceTriggeredOrder. # noqa: E501
- Currency pair # noqa: E501
+ Market # noqa: E501
:return: The market of this SpotPriceTriggeredOrder. # noqa: E501
:rtype: str
@@ -215,7 +202,7 @@ def market(self):
def market(self, market):
"""Sets the market of this SpotPriceTriggeredOrder.
- Currency pair # noqa: E501
+ Market # noqa: E501
:param market: The market of this SpotPriceTriggeredOrder. # noqa: E501
:type: str
@@ -229,7 +216,7 @@ def market(self, market):
def ctime(self):
"""Gets the ctime of this SpotPriceTriggeredOrder. # noqa: E501
- Creation time # noqa: E501
+ Created time # noqa: E501
:return: The ctime of this SpotPriceTriggeredOrder. # noqa: E501
:rtype: int
@@ -240,7 +227,7 @@ def ctime(self):
def ctime(self, ctime):
"""Sets the ctime of this SpotPriceTriggeredOrder.
- Creation time # noqa: E501
+ Created time # noqa: E501
:param ctime: The ctime of this SpotPriceTriggeredOrder. # noqa: E501
:type: int
@@ -252,7 +239,7 @@ def ctime(self, ctime):
def ftime(self):
"""Gets the ftime of this SpotPriceTriggeredOrder. # noqa: E501
- Finished time # noqa: E501
+ End time # noqa: E501
:return: The ftime of this SpotPriceTriggeredOrder. # noqa: E501
:rtype: int
@@ -263,7 +250,7 @@ def ftime(self):
def ftime(self, ftime):
"""Sets the ftime of this SpotPriceTriggeredOrder.
- Finished time # noqa: E501
+ End time # noqa: E501
:param ftime: The ftime of this SpotPriceTriggeredOrder. # noqa: E501
:type: int
@@ -275,7 +262,7 @@ def ftime(self, ftime):
def fired_order_id(self):
"""Gets the fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501
- ID of the newly created order on condition triggered # noqa: E501
+ ID of the order created after trigger # noqa: E501
:return: The fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501
:rtype: int
@@ -286,7 +273,7 @@ def fired_order_id(self):
def fired_order_id(self, fired_order_id):
"""Sets the fired_order_id of this SpotPriceTriggeredOrder.
- ID of the newly created order on condition triggered # noqa: E501
+ ID of the order created after trigger # noqa: E501
:param fired_order_id: The fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501
:type: int
@@ -298,7 +285,7 @@ def fired_order_id(self, fired_order_id):
def status(self):
"""Gets the status of this SpotPriceTriggeredOrder. # noqa: E501
- Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired # noqa: E501
+ Status - open: Running - cancelled: Manually cancelled - finish: Successfully completed - failed: Failed to execute - expired: Expired # noqa: E501
:return: The status of this SpotPriceTriggeredOrder. # noqa: E501
:rtype: str
@@ -309,7 +296,7 @@ def status(self):
def status(self, status):
"""Sets the status of this SpotPriceTriggeredOrder.
- Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired # noqa: E501
+ Status - open: Running - cancelled: Manually cancelled - finish: Successfully completed - failed: Failed to execute - expired: Expired # noqa: E501
:param status: The status of this SpotPriceTriggeredOrder. # noqa: E501
:type: str
@@ -321,7 +308,7 @@ def status(self, status):
def reason(self):
"""Gets the reason of this SpotPriceTriggeredOrder. # noqa: E501
- Additional remarks on how the order was finished # noqa: E501
+ Additional description of how the order was completed # noqa: E501
:return: The reason of this SpotPriceTriggeredOrder. # noqa: E501
:rtype: str
@@ -332,7 +319,7 @@ def reason(self):
def reason(self, reason):
"""Sets the reason of this SpotPriceTriggeredOrder.
- Additional remarks on how the order was finished # noqa: E501
+ Additional description of how the order was completed # noqa: E501
:param reason: The reason of this SpotPriceTriggeredOrder. # noqa: E501
:type: str
@@ -347,16 +334,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/stp_group.py b/gate_api/models/stp_group.py
index 26202a9..52ba304 100644
--- a/gate_api/models/stp_group.py
+++ b/gate_api/models/stp_group.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,13 +32,21 @@ class StpGroup(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'id': 'int', 'name': 'str', 'creator_id': 'int', 'create_time': 'int'}
-
- attribute_map = {'id': 'id', 'name': 'name', 'creator_id': 'creator_id', 'create_time': 'create_time'}
-
- def __init__(
- self, id=None, name=None, creator_id=None, create_time=None, local_vars_configuration=None
- ): # noqa: E501
+ openapi_types = {
+ 'id': 'int',
+ 'name': 'str',
+ 'creator_id': 'int',
+ 'create_time': 'int'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'name': 'name',
+ 'creator_id': 'creator_id',
+ 'create_time': 'create_time'
+ }
+
+ def __init__(self, id=None, name=None, creator_id=None, create_time=None, local_vars_configuration=None): # noqa: E501
# type: (int, str, int, int, Configuration) -> None
"""StpGroup - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -134,7 +142,7 @@ def creator_id(self, creator_id):
def create_time(self):
"""Gets the create_time of this StpGroup. # noqa: E501
- Creation time # noqa: E501
+ Created time # noqa: E501
:return: The create_time of this StpGroup. # noqa: E501
:rtype: int
@@ -145,7 +153,7 @@ def create_time(self):
def create_time(self, create_time):
"""Sets the create_time of this StpGroup.
- Creation time # noqa: E501
+ Created time # noqa: E501
:param create_time: The create_time of this StpGroup. # noqa: E501
:type: int
@@ -160,16 +168,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/stp_group_user.py b/gate_api/models/stp_group_user.py
index 623cf15..e6584f3 100644
--- a/gate_api/models/stp_group_user.py
+++ b/gate_api/models/stp_group_user.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,17 @@ class StpGroupUser(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'user_id': 'int', 'stp_id': 'int', 'create_time': 'int'}
-
- attribute_map = {'user_id': 'user_id', 'stp_id': 'stp_id', 'create_time': 'create_time'}
+ openapi_types = {
+ 'user_id': 'int',
+ 'stp_id': 'int',
+ 'create_time': 'int'
+ }
+
+ attribute_map = {
+ 'user_id': 'user_id',
+ 'stp_id': 'stp_id',
+ 'create_time': 'create_time'
+ }
def __init__(self, user_id=None, stp_id=None, create_time=None, local_vars_configuration=None): # noqa: E501
# type: (int, int, int, Configuration) -> None
@@ -105,7 +113,7 @@ def stp_id(self, stp_id):
def create_time(self):
"""Gets the create_time of this StpGroupUser. # noqa: E501
- Creation time # noqa: E501
+ Created time # noqa: E501
:return: The create_time of this StpGroupUser. # noqa: E501
:rtype: int
@@ -116,7 +124,7 @@ def create_time(self):
def create_time(self, create_time):
"""Sets the create_time of this StpGroupUser.
- Creation time # noqa: E501
+ Created time # noqa: E501
:param create_time: The create_time of this StpGroupUser. # noqa: E501
:type: int
@@ -131,16 +139,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/structured_buy.py b/gate_api/models/structured_buy.py
new file mode 100644
index 0000000..285adf7
--- /dev/null
+++ b/gate_api/models/structured_buy.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class StructuredBuy(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'pid': 'str',
+ 'amount': 'str'
+ }
+
+ attribute_map = {
+ 'pid': 'pid',
+ 'amount': 'amount'
+ }
+
+ def __init__(self, pid=None, amount=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """StructuredBuy - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._pid = None
+ self._amount = None
+ self.discriminator = None
+
+ if pid is not None:
+ self.pid = pid
+ if amount is not None:
+ self.amount = amount
+
+ @property
+ def pid(self):
+ """Gets the pid of this StructuredBuy. # noqa: E501
+
+ Product ID # noqa: E501
+
+ :return: The pid of this StructuredBuy. # noqa: E501
+ :rtype: str
+ """
+ return self._pid
+
+ @pid.setter
+ def pid(self, pid):
+ """Sets the pid of this StructuredBuy.
+
+ Product ID # noqa: E501
+
+ :param pid: The pid of this StructuredBuy. # noqa: E501
+ :type: str
+ """
+
+ self._pid = pid
+
+ @property
+ def amount(self):
+ """Gets the amount of this StructuredBuy. # noqa: E501
+
+ Buy Quantity # noqa: E501
+
+ :return: The amount of this StructuredBuy. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this StructuredBuy.
+
+ Buy Quantity # noqa: E501
+
+ :param amount: The amount of this StructuredBuy. # noqa: E501
+ :type: str
+ """
+
+ self._amount = amount
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, StructuredBuy):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, StructuredBuy):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/structured_get_project_list.py b/gate_api/models/structured_get_project_list.py
new file mode 100644
index 0000000..664a021
--- /dev/null
+++ b/gate_api/models/structured_get_project_list.py
@@ -0,0 +1,431 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class StructuredGetProjectList(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'int',
+ 'type': 'str',
+ 'name_en': 'str',
+ 'investment_coin': 'str',
+ 'investment_period': 'str',
+ 'min_annual_rate': 'str',
+ 'mid_annual_rate': 'str',
+ 'max_annual_rate': 'str',
+ 'watch_market': 'str',
+ 'start_time': 'int',
+ 'end_time': 'int',
+ 'status': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'type': 'type',
+ 'name_en': 'name_en',
+ 'investment_coin': 'investment_coin',
+ 'investment_period': 'investment_period',
+ 'min_annual_rate': 'min_annual_rate',
+ 'mid_annual_rate': 'mid_annual_rate',
+ 'max_annual_rate': 'max_annual_rate',
+ 'watch_market': 'watch_market',
+ 'start_time': 'start_time',
+ 'end_time': 'end_time',
+ 'status': 'status'
+ }
+
+ def __init__(self, id=None, type=None, name_en=None, investment_coin=None, investment_period=None, min_annual_rate=None, mid_annual_rate=None, max_annual_rate=None, watch_market=None, start_time=None, end_time=None, status=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, str, str, str, str, str, str, int, int, str, Configuration) -> None
+ """StructuredGetProjectList - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._id = None
+ self._type = None
+ self._name_en = None
+ self._investment_coin = None
+ self._investment_period = None
+ self._min_annual_rate = None
+ self._mid_annual_rate = None
+ self._max_annual_rate = None
+ self._watch_market = None
+ self._start_time = None
+ self._end_time = None
+ self._status = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if type is not None:
+ self.type = type
+ if name_en is not None:
+ self.name_en = name_en
+ if investment_coin is not None:
+ self.investment_coin = investment_coin
+ if investment_period is not None:
+ self.investment_period = investment_period
+ if min_annual_rate is not None:
+ self.min_annual_rate = min_annual_rate
+ if mid_annual_rate is not None:
+ self.mid_annual_rate = mid_annual_rate
+ if max_annual_rate is not None:
+ self.max_annual_rate = max_annual_rate
+ if watch_market is not None:
+ self.watch_market = watch_market
+ if start_time is not None:
+ self.start_time = start_time
+ if end_time is not None:
+ self.end_time = end_time
+ if status is not None:
+ self.status = status
+
+ @property
+ def id(self):
+ """Gets the id of this StructuredGetProjectList. # noqa: E501
+
+ Product ID # noqa: E501
+
+ :return: The id of this StructuredGetProjectList. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this StructuredGetProjectList.
+
+ Product ID # noqa: E501
+
+ :param id: The id of this StructuredGetProjectList. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ @property
+ def type(self):
+ """Gets the type of this StructuredGetProjectList. # noqa: E501
+
+ Product Type: `SharkFin2.0`-Shark Fin 2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball # noqa: E501
+
+ :return: The type of this StructuredGetProjectList. # noqa: E501
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this StructuredGetProjectList.
+
+ Product Type: `SharkFin2.0`-Shark Fin 2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball # noqa: E501
+
+ :param type: The type of this StructuredGetProjectList. # noqa: E501
+ :type: str
+ """
+
+ self._type = type
+
+ @property
+ def name_en(self):
+ """Gets the name_en of this StructuredGetProjectList. # noqa: E501
+
+ Product Name # noqa: E501
+
+ :return: The name_en of this StructuredGetProjectList. # noqa: E501
+ :rtype: str
+ """
+ return self._name_en
+
+ @name_en.setter
+ def name_en(self, name_en):
+ """Sets the name_en of this StructuredGetProjectList.
+
+ Product Name # noqa: E501
+
+ :param name_en: The name_en of this StructuredGetProjectList. # noqa: E501
+ :type: str
+ """
+
+ self._name_en = name_en
+
+ @property
+ def investment_coin(self):
+ """Gets the investment_coin of this StructuredGetProjectList. # noqa: E501
+
+ Investment Token # noqa: E501
+
+ :return: The investment_coin of this StructuredGetProjectList. # noqa: E501
+ :rtype: str
+ """
+ return self._investment_coin
+
+ @investment_coin.setter
+ def investment_coin(self, investment_coin):
+ """Sets the investment_coin of this StructuredGetProjectList.
+
+ Investment Token # noqa: E501
+
+ :param investment_coin: The investment_coin of this StructuredGetProjectList. # noqa: E501
+ :type: str
+ """
+
+ self._investment_coin = investment_coin
+
+ @property
+ def investment_period(self):
+ """Gets the investment_period of this StructuredGetProjectList. # noqa: E501
+
+ Investment Period # noqa: E501
+
+ :return: The investment_period of this StructuredGetProjectList. # noqa: E501
+ :rtype: str
+ """
+ return self._investment_period
+
+ @investment_period.setter
+ def investment_period(self, investment_period):
+ """Sets the investment_period of this StructuredGetProjectList.
+
+ Investment Period # noqa: E501
+
+ :param investment_period: The investment_period of this StructuredGetProjectList. # noqa: E501
+ :type: str
+ """
+
+ self._investment_period = investment_period
+
+ @property
+ def min_annual_rate(self):
+ """Gets the min_annual_rate of this StructuredGetProjectList. # noqa: E501
+
+ Minimum Annual Rate # noqa: E501
+
+ :return: The min_annual_rate of this StructuredGetProjectList. # noqa: E501
+ :rtype: str
+ """
+ return self._min_annual_rate
+
+ @min_annual_rate.setter
+ def min_annual_rate(self, min_annual_rate):
+ """Sets the min_annual_rate of this StructuredGetProjectList.
+
+ Minimum Annual Rate # noqa: E501
+
+ :param min_annual_rate: The min_annual_rate of this StructuredGetProjectList. # noqa: E501
+ :type: str
+ """
+
+ self._min_annual_rate = min_annual_rate
+
+ @property
+ def mid_annual_rate(self):
+ """Gets the mid_annual_rate of this StructuredGetProjectList. # noqa: E501
+
+ Intermediate Annual Rate # noqa: E501
+
+ :return: The mid_annual_rate of this StructuredGetProjectList. # noqa: E501
+ :rtype: str
+ """
+ return self._mid_annual_rate
+
+ @mid_annual_rate.setter
+ def mid_annual_rate(self, mid_annual_rate):
+ """Sets the mid_annual_rate of this StructuredGetProjectList.
+
+ Intermediate Annual Rate # noqa: E501
+
+ :param mid_annual_rate: The mid_annual_rate of this StructuredGetProjectList. # noqa: E501
+ :type: str
+ """
+
+ self._mid_annual_rate = mid_annual_rate
+
+ @property
+ def max_annual_rate(self):
+ """Gets the max_annual_rate of this StructuredGetProjectList. # noqa: E501
+
+ Maximum Annual Rate # noqa: E501
+
+ :return: The max_annual_rate of this StructuredGetProjectList. # noqa: E501
+ :rtype: str
+ """
+ return self._max_annual_rate
+
+ @max_annual_rate.setter
+ def max_annual_rate(self, max_annual_rate):
+ """Sets the max_annual_rate of this StructuredGetProjectList.
+
+ Maximum Annual Rate # noqa: E501
+
+ :param max_annual_rate: The max_annual_rate of this StructuredGetProjectList. # noqa: E501
+ :type: str
+ """
+
+ self._max_annual_rate = max_annual_rate
+
+ @property
+ def watch_market(self):
+ """Gets the watch_market of this StructuredGetProjectList. # noqa: E501
+
+ Underlying Market # noqa: E501
+
+ :return: The watch_market of this StructuredGetProjectList. # noqa: E501
+ :rtype: str
+ """
+ return self._watch_market
+
+ @watch_market.setter
+ def watch_market(self, watch_market):
+ """Sets the watch_market of this StructuredGetProjectList.
+
+ Underlying Market # noqa: E501
+
+ :param watch_market: The watch_market of this StructuredGetProjectList. # noqa: E501
+ :type: str
+ """
+
+ self._watch_market = watch_market
+
+ @property
+ def start_time(self):
+ """Gets the start_time of this StructuredGetProjectList. # noqa: E501
+
+ Start Time # noqa: E501
+
+ :return: The start_time of this StructuredGetProjectList. # noqa: E501
+ :rtype: int
+ """
+ return self._start_time
+
+ @start_time.setter
+ def start_time(self, start_time):
+ """Sets the start_time of this StructuredGetProjectList.
+
+ Start Time # noqa: E501
+
+ :param start_time: The start_time of this StructuredGetProjectList. # noqa: E501
+ :type: int
+ """
+
+ self._start_time = start_time
+
+ @property
+ def end_time(self):
+ """Gets the end_time of this StructuredGetProjectList. # noqa: E501
+
+ End time # noqa: E501
+
+ :return: The end_time of this StructuredGetProjectList. # noqa: E501
+ :rtype: int
+ """
+ return self._end_time
+
+ @end_time.setter
+ def end_time(self, end_time):
+ """Sets the end_time of this StructuredGetProjectList.
+
+ End time # noqa: E501
+
+ :param end_time: The end_time of this StructuredGetProjectList. # noqa: E501
+ :type: int
+ """
+
+ self._end_time = end_time
+
+ @property
+ def status(self):
+ """Gets the status of this StructuredGetProjectList. # noqa: E501
+
+ Status: `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done # noqa: E501
+
+ :return: The status of this StructuredGetProjectList. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this StructuredGetProjectList.
+
+ Status: `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done # noqa: E501
+
+ :param status: The status of this StructuredGetProjectList. # noqa: E501
+ :type: str
+ """
+
+ self._status = status
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, StructuredGetProjectList):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, StructuredGetProjectList):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/structured_order_list.py b/gate_api/models/structured_order_list.py
new file mode 100644
index 0000000..4f75222
--- /dev/null
+++ b/gate_api/models/structured_order_list.py
@@ -0,0 +1,291 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class StructuredOrderList(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'int',
+ 'pid': 'str',
+ 'lock_coin': 'str',
+ 'amount': 'str',
+ 'status': 'str',
+ 'income': 'str',
+ 'create_time': 'int'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'pid': 'pid',
+ 'lock_coin': 'lock_coin',
+ 'amount': 'amount',
+ 'status': 'status',
+ 'income': 'income',
+ 'create_time': 'create_time'
+ }
+
+ def __init__(self, id=None, pid=None, lock_coin=None, amount=None, status=None, income=None, create_time=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, str, str, str, int, Configuration) -> None
+ """StructuredOrderList - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._id = None
+ self._pid = None
+ self._lock_coin = None
+ self._amount = None
+ self._status = None
+ self._income = None
+ self._create_time = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if pid is not None:
+ self.pid = pid
+ if lock_coin is not None:
+ self.lock_coin = lock_coin
+ if amount is not None:
+ self.amount = amount
+ if status is not None:
+ self.status = status
+ if income is not None:
+ self.income = income
+ if create_time is not None:
+ self.create_time = create_time
+
+ @property
+ def id(self):
+ """Gets the id of this StructuredOrderList. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The id of this StructuredOrderList. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this StructuredOrderList.
+
+ Order ID # noqa: E501
+
+ :param id: The id of this StructuredOrderList. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ @property
+ def pid(self):
+ """Gets the pid of this StructuredOrderList. # noqa: E501
+
+ Product ID # noqa: E501
+
+ :return: The pid of this StructuredOrderList. # noqa: E501
+ :rtype: str
+ """
+ return self._pid
+
+ @pid.setter
+ def pid(self, pid):
+ """Sets the pid of this StructuredOrderList.
+
+ Product ID # noqa: E501
+
+ :param pid: The pid of this StructuredOrderList. # noqa: E501
+ :type: str
+ """
+
+ self._pid = pid
+
+ @property
+ def lock_coin(self):
+ """Gets the lock_coin of this StructuredOrderList. # noqa: E501
+
+ Locked coin # noqa: E501
+
+ :return: The lock_coin of this StructuredOrderList. # noqa: E501
+ :rtype: str
+ """
+ return self._lock_coin
+
+ @lock_coin.setter
+ def lock_coin(self, lock_coin):
+ """Sets the lock_coin of this StructuredOrderList.
+
+ Locked coin # noqa: E501
+
+ :param lock_coin: The lock_coin of this StructuredOrderList. # noqa: E501
+ :type: str
+ """
+
+ self._lock_coin = lock_coin
+
+ @property
+ def amount(self):
+ """Gets the amount of this StructuredOrderList. # noqa: E501
+
+ Locked amount # noqa: E501
+
+ :return: The amount of this StructuredOrderList. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this StructuredOrderList.
+
+ Locked amount # noqa: E501
+
+ :param amount: The amount of this StructuredOrderList. # noqa: E501
+ :type: str
+ """
+
+ self._amount = amount
+
+ @property
+ def status(self):
+ """Gets the status of this StructuredOrderList. # noqa: E501
+
+ Status: SUCCESS - SUCCESS FAILED - FAILED DONE - DONE # noqa: E501
+
+ :return: The status of this StructuredOrderList. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this StructuredOrderList.
+
+ Status: SUCCESS - SUCCESS FAILED - FAILED DONE - DONE # noqa: E501
+
+ :param status: The status of this StructuredOrderList. # noqa: E501
+ :type: str
+ """
+
+ self._status = status
+
+ @property
+ def income(self):
+ """Gets the income of this StructuredOrderList. # noqa: E501
+
+ Income # noqa: E501
+
+ :return: The income of this StructuredOrderList. # noqa: E501
+ :rtype: str
+ """
+ return self._income
+
+ @income.setter
+ def income(self, income):
+ """Sets the income of this StructuredOrderList.
+
+ Income # noqa: E501
+
+ :param income: The income of this StructuredOrderList. # noqa: E501
+ :type: str
+ """
+
+ self._income = income
+
+ @property
+ def create_time(self):
+ """Gets the create_time of this StructuredOrderList. # noqa: E501
+
+ Created time # noqa: E501
+
+ :return: The create_time of this StructuredOrderList. # noqa: E501
+ :rtype: int
+ """
+ return self._create_time
+
+ @create_time.setter
+ def create_time(self, create_time):
+ """Sets the create_time of this StructuredOrderList.
+
+ Created time # noqa: E501
+
+ :param create_time: The create_time of this StructuredOrderList. # noqa: E501
+ :type: int
+ """
+
+ self._create_time = create_time
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, StructuredOrderList):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, StructuredOrderList):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/sub_account.py b/gate_api/models/sub_account.py
index 8786fdc..ad8b79e 100644
--- a/gate_api/models/sub_account.py
+++ b/gate_api/models/sub_account.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -40,7 +40,7 @@ class SubAccount(object):
'state': 'int',
'type': 'int',
'user_id': 'int',
- 'create_time': 'int',
+ 'create_time': 'int'
}
attribute_map = {
@@ -51,21 +51,10 @@ class SubAccount(object):
'state': 'state',
'type': 'type',
'user_id': 'user_id',
- 'create_time': 'create_time',
+ 'create_time': 'create_time'
}
- def __init__(
- self,
- remark=None,
- login_name=None,
- password=None,
- email=None,
- state=None,
- type=None,
- user_id=None,
- create_time=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, remark=None, login_name=None, password=None, email=None, state=None, type=None, user_id=None, create_time=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, int, int, int, int, Configuration) -> None
"""SubAccount - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -102,7 +91,7 @@ def __init__(
def remark(self):
"""Gets the remark of this SubAccount. # noqa: E501
- custom text # noqa: E501
+ Remark # noqa: E501
:return: The remark of this SubAccount. # noqa: E501
:rtype: str
@@ -113,7 +102,7 @@ def remark(self):
def remark(self, remark):
"""Sets the remark of this SubAccount.
- custom text # noqa: E501
+ Remark # noqa: E501
:param remark: The remark of this SubAccount. # noqa: E501
:type: str
@@ -125,7 +114,7 @@ def remark(self, remark):
def login_name(self):
"""Gets the login_name of this SubAccount. # noqa: E501
- Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters # noqa: E501
+ Sub-account login name: Only letters, numbers and underscores are supported, cannot contain other invalid characters # noqa: E501
:return: The login_name of this SubAccount. # noqa: E501
:rtype: str
@@ -136,7 +125,7 @@ def login_name(self):
def login_name(self, login_name):
"""Sets the login_name of this SubAccount.
- Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters # noqa: E501
+ Sub-account login name: Only letters, numbers and underscores are supported, cannot contain other invalid characters # noqa: E501
:param login_name: The login_name of this SubAccount. # noqa: E501
:type: str
@@ -196,7 +185,7 @@ def email(self, email):
def state(self):
"""Gets the state of this SubAccount. # noqa: E501
- State: 1-normal, 2-locked\" # noqa: E501
+ Sub-account status: 1-normal, 2-locked # noqa: E501
:return: The state of this SubAccount. # noqa: E501
:rtype: int
@@ -207,7 +196,7 @@ def state(self):
def state(self, state):
"""Sets the state of this SubAccount.
- State: 1-normal, 2-locked\" # noqa: E501
+ Sub-account status: 1-normal, 2-locked # noqa: E501
:param state: The state of this SubAccount. # noqa: E501
:type: int
@@ -219,7 +208,7 @@ def state(self, state):
def type(self):
"""Gets the type of this SubAccount. # noqa: E501
- \"Sub-account type: 1 - sub-account, 3 - cross margin account # noqa: E501
+ Sub-account type: 1-Regular sub-account, 3-Cross margin sub-account # noqa: E501
:return: The type of this SubAccount. # noqa: E501
:rtype: int
@@ -230,7 +219,7 @@ def type(self):
def type(self, type):
"""Sets the type of this SubAccount.
- \"Sub-account type: 1 - sub-account, 3 - cross margin account # noqa: E501
+ Sub-account type: 1-Regular sub-account, 3-Cross margin sub-account # noqa: E501
:param type: The type of this SubAccount. # noqa: E501
:type: int
@@ -242,7 +231,7 @@ def type(self, type):
def user_id(self):
"""Gets the user_id of this SubAccount. # noqa: E501
- The user id of the sub-account # noqa: E501
+ Sub-account user ID # noqa: E501
:return: The user_id of this SubAccount. # noqa: E501
:rtype: int
@@ -253,7 +242,7 @@ def user_id(self):
def user_id(self, user_id):
"""Sets the user_id of this SubAccount.
- The user id of the sub-account # noqa: E501
+ Sub-account user ID # noqa: E501
:param user_id: The user_id of this SubAccount. # noqa: E501
:type: int
@@ -291,16 +280,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/sub_account_balance.py b/gate_api/models/sub_account_balance.py
index 0c3c630..7af2fb8 100644
--- a/gate_api/models/sub_account_balance.py
+++ b/gate_api/models/sub_account_balance.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class SubAccountBalance(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'uid': 'str', 'available': 'dict(str, str)'}
+ openapi_types = {
+ 'uid': 'str',
+ 'available': 'dict(str, str)'
+ }
- attribute_map = {'uid': 'uid', 'available': 'available'}
+ attribute_map = {
+ 'uid': 'uid',
+ 'available': 'available'
+ }
def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501
# type: (str, dict(str, str), Configuration) -> None
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/sub_account_cross_margin_balance.py b/gate_api/models/sub_account_cross_margin_balance.py
index d115300..524294f 100644
--- a/gate_api/models/sub_account_cross_margin_balance.py
+++ b/gate_api/models/sub_account_cross_margin_balance.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class SubAccountCrossMarginBalance(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'uid': 'str', 'available': 'SubCrossMarginAccount'}
+ openapi_types = {
+ 'uid': 'str',
+ 'available': 'SubCrossMarginAccount'
+ }
- attribute_map = {'uid': 'uid', 'available': 'available'}
+ attribute_map = {
+ 'uid': 'uid',
+ 'available': 'available'
+ }
def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501
# type: (str, SubCrossMarginAccount, Configuration) -> None
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/sub_account_futures_balance.py b/gate_api/models/sub_account_futures_balance.py
index d8b5e31..c499b88 100644
--- a/gate_api/models/sub_account_futures_balance.py
+++ b/gate_api/models/sub_account_futures_balance.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class SubAccountFuturesBalance(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'uid': 'str', 'available': 'dict(str, FuturesAccount)'}
+ openapi_types = {
+ 'uid': 'str',
+ 'available': 'dict(str, FuturesAccount)'
+ }
- attribute_map = {'uid': 'uid', 'available': 'available'}
+ attribute_map = {
+ 'uid': 'uid',
+ 'available': 'available'
+ }
def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501
# type: (str, dict(str, FuturesAccount), Configuration) -> None
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/sub_account_key.py b/gate_api/models/sub_account_key.py
index 58b35c8..c644eb6 100644
--- a/gate_api/models/sub_account_key.py
+++ b/gate_api/models/sub_account_key.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -33,15 +33,16 @@ class SubAccountKey(object):
and the value is json key in definition.
"""
openapi_types = {
- 'user_id': 'str',
+ 'user_id': 'int',
'mode': 'int',
'name': 'str',
- 'perms': 'list[ApiV4KeyPerm]',
+ 'perms': 'list[SubAccountKeyPerms]',
'ip_whitelist': 'list[str]',
'key': 'str',
'state': 'int',
- 'created_at': 'str',
- 'updated_at': 'str',
+ 'created_at': 'int',
+ 'updated_at': 'int',
+ 'last_access': 'int'
}
attribute_map = {
@@ -54,22 +55,11 @@ class SubAccountKey(object):
'state': 'state',
'created_at': 'created_at',
'updated_at': 'updated_at',
+ 'last_access': 'last_access'
}
- def __init__(
- self,
- user_id=None,
- mode=None,
- name=None,
- perms=None,
- ip_whitelist=None,
- key=None,
- state=None,
- created_at=None,
- updated_at=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, int, str, list[ApiV4KeyPerm], list[str], str, int, str, str, Configuration) -> None
+ def __init__(self, user_id=None, mode=None, name=None, perms=None, ip_whitelist=None, key=None, state=None, created_at=None, updated_at=None, last_access=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, int, str, list[SubAccountKeyPerms], list[str], str, int, int, int, int, Configuration) -> None
"""SubAccountKey - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -84,6 +74,7 @@ def __init__(
self._state = None
self._created_at = None
self._updated_at = None
+ self._last_access = None
self.discriminator = None
if user_id is not None:
@@ -104,6 +95,8 @@ def __init__(
self.created_at = created_at
if updated_at is not None:
self.updated_at = updated_at
+ if last_access is not None:
+ self.last_access = last_access
@property
def user_id(self):
@@ -112,7 +105,7 @@ def user_id(self):
User ID # noqa: E501
:return: The user_id of this SubAccountKey. # noqa: E501
- :rtype: str
+ :rtype: int
"""
return self._user_id
@@ -123,7 +116,7 @@ def user_id(self, user_id):
User ID # noqa: E501
:param user_id: The user_id of this SubAccountKey. # noqa: E501
- :type: str
+ :type: int
"""
self._user_id = user_id
@@ -155,7 +148,7 @@ def mode(self, mode):
def name(self):
"""Gets the name of this SubAccountKey. # noqa: E501
- API key name # noqa: E501
+ API Key Name # noqa: E501
:return: The name of this SubAccountKey. # noqa: E501
:rtype: str
@@ -166,7 +159,7 @@ def name(self):
def name(self, name):
"""Sets the name of this SubAccountKey.
- API key name # noqa: E501
+ API Key Name # noqa: E501
:param name: The name of this SubAccountKey. # noqa: E501
:type: str
@@ -180,7 +173,7 @@ def perms(self):
:return: The perms of this SubAccountKey. # noqa: E501
- :rtype: list[ApiV4KeyPerm]
+ :rtype: list[SubAccountKeyPerms]
"""
return self._perms
@@ -190,7 +183,7 @@ def perms(self, perms):
:param perms: The perms of this SubAccountKey. # noqa: E501
- :type: list[ApiV4KeyPerm]
+ :type: list[SubAccountKeyPerms]
"""
self._perms = perms
@@ -199,7 +192,7 @@ def perms(self, perms):
def ip_whitelist(self):
"""Gets the ip_whitelist of this SubAccountKey. # noqa: E501
- ip white list (list will be removed if no value is passed) # noqa: E501
+ IP whitelist (list will be cleared if no value is passed) # noqa: E501
:return: The ip_whitelist of this SubAccountKey. # noqa: E501
:rtype: list[str]
@@ -210,7 +203,7 @@ def ip_whitelist(self):
def ip_whitelist(self, ip_whitelist):
"""Sets the ip_whitelist of this SubAccountKey.
- ip white list (list will be removed if no value is passed) # noqa: E501
+ IP whitelist (list will be cleared if no value is passed) # noqa: E501
:param ip_whitelist: The ip_whitelist of this SubAccountKey. # noqa: E501
:type: list[str]
@@ -245,7 +238,7 @@ def key(self, key):
def state(self):
"""Gets the state of this SubAccountKey. # noqa: E501
- State 1 - normal 2 - locked 3 - frozen # noqa: E501
+ Status: 1-Normal 2-Frozen 3-Locked # noqa: E501
:return: The state of this SubAccountKey. # noqa: E501
:rtype: int
@@ -256,7 +249,7 @@ def state(self):
def state(self, state):
"""Sets the state of this SubAccountKey.
- State 1 - normal 2 - locked 3 - frozen # noqa: E501
+ Status: 1-Normal 2-Frozen 3-Locked # noqa: E501
:param state: The state of this SubAccountKey. # noqa: E501
:type: int
@@ -268,10 +261,10 @@ def state(self, state):
def created_at(self):
"""Gets the created_at of this SubAccountKey. # noqa: E501
- Creation time # noqa: E501
+ Created time # noqa: E501
:return: The created_at of this SubAccountKey. # noqa: E501
- :rtype: str
+ :rtype: int
"""
return self._created_at
@@ -279,10 +272,10 @@ def created_at(self):
def created_at(self, created_at):
"""Sets the created_at of this SubAccountKey.
- Creation time # noqa: E501
+ Created time # noqa: E501
:param created_at: The created_at of this SubAccountKey. # noqa: E501
- :type: str
+ :type: int
"""
self._created_at = created_at
@@ -291,10 +284,10 @@ def created_at(self, created_at):
def updated_at(self):
"""Gets the updated_at of this SubAccountKey. # noqa: E501
- Last update time # noqa: E501
+ Last Update Time # noqa: E501
:return: The updated_at of this SubAccountKey. # noqa: E501
- :rtype: str
+ :rtype: int
"""
return self._updated_at
@@ -302,14 +295,37 @@ def updated_at(self):
def updated_at(self, updated_at):
"""Sets the updated_at of this SubAccountKey.
- Last update time # noqa: E501
+ Last Update Time # noqa: E501
:param updated_at: The updated_at of this SubAccountKey. # noqa: E501
- :type: str
+ :type: int
"""
self._updated_at = updated_at
+ @property
+ def last_access(self):
+ """Gets the last_access of this SubAccountKey. # noqa: E501
+
+ Last Access Time # noqa: E501
+
+ :return: The last_access of this SubAccountKey. # noqa: E501
+ :rtype: int
+ """
+ return self._last_access
+
+ @last_access.setter
+ def last_access(self, last_access):
+ """Sets the last_access of this SubAccountKey.
+
+ Last Access Time # noqa: E501
+
+ :param last_access: The last_access of this SubAccountKey. # noqa: E501
+ :type: int
+ """
+
+ self._last_access = last_access
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -317,16 +333,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/api_v4_key_perm.py b/gate_api/models/sub_account_key_perms.py
similarity index 52%
rename from gate_api/models/api_v4_key_perm.py
rename to gate_api/models/sub_account_key_perms.py
index 4e09c7f..fa9a9f3 100644
--- a/gate_api/models/api_v4_key_perm.py
+++ b/gate_api/models/sub_account_key_perms.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@
from gate_api.configuration import Configuration
-class ApiV4KeyPerm(object):
+class SubAccountKeyPerms(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -32,13 +32,19 @@ class ApiV4KeyPerm(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'name': 'str', 'read_only': 'bool'}
+ openapi_types = {
+ 'name': 'str',
+ 'read_only': 'bool'
+ }
- attribute_map = {'name': 'name', 'read_only': 'read_only'}
+ attribute_map = {
+ 'name': 'name',
+ 'read_only': 'read_only'
+ }
def __init__(self, name=None, read_only=None, local_vars_configuration=None): # noqa: E501
# type: (str, bool, Configuration) -> None
- """ApiV4KeyPerm - a model defined in OpenAPI""" # noqa: E501
+ """SubAccountKeyPerms - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -54,50 +60,45 @@ def __init__(self, name=None, read_only=None, local_vars_configuration=None): #
@property
def name(self):
- """Gets the name of this ApiV4KeyPerm. # noqa: E501
+ """Gets the name of this SubAccountKeyPerms. # noqa: E501
- 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 # noqa: E501
+ Permission function name (no value will be cleared) - wallet: wallet - spot: spot/margin - futures: perpetual contract - delivery: delivery contract - earn: earn - custody: custody - options: options - account: account information - loan: lending - margin: margin - unified: unified account - copy: copy trading # noqa: E501
- :return: The name of this ApiV4KeyPerm. # noqa: E501
+ :return: The name of this SubAccountKeyPerms. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
- """Sets the name of this ApiV4KeyPerm.
+ """Sets the name of this SubAccountKeyPerms.
- 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 # noqa: E501
+ Permission function name (no value will be cleared) - wallet: wallet - spot: spot/margin - futures: perpetual contract - delivery: delivery contract - earn: earn - custody: custody - options: options - account: account information - loan: lending - margin: margin - unified: unified account - copy: copy trading # noqa: E501
- :param name: The name of this ApiV4KeyPerm. # noqa: E501
+ :param name: The name of this SubAccountKeyPerms. # noqa: E501
:type: str
"""
- allowed_values = ["wallet", "spot", "futures", "delivery", "earn", "options"] # noqa: E501
- if self.local_vars_configuration.client_side_validation and name not in allowed_values: # noqa: E501
- raise ValueError(
- "Invalid value for `name` ({0}), must be one of {1}".format(name, allowed_values) # noqa: E501
- )
self._name = name
@property
def read_only(self):
- """Gets the read_only of this ApiV4KeyPerm. # noqa: E501
+ """Gets the read_only of this SubAccountKeyPerms. # noqa: E501
- read only # noqa: E501
+ Read Only # noqa: E501
- :return: The read_only of this ApiV4KeyPerm. # noqa: E501
+ :return: The read_only of this SubAccountKeyPerms. # noqa: E501
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
- """Sets the read_only of this ApiV4KeyPerm.
+ """Sets the read_only of this SubAccountKeyPerms.
- read only # noqa: E501
+ Read Only # noqa: E501
- :param read_only: The read_only of this ApiV4KeyPerm. # noqa: E501
+ :param read_only: The read_only of this SubAccountKeyPerms. # noqa: E501
:type: bool
"""
@@ -110,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
@@ -135,14 +138,14 @@ def __repr__(self):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, ApiV4KeyPerm):
+ if not isinstance(other, SubAccountKeyPerms):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, ApiV4KeyPerm):
+ if not isinstance(other, SubAccountKeyPerms):
return True
return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/sub_account_margin_balance.py b/gate_api/models/sub_account_margin_balance.py
index fa81b18..22d8025 100644
--- a/gate_api/models/sub_account_margin_balance.py
+++ b/gate_api/models/sub_account_margin_balance.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class SubAccountMarginBalance(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'uid': 'str', 'available': 'list[MarginAccount]'}
+ openapi_types = {
+ 'uid': 'str',
+ 'available': 'list[MarginAccount]'
+ }
- attribute_map = {'uid': 'uid', 'available': 'available'}
+ attribute_map = {
+ 'uid': 'uid',
+ 'available': 'available'
+ }
def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501
# type: (str, list[MarginAccount], Configuration) -> None
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/sub_account_to_sub_account.py b/gate_api/models/sub_account_to_sub_account.py
index b343762..c082521 100644
--- a/gate_api/models/sub_account_to_sub_account.py
+++ b/gate_api/models/sub_account_to_sub_account.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -39,7 +39,7 @@ class SubAccountToSubAccount(object):
'sub_account_from_type': 'str',
'sub_account_to': 'str',
'sub_account_to_type': 'str',
- 'amount': 'str',
+ 'amount': 'str'
}
attribute_map = {
@@ -49,20 +49,10 @@ class SubAccountToSubAccount(object):
'sub_account_from_type': 'sub_account_from_type',
'sub_account_to': 'sub_account_to',
'sub_account_to_type': 'sub_account_to_type',
- 'amount': 'amount',
+ 'amount': 'amount'
}
- def __init__(
- self,
- currency=None,
- sub_account_type=None,
- sub_account_from=None,
- sub_account_from_type=None,
- sub_account_to=None,
- sub_account_to_type=None,
- amount=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, currency=None, sub_account_type=None, sub_account_from=None, sub_account_from_type=None, sub_account_to=None, sub_account_to_type=None, amount=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, str, str, str, Configuration) -> None
"""SubAccountToSubAccount - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -116,7 +106,7 @@ def currency(self, currency):
def sub_account_type(self):
"""Gets the sub_account_type of this SubAccountToSubAccount. # noqa: E501
- Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) # noqa: E501
+ Transfer from account (deprecated, use `sub_account_from_type` and `sub_account_to_type` instead) # noqa: E501
:return: The sub_account_type of this SubAccountToSubAccount. # noqa: E501
:rtype: str
@@ -127,7 +117,7 @@ def sub_account_type(self):
def sub_account_type(self, sub_account_type):
"""Sets the sub_account_type of this SubAccountToSubAccount.
- Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) # noqa: E501
+ Transfer from account (deprecated, use `sub_account_from_type` and `sub_account_to_type` instead) # noqa: E501
:param sub_account_type: The sub_account_type of this SubAccountToSubAccount. # noqa: E501
:type: str
@@ -164,7 +154,7 @@ def sub_account_from(self, sub_account_from):
def sub_account_from_type(self):
"""Gets the sub_account_from_type of this SubAccountToSubAccount. # noqa: E501
- Transfer from the account. `spot` - spot account, `futures` - perpetual contract account, `cross_margin` - cross margin account # noqa: E501
+ Source sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501
:return: The sub_account_from_type of this SubAccountToSubAccount. # noqa: E501
:rtype: str
@@ -175,22 +165,13 @@ def sub_account_from_type(self):
def sub_account_from_type(self, sub_account_from_type):
"""Sets the sub_account_from_type of this SubAccountToSubAccount.
- Transfer from the account. `spot` - spot account, `futures` - perpetual contract account, `cross_margin` - cross margin account # noqa: E501
+ Source sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501
:param sub_account_from_type: The sub_account_from_type of this SubAccountToSubAccount. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and sub_account_from_type is None: # noqa: E501
raise ValueError("Invalid value for `sub_account_from_type`, must not be `None`") # noqa: E501
- allowed_values = ["spot", "futures", "cross_margin"] # noqa: E501
- if (
- self.local_vars_configuration.client_side_validation and sub_account_from_type not in allowed_values
- ): # noqa: E501
- raise ValueError(
- "Invalid value for `sub_account_from_type` ({0}), must be one of {1}".format( # noqa: E501
- sub_account_from_type, allowed_values
- )
- )
self._sub_account_from_type = sub_account_from_type
@@ -223,7 +204,7 @@ def sub_account_to(self, sub_account_to):
def sub_account_to_type(self):
"""Gets the sub_account_to_type of this SubAccountToSubAccount. # noqa: E501
- Transfer to the account. `spot` - spot account, `futures` - perpetual contract account, `cross_margin` - cross margin account # noqa: E501
+ Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501
:return: The sub_account_to_type of this SubAccountToSubAccount. # noqa: E501
:rtype: str
@@ -234,22 +215,13 @@ def sub_account_to_type(self):
def sub_account_to_type(self, sub_account_to_type):
"""Sets the sub_account_to_type of this SubAccountToSubAccount.
- Transfer to the account. `spot` - spot account, `futures` - perpetual contract account, `cross_margin` - cross margin account # noqa: E501
+ Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501
:param sub_account_to_type: The sub_account_to_type of this SubAccountToSubAccount. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and sub_account_to_type is None: # noqa: E501
raise ValueError("Invalid value for `sub_account_to_type`, must not be `None`") # noqa: E501
- allowed_values = ["spot", "futures", "cross_margin"] # noqa: E501
- if (
- self.local_vars_configuration.client_side_validation and sub_account_to_type not in allowed_values
- ): # noqa: E501
- raise ValueError(
- "Invalid value for `sub_account_to_type` ({0}), must be one of {1}".format( # noqa: E501
- sub_account_to_type, allowed_values
- )
- )
self._sub_account_to_type = sub_account_to_type
@@ -285,16 +257,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/sub_account_transfer.py b/gate_api/models/sub_account_transfer.py
index 6e4b2ed..9ab7c79 100644
--- a/gate_api/models/sub_account_transfer.py
+++ b/gate_api/models/sub_account_transfer.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -33,98 +33,46 @@ class SubAccountTransfer(object):
and the value is json key in definition.
"""
openapi_types = {
- 'currency': 'str',
'sub_account': 'str',
- 'direction': 'str',
- 'amount': 'str',
- 'uid': 'str',
- 'client_order_id': 'str',
- 'timest': 'str',
- 'source': 'str',
'sub_account_type': 'str',
+ 'currency': 'str',
+ 'amount': 'str',
+ 'direction': 'str',
+ 'client_order_id': 'str'
}
attribute_map = {
- 'currency': 'currency',
'sub_account': 'sub_account',
- 'direction': 'direction',
- 'amount': 'amount',
- 'uid': 'uid',
- 'client_order_id': 'client_order_id',
- 'timest': 'timest',
- 'source': 'source',
'sub_account_type': 'sub_account_type',
+ 'currency': 'currency',
+ 'amount': 'amount',
+ 'direction': 'direction',
+ 'client_order_id': 'client_order_id'
}
- def __init__(
- self,
- currency=None,
- sub_account=None,
- direction=None,
- amount=None,
- uid=None,
- client_order_id=None,
- timest=None,
- source=None,
- sub_account_type='spot',
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, str, str, Configuration) -> None
+ def __init__(self, sub_account=None, sub_account_type='spot', currency=None, amount=None, direction=None, client_order_id=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, Configuration) -> None
"""SubAccountTransfer - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
- self._currency = None
self._sub_account = None
- self._direction = None
+ self._sub_account_type = None
+ self._currency = None
self._amount = None
- self._uid = None
+ self._direction = None
self._client_order_id = None
- self._timest = None
- self._source = None
- self._sub_account_type = None
self.discriminator = None
- self.currency = currency
self.sub_account = sub_account
- self.direction = direction
+ if sub_account_type is not None:
+ self.sub_account_type = sub_account_type
+ self.currency = currency
self.amount = amount
- if uid is not None:
- self.uid = uid
+ self.direction = direction
if client_order_id is not None:
self.client_order_id = client_order_id
- if timest is not None:
- self.timest = timest
- if source is not None:
- self.source = source
- if sub_account_type is not None:
- self.sub_account_type = sub_account_type
-
- @property
- def currency(self):
- """Gets the currency of this SubAccountTransfer. # noqa: E501
-
- Transfer currency name # noqa: E501
-
- :return: The currency of this SubAccountTransfer. # noqa: E501
- :rtype: str
- """
- return self._currency
-
- @currency.setter
- def currency(self, currency):
- """Sets the currency of this SubAccountTransfer.
-
- Transfer currency name # noqa: E501
-
- :param currency: The currency of this SubAccountTransfer. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501
- raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501
-
- self._currency = currency
@property
def sub_account(self):
@@ -152,36 +100,52 @@ def sub_account(self, sub_account):
self._sub_account = sub_account
@property
- def direction(self):
- """Gets the direction of this SubAccountTransfer. # noqa: E501
+ def sub_account_type(self):
+ """Gets the sub_account_type of this SubAccountTransfer. # noqa: E501
- Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501
+ Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account, options - options account # noqa: E501
- :return: The direction of this SubAccountTransfer. # noqa: E501
+ :return: The sub_account_type of this SubAccountTransfer. # noqa: E501
:rtype: str
"""
- return self._direction
+ return self._sub_account_type
- @direction.setter
- def direction(self, direction):
- """Sets the direction of this SubAccountTransfer.
+ @sub_account_type.setter
+ def sub_account_type(self, sub_account_type):
+ """Sets the sub_account_type of this SubAccountTransfer.
- Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501
+ Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account, options - options account # noqa: E501
- :param direction: The direction of this SubAccountTransfer. # noqa: E501
+ :param sub_account_type: The sub_account_type of this SubAccountTransfer. # noqa: E501
:type: str
"""
- if self.local_vars_configuration.client_side_validation and direction is None: # noqa: E501
- raise ValueError("Invalid value for `direction`, must not be `None`") # noqa: E501
- allowed_values = ["to", "from"] # noqa: E501
- if self.local_vars_configuration.client_side_validation and direction not in allowed_values: # noqa: E501
- raise ValueError(
- "Invalid value for `direction` ({0}), must be one of {1}".format( # noqa: E501
- direction, allowed_values
- )
- )
- self._direction = direction
+ self._sub_account_type = sub_account_type
+
+ @property
+ def currency(self):
+ """Gets the currency of this SubAccountTransfer. # noqa: E501
+
+ Transfer currency name # noqa: E501
+
+ :return: The currency of this SubAccountTransfer. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this SubAccountTransfer.
+
+ Transfer currency name # noqa: E501
+
+ :param currency: The currency of this SubAccountTransfer. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501
+ raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501
+
+ self._currency = currency
@property
def amount(self):
@@ -209,33 +173,35 @@ def amount(self, amount):
self._amount = amount
@property
- def uid(self):
- """Gets the uid of this SubAccountTransfer. # noqa: E501
+ def direction(self):
+ """Gets the direction of this SubAccountTransfer. # noqa: E501
- Main account user ID # noqa: E501
+ Transfer direction: to - transfer into sub-account, from - transfer out from sub-account # noqa: E501
- :return: The uid of this SubAccountTransfer. # noqa: E501
+ :return: The direction of this SubAccountTransfer. # noqa: E501
:rtype: str
"""
- return self._uid
+ return self._direction
- @uid.setter
- def uid(self, uid):
- """Sets the uid of this SubAccountTransfer.
+ @direction.setter
+ def direction(self, direction):
+ """Sets the direction of this SubAccountTransfer.
- Main account user ID # noqa: E501
+ Transfer direction: to - transfer into sub-account, from - transfer out from sub-account # noqa: E501
- :param uid: The uid of this SubAccountTransfer. # noqa: E501
+ :param direction: The direction of this SubAccountTransfer. # noqa: E501
:type: str
"""
+ if self.local_vars_configuration.client_side_validation and direction is None: # noqa: E501
+ raise ValueError("Invalid value for `direction`, must not be `None`") # noqa: E501
- self._uid = uid
+ self._direction = direction
@property
def client_order_id(self):
"""Gets the client_order_id of this SubAccountTransfer. # noqa: E501
- The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501
+ Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters # noqa: E501
:return: The client_order_id of this SubAccountTransfer. # noqa: E501
:rtype: str
@@ -246,7 +212,7 @@ def client_order_id(self):
def client_order_id(self, client_order_id):
"""Sets the client_order_id of this SubAccountTransfer.
- The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501
+ Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters # noqa: E501
:param client_order_id: The client_order_id of this SubAccountTransfer. # noqa: E501
:type: str
@@ -254,84 +220,6 @@ def client_order_id(self, client_order_id):
self._client_order_id = client_order_id
- @property
- def timest(self):
- """Gets the timest of this SubAccountTransfer. # noqa: E501
-
- Transfer timestamp # noqa: E501
-
- :return: The timest of this SubAccountTransfer. # noqa: E501
- :rtype: str
- """
- return self._timest
-
- @timest.setter
- def timest(self, timest):
- """Sets the timest of this SubAccountTransfer.
-
- Transfer timestamp # noqa: E501
-
- :param timest: The timest of this SubAccountTransfer. # noqa: E501
- :type: str
- """
-
- self._timest = timest
-
- @property
- def source(self):
- """Gets the source of this SubAccountTransfer. # noqa: E501
-
- Where the operation is initiated from # noqa: E501
-
- :return: The source of this SubAccountTransfer. # noqa: E501
- :rtype: str
- """
- return self._source
-
- @source.setter
- def source(self, source):
- """Sets the source of this SubAccountTransfer.
-
- Where the operation is initiated from # noqa: E501
-
- :param source: The source of this SubAccountTransfer. # noqa: E501
- :type: str
- """
-
- self._source = source
-
- @property
- def sub_account_type(self):
- """Gets the sub_account_type of this SubAccountTransfer. # noqa: E501
-
- Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `cross_margin` - cross margin account, `delivery` - delivery account # noqa: E501
-
- :return: The sub_account_type of this SubAccountTransfer. # noqa: E501
- :rtype: str
- """
- return self._sub_account_type
-
- @sub_account_type.setter
- def sub_account_type(self, sub_account_type):
- """Sets the sub_account_type of this SubAccountTransfer.
-
- Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `cross_margin` - cross margin account, `delivery` - delivery account # noqa: E501
-
- :param sub_account_type: The sub_account_type of this SubAccountTransfer. # noqa: E501
- :type: str
- """
- allowed_values = ["spot", "futures", "cross_margin", "delivery"] # noqa: E501
- if (
- self.local_vars_configuration.client_side_validation and sub_account_type not in allowed_values
- ): # noqa: E501
- raise ValueError(
- "Invalid value for `sub_account_type` ({0}), must be one of {1}".format( # noqa: E501
- sub_account_type, allowed_values
- )
- )
-
- self._sub_account_type = sub_account_type
-
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -339,16 +227,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/sub_account_transfer_record_item.py b/gate_api/models/sub_account_transfer_record_item.py
new file mode 100644
index 0000000..650a595
--- /dev/null
+++ b/gate_api/models/sub_account_transfer_record_item.py
@@ -0,0 +1,379 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class SubAccountTransferRecordItem(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'timest': 'str',
+ 'uid': 'str',
+ 'sub_account': 'str',
+ 'sub_account_type': 'str',
+ 'currency': 'str',
+ 'amount': 'str',
+ 'direction': 'str',
+ 'source': 'str',
+ 'client_order_id': 'str',
+ 'status': 'str'
+ }
+
+ attribute_map = {
+ 'timest': 'timest',
+ 'uid': 'uid',
+ 'sub_account': 'sub_account',
+ 'sub_account_type': 'sub_account_type',
+ 'currency': 'currency',
+ 'amount': 'amount',
+ 'direction': 'direction',
+ 'source': 'source',
+ 'client_order_id': 'client_order_id',
+ 'status': 'status'
+ }
+
+ def __init__(self, timest=None, uid=None, sub_account=None, sub_account_type='spot', currency=None, amount=None, direction=None, source=None, client_order_id=None, status=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None
+ """SubAccountTransferRecordItem - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._timest = None
+ self._uid = None
+ self._sub_account = None
+ self._sub_account_type = None
+ self._currency = None
+ self._amount = None
+ self._direction = None
+ self._source = None
+ self._client_order_id = None
+ self._status = None
+ self.discriminator = None
+
+ if timest is not None:
+ self.timest = timest
+ if uid is not None:
+ self.uid = uid
+ self.sub_account = sub_account
+ if sub_account_type is not None:
+ self.sub_account_type = sub_account_type
+ self.currency = currency
+ self.amount = amount
+ self.direction = direction
+ if source is not None:
+ self.source = source
+ if client_order_id is not None:
+ self.client_order_id = client_order_id
+ if status is not None:
+ self.status = status
+
+ @property
+ def timest(self):
+ """Gets the timest of this SubAccountTransferRecordItem. # noqa: E501
+
+ Transfer timestamp # noqa: E501
+
+ :return: The timest of this SubAccountTransferRecordItem. # noqa: E501
+ :rtype: str
+ """
+ return self._timest
+
+ @timest.setter
+ def timest(self, timest):
+ """Sets the timest of this SubAccountTransferRecordItem.
+
+ Transfer timestamp # noqa: E501
+
+ :param timest: The timest of this SubAccountTransferRecordItem. # noqa: E501
+ :type: str
+ """
+
+ self._timest = timest
+
+ @property
+ def uid(self):
+ """Gets the uid of this SubAccountTransferRecordItem. # noqa: E501
+
+ Main account user ID # noqa: E501
+
+ :return: The uid of this SubAccountTransferRecordItem. # noqa: E501
+ :rtype: str
+ """
+ return self._uid
+
+ @uid.setter
+ def uid(self, uid):
+ """Sets the uid of this SubAccountTransferRecordItem.
+
+ Main account user ID # noqa: E501
+
+ :param uid: The uid of this SubAccountTransferRecordItem. # noqa: E501
+ :type: str
+ """
+
+ self._uid = uid
+
+ @property
+ def sub_account(self):
+ """Gets the sub_account of this SubAccountTransferRecordItem. # noqa: E501
+
+ Sub account user ID # noqa: E501
+
+ :return: The sub_account of this SubAccountTransferRecordItem. # noqa: E501
+ :rtype: str
+ """
+ return self._sub_account
+
+ @sub_account.setter
+ def sub_account(self, sub_account):
+ """Sets the sub_account of this SubAccountTransferRecordItem.
+
+ Sub account user ID # noqa: E501
+
+ :param sub_account: The sub_account of this SubAccountTransferRecordItem. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and sub_account is None: # noqa: E501
+ raise ValueError("Invalid value for `sub_account`, must not be `None`") # noqa: E501
+
+ self._sub_account = sub_account
+
+ @property
+ def sub_account_type(self):
+ """Gets the sub_account_type of this SubAccountTransferRecordItem. # noqa: E501
+
+ Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account, options - options account # noqa: E501
+
+ :return: The sub_account_type of this SubAccountTransferRecordItem. # noqa: E501
+ :rtype: str
+ """
+ return self._sub_account_type
+
+ @sub_account_type.setter
+ def sub_account_type(self, sub_account_type):
+ """Sets the sub_account_type of this SubAccountTransferRecordItem.
+
+ Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account, options - options account # noqa: E501
+
+ :param sub_account_type: The sub_account_type of this SubAccountTransferRecordItem. # noqa: E501
+ :type: str
+ """
+
+ self._sub_account_type = sub_account_type
+
+ @property
+ def currency(self):
+ """Gets the currency of this SubAccountTransferRecordItem. # noqa: E501
+
+ Transfer currency name # noqa: E501
+
+ :return: The currency of this SubAccountTransferRecordItem. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this SubAccountTransferRecordItem.
+
+ Transfer currency name # noqa: E501
+
+ :param currency: The currency of this SubAccountTransferRecordItem. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501
+ raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501
+
+ self._currency = currency
+
+ @property
+ def amount(self):
+ """Gets the amount of this SubAccountTransferRecordItem. # noqa: E501
+
+ Transfer amount # noqa: E501
+
+ :return: The amount of this SubAccountTransferRecordItem. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this SubAccountTransferRecordItem.
+
+ Transfer amount # noqa: E501
+
+ :param amount: The amount of this SubAccountTransferRecordItem. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501
+ raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501
+
+ self._amount = amount
+
+ @property
+ def direction(self):
+ """Gets the direction of this SubAccountTransferRecordItem. # noqa: E501
+
+ Transfer direction: to - transfer into sub-account, from - transfer out from sub-account # noqa: E501
+
+ :return: The direction of this SubAccountTransferRecordItem. # noqa: E501
+ :rtype: str
+ """
+ return self._direction
+
+ @direction.setter
+ def direction(self, direction):
+ """Sets the direction of this SubAccountTransferRecordItem.
+
+ Transfer direction: to - transfer into sub-account, from - transfer out from sub-account # noqa: E501
+
+ :param direction: The direction of this SubAccountTransferRecordItem. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and direction is None: # noqa: E501
+ raise ValueError("Invalid value for `direction`, must not be `None`") # noqa: E501
+
+ self._direction = direction
+
+ @property
+ def source(self):
+ """Gets the source of this SubAccountTransferRecordItem. # noqa: E501
+
+ Source of the transfer operation # noqa: E501
+
+ :return: The source of this SubAccountTransferRecordItem. # noqa: E501
+ :rtype: str
+ """
+ return self._source
+
+ @source.setter
+ def source(self, source):
+ """Sets the source of this SubAccountTransferRecordItem.
+
+ Source of the transfer operation # noqa: E501
+
+ :param source: The source of this SubAccountTransferRecordItem. # noqa: E501
+ :type: str
+ """
+
+ self._source = source
+
+ @property
+ def client_order_id(self):
+ """Gets the client_order_id of this SubAccountTransferRecordItem. # noqa: E501
+
+ Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters # noqa: E501
+
+ :return: The client_order_id of this SubAccountTransferRecordItem. # noqa: E501
+ :rtype: str
+ """
+ return self._client_order_id
+
+ @client_order_id.setter
+ def client_order_id(self, client_order_id):
+ """Sets the client_order_id of this SubAccountTransferRecordItem.
+
+ Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters # noqa: E501
+
+ :param client_order_id: The client_order_id of this SubAccountTransferRecordItem. # noqa: E501
+ :type: str
+ """
+
+ self._client_order_id = client_order_id
+
+ @property
+ def status(self):
+ """Gets the status of this SubAccountTransferRecordItem. # noqa: E501
+
+ Sub-account transfer record status, currently only 'success' # noqa: E501
+
+ :return: The status of this SubAccountTransferRecordItem. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this SubAccountTransferRecordItem.
+
+ Sub-account transfer record status, currently only 'success' # noqa: E501
+
+ :param status: The status of this SubAccountTransferRecordItem. # noqa: E501
+ :type: str
+ """
+
+ self._status = status
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, SubAccountTransferRecordItem):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, SubAccountTransferRecordItem):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/sub_cross_margin_account.py b/gate_api/models/sub_cross_margin_account.py
index da7b610..0e43bca 100644
--- a/gate_api/models/sub_cross_margin_account.py
+++ b/gate_api/models/sub_cross_margin_account.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -35,7 +35,7 @@ class SubCrossMarginAccount(object):
openapi_types = {
'user_id': 'int',
'locked': 'bool',
- 'balances': 'dict(str, CrossMarginBalance1)',
+ 'balances': 'dict(str, CrossMarginBalance)',
'total': 'str',
'borrowed': 'str',
'borrowed_net': 'str',
@@ -48,7 +48,7 @@ class SubCrossMarginAccount(object):
'total_maintenance_margin': 'str',
'total_initial_margin_rate': 'str',
'total_maintenance_margin_rate': 'str',
- 'total_available_margin': 'str',
+ 'total_available_margin': 'str'
}
attribute_map = {
@@ -67,30 +67,11 @@ class SubCrossMarginAccount(object):
'total_maintenance_margin': 'total_maintenance_margin',
'total_initial_margin_rate': 'total_initial_margin_rate',
'total_maintenance_margin_rate': 'total_maintenance_margin_rate',
- 'total_available_margin': 'total_available_margin',
+ 'total_available_margin': 'total_available_margin'
}
- def __init__(
- self,
- user_id=None,
- locked=None,
- balances=None,
- total=None,
- borrowed=None,
- borrowed_net=None,
- net=None,
- leverage=None,
- interest=None,
- risk=None,
- total_initial_margin=None,
- total_margin_balance=None,
- total_maintenance_margin=None,
- total_initial_margin_rate=None,
- total_maintenance_margin_rate=None,
- total_available_margin=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, bool, dict(str, CrossMarginBalance1), str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None
+ def __init__(self, user_id=None, locked=None, balances=None, total=None, borrowed=None, borrowed_net=None, net=None, leverage=None, interest=None, risk=None, total_initial_margin=None, total_margin_balance=None, total_maintenance_margin=None, total_initial_margin_rate=None, total_maintenance_margin_rate=None, total_available_margin=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, bool, dict(str, CrossMarginBalance), str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None
"""SubCrossMarginAccount - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -151,7 +132,7 @@ def __init__(
def user_id(self):
"""Gets the user_id of this SubCrossMarginAccount. # noqa: E501
- User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account # noqa: E501
+ Cross margin account user ID. 0 means this sub-account has not yet opened a cross margin account # noqa: E501
:return: The user_id of this SubCrossMarginAccount. # noqa: E501
:rtype: int
@@ -162,7 +143,7 @@ def user_id(self):
def user_id(self, user_id):
"""Sets the user_id of this SubCrossMarginAccount.
- User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account # noqa: E501
+ Cross margin account user ID. 0 means this sub-account has not yet opened a cross margin account # noqa: E501
:param user_id: The user_id of this SubCrossMarginAccount. # noqa: E501
:type: int
@@ -174,7 +155,7 @@ def user_id(self, user_id):
def locked(self):
"""Gets the locked of this SubCrossMarginAccount. # noqa: E501
- Whether account is locked # noqa: E501
+ Whether the account is locked # noqa: E501
:return: The locked of this SubCrossMarginAccount. # noqa: E501
:rtype: bool
@@ -185,7 +166,7 @@ def locked(self):
def locked(self, locked):
"""Sets the locked of this SubCrossMarginAccount.
- Whether account is locked # noqa: E501
+ Whether the account is locked # noqa: E501
:param locked: The locked of this SubCrossMarginAccount. # noqa: E501
:type: bool
@@ -199,7 +180,7 @@ def balances(self):
:return: The balances of this SubCrossMarginAccount. # noqa: E501
- :rtype: dict(str, CrossMarginBalance1)
+ :rtype: dict(str, CrossMarginBalance)
"""
return self._balances
@@ -209,7 +190,7 @@ def balances(self, balances):
:param balances: The balances of this SubCrossMarginAccount. # noqa: E501
- :type: dict(str, CrossMarginBalance1)
+ :type: dict(str, CrossMarginBalance)
"""
self._balances = balances
@@ -264,7 +245,7 @@ def borrowed(self, borrowed):
def borrowed_net(self):
"""Gets the borrowed_net of this SubCrossMarginAccount. # noqa: E501
- Total borrowed value in USDT * borrowed factor # noqa: E501
+ Total borrowed value in USDT * leverage factor # noqa: E501
:return: The borrowed_net of this SubCrossMarginAccount. # noqa: E501
:rtype: str
@@ -275,7 +256,7 @@ def borrowed_net(self):
def borrowed_net(self, borrowed_net):
"""Sets the borrowed_net of this SubCrossMarginAccount.
- Total borrowed value in USDT * borrowed factor # noqa: E501
+ Total borrowed value in USDT * leverage factor # noqa: E501
:param borrowed_net: The borrowed_net of this SubCrossMarginAccount. # noqa: E501
:type: str
@@ -333,7 +314,7 @@ def leverage(self, leverage):
def interest(self):
"""Gets the interest of this SubCrossMarginAccount. # noqa: E501
- Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501
+ Total unpaid interest in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501
:return: The interest of this SubCrossMarginAccount. # noqa: E501
:rtype: str
@@ -344,7 +325,7 @@ def interest(self):
def interest(self, interest):
"""Sets the interest of this SubCrossMarginAccount.
- Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501
+ Total unpaid interest in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501
:param interest: The interest of this SubCrossMarginAccount. # noqa: E501
:type: str
@@ -356,7 +337,7 @@ def interest(self, interest):
def risk(self):
"""Gets the risk of this SubCrossMarginAccount. # noqa: E501
- Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501
+ Risk rate. When it falls below 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501
:return: The risk of this SubCrossMarginAccount. # noqa: E501
:rtype: str
@@ -367,7 +348,7 @@ def risk(self):
def risk(self, risk):
"""Sets the risk of this SubCrossMarginAccount.
- Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501
+ Risk rate. When it falls below 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501
:param risk: The risk of this SubCrossMarginAccount. # noqa: E501
:type: str
@@ -520,16 +501,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/sub_user_mode.py b/gate_api/models/sub_user_mode.py
new file mode 100644
index 0000000..2c73505
--- /dev/null
+++ b/gate_api/models/sub_user_mode.py
@@ -0,0 +1,179 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class SubUserMode(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'user_id': 'int',
+ 'is_unified': 'bool',
+ 'mode': 'str'
+ }
+
+ attribute_map = {
+ 'user_id': 'user_id',
+ 'is_unified': 'is_unified',
+ 'mode': 'mode'
+ }
+
+ def __init__(self, user_id=None, is_unified=None, mode=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, bool, str, Configuration) -> None
+ """SubUserMode - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._user_id = None
+ self._is_unified = None
+ self._mode = None
+ self.discriminator = None
+
+ if user_id is not None:
+ self.user_id = user_id
+ if is_unified is not None:
+ self.is_unified = is_unified
+ if mode is not None:
+ self.mode = mode
+
+ @property
+ def user_id(self):
+ """Gets the user_id of this SubUserMode. # noqa: E501
+
+ User ID # noqa: E501
+
+ :return: The user_id of this SubUserMode. # noqa: E501
+ :rtype: int
+ """
+ return self._user_id
+
+ @user_id.setter
+ def user_id(self, user_id):
+ """Sets the user_id of this SubUserMode.
+
+ User ID # noqa: E501
+
+ :param user_id: The user_id of this SubUserMode. # noqa: E501
+ :type: int
+ """
+
+ self._user_id = user_id
+
+ @property
+ def is_unified(self):
+ """Gets the is_unified of this SubUserMode. # noqa: E501
+
+ Whether it is a unified account # noqa: E501
+
+ :return: The is_unified of this SubUserMode. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_unified
+
+ @is_unified.setter
+ def is_unified(self, is_unified):
+ """Sets the is_unified of this SubUserMode.
+
+ Whether it is a unified account # noqa: E501
+
+ :param is_unified: The is_unified of this SubUserMode. # noqa: E501
+ :type: bool
+ """
+
+ self._is_unified = is_unified
+
+ @property
+ def mode(self):
+ """Gets the mode of this SubUserMode. # noqa: E501
+
+ Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501
+
+ :return: The mode of this SubUserMode. # noqa: E501
+ :rtype: str
+ """
+ return self._mode
+
+ @mode.setter
+ def mode(self, mode):
+ """Sets the mode of this SubUserMode.
+
+ Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501
+
+ :param mode: The mode of this SubUserMode. # noqa: E501
+ :type: str
+ """
+
+ self._mode = mode
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, SubUserMode):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, SubUserMode):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/swap_coin.py b/gate_api/models/swap_coin.py
new file mode 100644
index 0000000..14d56e4
--- /dev/null
+++ b/gate_api/models/swap_coin.py
@@ -0,0 +1,210 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class SwapCoin(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'coin': 'str',
+ 'side': 'str',
+ 'amount': 'str',
+ 'pid': 'int'
+ }
+
+ attribute_map = {
+ 'coin': 'coin',
+ 'side': 'side',
+ 'amount': 'amount',
+ 'pid': 'pid'
+ }
+
+ def __init__(self, coin=None, side=None, amount=None, pid=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, int, Configuration) -> None
+ """SwapCoin - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._coin = None
+ self._side = None
+ self._amount = None
+ self._pid = None
+ self.discriminator = None
+
+ self.coin = coin
+ self.side = side
+ self.amount = amount
+ if pid is not None:
+ self.pid = pid
+
+ @property
+ def coin(self):
+ """Gets the coin of this SwapCoin. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The coin of this SwapCoin. # noqa: E501
+ :rtype: str
+ """
+ return self._coin
+
+ @coin.setter
+ def coin(self, coin):
+ """Sets the coin of this SwapCoin.
+
+ Currency # noqa: E501
+
+ :param coin: The coin of this SwapCoin. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and coin is None: # noqa: E501
+ raise ValueError("Invalid value for `coin`, must not be `None`") # noqa: E501
+
+ self._coin = coin
+
+ @property
+ def side(self):
+ """Gets the side of this SwapCoin. # noqa: E501
+
+ 0 - Stake 1 - Redeem # noqa: E501
+
+ :return: The side of this SwapCoin. # noqa: E501
+ :rtype: str
+ """
+ return self._side
+
+ @side.setter
+ def side(self, side):
+ """Sets the side of this SwapCoin.
+
+ 0 - Stake 1 - Redeem # noqa: E501
+
+ :param side: The side of this SwapCoin. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501
+ raise ValueError("Invalid value for `side`, must not be `None`") # noqa: E501
+
+ self._side = side
+
+ @property
+ def amount(self):
+ """Gets the amount of this SwapCoin. # noqa: E501
+
+ Size # noqa: E501
+
+ :return: The amount of this SwapCoin. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this SwapCoin.
+
+ Size # noqa: E501
+
+ :param amount: The amount of this SwapCoin. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501
+ raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501
+
+ self._amount = amount
+
+ @property
+ def pid(self):
+ """Gets the pid of this SwapCoin. # noqa: E501
+
+ DeFi-type Mining Protocol Identifier # noqa: E501
+
+ :return: The pid of this SwapCoin. # noqa: E501
+ :rtype: int
+ """
+ return self._pid
+
+ @pid.setter
+ def pid(self, pid):
+ """Sets the pid of this SwapCoin.
+
+ DeFi-type Mining Protocol Identifier # noqa: E501
+
+ :param pid: The pid of this SwapCoin. # noqa: E501
+ :type: int
+ """
+
+ self._pid = pid
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, SwapCoin):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, SwapCoin):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/swap_coin_struct.py b/gate_api/models/swap_coin_struct.py
new file mode 100644
index 0000000..8a7ae01
--- /dev/null
+++ b/gate_api/models/swap_coin_struct.py
@@ -0,0 +1,515 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class SwapCoinStruct(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'int',
+ 'pid': 'int',
+ 'uid': 'int',
+ 'coin': 'str',
+ 'type': 'int',
+ 'subtype': 'str',
+ 'amount': 'str',
+ 'exchange_rate': 'str',
+ 'exchange_amount': 'str',
+ 'update_stamp': 'int',
+ 'create_stamp': 'int',
+ 'status': 'int',
+ 'protocol_type': 'int',
+ 'client_order_id': 'str',
+ 'source': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'pid': 'pid',
+ 'uid': 'uid',
+ 'coin': 'coin',
+ 'type': 'type',
+ 'subtype': 'subtype',
+ 'amount': 'amount',
+ 'exchange_rate': 'exchange_rate',
+ 'exchange_amount': 'exchange_amount',
+ 'update_stamp': 'updateStamp',
+ 'create_stamp': 'createStamp',
+ 'status': 'status',
+ 'protocol_type': 'protocol_type',
+ 'client_order_id': 'client_order_id',
+ 'source': 'source'
+ }
+
+ def __init__(self, id=None, pid=None, uid=None, coin=None, type=None, subtype=None, amount=None, exchange_rate=None, exchange_amount=None, update_stamp=None, create_stamp=None, status=None, protocol_type=None, client_order_id=None, source=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, int, int, str, int, str, str, str, str, int, int, int, int, str, str, Configuration) -> None
+ """SwapCoinStruct - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._id = None
+ self._pid = None
+ self._uid = None
+ self._coin = None
+ self._type = None
+ self._subtype = None
+ self._amount = None
+ self._exchange_rate = None
+ self._exchange_amount = None
+ self._update_stamp = None
+ self._create_stamp = None
+ self._status = None
+ self._protocol_type = None
+ self._client_order_id = None
+ self._source = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if pid is not None:
+ self.pid = pid
+ if uid is not None:
+ self.uid = uid
+ if coin is not None:
+ self.coin = coin
+ if type is not None:
+ self.type = type
+ if subtype is not None:
+ self.subtype = subtype
+ if amount is not None:
+ self.amount = amount
+ if exchange_rate is not None:
+ self.exchange_rate = exchange_rate
+ if exchange_amount is not None:
+ self.exchange_amount = exchange_amount
+ if update_stamp is not None:
+ self.update_stamp = update_stamp
+ if create_stamp is not None:
+ self.create_stamp = create_stamp
+ if status is not None:
+ self.status = status
+ if protocol_type is not None:
+ self.protocol_type = protocol_type
+ if client_order_id is not None:
+ self.client_order_id = client_order_id
+ if source is not None:
+ self.source = source
+
+ @property
+ def id(self):
+ """Gets the id of this SwapCoinStruct. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The id of this SwapCoinStruct. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this SwapCoinStruct.
+
+ Order ID # noqa: E501
+
+ :param id: The id of this SwapCoinStruct. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ @property
+ def pid(self):
+ """Gets the pid of this SwapCoinStruct. # noqa: E501
+
+ Product ID # noqa: E501
+
+ :return: The pid of this SwapCoinStruct. # noqa: E501
+ :rtype: int
+ """
+ return self._pid
+
+ @pid.setter
+ def pid(self, pid):
+ """Sets the pid of this SwapCoinStruct.
+
+ Product ID # noqa: E501
+
+ :param pid: The pid of this SwapCoinStruct. # noqa: E501
+ :type: int
+ """
+
+ self._pid = pid
+
+ @property
+ def uid(self):
+ """Gets the uid of this SwapCoinStruct. # noqa: E501
+
+ User ID # noqa: E501
+
+ :return: The uid of this SwapCoinStruct. # noqa: E501
+ :rtype: int
+ """
+ return self._uid
+
+ @uid.setter
+ def uid(self, uid):
+ """Sets the uid of this SwapCoinStruct.
+
+ User ID # noqa: E501
+
+ :param uid: The uid of this SwapCoinStruct. # noqa: E501
+ :type: int
+ """
+
+ self._uid = uid
+
+ @property
+ def coin(self):
+ """Gets the coin of this SwapCoinStruct. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The coin of this SwapCoinStruct. # noqa: E501
+ :rtype: str
+ """
+ return self._coin
+
+ @coin.setter
+ def coin(self, coin):
+ """Sets the coin of this SwapCoinStruct.
+
+ Currency # noqa: E501
+
+ :param coin: The coin of this SwapCoinStruct. # noqa: E501
+ :type: str
+ """
+
+ self._coin = coin
+
+ @property
+ def type(self):
+ """Gets the type of this SwapCoinStruct. # noqa: E501
+
+ Type 0-Staking 1-Redemption # noqa: E501
+
+ :return: The type of this SwapCoinStruct. # noqa: E501
+ :rtype: int
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this SwapCoinStruct.
+
+ Type 0-Staking 1-Redemption # noqa: E501
+
+ :param type: The type of this SwapCoinStruct. # noqa: E501
+ :type: int
+ """
+
+ self._type = type
+
+ @property
+ def subtype(self):
+ """Gets the subtype of this SwapCoinStruct. # noqa: E501
+
+ SubType # noqa: E501
+
+ :return: The subtype of this SwapCoinStruct. # noqa: E501
+ :rtype: str
+ """
+ return self._subtype
+
+ @subtype.setter
+ def subtype(self, subtype):
+ """Sets the subtype of this SwapCoinStruct.
+
+ SubType # noqa: E501
+
+ :param subtype: The subtype of this SwapCoinStruct. # noqa: E501
+ :type: str
+ """
+
+ self._subtype = subtype
+
+ @property
+ def amount(self):
+ """Gets the amount of this SwapCoinStruct. # noqa: E501
+
+ Amount # noqa: E501
+
+ :return: The amount of this SwapCoinStruct. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this SwapCoinStruct.
+
+ Amount # noqa: E501
+
+ :param amount: The amount of this SwapCoinStruct. # noqa: E501
+ :type: str
+ """
+
+ self._amount = amount
+
+ @property
+ def exchange_rate(self):
+ """Gets the exchange_rate of this SwapCoinStruct. # noqa: E501
+
+ Exchange ratio # noqa: E501
+
+ :return: The exchange_rate of this SwapCoinStruct. # noqa: E501
+ :rtype: str
+ """
+ return self._exchange_rate
+
+ @exchange_rate.setter
+ def exchange_rate(self, exchange_rate):
+ """Sets the exchange_rate of this SwapCoinStruct.
+
+ Exchange ratio # noqa: E501
+
+ :param exchange_rate: The exchange_rate of this SwapCoinStruct. # noqa: E501
+ :type: str
+ """
+
+ self._exchange_rate = exchange_rate
+
+ @property
+ def exchange_amount(self):
+ """Gets the exchange_amount of this SwapCoinStruct. # noqa: E501
+
+ Redemption Amount # noqa: E501
+
+ :return: The exchange_amount of this SwapCoinStruct. # noqa: E501
+ :rtype: str
+ """
+ return self._exchange_amount
+
+ @exchange_amount.setter
+ def exchange_amount(self, exchange_amount):
+ """Sets the exchange_amount of this SwapCoinStruct.
+
+ Redemption Amount # noqa: E501
+
+ :param exchange_amount: The exchange_amount of this SwapCoinStruct. # noqa: E501
+ :type: str
+ """
+
+ self._exchange_amount = exchange_amount
+
+ @property
+ def update_stamp(self):
+ """Gets the update_stamp of this SwapCoinStruct. # noqa: E501
+
+ UpdateTimestamp # noqa: E501
+
+ :return: The update_stamp of this SwapCoinStruct. # noqa: E501
+ :rtype: int
+ """
+ return self._update_stamp
+
+ @update_stamp.setter
+ def update_stamp(self, update_stamp):
+ """Sets the update_stamp of this SwapCoinStruct.
+
+ UpdateTimestamp # noqa: E501
+
+ :param update_stamp: The update_stamp of this SwapCoinStruct. # noqa: E501
+ :type: int
+ """
+
+ self._update_stamp = update_stamp
+
+ @property
+ def create_stamp(self):
+ """Gets the create_stamp of this SwapCoinStruct. # noqa: E501
+
+ Transaction timestamp # noqa: E501
+
+ :return: The create_stamp of this SwapCoinStruct. # noqa: E501
+ :rtype: int
+ """
+ return self._create_stamp
+
+ @create_stamp.setter
+ def create_stamp(self, create_stamp):
+ """Sets the create_stamp of this SwapCoinStruct.
+
+ Transaction timestamp # noqa: E501
+
+ :param create_stamp: The create_stamp of this SwapCoinStruct. # noqa: E501
+ :type: int
+ """
+
+ self._create_stamp = create_stamp
+
+ @property
+ def status(self):
+ """Gets the status of this SwapCoinStruct. # noqa: E501
+
+ status 1-success # noqa: E501
+
+ :return: The status of this SwapCoinStruct. # noqa: E501
+ :rtype: int
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this SwapCoinStruct.
+
+ status 1-success # noqa: E501
+
+ :param status: The status of this SwapCoinStruct. # noqa: E501
+ :type: int
+ """
+
+ self._status = status
+
+ @property
+ def protocol_type(self):
+ """Gets the protocol_type of this SwapCoinStruct. # noqa: E501
+
+ DEFI Protocol Type # noqa: E501
+
+ :return: The protocol_type of this SwapCoinStruct. # noqa: E501
+ :rtype: int
+ """
+ return self._protocol_type
+
+ @protocol_type.setter
+ def protocol_type(self, protocol_type):
+ """Sets the protocol_type of this SwapCoinStruct.
+
+ DEFI Protocol Type # noqa: E501
+
+ :param protocol_type: The protocol_type of this SwapCoinStruct. # noqa: E501
+ :type: int
+ """
+
+ self._protocol_type = protocol_type
+
+ @property
+ def client_order_id(self):
+ """Gets the client_order_id of this SwapCoinStruct. # noqa: E501
+
+ Reference ID # noqa: E501
+
+ :return: The client_order_id of this SwapCoinStruct. # noqa: E501
+ :rtype: str
+ """
+ return self._client_order_id
+
+ @client_order_id.setter
+ def client_order_id(self, client_order_id):
+ """Sets the client_order_id of this SwapCoinStruct.
+
+ Reference ID # noqa: E501
+
+ :param client_order_id: The client_order_id of this SwapCoinStruct. # noqa: E501
+ :type: str
+ """
+
+ self._client_order_id = client_order_id
+
+ @property
+ def source(self):
+ """Gets the source of this SwapCoinStruct. # noqa: E501
+
+ Order Origin # noqa: E501
+
+ :return: The source of this SwapCoinStruct. # noqa: E501
+ :rtype: str
+ """
+ return self._source
+
+ @source.setter
+ def source(self, source):
+ """Sets the source of this SwapCoinStruct.
+
+ Order Origin # noqa: E501
+
+ :param source: The source of this SwapCoinStruct. # noqa: E501
+ :type: str
+ """
+
+ self._source = source
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, SwapCoinStruct):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, SwapCoinStruct):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/system_time.py b/gate_api/models/system_time.py
index 8681684..285a0e7 100644
--- a/gate_api/models/system_time.py
+++ b/gate_api/models/system_time.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,13 @@ class SystemTime(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'server_time': 'int'}
+ openapi_types = {
+ 'server_time': 'int'
+ }
- attribute_map = {'server_time': 'server_time'}
+ attribute_map = {
+ 'server_time': 'server_time'
+ }
def __init__(self, server_time=None, local_vars_configuration=None): # noqa: E501
# type: (int, Configuration) -> None
@@ -79,16 +83,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/ticker.py b/gate_api/models/ticker.py
index e7520a6..289c557 100644
--- a/gate_api/models/ticker.py
+++ b/gate_api/models/ticker.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -36,7 +36,9 @@ class Ticker(object):
'currency_pair': 'str',
'last': 'str',
'lowest_ask': 'str',
+ 'lowest_size': 'str',
'highest_bid': 'str',
+ 'highest_size': 'str',
'change_percentage': 'str',
'change_utc0': 'str',
'change_utc8': 'str',
@@ -47,14 +49,16 @@ class Ticker(object):
'etf_net_value': 'str',
'etf_pre_net_value': 'str',
'etf_pre_timestamp': 'int',
- 'etf_leverage': 'str',
+ 'etf_leverage': 'str'
}
attribute_map = {
'currency_pair': 'currency_pair',
'last': 'last',
'lowest_ask': 'lowest_ask',
+ 'lowest_size': 'lowest_size',
'highest_bid': 'highest_bid',
+ 'highest_size': 'highest_size',
'change_percentage': 'change_percentage',
'change_utc0': 'change_utc0',
'change_utc8': 'change_utc8',
@@ -65,29 +69,11 @@ class Ticker(object):
'etf_net_value': 'etf_net_value',
'etf_pre_net_value': 'etf_pre_net_value',
'etf_pre_timestamp': 'etf_pre_timestamp',
- 'etf_leverage': 'etf_leverage',
+ 'etf_leverage': 'etf_leverage'
}
- def __init__(
- self,
- currency_pair=None,
- last=None,
- lowest_ask=None,
- highest_bid=None,
- change_percentage=None,
- change_utc0=None,
- change_utc8=None,
- base_volume=None,
- quote_volume=None,
- high_24h=None,
- low_24h=None,
- etf_net_value=None,
- etf_pre_net_value=None,
- etf_pre_timestamp=None,
- etf_leverage=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, int, str, Configuration) -> None
+ def __init__(self, currency_pair=None, last=None, lowest_ask=None, lowest_size=None, highest_bid=None, highest_size=None, change_percentage=None, change_utc0=None, change_utc8=None, base_volume=None, quote_volume=None, high_24h=None, low_24h=None, etf_net_value=None, etf_pre_net_value=None, etf_pre_timestamp=None, etf_leverage=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, str, Configuration) -> None
"""Ticker - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -96,7 +82,9 @@ def __init__(
self._currency_pair = None
self._last = None
self._lowest_ask = None
+ self._lowest_size = None
self._highest_bid = None
+ self._highest_size = None
self._change_percentage = None
self._change_utc0 = None
self._change_utc8 = None
@@ -116,8 +104,12 @@ def __init__(
self.last = last
if lowest_ask is not None:
self.lowest_ask = lowest_ask
+ if lowest_size is not None:
+ self.lowest_size = lowest_size
if highest_bid is not None:
self.highest_bid = highest_bid
+ if highest_size is not None:
+ self.highest_size = highest_size
if change_percentage is not None:
self.change_percentage = change_percentage
if change_utc0 is not None:
@@ -207,6 +199,29 @@ def lowest_ask(self, lowest_ask):
self._lowest_ask = lowest_ask
+ @property
+ def lowest_size(self):
+ """Gets the lowest_size of this Ticker. # noqa: E501
+
+ Latest seller's lowest price quantity; not available for batch queries; available for single queries, empty if no data # noqa: E501
+
+ :return: The lowest_size of this Ticker. # noqa: E501
+ :rtype: str
+ """
+ return self._lowest_size
+
+ @lowest_size.setter
+ def lowest_size(self, lowest_size):
+ """Sets the lowest_size of this Ticker.
+
+ Latest seller's lowest price quantity; not available for batch queries; available for single queries, empty if no data # noqa: E501
+
+ :param lowest_size: The lowest_size of this Ticker. # noqa: E501
+ :type: str
+ """
+
+ self._lowest_size = lowest_size
+
@property
def highest_bid(self):
"""Gets the highest_bid of this Ticker. # noqa: E501
@@ -230,11 +245,34 @@ def highest_bid(self, highest_bid):
self._highest_bid = highest_bid
+ @property
+ def highest_size(self):
+ """Gets the highest_size of this Ticker. # noqa: E501
+
+ Latest buyer's highest price quantity; not available for batch queries; available for single queries, empty if no data # noqa: E501
+
+ :return: The highest_size of this Ticker. # noqa: E501
+ :rtype: str
+ """
+ return self._highest_size
+
+ @highest_size.setter
+ def highest_size(self, highest_size):
+ """Sets the highest_size of this Ticker.
+
+ Latest buyer's highest price quantity; not available for batch queries; available for single queries, empty if no data # noqa: E501
+
+ :param highest_size: The highest_size of this Ticker. # noqa: E501
+ :type: str
+ """
+
+ self._highest_size = highest_size
+
@property
def change_percentage(self):
"""Gets the change_percentage of this Ticker. # noqa: E501
- Change percentage in the last 24h # noqa: E501
+ 24h price change percentage (negative for decrease, e.g., -7.45) # noqa: E501
:return: The change_percentage of this Ticker. # noqa: E501
:rtype: str
@@ -245,7 +283,7 @@ def change_percentage(self):
def change_percentage(self, change_percentage):
"""Sets the change_percentage of this Ticker.
- Change percentage in the last 24h # noqa: E501
+ 24h price change percentage (negative for decrease, e.g., -7.45) # noqa: E501
:param change_percentage: The change_percentage of this Ticker. # noqa: E501
:type: str
@@ -257,7 +295,7 @@ def change_percentage(self, change_percentage):
def change_utc0(self):
"""Gets the change_utc0 of this Ticker. # noqa: E501
- utc0 timezone, the percentage change in the last 24 hours # noqa: E501
+ UTC+0 timezone, 24h price change percentage, negative for decline (e.g., -7.45) # noqa: E501
:return: The change_utc0 of this Ticker. # noqa: E501
:rtype: str
@@ -268,7 +306,7 @@ def change_utc0(self):
def change_utc0(self, change_utc0):
"""Sets the change_utc0 of this Ticker.
- utc0 timezone, the percentage change in the last 24 hours # noqa: E501
+ UTC+0 timezone, 24h price change percentage, negative for decline (e.g., -7.45) # noqa: E501
:param change_utc0: The change_utc0 of this Ticker. # noqa: E501
:type: str
@@ -280,7 +318,7 @@ def change_utc0(self, change_utc0):
def change_utc8(self):
"""Gets the change_utc8 of this Ticker. # noqa: E501
- utc8 timezone, the percentage change in the last 24 hours # noqa: E501
+ UTC+8 timezone, 24h price change percentage, negative for decline (e.g., -7.45) # noqa: E501
:return: The change_utc8 of this Ticker. # noqa: E501
:rtype: str
@@ -291,7 +329,7 @@ def change_utc8(self):
def change_utc8(self, change_utc8):
"""Sets the change_utc8 of this Ticker.
- utc8 timezone, the percentage change in the last 24 hours # noqa: E501
+ UTC+8 timezone, 24h price change percentage, negative for decline (e.g., -7.45) # noqa: E501
:param change_utc8: The change_utc8 of this Ticker. # noqa: E501
:type: str
@@ -303,7 +341,7 @@ def change_utc8(self, change_utc8):
def base_volume(self):
"""Gets the base_volume of this Ticker. # noqa: E501
- Base currency trade volume in the last 24h # noqa: E501
+ Base currency trading volume in the last 24h # noqa: E501
:return: The base_volume of this Ticker. # noqa: E501
:rtype: str
@@ -314,7 +352,7 @@ def base_volume(self):
def base_volume(self, base_volume):
"""Sets the base_volume of this Ticker.
- Base currency trade volume in the last 24h # noqa: E501
+ Base currency trading volume in the last 24h # noqa: E501
:param base_volume: The base_volume of this Ticker. # noqa: E501
:type: str
@@ -326,7 +364,7 @@ def base_volume(self, base_volume):
def quote_volume(self):
"""Gets the quote_volume of this Ticker. # noqa: E501
- Quote currency trade volume in the last 24h # noqa: E501
+ Quote currency trading volume in the last 24h # noqa: E501
:return: The quote_volume of this Ticker. # noqa: E501
:rtype: str
@@ -337,7 +375,7 @@ def quote_volume(self):
def quote_volume(self, quote_volume):
"""Sets the quote_volume of this Ticker.
- Quote currency trade volume in the last 24h # noqa: E501
+ Quote currency trading volume in the last 24h # noqa: E501
:param quote_volume: The quote_volume of this Ticker. # noqa: E501
:type: str
@@ -349,7 +387,7 @@ def quote_volume(self, quote_volume):
def high_24h(self):
"""Gets the high_24h of this Ticker. # noqa: E501
- Highest price in 24h # noqa: E501
+ 24h High # noqa: E501
:return: The high_24h of this Ticker. # noqa: E501
:rtype: str
@@ -360,7 +398,7 @@ def high_24h(self):
def high_24h(self, high_24h):
"""Sets the high_24h of this Ticker.
- Highest price in 24h # noqa: E501
+ 24h High # noqa: E501
:param high_24h: The high_24h of this Ticker. # noqa: E501
:type: str
@@ -372,7 +410,7 @@ def high_24h(self, high_24h):
def low_24h(self):
"""Gets the low_24h of this Ticker. # noqa: E501
- Lowest price in 24h # noqa: E501
+ 24h Low # noqa: E501
:return: The low_24h of this Ticker. # noqa: E501
:rtype: str
@@ -383,7 +421,7 @@ def low_24h(self):
def low_24h(self, low_24h):
"""Sets the low_24h of this Ticker.
- Lowest price in 24h # noqa: E501
+ 24h Low # noqa: E501
:param low_24h: The low_24h of this Ticker. # noqa: E501
:type: str
@@ -418,7 +456,7 @@ def etf_net_value(self, etf_net_value):
def etf_pre_net_value(self):
"""Gets the etf_pre_net_value of this Ticker. # noqa: E501
- ETF previous net value at re-balancing time # noqa: E501
+ ETF net value at previous rebalancing point # noqa: E501
:return: The etf_pre_net_value of this Ticker. # noqa: E501
:rtype: str
@@ -429,7 +467,7 @@ def etf_pre_net_value(self):
def etf_pre_net_value(self, etf_pre_net_value):
"""Sets the etf_pre_net_value of this Ticker.
- ETF previous net value at re-balancing time # noqa: E501
+ ETF net value at previous rebalancing point # noqa: E501
:param etf_pre_net_value: The etf_pre_net_value of this Ticker. # noqa: E501
:type: str
@@ -441,7 +479,7 @@ def etf_pre_net_value(self, etf_pre_net_value):
def etf_pre_timestamp(self):
"""Gets the etf_pre_timestamp of this Ticker. # noqa: E501
- ETF previous re-balancing time # noqa: E501
+ ETF previous rebalancing time # noqa: E501
:return: The etf_pre_timestamp of this Ticker. # noqa: E501
:rtype: int
@@ -452,7 +490,7 @@ def etf_pre_timestamp(self):
def etf_pre_timestamp(self, etf_pre_timestamp):
"""Sets the etf_pre_timestamp of this Ticker.
- ETF previous re-balancing time # noqa: E501
+ ETF previous rebalancing time # noqa: E501
:param etf_pre_timestamp: The etf_pre_timestamp of this Ticker. # noqa: E501
:type: int
@@ -490,16 +528,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/total_balance.py b/gate_api/models/total_balance.py
index 89364a5..9dd8b78 100644
--- a/gate_api/models/total_balance.py
+++ b/gate_api/models/total_balance.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class TotalBalance(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'total': 'AccountBalance', 'details': 'dict(str, AccountBalance)'}
+ openapi_types = {
+ 'total': 'AccountBalance',
+ 'details': 'dict(str, AccountBalance)'
+ }
- attribute_map = {'total': 'total', 'details': 'details'}
+ attribute_map = {
+ 'total': 'total',
+ 'details': 'details'
+ }
def __init__(self, total=None, details=None, local_vars_configuration=None): # noqa: E501
# type: (AccountBalance, dict(str, AccountBalance), Configuration) -> None
@@ -77,7 +83,7 @@ def total(self, total):
def details(self):
"""Gets the details of this TotalBalance. # noqa: E501
- Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account # noqa: E501
+ Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: perpetual contract account - delivery: delivery contract account - warrant: warrant account - cbbc: CBBC account # noqa: E501
:return: The details of this TotalBalance. # noqa: E501
:rtype: dict(str, AccountBalance)
@@ -88,7 +94,7 @@ def details(self):
def details(self, details):
"""Sets the details of this TotalBalance.
- Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account # noqa: E501
+ Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: perpetual contract account - delivery: delivery contract account - warrant: warrant account - cbbc: CBBC account # noqa: E501
:param details: The details of this TotalBalance. # noqa: E501
:type: dict(str, AccountBalance)
@@ -103,16 +109,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/trade.py b/gate_api/models/trade.py
index 53e5a6e..7fbeff8 100644
--- a/gate_api/models/trade.py
+++ b/gate_api/models/trade.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -47,6 +47,8 @@ class Trade(object):
'point_fee': 'str',
'gt_fee': 'str',
'amend_text': 'str',
+ 'sequence_id': 'str',
+ 'text': 'str'
}
attribute_map = {
@@ -64,27 +66,12 @@ class Trade(object):
'point_fee': 'point_fee',
'gt_fee': 'gt_fee',
'amend_text': 'amend_text',
+ 'sequence_id': 'sequence_id',
+ 'text': 'text'
}
- def __init__(
- self,
- id=None,
- create_time=None,
- create_time_ms=None,
- currency_pair=None,
- side=None,
- role=None,
- amount=None,
- price=None,
- order_id=None,
- fee=None,
- fee_currency=None,
- point_fee=None,
- gt_fee=None,
- amend_text=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None
+ def __init__(self, id=None, create_time=None, create_time_ms=None, currency_pair=None, side=None, role=None, amount=None, price=None, order_id=None, fee=None, fee_currency=None, point_fee=None, gt_fee=None, amend_text=None, sequence_id=None, text=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None
"""Trade - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -104,6 +91,8 @@ def __init__(
self._point_fee = None
self._gt_fee = None
self._amend_text = None
+ self._sequence_id = None
+ self._text = None
self.discriminator = None
if id is not None:
@@ -134,12 +123,16 @@ def __init__(
self.gt_fee = gt_fee
if amend_text is not None:
self.amend_text = amend_text
+ if sequence_id is not None:
+ self.sequence_id = sequence_id
+ if text is not None:
+ self.text = text
@property
def id(self):
"""Gets the id of this Trade. # noqa: E501
- Trade ID # noqa: E501
+ Fill ID # noqa: E501
:return: The id of this Trade. # noqa: E501
:rtype: str
@@ -150,7 +143,7 @@ def id(self):
def id(self, id):
"""Sets the id of this Trade.
- Trade ID # noqa: E501
+ Fill ID # noqa: E501
:param id: The id of this Trade. # noqa: E501
:type: str
@@ -162,7 +155,7 @@ def id(self, id):
def create_time(self):
"""Gets the create_time of this Trade. # noqa: E501
- Trading time # noqa: E501
+ Fill Time # noqa: E501
:return: The create_time of this Trade. # noqa: E501
:rtype: str
@@ -173,7 +166,7 @@ def create_time(self):
def create_time(self, create_time):
"""Sets the create_time of this Trade.
- Trading time # noqa: E501
+ Fill Time # noqa: E501
:param create_time: The create_time of this Trade. # noqa: E501
:type: str
@@ -231,7 +224,7 @@ def currency_pair(self, currency_pair):
def side(self):
"""Gets the side of this Trade. # noqa: E501
- Order side # noqa: E501
+ Buy or sell order # noqa: E501
:return: The side of this Trade. # noqa: E501
:rtype: str
@@ -242,7 +235,7 @@ def side(self):
def side(self, side):
"""Sets the side of this Trade.
- Order side # noqa: E501
+ Buy or sell order # noqa: E501
:param side: The side of this Trade. # noqa: E501
:type: str
@@ -250,7 +243,8 @@ def side(self, side):
allowed_values = ["buy", "sell"] # noqa: E501
if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `side` ({0}), must be one of {1}".format(side, allowed_values) # noqa: E501
+ "Invalid value for `side` ({0}), must be one of {1}" # noqa: E501
+ .format(side, allowed_values)
)
self._side = side
@@ -259,7 +253,7 @@ def side(self, side):
def role(self):
"""Gets the role of this Trade. # noqa: E501
- Trade role. No value in public endpoints # noqa: E501
+ Trade role, not returned in public endpoints # noqa: E501
:return: The role of this Trade. # noqa: E501
:rtype: str
@@ -270,7 +264,7 @@ def role(self):
def role(self, role):
"""Sets the role of this Trade.
- Trade role. No value in public endpoints # noqa: E501
+ Trade role, not returned in public endpoints # noqa: E501
:param role: The role of this Trade. # noqa: E501
:type: str
@@ -278,7 +272,8 @@ def role(self, role):
allowed_values = ["taker", "maker"] # noqa: E501
if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `role` ({0}), must be one of {1}".format(role, allowed_values) # noqa: E501
+ "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501
+ .format(role, allowed_values)
)
self._role = role
@@ -333,7 +328,7 @@ def price(self, price):
def order_id(self):
"""Gets the order_id of this Trade. # noqa: E501
- Related order ID. No value in public endpoints # noqa: E501
+ Related order ID, not returned in public endpoints # noqa: E501
:return: The order_id of this Trade. # noqa: E501
:rtype: str
@@ -344,7 +339,7 @@ def order_id(self):
def order_id(self, order_id):
"""Sets the order_id of this Trade.
- Related order ID. No value in public endpoints # noqa: E501
+ Related order ID, not returned in public endpoints # noqa: E501
:param order_id: The order_id of this Trade. # noqa: E501
:type: str
@@ -356,7 +351,7 @@ def order_id(self, order_id):
def fee(self):
"""Gets the fee of this Trade. # noqa: E501
- Fee deducted. No value in public endpoints # noqa: E501
+ Fee deducted, not returned in public endpoints # noqa: E501
:return: The fee of this Trade. # noqa: E501
:rtype: str
@@ -367,7 +362,7 @@ def fee(self):
def fee(self, fee):
"""Sets the fee of this Trade.
- Fee deducted. No value in public endpoints # noqa: E501
+ Fee deducted, not returned in public endpoints # noqa: E501
:param fee: The fee of this Trade. # noqa: E501
:type: str
@@ -379,7 +374,7 @@ def fee(self, fee):
def fee_currency(self):
"""Gets the fee_currency of this Trade. # noqa: E501
- Fee currency unit. No value in public endpoints # noqa: E501
+ Fee currency unit, not returned in public endpoints # noqa: E501
:return: The fee_currency of this Trade. # noqa: E501
:rtype: str
@@ -390,7 +385,7 @@ def fee_currency(self):
def fee_currency(self, fee_currency):
"""Sets the fee_currency of this Trade.
- Fee currency unit. No value in public endpoints # noqa: E501
+ Fee currency unit, not returned in public endpoints # noqa: E501
:param fee_currency: The fee_currency of this Trade. # noqa: E501
:type: str
@@ -402,7 +397,7 @@ def fee_currency(self, fee_currency):
def point_fee(self):
"""Gets the point_fee of this Trade. # noqa: E501
- Points used to deduct fee. No value in public endpoints # noqa: E501
+ Points used to deduct fee, not returned in public endpoints # noqa: E501
:return: The point_fee of this Trade. # noqa: E501
:rtype: str
@@ -413,7 +408,7 @@ def point_fee(self):
def point_fee(self, point_fee):
"""Sets the point_fee of this Trade.
- Points used to deduct fee. No value in public endpoints # noqa: E501
+ Points used to deduct fee, not returned in public endpoints # noqa: E501
:param point_fee: The point_fee of this Trade. # noqa: E501
:type: str
@@ -425,7 +420,7 @@ def point_fee(self, point_fee):
def gt_fee(self):
"""Gets the gt_fee of this Trade. # noqa: E501
- GT used to deduct fee. No value in public endpoints # noqa: E501
+ GT used to deduct fee, not returned in public endpoints # noqa: E501
:return: The gt_fee of this Trade. # noqa: E501
:rtype: str
@@ -436,7 +431,7 @@ def gt_fee(self):
def gt_fee(self, gt_fee):
"""Sets the gt_fee of this Trade.
- GT used to deduct fee. No value in public endpoints # noqa: E501
+ GT used to deduct fee, not returned in public endpoints # noqa: E501
:param gt_fee: The gt_fee of this Trade. # noqa: E501
:type: str
@@ -467,6 +462,52 @@ def amend_text(self, amend_text):
self._amend_text = amend_text
+ @property
+ def sequence_id(self):
+ """Gets the sequence_id of this Trade. # noqa: E501
+
+ Consecutive trade ID within a single market. Used to track and identify trades in the specific market # noqa: E501
+
+ :return: The sequence_id of this Trade. # noqa: E501
+ :rtype: str
+ """
+ return self._sequence_id
+
+ @sequence_id.setter
+ def sequence_id(self, sequence_id):
+ """Sets the sequence_id of this Trade.
+
+ Consecutive trade ID within a single market. Used to track and identify trades in the specific market # noqa: E501
+
+ :param sequence_id: The sequence_id of this Trade. # noqa: E501
+ :type: str
+ """
+
+ self._sequence_id = sequence_id
+
+ @property
+ def text(self):
+ """Gets the text of this Trade. # noqa: E501
+
+ User-defined information, not returned in public endpoints # noqa: E501
+
+ :return: The text of this Trade. # noqa: E501
+ :rtype: str
+ """
+ return self._text
+
+ @text.setter
+ def text(self, text):
+ """Sets the text of this Trade.
+
+ User-defined information, not returned in public endpoints # noqa: E501
+
+ :param text: The text of this Trade. # noqa: E501
+ :type: str
+ """
+
+ self._text = text
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -474,16 +515,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/trade_fee.py b/gate_api/models/trade_fee.py
index 3404248..7b3fd5a 100644
--- a/gate_api/models/trade_fee.py
+++ b/gate_api/models/trade_fee.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -45,6 +45,7 @@ class TradeFee(object):
'futures_maker_fee': 'str',
'delivery_taker_fee': 'str',
'delivery_maker_fee': 'str',
+ 'debit_fee': 'int'
}
attribute_map = {
@@ -60,25 +61,11 @@ class TradeFee(object):
'futures_maker_fee': 'futures_maker_fee',
'delivery_taker_fee': 'delivery_taker_fee',
'delivery_maker_fee': 'delivery_maker_fee',
+ 'debit_fee': 'debit_fee'
}
- def __init__(
- self,
- user_id=None,
- taker_fee=None,
- maker_fee=None,
- gt_discount=None,
- gt_taker_fee=None,
- gt_maker_fee=None,
- loan_fee=None,
- point_type=None,
- futures_taker_fee=None,
- futures_maker_fee=None,
- delivery_taker_fee=None,
- delivery_maker_fee=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, str, str, bool, str, str, str, str, str, str, str, str, Configuration) -> None
+ def __init__(self, user_id=None, taker_fee=None, maker_fee=None, gt_discount=None, gt_taker_fee=None, gt_maker_fee=None, loan_fee=None, point_type=None, futures_taker_fee=None, futures_maker_fee=None, delivery_taker_fee=None, delivery_maker_fee=None, debit_fee=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, bool, str, str, str, str, str, str, str, str, int, Configuration) -> None
"""TradeFee - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -96,6 +83,7 @@ def __init__(
self._futures_maker_fee = None
self._delivery_taker_fee = None
self._delivery_maker_fee = None
+ self._debit_fee = None
self.discriminator = None
if user_id is not None:
@@ -122,6 +110,8 @@ def __init__(
self.delivery_taker_fee = delivery_taker_fee
if delivery_maker_fee is not None:
self.delivery_maker_fee = delivery_maker_fee
+ if debit_fee is not None:
+ self.debit_fee = debit_fee
@property
def user_id(self):
@@ -196,7 +186,7 @@ def maker_fee(self, maker_fee):
def gt_discount(self):
"""Gets the gt_discount of this TradeFee. # noqa: E501
- If GT deduction is enabled # noqa: E501
+ Whether GT deduction discount is enabled # noqa: E501
:return: The gt_discount of this TradeFee. # noqa: E501
:rtype: bool
@@ -207,7 +197,7 @@ def gt_discount(self):
def gt_discount(self, gt_discount):
"""Sets the gt_discount of this TradeFee.
- If GT deduction is enabled # noqa: E501
+ Whether GT deduction discount is enabled # noqa: E501
:param gt_discount: The gt_discount of this TradeFee. # noqa: E501
:type: bool
@@ -242,7 +232,7 @@ def gt_taker_fee(self, gt_taker_fee):
def gt_maker_fee(self):
"""Gets the gt_maker_fee of this TradeFee. # noqa: E501
- Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501
+ Maker fee rate with GT deduction. Returns 0 if GT deduction is disabled # noqa: E501
:return: The gt_maker_fee of this TradeFee. # noqa: E501
:rtype: str
@@ -253,7 +243,7 @@ def gt_maker_fee(self):
def gt_maker_fee(self, gt_maker_fee):
"""Sets the gt_maker_fee of this TradeFee.
- Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501
+ Maker fee rate with GT deduction. Returns 0 if GT deduction is disabled # noqa: E501
:param gt_maker_fee: The gt_maker_fee of this TradeFee. # noqa: E501
:type: str
@@ -288,7 +278,7 @@ def loan_fee(self, loan_fee):
def point_type(self):
"""Gets the point_type of this TradeFee. # noqa: E501
- Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501
+ Point card type: 0 - Original version, 1 - New version since 202009 # noqa: E501
:return: The point_type of this TradeFee. # noqa: E501
:rtype: str
@@ -299,7 +289,7 @@ def point_type(self):
def point_type(self, point_type):
"""Sets the point_type of this TradeFee.
- Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501
+ Point card type: 0 - Original version, 1 - New version since 202009 # noqa: E501
:param point_type: The point_type of this TradeFee. # noqa: E501
:type: str
@@ -311,7 +301,7 @@ def point_type(self, point_type):
def futures_taker_fee(self):
"""Gets the futures_taker_fee of this TradeFee. # noqa: E501
- Futures trading taker fee # noqa: E501
+ Perpetual contract taker fee rate # noqa: E501
:return: The futures_taker_fee of this TradeFee. # noqa: E501
:rtype: str
@@ -322,7 +312,7 @@ def futures_taker_fee(self):
def futures_taker_fee(self, futures_taker_fee):
"""Sets the futures_taker_fee of this TradeFee.
- Futures trading taker fee # noqa: E501
+ Perpetual contract taker fee rate # noqa: E501
:param futures_taker_fee: The futures_taker_fee of this TradeFee. # noqa: E501
:type: str
@@ -334,7 +324,7 @@ def futures_taker_fee(self, futures_taker_fee):
def futures_maker_fee(self):
"""Gets the futures_maker_fee of this TradeFee. # noqa: E501
- Future trading maker fee # noqa: E501
+ Perpetual contract maker fee rate # noqa: E501
:return: The futures_maker_fee of this TradeFee. # noqa: E501
:rtype: str
@@ -345,7 +335,7 @@ def futures_maker_fee(self):
def futures_maker_fee(self, futures_maker_fee):
"""Sets the futures_maker_fee of this TradeFee.
- Future trading maker fee # noqa: E501
+ Perpetual contract maker fee rate # noqa: E501
:param futures_maker_fee: The futures_maker_fee of this TradeFee. # noqa: E501
:type: str
@@ -357,7 +347,7 @@ def futures_maker_fee(self, futures_maker_fee):
def delivery_taker_fee(self):
"""Gets the delivery_taker_fee of this TradeFee. # noqa: E501
- 交割合约 taker 费率 # noqa: E501
+ Delivery contract taker fee rate # noqa: E501
:return: The delivery_taker_fee of this TradeFee. # noqa: E501
:rtype: str
@@ -368,7 +358,7 @@ def delivery_taker_fee(self):
def delivery_taker_fee(self, delivery_taker_fee):
"""Sets the delivery_taker_fee of this TradeFee.
- 交割合约 taker 费率 # noqa: E501
+ Delivery contract taker fee rate # noqa: E501
:param delivery_taker_fee: The delivery_taker_fee of this TradeFee. # noqa: E501
:type: str
@@ -380,7 +370,7 @@ def delivery_taker_fee(self, delivery_taker_fee):
def delivery_maker_fee(self):
"""Gets the delivery_maker_fee of this TradeFee. # noqa: E501
- 交割合约 maker 费率 # noqa: E501
+ Delivery contract maker fee rate # noqa: E501
:return: The delivery_maker_fee of this TradeFee. # noqa: E501
:rtype: str
@@ -391,7 +381,7 @@ def delivery_maker_fee(self):
def delivery_maker_fee(self, delivery_maker_fee):
"""Sets the delivery_maker_fee of this TradeFee.
- 交割合约 maker 费率 # noqa: E501
+ Delivery contract maker fee rate # noqa: E501
:param delivery_maker_fee: The delivery_maker_fee of this TradeFee. # noqa: E501
:type: str
@@ -399,6 +389,29 @@ def delivery_maker_fee(self, delivery_maker_fee):
self._delivery_maker_fee = delivery_maker_fee
+ @property
+ def debit_fee(self):
+ """Gets the debit_fee of this TradeFee. # noqa: E501
+
+ Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates # noqa: E501
+
+ :return: The debit_fee of this TradeFee. # noqa: E501
+ :rtype: int
+ """
+ return self._debit_fee
+
+ @debit_fee.setter
+ def debit_fee(self, debit_fee):
+ """Sets the debit_fee of this TradeFee.
+
+ Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates # noqa: E501
+
+ :param debit_fee: The debit_fee of this TradeFee. # noqa: E501
+ :type: int
+ """
+
+ self._debit_fee = debit_fee
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -406,16 +419,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/transaction_id.py b/gate_api/models/transaction_id.py
index 497f27d..d902340 100644
--- a/gate_api/models/transaction_id.py
+++ b/gate_api/models/transaction_id.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,13 @@ class TransactionID(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'tx_id': 'int'}
+ openapi_types = {
+ 'tx_id': 'int'
+ }
- attribute_map = {'tx_id': 'tx_id'}
+ attribute_map = {
+ 'tx_id': 'tx_id'
+ }
def __init__(self, tx_id=None, local_vars_configuration=None): # noqa: E501
# type: (int, Configuration) -> None
@@ -53,7 +57,7 @@ def __init__(self, tx_id=None, local_vars_configuration=None): # noqa: E501
def tx_id(self):
"""Gets the tx_id of this TransactionID. # noqa: E501
- Order id # noqa: E501
+ Order ID # noqa: E501
:return: The tx_id of this TransactionID. # noqa: E501
:rtype: int
@@ -64,7 +68,7 @@ def tx_id(self):
def tx_id(self, tx_id):
"""Sets the tx_id of this TransactionID.
- Order id # noqa: E501
+ Order ID # noqa: E501
:param tx_id: The tx_id of this TransactionID. # noqa: E501
:type: int
@@ -79,16 +83,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/transfer.py b/gate_api/models/transfer.py
index 6eb34f1..aaf2469 100644
--- a/gate_api/models/transfer.py
+++ b/gate_api/models/transfer.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -38,7 +38,7 @@ class Transfer(object):
'to': 'str',
'amount': 'str',
'currency_pair': 'str',
- 'settle': 'str',
+ 'settle': 'str'
}
attribute_map = {
@@ -47,19 +47,10 @@ class Transfer(object):
'to': 'to',
'amount': 'amount',
'currency_pair': 'currency_pair',
- 'settle': 'settle',
+ 'settle': 'settle'
}
- def __init__(
- self,
- currency=None,
- _from=None,
- to=None,
- amount=None,
- currency_pair=None,
- settle=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, currency=None, _from=None, to=None, amount=None, currency_pair=None, settle=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, str, str, Configuration) -> None
"""Transfer - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -87,7 +78,7 @@ def __init__(
def currency(self):
"""Gets the currency of this Transfer. # noqa: E501
- Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency # noqa: E501
+ Transfer currency name. For contract accounts, `currency` can be set to `POINT` (points) or supported settlement currencies (e.g., `BTC`, `USDT`) # noqa: E501
:return: The currency of this Transfer. # noqa: E501
:rtype: str
@@ -98,7 +89,7 @@ def currency(self):
def currency(self, currency):
"""Sets the currency of this Transfer.
- Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency # noqa: E501
+ Transfer currency name. For contract accounts, `currency` can be set to `POINT` (points) or supported settlement currencies (e.g., `BTC`, `USDT`) # noqa: E501
:param currency: The currency of this Transfer. # noqa: E501
:type: str
@@ -130,10 +121,11 @@ def _from(self, _from):
"""
if self.local_vars_configuration.client_side_validation and _from is None: # noqa: E501
raise ValueError("Invalid value for `_from`, must not be `None`") # noqa: E501
- allowed_values = ["spot", "margin", "futures", "delivery", "cross_margin", "options"] # noqa: E501
+ allowed_values = ["spot", "margin", "futures", "delivery", "options"] # noqa: E501
if self.local_vars_configuration.client_side_validation and _from not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `_from` ({0}), must be one of {1}".format(_from, allowed_values) # noqa: E501
+ "Invalid value for `_from` ({0}), must be one of {1}" # noqa: E501
+ .format(_from, allowed_values)
)
self.__from = _from
@@ -160,10 +152,11 @@ def to(self, to):
"""
if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501
raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501
- allowed_values = ["spot", "margin", "futures", "delivery", "cross_margin", "options"] # noqa: E501
+ allowed_values = ["spot", "margin", "futures", "delivery", "options"] # noqa: E501
if self.local_vars_configuration.client_side_validation and to not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `to` ({0}), must be one of {1}".format(to, allowed_values) # noqa: E501
+ "Invalid value for `to` ({0}), must be one of {1}" # noqa: E501
+ .format(to, allowed_values)
)
self._to = to
@@ -197,7 +190,7 @@ def amount(self, amount):
def currency_pair(self):
"""Gets the currency_pair of this Transfer. # noqa: E501
- Margin currency pair. Required if transfer from or to margin account # noqa: E501
+ Margin trading pair. Required when transferring to or from margin account # noqa: E501
:return: The currency_pair of this Transfer. # noqa: E501
:rtype: str
@@ -208,7 +201,7 @@ def currency_pair(self):
def currency_pair(self, currency_pair):
"""Sets the currency_pair of this Transfer.
- Margin currency pair. Required if transfer from or to margin account # noqa: E501
+ Margin trading pair. Required when transferring to or from margin account # noqa: E501
:param currency_pair: The currency_pair of this Transfer. # noqa: E501
:type: str
@@ -220,7 +213,7 @@ def currency_pair(self, currency_pair):
def settle(self):
"""Gets the settle of this Transfer. # noqa: E501
- Futures settle currency. Required if transferring from or to futures account # noqa: E501
+ Contract settlement currency. Required when transferring to or from contract account # noqa: E501
:return: The settle of this Transfer. # noqa: E501
:rtype: str
@@ -231,7 +224,7 @@ def settle(self):
def settle(self, settle):
"""Sets the settle of this Transfer.
- Futures settle currency. Required if transferring from or to futures account # noqa: E501
+ Contract settlement currency. Required when transferring to or from contract account # noqa: E501
:param settle: The settle of this Transfer. # noqa: E501
:type: str
@@ -246,16 +239,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/transfer_order_status.py b/gate_api/models/transfer_order_status.py
new file mode 100644
index 0000000..527b77a
--- /dev/null
+++ b/gate_api/models/transfer_order_status.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class TransferOrderStatus(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'tx_id': 'str',
+ 'status': 'str'
+ }
+
+ attribute_map = {
+ 'tx_id': 'tx_id',
+ 'status': 'status'
+ }
+
+ def __init__(self, tx_id=None, status=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """TransferOrderStatus - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._tx_id = None
+ self._status = None
+ self.discriminator = None
+
+ if tx_id is not None:
+ self.tx_id = tx_id
+ if status is not None:
+ self.status = status
+
+ @property
+ def tx_id(self):
+ """Gets the tx_id of this TransferOrderStatus. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The tx_id of this TransferOrderStatus. # noqa: E501
+ :rtype: str
+ """
+ return self._tx_id
+
+ @tx_id.setter
+ def tx_id(self, tx_id):
+ """Sets the tx_id of this TransferOrderStatus.
+
+ Order ID # noqa: E501
+
+ :param tx_id: The tx_id of this TransferOrderStatus. # noqa: E501
+ :type: str
+ """
+
+ self._tx_id = tx_id
+
+ @property
+ def status(self):
+ """Gets the status of this TransferOrderStatus. # noqa: E501
+
+ Transfer status: PENDING - Processing, SUCCESS - Transfer successful, FAIL - Transfer failed, PARTIAL_SUCCESS - Partially successful (this status appears when transferring between sub-accounts) # noqa: E501
+
+ :return: The status of this TransferOrderStatus. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this TransferOrderStatus.
+
+ Transfer status: PENDING - Processing, SUCCESS - Transfer successful, FAIL - Transfer failed, PARTIAL_SUCCESS - Partially successful (this status appears when transferring between sub-accounts) # noqa: E501
+
+ :param status: The status of this TransferOrderStatus. # noqa: E501
+ :type: str
+ """
+
+ self._status = status
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, TransferOrderStatus):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, TransferOrderStatus):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/portfolio_transferable.py b/gate_api/models/transferables_result.py
similarity index 61%
rename from gate_api/models/portfolio_transferable.py
rename to gate_api/models/transferables_result.py
index 2ea8e86..a2659ba 100644
--- a/gate_api/models/portfolio_transferable.py
+++ b/gate_api/models/transferables_result.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@
from gate_api.configuration import Configuration
-class PortfolioTransferable(object):
+class TransferablesResult(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -32,13 +32,19 @@ class PortfolioTransferable(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'amount': 'str'}
+ openapi_types = {
+ 'currency': 'str',
+ 'amount': 'str'
+ }
- attribute_map = {'currency': 'currency', 'amount': 'amount'}
+ attribute_map = {
+ 'currency': 'currency',
+ 'amount': 'amount'
+ }
def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, Configuration) -> None
- """PortfolioTransferable - a model defined in OpenAPI""" # noqa: E501
+ """TransferablesResult - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -54,22 +60,22 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None):
@property
def currency(self):
- """Gets the currency of this PortfolioTransferable. # noqa: E501
+ """Gets the currency of this TransferablesResult. # noqa: E501
Currency detail # noqa: E501
- :return: The currency of this PortfolioTransferable. # noqa: E501
+ :return: The currency of this TransferablesResult. # noqa: E501
:rtype: str
"""
return self._currency
@currency.setter
def currency(self, currency):
- """Sets the currency of this PortfolioTransferable.
+ """Sets the currency of this TransferablesResult.
Currency detail # noqa: E501
- :param currency: The currency of this PortfolioTransferable. # noqa: E501
+ :param currency: The currency of this TransferablesResult. # noqa: E501
:type: str
"""
@@ -77,22 +83,22 @@ def currency(self, currency):
@property
def amount(self):
- """Gets the amount of this PortfolioTransferable. # noqa: E501
+ """Gets the amount of this TransferablesResult. # noqa: E501
- The maximum amount that can be transferred out # noqa: E501
+ Maximum transferable amount # noqa: E501
- :return: The amount of this PortfolioTransferable. # noqa: E501
+ :return: The amount of this TransferablesResult. # noqa: E501
:rtype: str
"""
return self._amount
@amount.setter
def amount(self, amount):
- """Sets the amount of this PortfolioTransferable.
+ """Sets the amount of this TransferablesResult.
- The maximum amount that can be transferred out # noqa: E501
+ Maximum transferable amount # noqa: E501
- :param amount: The amount of this PortfolioTransferable. # noqa: E501
+ :param amount: The amount of this TransferablesResult. # noqa: E501
:type: str
"""
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
@@ -130,14 +138,14 @@ def __repr__(self):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, PortfolioTransferable):
+ if not isinstance(other, TransferablesResult):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, PortfolioTransferable):
+ if not isinstance(other, TransferablesResult):
return True
return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/trigger_order_response.py b/gate_api/models/trigger_order_response.py
index 6d1ec7c..2e0b560 100644
--- a/gate_api/models/trigger_order_response.py
+++ b/gate_api/models/trigger_order_response.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,13 @@ class TriggerOrderResponse(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'id': 'int'}
+ openapi_types = {
+ 'id': 'int'
+ }
- attribute_map = {'id': 'id'}
+ attribute_map = {
+ 'id': 'id'
+ }
def __init__(self, id=None, local_vars_configuration=None): # noqa: E501
# type: (int, Configuration) -> None
@@ -79,16 +83,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/trigger_time.py b/gate_api/models/trigger_time.py
index f6a642b..6b7c80d 100644
--- a/gate_api/models/trigger_time.py
+++ b/gate_api/models/trigger_time.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,13 @@ class TriggerTime(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'trigger_time': 'int'}
+ openapi_types = {
+ 'trigger_time': 'int'
+ }
- attribute_map = {'trigger_time': 'triggerTime'}
+ attribute_map = {
+ 'trigger_time': 'triggerTime'
+ }
def __init__(self, trigger_time=None, local_vars_configuration=None): # noqa: E501
# type: (int, Configuration) -> None
@@ -53,7 +57,7 @@ def __init__(self, trigger_time=None, local_vars_configuration=None): # noqa: E
def trigger_time(self):
"""Gets the trigger_time of this TriggerTime. # noqa: E501
- Timestamp of the end of the countdown, in milliseconds # noqa: E501
+ Timestamp when countdown ends, in milliseconds # noqa: E501
:return: The trigger_time of this TriggerTime. # noqa: E501
:rtype: int
@@ -64,7 +68,7 @@ def trigger_time(self):
def trigger_time(self, trigger_time):
"""Sets the trigger_time of this TriggerTime.
- Timestamp of the end of the countdown, in milliseconds # noqa: E501
+ Timestamp when countdown ends, in milliseconds # noqa: E501
:param trigger_time: The trigger_time of this TriggerTime. # noqa: E501
:type: int
@@ -79,16 +83,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/uid_push_order.py b/gate_api/models/uid_push_order.py
new file mode 100644
index 0000000..eb36625
--- /dev/null
+++ b/gate_api/models/uid_push_order.py
@@ -0,0 +1,347 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UidPushOrder(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'int',
+ 'push_uid': 'int',
+ 'receive_uid': 'int',
+ 'currency': 'str',
+ 'amount': 'str',
+ 'create_time': 'int',
+ 'status': 'str',
+ 'message': 'str',
+ 'transaction_type': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'push_uid': 'push_uid',
+ 'receive_uid': 'receive_uid',
+ 'currency': 'currency',
+ 'amount': 'amount',
+ 'create_time': 'create_time',
+ 'status': 'status',
+ 'message': 'message',
+ 'transaction_type': 'transaction_type'
+ }
+
+ def __init__(self, id=None, push_uid=None, receive_uid=None, currency=None, amount=None, create_time=None, status=None, message=None, transaction_type=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, int, int, str, str, int, str, str, str, Configuration) -> None
+ """UidPushOrder - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._id = None
+ self._push_uid = None
+ self._receive_uid = None
+ self._currency = None
+ self._amount = None
+ self._create_time = None
+ self._status = None
+ self._message = None
+ self._transaction_type = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if push_uid is not None:
+ self.push_uid = push_uid
+ if receive_uid is not None:
+ self.receive_uid = receive_uid
+ if currency is not None:
+ self.currency = currency
+ if amount is not None:
+ self.amount = amount
+ if create_time is not None:
+ self.create_time = create_time
+ if status is not None:
+ self.status = status
+ if message is not None:
+ self.message = message
+ if transaction_type is not None:
+ self.transaction_type = transaction_type
+
+ @property
+ def id(self):
+ """Gets the id of this UidPushOrder. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The id of this UidPushOrder. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this UidPushOrder.
+
+ Order ID # noqa: E501
+
+ :param id: The id of this UidPushOrder. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ @property
+ def push_uid(self):
+ """Gets the push_uid of this UidPushOrder. # noqa: E501
+
+ Initiator User ID # noqa: E501
+
+ :return: The push_uid of this UidPushOrder. # noqa: E501
+ :rtype: int
+ """
+ return self._push_uid
+
+ @push_uid.setter
+ def push_uid(self, push_uid):
+ """Sets the push_uid of this UidPushOrder.
+
+ Initiator User ID # noqa: E501
+
+ :param push_uid: The push_uid of this UidPushOrder. # noqa: E501
+ :type: int
+ """
+
+ self._push_uid = push_uid
+
+ @property
+ def receive_uid(self):
+ """Gets the receive_uid of this UidPushOrder. # noqa: E501
+
+ Recipient User ID # noqa: E501
+
+ :return: The receive_uid of this UidPushOrder. # noqa: E501
+ :rtype: int
+ """
+ return self._receive_uid
+
+ @receive_uid.setter
+ def receive_uid(self, receive_uid):
+ """Sets the receive_uid of this UidPushOrder.
+
+ Recipient User ID # noqa: E501
+
+ :param receive_uid: The receive_uid of this UidPushOrder. # noqa: E501
+ :type: int
+ """
+
+ self._receive_uid = receive_uid
+
+ @property
+ def currency(self):
+ """Gets the currency of this UidPushOrder. # noqa: E501
+
+ Currency name # noqa: E501
+
+ :return: The currency of this UidPushOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this UidPushOrder.
+
+ Currency name # noqa: E501
+
+ :param currency: The currency of this UidPushOrder. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def amount(self):
+ """Gets the amount of this UidPushOrder. # noqa: E501
+
+ Transfer amount # noqa: E501
+
+ :return: The amount of this UidPushOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this UidPushOrder.
+
+ Transfer amount # noqa: E501
+
+ :param amount: The amount of this UidPushOrder. # noqa: E501
+ :type: str
+ """
+
+ self._amount = amount
+
+ @property
+ def create_time(self):
+ """Gets the create_time of this UidPushOrder. # noqa: E501
+
+ Created time # noqa: E501
+
+ :return: The create_time of this UidPushOrder. # noqa: E501
+ :rtype: int
+ """
+ return self._create_time
+
+ @create_time.setter
+ def create_time(self, create_time):
+ """Sets the create_time of this UidPushOrder.
+
+ Created time # noqa: E501
+
+ :param create_time: The create_time of this UidPushOrder. # noqa: E501
+ :type: int
+ """
+
+ self._create_time = create_time
+
+ @property
+ def status(self):
+ """Gets the status of this UidPushOrder. # noqa: E501
+
+ Withdrawal status: - CREATING: Creating - PENDING: Waiting for recipient (Please contact the recipient to accept the transfer on Gate official website) - CANCELLING: Cancelling - CANCELLED: Cancelled - REFUSING: Refusing - REFUSED: Refused - RECEIVING: Receiving - RECEIVED: Success # noqa: E501
+
+ :return: The status of this UidPushOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this UidPushOrder.
+
+ Withdrawal status: - CREATING: Creating - PENDING: Waiting for recipient (Please contact the recipient to accept the transfer on Gate official website) - CANCELLING: Cancelling - CANCELLED: Cancelled - REFUSING: Refusing - REFUSED: Refused - RECEIVING: Receiving - RECEIVED: Success # noqa: E501
+
+ :param status: The status of this UidPushOrder. # noqa: E501
+ :type: str
+ """
+
+ self._status = status
+
+ @property
+ def message(self):
+ """Gets the message of this UidPushOrder. # noqa: E501
+
+ PENDING reason tips # noqa: E501
+
+ :return: The message of this UidPushOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._message
+
+ @message.setter
+ def message(self, message):
+ """Sets the message of this UidPushOrder.
+
+ PENDING reason tips # noqa: E501
+
+ :param message: The message of this UidPushOrder. # noqa: E501
+ :type: str
+ """
+
+ self._message = message
+
+ @property
+ def transaction_type(self):
+ """Gets the transaction_type of this UidPushOrder. # noqa: E501
+
+ Order Type # noqa: E501
+
+ :return: The transaction_type of this UidPushOrder. # noqa: E501
+ :rtype: str
+ """
+ return self._transaction_type
+
+ @transaction_type.setter
+ def transaction_type(self, transaction_type):
+ """Sets the transaction_type of this UidPushOrder.
+
+ Order Type # noqa: E501
+
+ :param transaction_type: The transaction_type of this UidPushOrder. # noqa: E501
+ :type: str
+ """
+
+ self._transaction_type = transaction_type
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UidPushOrder):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UidPushOrder):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/uid_push_withdrawal.py b/gate_api/models/uid_push_withdrawal.py
new file mode 100644
index 0000000..da15f5c
--- /dev/null
+++ b/gate_api/models/uid_push_withdrawal.py
@@ -0,0 +1,182 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UidPushWithdrawal(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'receive_uid': 'int',
+ 'currency': 'str',
+ 'amount': 'str'
+ }
+
+ attribute_map = {
+ 'receive_uid': 'receive_uid',
+ 'currency': 'currency',
+ 'amount': 'amount'
+ }
+
+ def __init__(self, receive_uid=None, currency=None, amount=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, Configuration) -> None
+ """UidPushWithdrawal - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._receive_uid = None
+ self._currency = None
+ self._amount = None
+ self.discriminator = None
+
+ self.receive_uid = receive_uid
+ self.currency = currency
+ self.amount = amount
+
+ @property
+ def receive_uid(self):
+ """Gets the receive_uid of this UidPushWithdrawal. # noqa: E501
+
+ Recipient UID # noqa: E501
+
+ :return: The receive_uid of this UidPushWithdrawal. # noqa: E501
+ :rtype: int
+ """
+ return self._receive_uid
+
+ @receive_uid.setter
+ def receive_uid(self, receive_uid):
+ """Sets the receive_uid of this UidPushWithdrawal.
+
+ Recipient UID # noqa: E501
+
+ :param receive_uid: The receive_uid of this UidPushWithdrawal. # noqa: E501
+ :type: int
+ """
+ if self.local_vars_configuration.client_side_validation and receive_uid is None: # noqa: E501
+ raise ValueError("Invalid value for `receive_uid`, must not be `None`") # noqa: E501
+
+ self._receive_uid = receive_uid
+
+ @property
+ def currency(self):
+ """Gets the currency of this UidPushWithdrawal. # noqa: E501
+
+ Currency name # noqa: E501
+
+ :return: The currency of this UidPushWithdrawal. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this UidPushWithdrawal.
+
+ Currency name # noqa: E501
+
+ :param currency: The currency of this UidPushWithdrawal. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501
+ raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501
+
+ self._currency = currency
+
+ @property
+ def amount(self):
+ """Gets the amount of this UidPushWithdrawal. # noqa: E501
+
+ Transfer amount # noqa: E501
+
+ :return: The amount of this UidPushWithdrawal. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this UidPushWithdrawal.
+
+ Transfer amount # noqa: E501
+
+ :param amount: The amount of this UidPushWithdrawal. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501
+ raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501
+
+ self._amount = amount
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UidPushWithdrawal):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UidPushWithdrawal):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/uid_push_withdrawal_resp.py b/gate_api/models/uid_push_withdrawal_resp.py
new file mode 100644
index 0000000..7afe6eb
--- /dev/null
+++ b/gate_api/models/uid_push_withdrawal_resp.py
@@ -0,0 +1,123 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UidPushWithdrawalResp(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'int'
+ }
+
+ attribute_map = {
+ 'id': 'id'
+ }
+
+ def __init__(self, id=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, Configuration) -> None
+ """UidPushWithdrawalResp - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._id = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+
+ @property
+ def id(self):
+ """Gets the id of this UidPushWithdrawalResp. # noqa: E501
+
+ Order ID # noqa: E501
+
+ :return: The id of this UidPushWithdrawalResp. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this UidPushWithdrawalResp.
+
+ Order ID # noqa: E501
+
+ :param id: The id of this UidPushWithdrawalResp. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UidPushWithdrawalResp):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UidPushWithdrawalResp):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/uni_currency.py b/gate_api/models/uni_currency.py
index 4147e78..eee7b2c 100644
--- a/gate_api/models/uni_currency.py
+++ b/gate_api/models/uni_currency.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -37,7 +37,7 @@ class UniCurrency(object):
'min_lend_amount': 'str',
'max_lend_amount': 'str',
'max_rate': 'str',
- 'min_rate': 'str',
+ 'min_rate': 'str'
}
attribute_map = {
@@ -45,18 +45,10 @@ class UniCurrency(object):
'min_lend_amount': 'min_lend_amount',
'max_lend_amount': 'max_lend_amount',
'max_rate': 'max_rate',
- 'min_rate': 'min_rate',
+ 'min_rate': 'min_rate'
}
- def __init__(
- self,
- currency=None,
- min_lend_amount=None,
- max_lend_amount=None,
- max_rate=None,
- min_rate=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, currency=None, min_lend_amount=None, max_lend_amount=None, max_rate=None, min_rate=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, str, Configuration) -> None
"""UniCurrency - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -108,7 +100,7 @@ def currency(self, currency):
def min_lend_amount(self):
"""Gets the min_lend_amount of this UniCurrency. # noqa: E501
- The minimum lending amount, in the unit of the currency. # noqa: E501
+ The minimum lending amount, in the unit of the currency # noqa: E501
:return: The min_lend_amount of this UniCurrency. # noqa: E501
:rtype: str
@@ -119,7 +111,7 @@ def min_lend_amount(self):
def min_lend_amount(self, min_lend_amount):
"""Sets the min_lend_amount of this UniCurrency.
- The minimum lending amount, in the unit of the currency. # noqa: E501
+ The minimum lending amount, in the unit of the currency # noqa: E501
:param min_lend_amount: The min_lend_amount of this UniCurrency. # noqa: E501
:type: str
@@ -203,16 +195,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/uni_currency_interest.py b/gate_api/models/uni_currency_interest.py
new file mode 100644
index 0000000..525ec59
--- /dev/null
+++ b/gate_api/models/uni_currency_interest.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UniCurrencyInterest(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'interest_status': 'str'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'interest_status': 'interest_status'
+ }
+
+ def __init__(self, currency=None, interest_status=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, Configuration) -> None
+ """UniCurrencyInterest - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._interest_status = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if interest_status is not None:
+ self.interest_status = interest_status
+
+ @property
+ def currency(self):
+ """Gets the currency of this UniCurrencyInterest. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this UniCurrencyInterest. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this UniCurrencyInterest.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this UniCurrencyInterest. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def interest_status(self):
+ """Gets the interest_status of this UniCurrencyInterest. # noqa: E501
+
+ Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment # noqa: E501
+
+ :return: The interest_status of this UniCurrencyInterest. # noqa: E501
+ :rtype: str
+ """
+ return self._interest_status
+
+ @interest_status.setter
+ def interest_status(self, interest_status):
+ """Sets the interest_status of this UniCurrencyInterest.
+
+ Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment # noqa: E501
+
+ :param interest_status: The interest_status of this UniCurrencyInterest. # noqa: E501
+ :type: str
+ """
+
+ self._interest_status = interest_status
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UniCurrencyInterest):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UniCurrencyInterest):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/uni_currency_pair.py b/gate_api/models/uni_currency_pair.py
index 7d331aa..362d6b1 100644
--- a/gate_api/models/uni_currency_pair.py
+++ b/gate_api/models/uni_currency_pair.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -36,24 +36,17 @@ class UniCurrencyPair(object):
'currency_pair': 'str',
'base_min_borrow_amount': 'str',
'quote_min_borrow_amount': 'str',
- 'leverage': 'str',
+ 'leverage': 'str'
}
attribute_map = {
'currency_pair': 'currency_pair',
'base_min_borrow_amount': 'base_min_borrow_amount',
'quote_min_borrow_amount': 'quote_min_borrow_amount',
- 'leverage': 'leverage',
+ 'leverage': 'leverage'
}
- def __init__(
- self,
- currency_pair=None,
- base_min_borrow_amount=None,
- quote_min_borrow_amount=None,
- leverage=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, currency_pair=None, base_min_borrow_amount=None, quote_min_borrow_amount=None, leverage=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, Configuration) -> None
"""UniCurrencyPair - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -174,16 +167,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/uni_interest_record.py b/gate_api/models/uni_interest_record.py
index fdcb12e..f06d5fd 100644
--- a/gate_api/models/uni_interest_record.py
+++ b/gate_api/models/uni_interest_record.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,26 +32,26 @@ class UniInterestRecord(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'status': 'int', 'currency': 'str', 'actual_rate': 'str', 'interest': 'str', 'create_time': 'int'}
+ openapi_types = {
+ 'status': 'int',
+ 'currency': 'str',
+ 'actual_rate': 'str',
+ 'interest': 'str',
+ 'interest_status': 'str',
+ 'create_time': 'int'
+ }
attribute_map = {
'status': 'status',
'currency': 'currency',
'actual_rate': 'actual_rate',
'interest': 'interest',
- 'create_time': 'create_time',
+ 'interest_status': 'interest_status',
+ 'create_time': 'create_time'
}
- def __init__(
- self,
- status=None,
- currency=None,
- actual_rate=None,
- interest=None,
- create_time=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (int, str, str, str, int, Configuration) -> None
+ def __init__(self, status=None, currency=None, actual_rate=None, interest=None, interest_status=None, create_time=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, str, str, int, Configuration) -> None
"""UniInterestRecord - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -61,6 +61,7 @@ def __init__(
self._currency = None
self._actual_rate = None
self._interest = None
+ self._interest_status = None
self._create_time = None
self.discriminator = None
@@ -72,6 +73,8 @@ def __init__(
self.actual_rate = actual_rate
if interest is not None:
self.interest = interest
+ if interest_status is not None:
+ self.interest_status = interest_status
if create_time is not None:
self.create_time = create_time
@@ -167,6 +170,29 @@ def interest(self, interest):
self._interest = interest
+ @property
+ def interest_status(self):
+ """Gets the interest_status of this UniInterestRecord. # noqa: E501
+
+ Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment # noqa: E501
+
+ :return: The interest_status of this UniInterestRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._interest_status
+
+ @interest_status.setter
+ def interest_status(self, interest_status):
+ """Sets the interest_status of this UniInterestRecord.
+
+ Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment # noqa: E501
+
+ :param interest_status: The interest_status of this UniInterestRecord. # noqa: E501
+ :type: str
+ """
+
+ self._interest_status = interest_status
+
@property
def create_time(self):
"""Gets the create_time of this UniInterestRecord. # noqa: E501
@@ -197,16 +223,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/uni_lend.py b/gate_api/models/uni_lend.py
index bbbb4ca..8c00a50 100644
--- a/gate_api/models/uni_lend.py
+++ b/gate_api/models/uni_lend.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -39,8 +39,10 @@ class UniLend(object):
'lent_amount': 'str',
'frozen_amount': 'str',
'min_rate': 'str',
+ 'interest_status': 'str',
+ 'reinvest_left_amount': 'str',
'create_time': 'int',
- 'update_time': 'int',
+ 'update_time': 'int'
}
attribute_map = {
@@ -50,23 +52,14 @@ class UniLend(object):
'lent_amount': 'lent_amount',
'frozen_amount': 'frozen_amount',
'min_rate': 'min_rate',
+ 'interest_status': 'interest_status',
+ 'reinvest_left_amount': 'reinvest_left_amount',
'create_time': 'create_time',
- 'update_time': 'update_time',
+ 'update_time': 'update_time'
}
- def __init__(
- self,
- currency=None,
- current_amount=None,
- amount=None,
- lent_amount=None,
- frozen_amount=None,
- min_rate=None,
- create_time=None,
- update_time=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, int, int, Configuration) -> None
+ def __init__(self, currency=None, current_amount=None, amount=None, lent_amount=None, frozen_amount=None, min_rate=None, interest_status=None, reinvest_left_amount=None, create_time=None, update_time=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, int, int, Configuration) -> None
"""UniLend - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -78,6 +71,8 @@ def __init__(
self._lent_amount = None
self._frozen_amount = None
self._min_rate = None
+ self._interest_status = None
+ self._reinvest_left_amount = None
self._create_time = None
self._update_time = None
self.discriminator = None
@@ -94,6 +89,10 @@ def __init__(
self.frozen_amount = frozen_amount
if min_rate is not None:
self.min_rate = min_rate
+ if interest_status is not None:
+ self.interest_status = interest_status
+ if reinvest_left_amount is not None:
+ self.reinvest_left_amount = reinvest_left_amount
if create_time is not None:
self.create_time = create_time
if update_time is not None:
@@ -149,7 +148,7 @@ def current_amount(self, current_amount):
def amount(self):
"""Gets the amount of this UniLend. # noqa: E501
- Total amount # noqa: E501
+ Total Lending Amount # noqa: E501
:return: The amount of this UniLend. # noqa: E501
:rtype: str
@@ -160,7 +159,7 @@ def amount(self):
def amount(self, amount):
"""Sets the amount of this UniLend.
- Total amount # noqa: E501
+ Total Lending Amount # noqa: E501
:param amount: The amount of this UniLend. # noqa: E501
:type: str
@@ -172,7 +171,7 @@ def amount(self, amount):
def lent_amount(self):
"""Gets the lent_amount of this UniLend. # noqa: E501
- Lent amount # noqa: E501
+ Lent Amount # noqa: E501
:return: The lent_amount of this UniLend. # noqa: E501
:rtype: str
@@ -183,7 +182,7 @@ def lent_amount(self):
def lent_amount(self, lent_amount):
"""Sets the lent_amount of this UniLend.
- Lent amount # noqa: E501
+ Lent Amount # noqa: E501
:param lent_amount: The lent_amount of this UniLend. # noqa: E501
:type: str
@@ -195,7 +194,7 @@ def lent_amount(self, lent_amount):
def frozen_amount(self):
"""Gets the frozen_amount of this UniLend. # noqa: E501
- Frozen amount # noqa: E501
+ Pending Redemption Amount # noqa: E501
:return: The frozen_amount of this UniLend. # noqa: E501
:rtype: str
@@ -206,7 +205,7 @@ def frozen_amount(self):
def frozen_amount(self, frozen_amount):
"""Sets the frozen_amount of this UniLend.
- Frozen amount # noqa: E501
+ Pending Redemption Amount # noqa: E501
:param frozen_amount: The frozen_amount of this UniLend. # noqa: E501
:type: str
@@ -237,11 +236,57 @@ def min_rate(self, min_rate):
self._min_rate = min_rate
+ @property
+ def interest_status(self):
+ """Gets the interest_status of this UniLend. # noqa: E501
+
+ Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment # noqa: E501
+
+ :return: The interest_status of this UniLend. # noqa: E501
+ :rtype: str
+ """
+ return self._interest_status
+
+ @interest_status.setter
+ def interest_status(self, interest_status):
+ """Sets the interest_status of this UniLend.
+
+ Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment # noqa: E501
+
+ :param interest_status: The interest_status of this UniLend. # noqa: E501
+ :type: str
+ """
+
+ self._interest_status = interest_status
+
+ @property
+ def reinvest_left_amount(self):
+ """Gets the reinvest_left_amount of this UniLend. # noqa: E501
+
+ Non-reinvested Amount # noqa: E501
+
+ :return: The reinvest_left_amount of this UniLend. # noqa: E501
+ :rtype: str
+ """
+ return self._reinvest_left_amount
+
+ @reinvest_left_amount.setter
+ def reinvest_left_amount(self, reinvest_left_amount):
+ """Sets the reinvest_left_amount of this UniLend.
+
+ Non-reinvested Amount # noqa: E501
+
+ :param reinvest_left_amount: The reinvest_left_amount of this UniLend. # noqa: E501
+ :type: str
+ """
+
+ self._reinvest_left_amount = reinvest_left_amount
+
@property
def create_time(self):
"""Gets the create_time of this UniLend. # noqa: E501
- Created time of the lending order # noqa: E501
+ Lending Order Creation Time # noqa: E501
:return: The create_time of this UniLend. # noqa: E501
:rtype: int
@@ -252,7 +297,7 @@ def create_time(self):
def create_time(self, create_time):
"""Sets the create_time of this UniLend.
- Created time of the lending order # noqa: E501
+ Lending Order Creation Time # noqa: E501
:param create_time: The create_time of this UniLend. # noqa: E501
:type: int
@@ -264,7 +309,7 @@ def create_time(self, create_time):
def update_time(self):
"""Gets the update_time of this UniLend. # noqa: E501
- Upated time of the lending order # noqa: E501
+ Lending Order Last Update Time # noqa: E501
:return: The update_time of this UniLend. # noqa: E501
:rtype: int
@@ -275,7 +320,7 @@ def update_time(self):
def update_time(self, update_time):
"""Sets the update_time of this UniLend.
- Upated time of the lending order # noqa: E501
+ Lending Order Last Update Time # noqa: E501
:param update_time: The update_time of this UniLend. # noqa: E501
:type: int
@@ -290,16 +335,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/uni_lend_interest.py b/gate_api/models/uni_lend_interest.py
index 4ae4765..80f3a0a 100644
--- a/gate_api/models/uni_lend_interest.py
+++ b/gate_api/models/uni_lend_interest.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class UniLendInterest(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'interest': 'str'}
+ openapi_types = {
+ 'currency': 'str',
+ 'interest': 'str'
+ }
- attribute_map = {'currency': 'currency', 'interest': 'interest'}
+ attribute_map = {
+ 'currency': 'currency',
+ 'interest': 'interest'
+ }
def __init__(self, currency=None, interest=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, Configuration) -> None
@@ -79,7 +85,7 @@ def currency(self, currency):
def interest(self):
"""Gets the interest of this UniLendInterest. # noqa: E501
- Interest # noqa: E501
+ Interest income # noqa: E501
:return: The interest of this UniLendInterest. # noqa: E501
:rtype: str
@@ -90,7 +96,7 @@ def interest(self):
def interest(self, interest):
"""Sets the interest of this UniLendInterest.
- Interest # noqa: E501
+ Interest income # noqa: E501
:param interest: The interest of this UniLendInterest. # noqa: E501
:type: str
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/uni_lend_record.py b/gate_api/models/uni_lend_record.py
index c584266..a435111 100644
--- a/gate_api/models/uni_lend_record.py
+++ b/gate_api/models/uni_lend_record.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -39,7 +39,7 @@ class UniLendRecord(object):
'last_lent_amount': 'str',
'last_frozen_amount': 'str',
'type': 'str',
- 'create_time': 'int',
+ 'create_time': 'int'
}
attribute_map = {
@@ -49,20 +49,10 @@ class UniLendRecord(object):
'last_lent_amount': 'last_lent_amount',
'last_frozen_amount': 'last_frozen_amount',
'type': 'type',
- 'create_time': 'create_time',
+ 'create_time': 'create_time'
}
- def __init__(
- self,
- currency=None,
- amount=None,
- last_wallet_amount=None,
- last_lent_amount=None,
- last_frozen_amount=None,
- type=None,
- create_time=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, currency=None, amount=None, last_wallet_amount=None, last_lent_amount=None, last_frozen_amount=None, type=None, create_time=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, str, str, int, Configuration) -> None
"""UniLendRecord - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -120,7 +110,7 @@ def currency(self, currency):
def amount(self):
"""Gets the amount of this UniLendRecord. # noqa: E501
- current amount # noqa: E501
+ Current Amount # noqa: E501
:return: The amount of this UniLendRecord. # noqa: E501
:rtype: str
@@ -131,7 +121,7 @@ def amount(self):
def amount(self, amount):
"""Sets the amount of this UniLendRecord.
- current amount # noqa: E501
+ Current Amount # noqa: E501
:param amount: The amount of this UniLendRecord. # noqa: E501
:type: str
@@ -143,7 +133,7 @@ def amount(self, amount):
def last_wallet_amount(self):
"""Gets the last_wallet_amount of this UniLendRecord. # noqa: E501
- Last wallet amount # noqa: E501
+ Previous Available Amount # noqa: E501
:return: The last_wallet_amount of this UniLendRecord. # noqa: E501
:rtype: str
@@ -154,7 +144,7 @@ def last_wallet_amount(self):
def last_wallet_amount(self, last_wallet_amount):
"""Sets the last_wallet_amount of this UniLendRecord.
- Last wallet amount # noqa: E501
+ Previous Available Amount # noqa: E501
:param last_wallet_amount: The last_wallet_amount of this UniLendRecord. # noqa: E501
:type: str
@@ -166,7 +156,7 @@ def last_wallet_amount(self, last_wallet_amount):
def last_lent_amount(self):
"""Gets the last_lent_amount of this UniLendRecord. # noqa: E501
- Last lent amount # noqa: E501
+ Previous Lent Amount # noqa: E501
:return: The last_lent_amount of this UniLendRecord. # noqa: E501
:rtype: str
@@ -177,7 +167,7 @@ def last_lent_amount(self):
def last_lent_amount(self, last_lent_amount):
"""Sets the last_lent_amount of this UniLendRecord.
- Last lent amount # noqa: E501
+ Previous Lent Amount # noqa: E501
:param last_lent_amount: The last_lent_amount of this UniLendRecord. # noqa: E501
:type: str
@@ -189,7 +179,7 @@ def last_lent_amount(self, last_lent_amount):
def last_frozen_amount(self):
"""Gets the last_frozen_amount of this UniLendRecord. # noqa: E501
- Last frozen amount # noqa: E501
+ Previous Frozen Amount # noqa: E501
:return: The last_frozen_amount of this UniLendRecord. # noqa: E501
:rtype: str
@@ -200,7 +190,7 @@ def last_frozen_amount(self):
def last_frozen_amount(self, last_frozen_amount):
"""Sets the last_frozen_amount of this UniLendRecord.
- Last frozen amount # noqa: E501
+ Previous Frozen Amount # noqa: E501
:param last_frozen_amount: The last_frozen_amount of this UniLendRecord. # noqa: E501
:type: str
@@ -212,7 +202,7 @@ def last_frozen_amount(self, last_frozen_amount):
def type(self):
"""Gets the type of this UniLendRecord. # noqa: E501
- Record type: lend - lend, redeem - redeem # noqa: E501
+ Record Type: lend - Lend, redeem - Redeem # noqa: E501
:return: The type of this UniLendRecord. # noqa: E501
:rtype: str
@@ -223,7 +213,7 @@ def type(self):
def type(self, type):
"""Sets the type of this UniLendRecord.
- Record type: lend - lend, redeem - redeem # noqa: E501
+ Record Type: lend - Lend, redeem - Redeem # noqa: E501
:param type: The type of this UniLendRecord. # noqa: E501
:type: str
@@ -261,16 +251,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/uni_loan.py b/gate_api/models/uni_loan.py
index b043749..0010ef5 100644
--- a/gate_api/models/uni_loan.py
+++ b/gate_api/models/uni_loan.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -36,28 +36,22 @@ class UniLoan(object):
'currency': 'str',
'currency_pair': 'str',
'amount': 'str',
+ 'type': 'str',
'create_time': 'int',
- 'update_time': 'int',
+ 'update_time': 'int'
}
attribute_map = {
'currency': 'currency',
'currency_pair': 'currency_pair',
'amount': 'amount',
+ 'type': 'type',
'create_time': 'create_time',
- 'update_time': 'update_time',
+ 'update_time': 'update_time'
}
- def __init__(
- self,
- currency=None,
- currency_pair=None,
- amount=None,
- create_time=None,
- update_time=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, int, int, Configuration) -> None
+ def __init__(self, currency=None, currency_pair=None, amount=None, type=None, create_time=None, update_time=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, int, int, Configuration) -> None
"""UniLoan - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -66,6 +60,7 @@ def __init__(
self._currency = None
self._currency_pair = None
self._amount = None
+ self._type = None
self._create_time = None
self._update_time = None
self.discriminator = None
@@ -76,6 +71,8 @@ def __init__(
self.currency_pair = currency_pair
if amount is not None:
self.amount = amount
+ if type is not None:
+ self.type = type
if create_time is not None:
self.create_time = create_time
if update_time is not None:
@@ -131,7 +128,7 @@ def currency_pair(self, currency_pair):
def amount(self):
"""Gets the amount of this UniLoan. # noqa: E501
- amount # noqa: E501
+ Amount to Repay # noqa: E501
:return: The amount of this UniLoan. # noqa: E501
:rtype: str
@@ -142,7 +139,7 @@ def amount(self):
def amount(self, amount):
"""Sets the amount of this UniLoan.
- amount # noqa: E501
+ Amount to Repay # noqa: E501
:param amount: The amount of this UniLoan. # noqa: E501
:type: str
@@ -150,6 +147,29 @@ def amount(self, amount):
self._amount = amount
+ @property
+ def type(self):
+ """Gets the type of this UniLoan. # noqa: E501
+
+ Loan type: platform borrowing - platform, margin borrowing - margin # noqa: E501
+
+ :return: The type of this UniLoan. # noqa: E501
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this UniLoan.
+
+ Loan type: platform borrowing - platform, margin borrowing - margin # noqa: E501
+
+ :param type: The type of this UniLoan. # noqa: E501
+ :type: str
+ """
+
+ self._type = type
+
@property
def create_time(self):
"""Gets the create_time of this UniLoan. # noqa: E501
@@ -177,7 +197,7 @@ def create_time(self, create_time):
def update_time(self):
"""Gets the update_time of this UniLoan. # noqa: E501
- Updated time # noqa: E501
+ Last Update Time # noqa: E501
:return: The update_time of this UniLoan. # noqa: E501
:rtype: int
@@ -188,7 +208,7 @@ def update_time(self):
def update_time(self, update_time):
"""Sets the update_time of this UniLoan.
- Updated time # noqa: E501
+ Last Update Time # noqa: E501
:param update_time: The update_time of this UniLoan. # noqa: E501
:type: int
@@ -203,16 +223,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/uni_loan_interest_record.py b/gate_api/models/uni_loan_interest_record.py
index 3ee7f87..537866f 100644
--- a/gate_api/models/uni_loan_interest_record.py
+++ b/gate_api/models/uni_loan_interest_record.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -38,7 +38,8 @@ class UniLoanInterestRecord(object):
'actual_rate': 'str',
'interest': 'str',
'status': 'int',
- 'create_time': 'int',
+ 'type': 'str',
+ 'create_time': 'int'
}
attribute_map = {
@@ -47,20 +48,12 @@ class UniLoanInterestRecord(object):
'actual_rate': 'actual_rate',
'interest': 'interest',
'status': 'status',
- 'create_time': 'create_time',
+ 'type': 'type',
+ 'create_time': 'create_time'
}
- def __init__(
- self,
- currency=None,
- currency_pair=None,
- actual_rate=None,
- interest=None,
- status=None,
- create_time=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, int, int, Configuration) -> None
+ def __init__(self, currency=None, currency_pair=None, actual_rate=None, interest=None, status=None, type=None, create_time=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, int, str, int, Configuration) -> None
"""UniLoanInterestRecord - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -71,6 +64,7 @@ def __init__(
self._actual_rate = None
self._interest = None
self._status = None
+ self._type = None
self._create_time = None
self.discriminator = None
@@ -84,6 +78,8 @@ def __init__(
self.interest = interest
if status is not None:
self.status = status
+ if type is not None:
+ self.type = type
if create_time is not None:
self.create_time = create_time
@@ -137,7 +133,7 @@ def currency_pair(self, currency_pair):
def actual_rate(self):
"""Gets the actual_rate of this UniLoanInterestRecord. # noqa: E501
- Actual rate # noqa: E501
+ Actual Rate # noqa: E501
:return: The actual_rate of this UniLoanInterestRecord. # noqa: E501
:rtype: str
@@ -148,7 +144,7 @@ def actual_rate(self):
def actual_rate(self, actual_rate):
"""Sets the actual_rate of this UniLoanInterestRecord.
- Actual rate # noqa: E501
+ Actual Rate # noqa: E501
:param actual_rate: The actual_rate of this UniLoanInterestRecord. # noqa: E501
:type: str
@@ -202,6 +198,29 @@ def status(self, status):
self._status = status
+ @property
+ def type(self):
+ """Gets the type of this UniLoanInterestRecord. # noqa: E501
+
+ Type: platform - Platform borrowing, margin - Margin borrowing # noqa: E501
+
+ :return: The type of this UniLoanInterestRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this UniLoanInterestRecord.
+
+ Type: platform - Platform borrowing, margin - Margin borrowing # noqa: E501
+
+ :param type: The type of this UniLoanInterestRecord. # noqa: E501
+ :type: str
+ """
+
+ self._type = type
+
@property
def create_time(self):
"""Gets the create_time of this UniLoanInterestRecord. # noqa: E501
@@ -232,16 +251,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/uni_loan_record.py b/gate_api/models/uni_loan_record.py
index 52bb443..460120b 100644
--- a/gate_api/models/uni_loan_record.py
+++ b/gate_api/models/uni_loan_record.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,19 +32,23 @@ class UniLoanRecord(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'type': 'str', 'currency_pair': 'str', 'currency': 'str', 'amount': 'str', 'create_time': 'int'}
+ openapi_types = {
+ 'type': 'str',
+ 'currency_pair': 'str',
+ 'currency': 'str',
+ 'amount': 'str',
+ 'create_time': 'int'
+ }
attribute_map = {
'type': 'type',
'currency_pair': 'currency_pair',
'currency': 'currency',
'amount': 'amount',
- 'create_time': 'create_time',
+ 'create_time': 'create_time'
}
- def __init__(
- self, type=None, currency_pair=None, currency=None, amount=None, create_time=None, local_vars_configuration=None
- ): # noqa: E501
+ def __init__(self, type=None, currency_pair=None, currency=None, amount=None, create_time=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, int, Configuration) -> None
"""UniLoanRecord - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -73,7 +77,7 @@ def __init__(
def type(self):
"""Gets the type of this UniLoanRecord. # noqa: E501
- type: borrow - borrow, repay - repay # noqa: E501
+ Type: `borrow` - borrow, `repay` - repay # noqa: E501
:return: The type of this UniLoanRecord. # noqa: E501
:rtype: str
@@ -84,7 +88,7 @@ def type(self):
def type(self, type):
"""Sets the type of this UniLoanRecord.
- type: borrow - borrow, repay - repay # noqa: E501
+ Type: `borrow` - borrow, `repay` - repay # noqa: E501
:param type: The type of this UniLoanRecord. # noqa: E501
:type: str
@@ -142,7 +146,7 @@ def currency(self, currency):
def amount(self):
"""Gets the amount of this UniLoanRecord. # noqa: E501
- The amount of lending or repaying # noqa: E501
+ Borrow or repayment amount # noqa: E501
:return: The amount of this UniLoanRecord. # noqa: E501
:rtype: str
@@ -153,7 +157,7 @@ def amount(self):
def amount(self, amount):
"""Sets the amount of this UniLoanRecord.
- The amount of lending or repaying # noqa: E501
+ Borrow or repayment amount # noqa: E501
:param amount: The amount of this UniLoanRecord. # noqa: E501
:type: str
@@ -191,16 +195,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/unified_account.py b/gate_api/models/unified_account.py
new file mode 100644
index 0000000..7c3f5e4
--- /dev/null
+++ b/gate_api/models/unified_account.py
@@ -0,0 +1,653 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedAccount(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'user_id': 'int',
+ 'refresh_time': 'int',
+ 'locked': 'bool',
+ 'balances': 'dict(str, UnifiedBalance)',
+ 'total': 'str',
+ 'borrowed': 'str',
+ 'total_initial_margin': 'str',
+ 'total_margin_balance': 'str',
+ 'total_maintenance_margin': 'str',
+ 'total_initial_margin_rate': 'str',
+ 'total_maintenance_margin_rate': 'str',
+ 'total_available_margin': 'str',
+ 'unified_account_total': 'str',
+ 'unified_account_total_liab': 'str',
+ 'unified_account_total_equity': 'str',
+ 'leverage': 'str',
+ 'spot_order_loss': 'str',
+ 'spot_hedge': 'bool',
+ 'use_funding': 'bool',
+ 'is_all_collateral': 'bool'
+ }
+
+ attribute_map = {
+ 'user_id': 'user_id',
+ 'refresh_time': 'refresh_time',
+ 'locked': 'locked',
+ 'balances': 'balances',
+ 'total': 'total',
+ 'borrowed': 'borrowed',
+ 'total_initial_margin': 'total_initial_margin',
+ 'total_margin_balance': 'total_margin_balance',
+ 'total_maintenance_margin': 'total_maintenance_margin',
+ 'total_initial_margin_rate': 'total_initial_margin_rate',
+ 'total_maintenance_margin_rate': 'total_maintenance_margin_rate',
+ 'total_available_margin': 'total_available_margin',
+ 'unified_account_total': 'unified_account_total',
+ 'unified_account_total_liab': 'unified_account_total_liab',
+ 'unified_account_total_equity': 'unified_account_total_equity',
+ 'leverage': 'leverage',
+ 'spot_order_loss': 'spot_order_loss',
+ 'spot_hedge': 'spot_hedge',
+ 'use_funding': 'use_funding',
+ 'is_all_collateral': 'is_all_collateral'
+ }
+
+ def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, total=None, borrowed=None, total_initial_margin=None, total_margin_balance=None, total_maintenance_margin=None, total_initial_margin_rate=None, total_maintenance_margin_rate=None, total_available_margin=None, unified_account_total=None, unified_account_total_liab=None, unified_account_total_equity=None, leverage=None, spot_order_loss=None, spot_hedge=None, use_funding=None, is_all_collateral=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, int, bool, dict(str, UnifiedBalance), str, str, str, str, str, str, str, str, str, str, str, str, str, bool, bool, bool, Configuration) -> None
+ """UnifiedAccount - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._user_id = None
+ self._refresh_time = None
+ self._locked = None
+ self._balances = None
+ self._total = None
+ self._borrowed = None
+ self._total_initial_margin = None
+ self._total_margin_balance = None
+ self._total_maintenance_margin = None
+ self._total_initial_margin_rate = None
+ self._total_maintenance_margin_rate = None
+ self._total_available_margin = None
+ self._unified_account_total = None
+ self._unified_account_total_liab = None
+ self._unified_account_total_equity = None
+ self._leverage = None
+ self._spot_order_loss = None
+ self._spot_hedge = None
+ self._use_funding = None
+ self._is_all_collateral = None
+ self.discriminator = None
+
+ if user_id is not None:
+ self.user_id = user_id
+ if refresh_time is not None:
+ self.refresh_time = refresh_time
+ if locked is not None:
+ self.locked = locked
+ if balances is not None:
+ self.balances = balances
+ if total is not None:
+ self.total = total
+ if borrowed is not None:
+ self.borrowed = borrowed
+ if total_initial_margin is not None:
+ self.total_initial_margin = total_initial_margin
+ if total_margin_balance is not None:
+ self.total_margin_balance = total_margin_balance
+ if total_maintenance_margin is not None:
+ self.total_maintenance_margin = total_maintenance_margin
+ if total_initial_margin_rate is not None:
+ self.total_initial_margin_rate = total_initial_margin_rate
+ if total_maintenance_margin_rate is not None:
+ self.total_maintenance_margin_rate = total_maintenance_margin_rate
+ if total_available_margin is not None:
+ self.total_available_margin = total_available_margin
+ if unified_account_total is not None:
+ self.unified_account_total = unified_account_total
+ if unified_account_total_liab is not None:
+ self.unified_account_total_liab = unified_account_total_liab
+ if unified_account_total_equity is not None:
+ self.unified_account_total_equity = unified_account_total_equity
+ if leverage is not None:
+ self.leverage = leverage
+ if spot_order_loss is not None:
+ self.spot_order_loss = spot_order_loss
+ if spot_hedge is not None:
+ self.spot_hedge = spot_hedge
+ if use_funding is not None:
+ self.use_funding = use_funding
+ if is_all_collateral is not None:
+ self.is_all_collateral = is_all_collateral
+
+ @property
+ def user_id(self):
+ """Gets the user_id of this UnifiedAccount. # noqa: E501
+
+ User ID # noqa: E501
+
+ :return: The user_id of this UnifiedAccount. # noqa: E501
+ :rtype: int
+ """
+ return self._user_id
+
+ @user_id.setter
+ def user_id(self, user_id):
+ """Sets the user_id of this UnifiedAccount.
+
+ User ID # noqa: E501
+
+ :param user_id: The user_id of this UnifiedAccount. # noqa: E501
+ :type: int
+ """
+
+ self._user_id = user_id
+
+ @property
+ def refresh_time(self):
+ """Gets the refresh_time of this UnifiedAccount. # noqa: E501
+
+ Last refresh time # noqa: E501
+
+ :return: The refresh_time of this UnifiedAccount. # noqa: E501
+ :rtype: int
+ """
+ return self._refresh_time
+
+ @refresh_time.setter
+ def refresh_time(self, refresh_time):
+ """Sets the refresh_time of this UnifiedAccount.
+
+ Last refresh time # noqa: E501
+
+ :param refresh_time: The refresh_time of this UnifiedAccount. # noqa: E501
+ :type: int
+ """
+
+ self._refresh_time = refresh_time
+
+ @property
+ def locked(self):
+ """Gets the locked of this UnifiedAccount. # noqa: E501
+
+ Whether the account is locked, valid in cross-currency margin/combined margin mode, false in other modes such as single-currency margin mode # noqa: E501
+
+ :return: The locked of this UnifiedAccount. # noqa: E501
+ :rtype: bool
+ """
+ return self._locked
+
+ @locked.setter
+ def locked(self, locked):
+ """Sets the locked of this UnifiedAccount.
+
+ Whether the account is locked, valid in cross-currency margin/combined margin mode, false in other modes such as single-currency margin mode # noqa: E501
+
+ :param locked: The locked of this UnifiedAccount. # noqa: E501
+ :type: bool
+ """
+
+ self._locked = locked
+
+ @property
+ def balances(self):
+ """Gets the balances of this UnifiedAccount. # noqa: E501
+
+
+ :return: The balances of this UnifiedAccount. # noqa: E501
+ :rtype: dict(str, UnifiedBalance)
+ """
+ return self._balances
+
+ @balances.setter
+ def balances(self, balances):
+ """Sets the balances of this UnifiedAccount.
+
+
+ :param balances: The balances of this UnifiedAccount. # noqa: E501
+ :type: dict(str, UnifiedBalance)
+ """
+
+ self._balances = balances
+
+ @property
+ def total(self):
+ """Gets the total of this UnifiedAccount. # noqa: E501
+
+ Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be removed, replaced by unified_account_total) # noqa: E501
+
+ :return: The total of this UnifiedAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._total
+
+ @total.setter
+ def total(self, total):
+ """Sets the total of this UnifiedAccount.
+
+ Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be removed, replaced by unified_account_total) # noqa: E501
+
+ :param total: The total of this UnifiedAccount. # noqa: E501
+ :type: str
+ """
+
+ self._total = total
+
+ @property
+ def borrowed(self):
+ """Gets the borrowed of this UnifiedAccount. # noqa: E501
+
+ Total borrowed amount converted to USD, i.e. the sum of `borrowed * price` of all currencies (excluding point cards), valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :return: The borrowed of this UnifiedAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._borrowed
+
+ @borrowed.setter
+ def borrowed(self, borrowed):
+ """Sets the borrowed of this UnifiedAccount.
+
+ Total borrowed amount converted to USD, i.e. the sum of `borrowed * price` of all currencies (excluding point cards), valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :param borrowed: The borrowed of this UnifiedAccount. # noqa: E501
+ :type: str
+ """
+
+ self._borrowed = borrowed
+
+ @property
+ def total_initial_margin(self):
+ """Gets the total_initial_margin of this UnifiedAccount. # noqa: E501
+
+ Total initial margin, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :return: The total_initial_margin of this UnifiedAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._total_initial_margin
+
+ @total_initial_margin.setter
+ def total_initial_margin(self, total_initial_margin):
+ """Sets the total_initial_margin of this UnifiedAccount.
+
+ Total initial margin, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :param total_initial_margin: The total_initial_margin of this UnifiedAccount. # noqa: E501
+ :type: str
+ """
+
+ self._total_initial_margin = total_initial_margin
+
+ @property
+ def total_margin_balance(self):
+ """Gets the total_margin_balance of this UnifiedAccount. # noqa: E501
+
+ Total margin balance, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :return: The total_margin_balance of this UnifiedAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._total_margin_balance
+
+ @total_margin_balance.setter
+ def total_margin_balance(self, total_margin_balance):
+ """Sets the total_margin_balance of this UnifiedAccount.
+
+ Total margin balance, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :param total_margin_balance: The total_margin_balance of this UnifiedAccount. # noqa: E501
+ :type: str
+ """
+
+ self._total_margin_balance = total_margin_balance
+
+ @property
+ def total_maintenance_margin(self):
+ """Gets the total_maintenance_margin of this UnifiedAccount. # noqa: E501
+
+ Total maintenance margin is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :return: The total_maintenance_margin of this UnifiedAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._total_maintenance_margin
+
+ @total_maintenance_margin.setter
+ def total_maintenance_margin(self, total_maintenance_margin):
+ """Sets the total_maintenance_margin of this UnifiedAccount.
+
+ Total maintenance margin is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :param total_maintenance_margin: The total_maintenance_margin of this UnifiedAccount. # noqa: E501
+ :type: str
+ """
+
+ self._total_maintenance_margin = total_maintenance_margin
+
+ @property
+ def total_initial_margin_rate(self):
+ """Gets the total_initial_margin_rate of this UnifiedAccount. # noqa: E501
+
+ Total initial margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :return: The total_initial_margin_rate of this UnifiedAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._total_initial_margin_rate
+
+ @total_initial_margin_rate.setter
+ def total_initial_margin_rate(self, total_initial_margin_rate):
+ """Sets the total_initial_margin_rate of this UnifiedAccount.
+
+ Total initial margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :param total_initial_margin_rate: The total_initial_margin_rate of this UnifiedAccount. # noqa: E501
+ :type: str
+ """
+
+ self._total_initial_margin_rate = total_initial_margin_rate
+
+ @property
+ def total_maintenance_margin_rate(self):
+ """Gets the total_maintenance_margin_rate of this UnifiedAccount. # noqa: E501
+
+ Total maintenance margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :return: The total_maintenance_margin_rate of this UnifiedAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._total_maintenance_margin_rate
+
+ @total_maintenance_margin_rate.setter
+ def total_maintenance_margin_rate(self, total_maintenance_margin_rate):
+ """Sets the total_maintenance_margin_rate of this UnifiedAccount.
+
+ Total maintenance margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :param total_maintenance_margin_rate: The total_maintenance_margin_rate of this UnifiedAccount. # noqa: E501
+ :type: str
+ """
+
+ self._total_maintenance_margin_rate = total_maintenance_margin_rate
+
+ @property
+ def total_available_margin(self):
+ """Gets the total_available_margin of this UnifiedAccount. # noqa: E501
+
+ Available margin amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :return: The total_available_margin of this UnifiedAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._total_available_margin
+
+ @total_available_margin.setter
+ def total_available_margin(self, total_available_margin):
+ """Sets the total_available_margin of this UnifiedAccount.
+
+ Available margin amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :param total_available_margin: The total_available_margin of this UnifiedAccount. # noqa: E501
+ :type: str
+ """
+
+ self._total_available_margin = total_available_margin
+
+ @property
+ def unified_account_total(self):
+ """Gets the unified_account_total of this UnifiedAccount. # noqa: E501
+
+ Total unified account assets, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501
+
+ :return: The unified_account_total of this UnifiedAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._unified_account_total
+
+ @unified_account_total.setter
+ def unified_account_total(self, unified_account_total):
+ """Sets the unified_account_total of this UnifiedAccount.
+
+ Total unified account assets, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501
+
+ :param unified_account_total: The unified_account_total of this UnifiedAccount. # noqa: E501
+ :type: str
+ """
+
+ self._unified_account_total = unified_account_total
+
+ @property
+ def unified_account_total_liab(self):
+ """Gets the unified_account_total_liab of this UnifiedAccount. # noqa: E501
+
+ Total unified account borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :return: The unified_account_total_liab of this UnifiedAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._unified_account_total_liab
+
+ @unified_account_total_liab.setter
+ def unified_account_total_liab(self, unified_account_total_liab):
+ """Sets the unified_account_total_liab of this UnifiedAccount.
+
+ Total unified account borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :param unified_account_total_liab: The unified_account_total_liab of this UnifiedAccount. # noqa: E501
+ :type: str
+ """
+
+ self._unified_account_total_liab = unified_account_total_liab
+
+ @property
+ def unified_account_total_equity(self):
+ """Gets the unified_account_total_equity of this UnifiedAccount. # noqa: E501
+
+ Total unified account equity, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501
+
+ :return: The unified_account_total_equity of this UnifiedAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._unified_account_total_equity
+
+ @unified_account_total_equity.setter
+ def unified_account_total_equity(self, unified_account_total_equity):
+ """Sets the unified_account_total_equity of this UnifiedAccount.
+
+ Total unified account equity, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501
+
+ :param unified_account_total_equity: The unified_account_total_equity of this UnifiedAccount. # noqa: E501
+ :type: str
+ """
+
+ self._unified_account_total_equity = unified_account_total_equity
+
+ @property
+ def leverage(self):
+ """Gets the leverage of this UnifiedAccount. # noqa: E501
+
+ Actual leverage ratio, valid in cross-currency margin/combined margin mode # noqa: E501
+
+ :return: The leverage of this UnifiedAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._leverage
+
+ @leverage.setter
+ def leverage(self, leverage):
+ """Sets the leverage of this UnifiedAccount.
+
+ Actual leverage ratio, valid in cross-currency margin/combined margin mode # noqa: E501
+
+ :param leverage: The leverage of this UnifiedAccount. # noqa: E501
+ :type: str
+ """
+
+ self._leverage = leverage
+
+ @property
+ def spot_order_loss(self):
+ """Gets the spot_order_loss of this UnifiedAccount. # noqa: E501
+
+ Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :return: The spot_order_loss of this UnifiedAccount. # noqa: E501
+ :rtype: str
+ """
+ return self._spot_order_loss
+
+ @spot_order_loss.setter
+ def spot_order_loss(self, spot_order_loss):
+ """Sets the spot_order_loss of this UnifiedAccount.
+
+ Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :param spot_order_loss: The spot_order_loss of this UnifiedAccount. # noqa: E501
+ :type: str
+ """
+
+ self._spot_order_loss = spot_order_loss
+
+ @property
+ def spot_hedge(self):
+ """Gets the spot_hedge of this UnifiedAccount. # noqa: E501
+
+ Spot hedging status: true - enabled, false - disabled # noqa: E501
+
+ :return: The spot_hedge of this UnifiedAccount. # noqa: E501
+ :rtype: bool
+ """
+ return self._spot_hedge
+
+ @spot_hedge.setter
+ def spot_hedge(self, spot_hedge):
+ """Sets the spot_hedge of this UnifiedAccount.
+
+ Spot hedging status: true - enabled, false - disabled # noqa: E501
+
+ :param spot_hedge: The spot_hedge of this UnifiedAccount. # noqa: E501
+ :type: bool
+ """
+
+ self._spot_hedge = spot_hedge
+
+ @property
+ def use_funding(self):
+ """Gets the use_funding of this UnifiedAccount. # noqa: E501
+
+ Whether to use Earn funds as margin # noqa: E501
+
+ :return: The use_funding of this UnifiedAccount. # noqa: E501
+ :rtype: bool
+ """
+ return self._use_funding
+
+ @use_funding.setter
+ def use_funding(self, use_funding):
+ """Sets the use_funding of this UnifiedAccount.
+
+ Whether to use Earn funds as margin # noqa: E501
+
+ :param use_funding: The use_funding of this UnifiedAccount. # noqa: E501
+ :type: bool
+ """
+
+ self._use_funding = use_funding
+
+ @property
+ def is_all_collateral(self):
+ """Gets the is_all_collateral of this UnifiedAccount. # noqa: E501
+
+ Whether all currencies are used as margin: true - all currencies as margin, false - no # noqa: E501
+
+ :return: The is_all_collateral of this UnifiedAccount. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_all_collateral
+
+ @is_all_collateral.setter
+ def is_all_collateral(self, is_all_collateral):
+ """Sets the is_all_collateral of this UnifiedAccount.
+
+ Whether all currencies are used as margin: true - all currencies as margin, false - no # noqa: E501
+
+ :param is_all_collateral: The is_all_collateral of this UnifiedAccount. # noqa: E501
+ :type: bool
+ """
+
+ self._is_all_collateral = is_all_collateral
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedAccount):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedAccount):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_balance.py b/gate_api/models/unified_balance.py
new file mode 100644
index 0000000..1d7171a
--- /dev/null
+++ b/gate_api/models/unified_balance.py
@@ -0,0 +1,655 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedBalance(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'available': 'str',
+ 'freeze': 'str',
+ 'borrowed': 'str',
+ 'negative_liab': 'str',
+ 'futures_pos_liab': 'str',
+ 'equity': 'str',
+ 'total_freeze': 'str',
+ 'total_liab': 'str',
+ 'spot_in_use': 'str',
+ 'funding': 'str',
+ 'funding_version': 'str',
+ 'cross_balance': 'str',
+ 'iso_balance': 'str',
+ 'im': 'str',
+ 'mm': 'str',
+ 'imr': 'str',
+ 'mmr': 'str',
+ 'margin_balance': 'str',
+ 'available_margin': 'str',
+ 'enabled_collateral': 'bool'
+ }
+
+ attribute_map = {
+ 'available': 'available',
+ 'freeze': 'freeze',
+ 'borrowed': 'borrowed',
+ 'negative_liab': 'negative_liab',
+ 'futures_pos_liab': 'futures_pos_liab',
+ 'equity': 'equity',
+ 'total_freeze': 'total_freeze',
+ 'total_liab': 'total_liab',
+ 'spot_in_use': 'spot_in_use',
+ 'funding': 'funding',
+ 'funding_version': 'funding_version',
+ 'cross_balance': 'cross_balance',
+ 'iso_balance': 'iso_balance',
+ 'im': 'im',
+ 'mm': 'mm',
+ 'imr': 'imr',
+ 'mmr': 'mmr',
+ 'margin_balance': 'margin_balance',
+ 'available_margin': 'available_margin',
+ 'enabled_collateral': 'enabled_collateral'
+ }
+
+ def __init__(self, available=None, freeze=None, borrowed=None, negative_liab=None, futures_pos_liab=None, equity=None, total_freeze=None, total_liab=None, spot_in_use=None, funding=None, funding_version=None, cross_balance=None, iso_balance=None, im=None, mm=None, imr=None, mmr=None, margin_balance=None, available_margin=None, enabled_collateral=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, bool, Configuration) -> None
+ """UnifiedBalance - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._available = None
+ self._freeze = None
+ self._borrowed = None
+ self._negative_liab = None
+ self._futures_pos_liab = None
+ self._equity = None
+ self._total_freeze = None
+ self._total_liab = None
+ self._spot_in_use = None
+ self._funding = None
+ self._funding_version = None
+ self._cross_balance = None
+ self._iso_balance = None
+ self._im = None
+ self._mm = None
+ self._imr = None
+ self._mmr = None
+ self._margin_balance = None
+ self._available_margin = None
+ self._enabled_collateral = None
+ self.discriminator = None
+
+ if available is not None:
+ self.available = available
+ if freeze is not None:
+ self.freeze = freeze
+ if borrowed is not None:
+ self.borrowed = borrowed
+ if negative_liab is not None:
+ self.negative_liab = negative_liab
+ if futures_pos_liab is not None:
+ self.futures_pos_liab = futures_pos_liab
+ if equity is not None:
+ self.equity = equity
+ if total_freeze is not None:
+ self.total_freeze = total_freeze
+ if total_liab is not None:
+ self.total_liab = total_liab
+ if spot_in_use is not None:
+ self.spot_in_use = spot_in_use
+ if funding is not None:
+ self.funding = funding
+ if funding_version is not None:
+ self.funding_version = funding_version
+ if cross_balance is not None:
+ self.cross_balance = cross_balance
+ if iso_balance is not None:
+ self.iso_balance = iso_balance
+ if im is not None:
+ self.im = im
+ if mm is not None:
+ self.mm = mm
+ if imr is not None:
+ self.imr = imr
+ if mmr is not None:
+ self.mmr = mmr
+ if margin_balance is not None:
+ self.margin_balance = margin_balance
+ if available_margin is not None:
+ self.available_margin = available_margin
+ if enabled_collateral is not None:
+ self.enabled_collateral = enabled_collateral
+
+ @property
+ def available(self):
+ """Gets the available of this UnifiedBalance. # noqa: E501
+
+ Available balance, valid in single currency margin/cross-currency margin/combined margin mode, calculation varies by mode # noqa: E501
+
+ :return: The available of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._available
+
+ @available.setter
+ def available(self, available):
+ """Sets the available of this UnifiedBalance.
+
+ Available balance, valid in single currency margin/cross-currency margin/combined margin mode, calculation varies by mode # noqa: E501
+
+ :param available: The available of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._available = available
+
+ @property
+ def freeze(self):
+ """Gets the freeze of this UnifiedBalance. # noqa: E501
+
+ Locked balance, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501
+
+ :return: The freeze of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._freeze
+
+ @freeze.setter
+ def freeze(self, freeze):
+ """Sets the freeze of this UnifiedBalance.
+
+ Locked balance, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501
+
+ :param freeze: The freeze of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._freeze = freeze
+
+ @property
+ def borrowed(self):
+ """Gets the borrowed of this UnifiedBalance. # noqa: E501
+
+ Borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :return: The borrowed of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._borrowed
+
+ @borrowed.setter
+ def borrowed(self, borrowed):
+ """Sets the borrowed of this UnifiedBalance.
+
+ Borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :param borrowed: The borrowed of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._borrowed = borrowed
+
+ @property
+ def negative_liab(self):
+ """Gets the negative_liab of this UnifiedBalance. # noqa: E501
+
+ Negative balance borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :return: The negative_liab of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._negative_liab
+
+ @negative_liab.setter
+ def negative_liab(self, negative_liab):
+ """Sets the negative_liab of this UnifiedBalance.
+
+ Negative balance borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :param negative_liab: The negative_liab of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._negative_liab = negative_liab
+
+ @property
+ def futures_pos_liab(self):
+ """Gets the futures_pos_liab of this UnifiedBalance. # noqa: E501
+
+ Contract opening position borrowing currency (abandoned, to be offline field) # noqa: E501
+
+ :return: The futures_pos_liab of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._futures_pos_liab
+
+ @futures_pos_liab.setter
+ def futures_pos_liab(self, futures_pos_liab):
+ """Sets the futures_pos_liab of this UnifiedBalance.
+
+ Contract opening position borrowing currency (abandoned, to be offline field) # noqa: E501
+
+ :param futures_pos_liab: The futures_pos_liab of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._futures_pos_liab = futures_pos_liab
+
+ @property
+ def equity(self):
+ """Gets the equity of this UnifiedBalance. # noqa: E501
+
+ Equity, valid in single currency margin/cross currency margin/combined margin mode # noqa: E501
+
+ :return: The equity of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._equity
+
+ @equity.setter
+ def equity(self, equity):
+ """Sets the equity of this UnifiedBalance.
+
+ Equity, valid in single currency margin/cross currency margin/combined margin mode # noqa: E501
+
+ :param equity: The equity of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._equity = equity
+
+ @property
+ def total_freeze(self):
+ """Gets the total_freeze of this UnifiedBalance. # noqa: E501
+
+ Total frozen (deprecated, to be removed) # noqa: E501
+
+ :return: The total_freeze of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._total_freeze
+
+ @total_freeze.setter
+ def total_freeze(self, total_freeze):
+ """Sets the total_freeze of this UnifiedBalance.
+
+ Total frozen (deprecated, to be removed) # noqa: E501
+
+ :param total_freeze: The total_freeze of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._total_freeze = total_freeze
+
+ @property
+ def total_liab(self):
+ """Gets the total_liab of this UnifiedBalance. # noqa: E501
+
+ Total borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :return: The total_liab of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._total_liab
+
+ @total_liab.setter
+ def total_liab(self, total_liab):
+ """Sets the total_liab of this UnifiedBalance.
+
+ Total borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501
+
+ :param total_liab: The total_liab of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._total_liab = total_liab
+
+ @property
+ def spot_in_use(self):
+ """Gets the spot_in_use of this UnifiedBalance. # noqa: E501
+
+ The amount of spot hedging is valid in the combined margin mode, and is 0 in other margin modes such as single currency and cross-currency margin modes # noqa: E501
+
+ :return: The spot_in_use of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._spot_in_use
+
+ @spot_in_use.setter
+ def spot_in_use(self, spot_in_use):
+ """Sets the spot_in_use of this UnifiedBalance.
+
+ The amount of spot hedging is valid in the combined margin mode, and is 0 in other margin modes such as single currency and cross-currency margin modes # noqa: E501
+
+ :param spot_in_use: The spot_in_use of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._spot_in_use = spot_in_use
+
+ @property
+ def funding(self):
+ """Gets the funding of this UnifiedBalance. # noqa: E501
+
+ Uniloan financial management amount, effective when turned on as a unified account margin switch # noqa: E501
+
+ :return: The funding of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._funding
+
+ @funding.setter
+ def funding(self, funding):
+ """Sets the funding of this UnifiedBalance.
+
+ Uniloan financial management amount, effective when turned on as a unified account margin switch # noqa: E501
+
+ :param funding: The funding of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._funding = funding
+
+ @property
+ def funding_version(self):
+ """Gets the funding_version of this UnifiedBalance. # noqa: E501
+
+ Funding version # noqa: E501
+
+ :return: The funding_version of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._funding_version
+
+ @funding_version.setter
+ def funding_version(self, funding_version):
+ """Sets the funding_version of this UnifiedBalance.
+
+ Funding version # noqa: E501
+
+ :param funding_version: The funding_version of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._funding_version = funding_version
+
+ @property
+ def cross_balance(self):
+ """Gets the cross_balance of this UnifiedBalance. # noqa: E501
+
+ Full margin balance is valid in single currency margin mode, and is 0 in other modes such as cross currency margin/combined margin mode # noqa: E501
+
+ :return: The cross_balance of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._cross_balance
+
+ @cross_balance.setter
+ def cross_balance(self, cross_balance):
+ """Sets the cross_balance of this UnifiedBalance.
+
+ Full margin balance is valid in single currency margin mode, and is 0 in other modes such as cross currency margin/combined margin mode # noqa: E501
+
+ :param cross_balance: The cross_balance of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._cross_balance = cross_balance
+
+ @property
+ def iso_balance(self):
+ """Gets the iso_balance of this UnifiedBalance. # noqa: E501
+
+ Isolated margin balance is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501
+
+ :return: The iso_balance of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._iso_balance
+
+ @iso_balance.setter
+ def iso_balance(self, iso_balance):
+ """Sets the iso_balance of this UnifiedBalance.
+
+ Isolated margin balance is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501
+
+ :param iso_balance: The iso_balance of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._iso_balance = iso_balance
+
+ @property
+ def im(self):
+ """Gets the im of this UnifiedBalance. # noqa: E501
+
+ Full-position initial margin is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501
+
+ :return: The im of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._im
+
+ @im.setter
+ def im(self, im):
+ """Sets the im of this UnifiedBalance.
+
+ Full-position initial margin is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501
+
+ :param im: The im of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._im = im
+
+ @property
+ def mm(self):
+ """Gets the mm of this UnifiedBalance. # noqa: E501
+
+ Cross margin maintenance margin, valid in single-currency margin mode, 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501
+
+ :return: The mm of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._mm
+
+ @mm.setter
+ def mm(self, mm):
+ """Sets the mm of this UnifiedBalance.
+
+ Cross margin maintenance margin, valid in single-currency margin mode, 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501
+
+ :param mm: The mm of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._mm = mm
+
+ @property
+ def imr(self):
+ """Gets the imr of this UnifiedBalance. # noqa: E501
+
+ Full-position initial margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501
+
+ :return: The imr of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._imr
+
+ @imr.setter
+ def imr(self, imr):
+ """Sets the imr of this UnifiedBalance.
+
+ Full-position initial margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501
+
+ :param imr: The imr of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._imr = imr
+
+ @property
+ def mmr(self):
+ """Gets the mmr of this UnifiedBalance. # noqa: E501
+
+ Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501
+
+ :return: The mmr of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._mmr
+
+ @mmr.setter
+ def mmr(self, mmr):
+ """Sets the mmr of this UnifiedBalance.
+
+ Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501
+
+ :param mmr: The mmr of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._mmr = mmr
+
+ @property
+ def margin_balance(self):
+ """Gets the margin_balance of this UnifiedBalance. # noqa: E501
+
+ Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode # noqa: E501
+
+ :return: The margin_balance of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._margin_balance
+
+ @margin_balance.setter
+ def margin_balance(self, margin_balance):
+ """Sets the margin_balance of this UnifiedBalance.
+
+ Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode # noqa: E501
+
+ :param margin_balance: The margin_balance of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._margin_balance = margin_balance
+
+ @property
+ def available_margin(self):
+ """Gets the available_margin of this UnifiedBalance. # noqa: E501
+
+ Cross margin available balance, valid in single currency margin mode, 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501
+
+ :return: The available_margin of this UnifiedBalance. # noqa: E501
+ :rtype: str
+ """
+ return self._available_margin
+
+ @available_margin.setter
+ def available_margin(self, available_margin):
+ """Sets the available_margin of this UnifiedBalance.
+
+ Cross margin available balance, valid in single currency margin mode, 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501
+
+ :param available_margin: The available_margin of this UnifiedBalance. # noqa: E501
+ :type: str
+ """
+
+ self._available_margin = available_margin
+
+ @property
+ def enabled_collateral(self):
+ """Gets the enabled_collateral of this UnifiedBalance. # noqa: E501
+
+ Currency enabled as margin: true - Enabled, false - Disabled # noqa: E501
+
+ :return: The enabled_collateral of this UnifiedBalance. # noqa: E501
+ :rtype: bool
+ """
+ return self._enabled_collateral
+
+ @enabled_collateral.setter
+ def enabled_collateral(self, enabled_collateral):
+ """Sets the enabled_collateral of this UnifiedBalance.
+
+ Currency enabled as margin: true - Enabled, false - Disabled # noqa: E501
+
+ :param enabled_collateral: The enabled_collateral of this UnifiedBalance. # noqa: E501
+ :type: bool
+ """
+
+ self._enabled_collateral = enabled_collateral
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedBalance):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedBalance):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/cross_margin_borrowable.py b/gate_api/models/unified_borrowable.py
similarity index 63%
rename from gate_api/models/cross_margin_borrowable.py
rename to gate_api/models/unified_borrowable.py
index a5fe9c4..7201c76 100644
--- a/gate_api/models/cross_margin_borrowable.py
+++ b/gate_api/models/unified_borrowable.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@
from gate_api.configuration import Configuration
-class CrossMarginBorrowable(object):
+class UnifiedBorrowable(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -32,13 +32,19 @@ class CrossMarginBorrowable(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'amount': 'str'}
+ openapi_types = {
+ 'currency': 'str',
+ 'amount': 'str'
+ }
- attribute_map = {'currency': 'currency', 'amount': 'amount'}
+ attribute_map = {
+ 'currency': 'currency',
+ 'amount': 'amount'
+ }
def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, Configuration) -> None
- """CrossMarginBorrowable - a model defined in OpenAPI""" # noqa: E501
+ """UnifiedBorrowable - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -54,22 +60,22 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None):
@property
def currency(self):
- """Gets the currency of this CrossMarginBorrowable. # noqa: E501
+ """Gets the currency of this UnifiedBorrowable. # noqa: E501
Currency detail # noqa: E501
- :return: The currency of this CrossMarginBorrowable. # noqa: E501
+ :return: The currency of this UnifiedBorrowable. # noqa: E501
:rtype: str
"""
return self._currency
@currency.setter
def currency(self, currency):
- """Sets the currency of this CrossMarginBorrowable.
+ """Sets the currency of this UnifiedBorrowable.
Currency detail # noqa: E501
- :param currency: The currency of this CrossMarginBorrowable. # noqa: E501
+ :param currency: The currency of this UnifiedBorrowable. # noqa: E501
:type: str
"""
@@ -77,22 +83,22 @@ def currency(self, currency):
@property
def amount(self):
- """Gets the amount of this CrossMarginBorrowable. # noqa: E501
+ """Gets the amount of this UnifiedBorrowable. # noqa: E501
Max borrowable amount # noqa: E501
- :return: The amount of this CrossMarginBorrowable. # noqa: E501
+ :return: The amount of this UnifiedBorrowable. # noqa: E501
:rtype: str
"""
return self._amount
@amount.setter
def amount(self, amount):
- """Sets the amount of this CrossMarginBorrowable.
+ """Sets the amount of this UnifiedBorrowable.
Max borrowable amount # noqa: E501
- :param amount: The amount of this CrossMarginBorrowable. # noqa: E501
+ :param amount: The amount of this UnifiedBorrowable. # noqa: E501
:type: str
"""
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
@@ -130,14 +138,14 @@ def __repr__(self):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, CrossMarginBorrowable):
+ if not isinstance(other, UnifiedBorrowable):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, CrossMarginBorrowable):
+ if not isinstance(other, UnifiedBorrowable):
return True
return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/cross_margin_transferable.py b/gate_api/models/unified_borrowable1.py
similarity index 61%
rename from gate_api/models/cross_margin_transferable.py
rename to gate_api/models/unified_borrowable1.py
index f38d641..626d1af 100644
--- a/gate_api/models/cross_margin_transferable.py
+++ b/gate_api/models/unified_borrowable1.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@
from gate_api.configuration import Configuration
-class CrossMarginTransferable(object):
+class UnifiedBorrowable1(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -32,13 +32,19 @@ class CrossMarginTransferable(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'amount': 'str'}
+ openapi_types = {
+ 'currency': 'str',
+ 'amount': 'str'
+ }
- attribute_map = {'currency': 'currency', 'amount': 'amount'}
+ attribute_map = {
+ 'currency': 'currency',
+ 'amount': 'amount'
+ }
def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, Configuration) -> None
- """CrossMarginTransferable - a model defined in OpenAPI""" # noqa: E501
+ """UnifiedBorrowable1 - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -54,22 +60,22 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None):
@property
def currency(self):
- """Gets the currency of this CrossMarginTransferable. # noqa: E501
+ """Gets the currency of this UnifiedBorrowable1. # noqa: E501
Currency detail # noqa: E501
- :return: The currency of this CrossMarginTransferable. # noqa: E501
+ :return: The currency of this UnifiedBorrowable1. # noqa: E501
:rtype: str
"""
return self._currency
@currency.setter
def currency(self, currency):
- """Sets the currency of this CrossMarginTransferable.
+ """Sets the currency of this UnifiedBorrowable1.
Currency detail # noqa: E501
- :param currency: The currency of this CrossMarginTransferable. # noqa: E501
+ :param currency: The currency of this UnifiedBorrowable1. # noqa: E501
:type: str
"""
@@ -77,22 +83,22 @@ def currency(self, currency):
@property
def amount(self):
- """Gets the amount of this CrossMarginTransferable. # noqa: E501
+ """Gets the amount of this UnifiedBorrowable1. # noqa: E501
- Max transferable amount # noqa: E501
+ Maximum borrowable amount # noqa: E501
- :return: The amount of this CrossMarginTransferable. # noqa: E501
+ :return: The amount of this UnifiedBorrowable1. # noqa: E501
:rtype: str
"""
return self._amount
@amount.setter
def amount(self, amount):
- """Sets the amount of this CrossMarginTransferable.
+ """Sets the amount of this UnifiedBorrowable1.
- Max transferable amount # noqa: E501
+ Maximum borrowable amount # noqa: E501
- :param amount: The amount of this CrossMarginTransferable. # noqa: E501
+ :param amount: The amount of this UnifiedBorrowable1. # noqa: E501
:type: str
"""
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
@@ -130,14 +138,14 @@ def __repr__(self):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, CrossMarginTransferable):
+ if not isinstance(other, UnifiedBorrowable1):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, CrossMarginTransferable):
+ if not isinstance(other, UnifiedBorrowable1):
return True
return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_collateral_req.py b/gate_api/models/unified_collateral_req.py
new file mode 100644
index 0000000..6e4c9c2
--- /dev/null
+++ b/gate_api/models/unified_collateral_req.py
@@ -0,0 +1,185 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedCollateralReq(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'collateral_type': 'int',
+ 'enable_list': 'list[str]',
+ 'disable_list': 'list[str]'
+ }
+
+ attribute_map = {
+ 'collateral_type': 'collateral_type',
+ 'enable_list': 'enable_list',
+ 'disable_list': 'disable_list'
+ }
+
+ def __init__(self, collateral_type=None, enable_list=None, disable_list=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, list[str], list[str], Configuration) -> None
+ """UnifiedCollateralReq - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._collateral_type = None
+ self._enable_list = None
+ self._disable_list = None
+ self.discriminator = None
+
+ if collateral_type is not None:
+ self.collateral_type = collateral_type
+ if enable_list is not None:
+ self.enable_list = enable_list
+ if disable_list is not None:
+ self.disable_list = disable_list
+
+ @property
+ def collateral_type(self):
+ """Gets the collateral_type of this UnifiedCollateralReq. # noqa: E501
+
+ User-set collateral mode: 0(all)-All currencies as collateral, 1(custom)-Custom currencies as collateral. When collateral_type is 0(all), enable_list and disable_list parameters are invalid # noqa: E501
+
+ :return: The collateral_type of this UnifiedCollateralReq. # noqa: E501
+ :rtype: int
+ """
+ return self._collateral_type
+
+ @collateral_type.setter
+ def collateral_type(self, collateral_type):
+ """Sets the collateral_type of this UnifiedCollateralReq.
+
+ User-set collateral mode: 0(all)-All currencies as collateral, 1(custom)-Custom currencies as collateral. When collateral_type is 0(all), enable_list and disable_list parameters are invalid # noqa: E501
+
+ :param collateral_type: The collateral_type of this UnifiedCollateralReq. # noqa: E501
+ :type: int
+ """
+ allowed_values = [0, 1] # noqa: E501
+ if self.local_vars_configuration.client_side_validation and collateral_type not in allowed_values: # noqa: E501
+ raise ValueError(
+ "Invalid value for `collateral_type` ({0}), must be one of {1}" # noqa: E501
+ .format(collateral_type, allowed_values)
+ )
+
+ self._collateral_type = collateral_type
+
+ @property
+ def enable_list(self):
+ """Gets the enable_list of this UnifiedCollateralReq. # noqa: E501
+
+ Currency list, where collateral_type=1(custom) indicates the addition logic # noqa: E501
+
+ :return: The enable_list of this UnifiedCollateralReq. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._enable_list
+
+ @enable_list.setter
+ def enable_list(self, enable_list):
+ """Sets the enable_list of this UnifiedCollateralReq.
+
+ Currency list, where collateral_type=1(custom) indicates the addition logic # noqa: E501
+
+ :param enable_list: The enable_list of this UnifiedCollateralReq. # noqa: E501
+ :type: list[str]
+ """
+
+ self._enable_list = enable_list
+
+ @property
+ def disable_list(self):
+ """Gets the disable_list of this UnifiedCollateralReq. # noqa: E501
+
+ Disable list, indicating the disable logic # noqa: E501
+
+ :return: The disable_list of this UnifiedCollateralReq. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._disable_list
+
+ @disable_list.setter
+ def disable_list(self, disable_list):
+ """Sets the disable_list of this UnifiedCollateralReq.
+
+ Disable list, indicating the disable logic # noqa: E501
+
+ :param disable_list: The disable_list of this UnifiedCollateralReq. # noqa: E501
+ :type: list[str]
+ """
+
+ self._disable_list = disable_list
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedCollateralReq):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedCollateralReq):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_collateral_res.py b/gate_api/models/unified_collateral_res.py
new file mode 100644
index 0000000..a1cd842
--- /dev/null
+++ b/gate_api/models/unified_collateral_res.py
@@ -0,0 +1,123 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedCollateralRes(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'is_success': 'bool'
+ }
+
+ attribute_map = {
+ 'is_success': 'is_success'
+ }
+
+ def __init__(self, is_success=None, local_vars_configuration=None): # noqa: E501
+ # type: (bool, Configuration) -> None
+ """UnifiedCollateralRes - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._is_success = None
+ self.discriminator = None
+
+ if is_success is not None:
+ self.is_success = is_success
+
+ @property
+ def is_success(self):
+ """Gets the is_success of this UnifiedCollateralRes. # noqa: E501
+
+ Whether the setting was successful # noqa: E501
+
+ :return: The is_success of this UnifiedCollateralRes. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_success
+
+ @is_success.setter
+ def is_success(self, is_success):
+ """Sets the is_success of this UnifiedCollateralRes.
+
+ Whether the setting was successful # noqa: E501
+
+ :param is_success: The is_success of this UnifiedCollateralRes. # noqa: E501
+ :type: bool
+ """
+
+ self._is_success = is_success
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedCollateralRes):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedCollateralRes):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_currency.py b/gate_api/models/unified_currency.py
new file mode 100644
index 0000000..1039e91
--- /dev/null
+++ b/gate_api/models/unified_currency.py
@@ -0,0 +1,263 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedCurrency(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'name': 'str',
+ 'prec': 'str',
+ 'min_borrow_amount': 'str',
+ 'user_max_borrow_amount': 'str',
+ 'total_max_borrow_amount': 'str',
+ 'loan_status': 'str'
+ }
+
+ attribute_map = {
+ 'name': 'name',
+ 'prec': 'prec',
+ 'min_borrow_amount': 'min_borrow_amount',
+ 'user_max_borrow_amount': 'user_max_borrow_amount',
+ 'total_max_borrow_amount': 'total_max_borrow_amount',
+ 'loan_status': 'loan_status'
+ }
+
+ def __init__(self, name=None, prec=None, min_borrow_amount=None, user_max_borrow_amount=None, total_max_borrow_amount=None, loan_status=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, Configuration) -> None
+ """UnifiedCurrency - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._name = None
+ self._prec = None
+ self._min_borrow_amount = None
+ self._user_max_borrow_amount = None
+ self._total_max_borrow_amount = None
+ self._loan_status = None
+ self.discriminator = None
+
+ if name is not None:
+ self.name = name
+ if prec is not None:
+ self.prec = prec
+ if min_borrow_amount is not None:
+ self.min_borrow_amount = min_borrow_amount
+ if user_max_borrow_amount is not None:
+ self.user_max_borrow_amount = user_max_borrow_amount
+ if total_max_borrow_amount is not None:
+ self.total_max_borrow_amount = total_max_borrow_amount
+ if loan_status is not None:
+ self.loan_status = loan_status
+
+ @property
+ def name(self):
+ """Gets the name of this UnifiedCurrency. # noqa: E501
+
+ Currency name # noqa: E501
+
+ :return: The name of this UnifiedCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this UnifiedCurrency.
+
+ Currency name # noqa: E501
+
+ :param name: The name of this UnifiedCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._name = name
+
+ @property
+ def prec(self):
+ """Gets the prec of this UnifiedCurrency. # noqa: E501
+
+ Currency precision # noqa: E501
+
+ :return: The prec of this UnifiedCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._prec
+
+ @prec.setter
+ def prec(self, prec):
+ """Sets the prec of this UnifiedCurrency.
+
+ Currency precision # noqa: E501
+
+ :param prec: The prec of this UnifiedCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._prec = prec
+
+ @property
+ def min_borrow_amount(self):
+ """Gets the min_borrow_amount of this UnifiedCurrency. # noqa: E501
+
+ Minimum borrowable limit, in currency units # noqa: E501
+
+ :return: The min_borrow_amount of this UnifiedCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._min_borrow_amount
+
+ @min_borrow_amount.setter
+ def min_borrow_amount(self, min_borrow_amount):
+ """Sets the min_borrow_amount of this UnifiedCurrency.
+
+ Minimum borrowable limit, in currency units # noqa: E501
+
+ :param min_borrow_amount: The min_borrow_amount of this UnifiedCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._min_borrow_amount = min_borrow_amount
+
+ @property
+ def user_max_borrow_amount(self):
+ """Gets the user_max_borrow_amount of this UnifiedCurrency. # noqa: E501
+
+ User's maximum borrowable limit, in USDT # noqa: E501
+
+ :return: The user_max_borrow_amount of this UnifiedCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._user_max_borrow_amount
+
+ @user_max_borrow_amount.setter
+ def user_max_borrow_amount(self, user_max_borrow_amount):
+ """Sets the user_max_borrow_amount of this UnifiedCurrency.
+
+ User's maximum borrowable limit, in USDT # noqa: E501
+
+ :param user_max_borrow_amount: The user_max_borrow_amount of this UnifiedCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._user_max_borrow_amount = user_max_borrow_amount
+
+ @property
+ def total_max_borrow_amount(self):
+ """Gets the total_max_borrow_amount of this UnifiedCurrency. # noqa: E501
+
+ Platform's maximum borrowable limit, in USDT # noqa: E501
+
+ :return: The total_max_borrow_amount of this UnifiedCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._total_max_borrow_amount
+
+ @total_max_borrow_amount.setter
+ def total_max_borrow_amount(self, total_max_borrow_amount):
+ """Sets the total_max_borrow_amount of this UnifiedCurrency.
+
+ Platform's maximum borrowable limit, in USDT # noqa: E501
+
+ :param total_max_borrow_amount: The total_max_borrow_amount of this UnifiedCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._total_max_borrow_amount = total_max_borrow_amount
+
+ @property
+ def loan_status(self):
+ """Gets the loan_status of this UnifiedCurrency. # noqa: E501
+
+ Lending status - `disable` : Lending prohibited - `enable` : Lending supported # noqa: E501
+
+ :return: The loan_status of this UnifiedCurrency. # noqa: E501
+ :rtype: str
+ """
+ return self._loan_status
+
+ @loan_status.setter
+ def loan_status(self, loan_status):
+ """Sets the loan_status of this UnifiedCurrency.
+
+ Lending status - `disable` : Lending prohibited - `enable` : Lending supported # noqa: E501
+
+ :param loan_status: The loan_status of this UnifiedCurrency. # noqa: E501
+ :type: str
+ """
+
+ self._loan_status = loan_status
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedCurrency):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedCurrency):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_discount.py b/gate_api/models/unified_discount.py
new file mode 100644
index 0000000..27cad2c
--- /dev/null
+++ b/gate_api/models/unified_discount.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedDiscount(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'discount_tiers': 'list[UnifiedDiscountTiers]'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'discount_tiers': 'discount_tiers'
+ }
+
+ def __init__(self, currency=None, discount_tiers=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, list[UnifiedDiscountTiers], Configuration) -> None
+ """UnifiedDiscount - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._discount_tiers = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if discount_tiers is not None:
+ self.discount_tiers = discount_tiers
+
+ @property
+ def currency(self):
+ """Gets the currency of this UnifiedDiscount. # noqa: E501
+
+ Currency name # noqa: E501
+
+ :return: The currency of this UnifiedDiscount. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this UnifiedDiscount.
+
+ Currency name # noqa: E501
+
+ :param currency: The currency of this UnifiedDiscount. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def discount_tiers(self):
+ """Gets the discount_tiers of this UnifiedDiscount. # noqa: E501
+
+ Tiered discount # noqa: E501
+
+ :return: The discount_tiers of this UnifiedDiscount. # noqa: E501
+ :rtype: list[UnifiedDiscountTiers]
+ """
+ return self._discount_tiers
+
+ @discount_tiers.setter
+ def discount_tiers(self, discount_tiers):
+ """Sets the discount_tiers of this UnifiedDiscount.
+
+ Tiered discount # noqa: E501
+
+ :param discount_tiers: The discount_tiers of this UnifiedDiscount. # noqa: E501
+ :type: list[UnifiedDiscountTiers]
+ """
+
+ self._discount_tiers = discount_tiers
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedDiscount):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedDiscount):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_discount_tiers.py b/gate_api/models/unified_discount_tiers.py
new file mode 100644
index 0000000..1487ce8
--- /dev/null
+++ b/gate_api/models/unified_discount_tiers.py
@@ -0,0 +1,235 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedDiscountTiers(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'tier': 'str',
+ 'discount': 'str',
+ 'lower_limit': 'str',
+ 'upper_limit': 'str',
+ 'leverage': 'str'
+ }
+
+ attribute_map = {
+ 'tier': 'tier',
+ 'discount': 'discount',
+ 'lower_limit': 'lower_limit',
+ 'upper_limit': 'upper_limit',
+ 'leverage': 'leverage'
+ }
+
+ def __init__(self, tier=None, discount=None, lower_limit=None, upper_limit=None, leverage=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, Configuration) -> None
+ """UnifiedDiscountTiers - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._tier = None
+ self._discount = None
+ self._lower_limit = None
+ self._upper_limit = None
+ self._leverage = None
+ self.discriminator = None
+
+ if tier is not None:
+ self.tier = tier
+ if discount is not None:
+ self.discount = discount
+ if lower_limit is not None:
+ self.lower_limit = lower_limit
+ if upper_limit is not None:
+ self.upper_limit = upper_limit
+ if leverage is not None:
+ self.leverage = leverage
+
+ @property
+ def tier(self):
+ """Gets the tier of this UnifiedDiscountTiers. # noqa: E501
+
+ Tier # noqa: E501
+
+ :return: The tier of this UnifiedDiscountTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._tier
+
+ @tier.setter
+ def tier(self, tier):
+ """Sets the tier of this UnifiedDiscountTiers.
+
+ Tier # noqa: E501
+
+ :param tier: The tier of this UnifiedDiscountTiers. # noqa: E501
+ :type: str
+ """
+
+ self._tier = tier
+
+ @property
+ def discount(self):
+ """Gets the discount of this UnifiedDiscountTiers. # noqa: E501
+
+ Discount # noqa: E501
+
+ :return: The discount of this UnifiedDiscountTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._discount
+
+ @discount.setter
+ def discount(self, discount):
+ """Sets the discount of this UnifiedDiscountTiers.
+
+ Discount # noqa: E501
+
+ :param discount: The discount of this UnifiedDiscountTiers. # noqa: E501
+ :type: str
+ """
+
+ self._discount = discount
+
+ @property
+ def lower_limit(self):
+ """Gets the lower_limit of this UnifiedDiscountTiers. # noqa: E501
+
+ Lower limit # noqa: E501
+
+ :return: The lower_limit of this UnifiedDiscountTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._lower_limit
+
+ @lower_limit.setter
+ def lower_limit(self, lower_limit):
+ """Sets the lower_limit of this UnifiedDiscountTiers.
+
+ Lower limit # noqa: E501
+
+ :param lower_limit: The lower_limit of this UnifiedDiscountTiers. # noqa: E501
+ :type: str
+ """
+
+ self._lower_limit = lower_limit
+
+ @property
+ def upper_limit(self):
+ """Gets the upper_limit of this UnifiedDiscountTiers. # noqa: E501
+
+ Upper limit, + indicates positive infinity # noqa: E501
+
+ :return: The upper_limit of this UnifiedDiscountTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._upper_limit
+
+ @upper_limit.setter
+ def upper_limit(self, upper_limit):
+ """Sets the upper_limit of this UnifiedDiscountTiers.
+
+ Upper limit, + indicates positive infinity # noqa: E501
+
+ :param upper_limit: The upper_limit of this UnifiedDiscountTiers. # noqa: E501
+ :type: str
+ """
+
+ self._upper_limit = upper_limit
+
+ @property
+ def leverage(self):
+ """Gets the leverage of this UnifiedDiscountTiers. # noqa: E501
+
+ Position leverage # noqa: E501
+
+ :return: The leverage of this UnifiedDiscountTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._leverage
+
+ @leverage.setter
+ def leverage(self, leverage):
+ """Sets the leverage of this UnifiedDiscountTiers.
+
+ Position leverage # noqa: E501
+
+ :param leverage: The leverage of this UnifiedDiscountTiers. # noqa: E501
+ :type: str
+ """
+
+ self._leverage = leverage
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedDiscountTiers):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedDiscountTiers):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_history_loan_rate.py b/gate_api/models/unified_history_loan_rate.py
new file mode 100644
index 0000000..dd3edd2
--- /dev/null
+++ b/gate_api/models/unified_history_loan_rate.py
@@ -0,0 +1,207 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedHistoryLoanRate(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'tier': 'str',
+ 'tier_up_rate': 'str',
+ 'rates': 'list[UnifiedHistoryLoanRateRates]'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'tier': 'tier',
+ 'tier_up_rate': 'tier_up_rate',
+ 'rates': 'rates'
+ }
+
+ def __init__(self, currency=None, tier=None, tier_up_rate=None, rates=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, list[UnifiedHistoryLoanRateRates], Configuration) -> None
+ """UnifiedHistoryLoanRate - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._tier = None
+ self._tier_up_rate = None
+ self._rates = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if tier is not None:
+ self.tier = tier
+ if tier_up_rate is not None:
+ self.tier_up_rate = tier_up_rate
+ if rates is not None:
+ self.rates = rates
+
+ @property
+ def currency(self):
+ """Gets the currency of this UnifiedHistoryLoanRate. # noqa: E501
+
+ Currency name # noqa: E501
+
+ :return: The currency of this UnifiedHistoryLoanRate. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this UnifiedHistoryLoanRate.
+
+ Currency name # noqa: E501
+
+ :param currency: The currency of this UnifiedHistoryLoanRate. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def tier(self):
+ """Gets the tier of this UnifiedHistoryLoanRate. # noqa: E501
+
+ VIP level for the floating rate to be retrieved # noqa: E501
+
+ :return: The tier of this UnifiedHistoryLoanRate. # noqa: E501
+ :rtype: str
+ """
+ return self._tier
+
+ @tier.setter
+ def tier(self, tier):
+ """Sets the tier of this UnifiedHistoryLoanRate.
+
+ VIP level for the floating rate to be retrieved # noqa: E501
+
+ :param tier: The tier of this UnifiedHistoryLoanRate. # noqa: E501
+ :type: str
+ """
+
+ self._tier = tier
+
+ @property
+ def tier_up_rate(self):
+ """Gets the tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501
+
+ Floating rate corresponding to VIP level # noqa: E501
+
+ :return: The tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501
+ :rtype: str
+ """
+ return self._tier_up_rate
+
+ @tier_up_rate.setter
+ def tier_up_rate(self, tier_up_rate):
+ """Sets the tier_up_rate of this UnifiedHistoryLoanRate.
+
+ Floating rate corresponding to VIP level # noqa: E501
+
+ :param tier_up_rate: The tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501
+ :type: str
+ """
+
+ self._tier_up_rate = tier_up_rate
+
+ @property
+ def rates(self):
+ """Gets the rates of this UnifiedHistoryLoanRate. # noqa: E501
+
+ Historical interest rate information, one data point per hour, array size determined by page and limit parameters from the API request, sorted by time from recent to distant # noqa: E501
+
+ :return: The rates of this UnifiedHistoryLoanRate. # noqa: E501
+ :rtype: list[UnifiedHistoryLoanRateRates]
+ """
+ return self._rates
+
+ @rates.setter
+ def rates(self, rates):
+ """Sets the rates of this UnifiedHistoryLoanRate.
+
+ Historical interest rate information, one data point per hour, array size determined by page and limit parameters from the API request, sorted by time from recent to distant # noqa: E501
+
+ :param rates: The rates of this UnifiedHistoryLoanRate. # noqa: E501
+ :type: list[UnifiedHistoryLoanRateRates]
+ """
+
+ self._rates = rates
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedHistoryLoanRate):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedHistoryLoanRate):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_history_loan_rate_rates.py b/gate_api/models/unified_history_loan_rate_rates.py
new file mode 100644
index 0000000..100221f
--- /dev/null
+++ b/gate_api/models/unified_history_loan_rate_rates.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedHistoryLoanRateRates(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'time': 'int',
+ 'rate': 'str'
+ }
+
+ attribute_map = {
+ 'time': 'time',
+ 'rate': 'rate'
+ }
+
+ def __init__(self, time=None, rate=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, Configuration) -> None
+ """UnifiedHistoryLoanRateRates - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._time = None
+ self._rate = None
+ self.discriminator = None
+
+ if time is not None:
+ self.time = time
+ if rate is not None:
+ self.rate = rate
+
+ @property
+ def time(self):
+ """Gets the time of this UnifiedHistoryLoanRateRates. # noqa: E501
+
+ Hourly timestamp corresponding to this interest rate, in milliseconds # noqa: E501
+
+ :return: The time of this UnifiedHistoryLoanRateRates. # noqa: E501
+ :rtype: int
+ """
+ return self._time
+
+ @time.setter
+ def time(self, time):
+ """Sets the time of this UnifiedHistoryLoanRateRates.
+
+ Hourly timestamp corresponding to this interest rate, in milliseconds # noqa: E501
+
+ :param time: The time of this UnifiedHistoryLoanRateRates. # noqa: E501
+ :type: int
+ """
+
+ self._time = time
+
+ @property
+ def rate(self):
+ """Gets the rate of this UnifiedHistoryLoanRateRates. # noqa: E501
+
+ Historical interest rate for this hour # noqa: E501
+
+ :return: The rate of this UnifiedHistoryLoanRateRates. # noqa: E501
+ :rtype: str
+ """
+ return self._rate
+
+ @rate.setter
+ def rate(self, rate):
+ """Sets the rate of this UnifiedHistoryLoanRateRates.
+
+ Historical interest rate for this hour # noqa: E501
+
+ :param rate: The rate of this UnifiedHistoryLoanRateRates. # noqa: E501
+ :type: str
+ """
+
+ self._rate = rate
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedHistoryLoanRateRates):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedHistoryLoanRateRates):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_leverage_config.py b/gate_api/models/unified_leverage_config.py
new file mode 100644
index 0000000..1e4bf22
--- /dev/null
+++ b/gate_api/models/unified_leverage_config.py
@@ -0,0 +1,291 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedLeverageConfig(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'current_leverage': 'str',
+ 'min_leverage': 'str',
+ 'max_leverage': 'str',
+ 'debit': 'str',
+ 'available_margin': 'str',
+ 'borrowable': 'str',
+ 'except_leverage_borrowable': 'str'
+ }
+
+ attribute_map = {
+ 'current_leverage': 'current_leverage',
+ 'min_leverage': 'min_leverage',
+ 'max_leverage': 'max_leverage',
+ 'debit': 'debit',
+ 'available_margin': 'available_margin',
+ 'borrowable': 'borrowable',
+ 'except_leverage_borrowable': 'except_leverage_borrowable'
+ }
+
+ def __init__(self, current_leverage=None, min_leverage=None, max_leverage=None, debit=None, available_margin=None, borrowable=None, except_leverage_borrowable=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, Configuration) -> None
+ """UnifiedLeverageConfig - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._current_leverage = None
+ self._min_leverage = None
+ self._max_leverage = None
+ self._debit = None
+ self._available_margin = None
+ self._borrowable = None
+ self._except_leverage_borrowable = None
+ self.discriminator = None
+
+ if current_leverage is not None:
+ self.current_leverage = current_leverage
+ if min_leverage is not None:
+ self.min_leverage = min_leverage
+ if max_leverage is not None:
+ self.max_leverage = max_leverage
+ if debit is not None:
+ self.debit = debit
+ if available_margin is not None:
+ self.available_margin = available_margin
+ if borrowable is not None:
+ self.borrowable = borrowable
+ if except_leverage_borrowable is not None:
+ self.except_leverage_borrowable = except_leverage_borrowable
+
+ @property
+ def current_leverage(self):
+ """Gets the current_leverage of this UnifiedLeverageConfig. # noqa: E501
+
+ Current leverage ratio # noqa: E501
+
+ :return: The current_leverage of this UnifiedLeverageConfig. # noqa: E501
+ :rtype: str
+ """
+ return self._current_leverage
+
+ @current_leverage.setter
+ def current_leverage(self, current_leverage):
+ """Sets the current_leverage of this UnifiedLeverageConfig.
+
+ Current leverage ratio # noqa: E501
+
+ :param current_leverage: The current_leverage of this UnifiedLeverageConfig. # noqa: E501
+ :type: str
+ """
+
+ self._current_leverage = current_leverage
+
+ @property
+ def min_leverage(self):
+ """Gets the min_leverage of this UnifiedLeverageConfig. # noqa: E501
+
+ Minimum adjustable leverage ratio # noqa: E501
+
+ :return: The min_leverage of this UnifiedLeverageConfig. # noqa: E501
+ :rtype: str
+ """
+ return self._min_leverage
+
+ @min_leverage.setter
+ def min_leverage(self, min_leverage):
+ """Sets the min_leverage of this UnifiedLeverageConfig.
+
+ Minimum adjustable leverage ratio # noqa: E501
+
+ :param min_leverage: The min_leverage of this UnifiedLeverageConfig. # noqa: E501
+ :type: str
+ """
+
+ self._min_leverage = min_leverage
+
+ @property
+ def max_leverage(self):
+ """Gets the max_leverage of this UnifiedLeverageConfig. # noqa: E501
+
+ Maximum adjustable leverage ratio # noqa: E501
+
+ :return: The max_leverage of this UnifiedLeverageConfig. # noqa: E501
+ :rtype: str
+ """
+ return self._max_leverage
+
+ @max_leverage.setter
+ def max_leverage(self, max_leverage):
+ """Sets the max_leverage of this UnifiedLeverageConfig.
+
+ Maximum adjustable leverage ratio # noqa: E501
+
+ :param max_leverage: The max_leverage of this UnifiedLeverageConfig. # noqa: E501
+ :type: str
+ """
+
+ self._max_leverage = max_leverage
+
+ @property
+ def debit(self):
+ """Gets the debit of this UnifiedLeverageConfig. # noqa: E501
+
+ Current liabilities # noqa: E501
+
+ :return: The debit of this UnifiedLeverageConfig. # noqa: E501
+ :rtype: str
+ """
+ return self._debit
+
+ @debit.setter
+ def debit(self, debit):
+ """Sets the debit of this UnifiedLeverageConfig.
+
+ Current liabilities # noqa: E501
+
+ :param debit: The debit of this UnifiedLeverageConfig. # noqa: E501
+ :type: str
+ """
+
+ self._debit = debit
+
+ @property
+ def available_margin(self):
+ """Gets the available_margin of this UnifiedLeverageConfig. # noqa: E501
+
+ Available Margin # noqa: E501
+
+ :return: The available_margin of this UnifiedLeverageConfig. # noqa: E501
+ :rtype: str
+ """
+ return self._available_margin
+
+ @available_margin.setter
+ def available_margin(self, available_margin):
+ """Sets the available_margin of this UnifiedLeverageConfig.
+
+ Available Margin # noqa: E501
+
+ :param available_margin: The available_margin of this UnifiedLeverageConfig. # noqa: E501
+ :type: str
+ """
+
+ self._available_margin = available_margin
+
+ @property
+ def borrowable(self):
+ """Gets the borrowable of this UnifiedLeverageConfig. # noqa: E501
+
+ Maximum borrowable amount at current leverage # noqa: E501
+
+ :return: The borrowable of this UnifiedLeverageConfig. # noqa: E501
+ :rtype: str
+ """
+ return self._borrowable
+
+ @borrowable.setter
+ def borrowable(self, borrowable):
+ """Sets the borrowable of this UnifiedLeverageConfig.
+
+ Maximum borrowable amount at current leverage # noqa: E501
+
+ :param borrowable: The borrowable of this UnifiedLeverageConfig. # noqa: E501
+ :type: str
+ """
+
+ self._borrowable = borrowable
+
+ @property
+ def except_leverage_borrowable(self):
+ """Gets the except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501
+
+ Maximum borrowable from margin and maximum borrowable from Earn, whichever is smaller # noqa: E501
+
+ :return: The except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501
+ :rtype: str
+ """
+ return self._except_leverage_borrowable
+
+ @except_leverage_borrowable.setter
+ def except_leverage_borrowable(self, except_leverage_borrowable):
+ """Sets the except_leverage_borrowable of this UnifiedLeverageConfig.
+
+ Maximum borrowable from margin and maximum borrowable from Earn, whichever is smaller # noqa: E501
+
+ :param except_leverage_borrowable: The except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501
+ :type: str
+ """
+
+ self._except_leverage_borrowable = except_leverage_borrowable
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedLeverageConfig):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedLeverageConfig):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/cross_margin_repay_request.py b/gate_api/models/unified_leverage_setting.py
similarity index 52%
rename from gate_api/models/cross_margin_repay_request.py
rename to gate_api/models/unified_leverage_setting.py
index 078dcbd..4ac92bb 100644
--- a/gate_api/models/cross_margin_repay_request.py
+++ b/gate_api/models/unified_leverage_setting.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@
from gate_api.configuration import Configuration
-class CrossMarginRepayRequest(object):
+class UnifiedLeverageSetting(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -32,42 +32,48 @@ class CrossMarginRepayRequest(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'amount': 'str'}
+ openapi_types = {
+ 'currency': 'str',
+ 'leverage': 'str'
+ }
- attribute_map = {'currency': 'currency', 'amount': 'amount'}
+ attribute_map = {
+ 'currency': 'currency',
+ 'leverage': 'leverage'
+ }
- def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, currency=None, leverage=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, Configuration) -> None
- """CrossMarginRepayRequest - a model defined in OpenAPI""" # noqa: E501
+ """UnifiedLeverageSetting - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._currency = None
- self._amount = None
+ self._leverage = None
self.discriminator = None
self.currency = currency
- self.amount = amount
+ self.leverage = leverage
@property
def currency(self):
- """Gets the currency of this CrossMarginRepayRequest. # noqa: E501
+ """Gets the currency of this UnifiedLeverageSetting. # noqa: E501
- Repayment currency # noqa: E501
+ Currency name # noqa: E501
- :return: The currency of this CrossMarginRepayRequest. # noqa: E501
+ :return: The currency of this UnifiedLeverageSetting. # noqa: E501
:rtype: str
"""
return self._currency
@currency.setter
def currency(self, currency):
- """Sets the currency of this CrossMarginRepayRequest.
+ """Sets the currency of this UnifiedLeverageSetting.
- Repayment currency # noqa: E501
+ Currency name # noqa: E501
- :param currency: The currency of this CrossMarginRepayRequest. # noqa: E501
+ :param currency: The currency of this UnifiedLeverageSetting. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501
@@ -76,29 +82,29 @@ def currency(self, currency):
self._currency = currency
@property
- def amount(self):
- """Gets the amount of this CrossMarginRepayRequest. # noqa: E501
+ def leverage(self):
+ """Gets the leverage of this UnifiedLeverageSetting. # noqa: E501
- Repayment amount # noqa: E501
+ Multiplier # noqa: E501
- :return: The amount of this CrossMarginRepayRequest. # noqa: E501
+ :return: The leverage of this UnifiedLeverageSetting. # noqa: E501
:rtype: str
"""
- return self._amount
+ return self._leverage
- @amount.setter
- def amount(self, amount):
- """Sets the amount of this CrossMarginRepayRequest.
+ @leverage.setter
+ def leverage(self, leverage):
+ """Sets the leverage of this UnifiedLeverageSetting.
- Repayment amount # noqa: E501
+ Multiplier # noqa: E501
- :param amount: The amount of this CrossMarginRepayRequest. # noqa: E501
+ :param leverage: The leverage of this UnifiedLeverageSetting. # noqa: E501
:type: str
"""
- if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501
- raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501
+ if self.local_vars_configuration.client_side_validation and leverage is None: # noqa: E501
+ raise ValueError("Invalid value for `leverage`, must not be `None`") # noqa: E501
- self._amount = amount
+ self._leverage = leverage
def to_dict(self):
"""Returns the model properties as a dict"""
@@ -107,16 +113,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
@@ -132,14 +140,14 @@ def __repr__(self):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, CrossMarginRepayRequest):
+ if not isinstance(other, UnifiedLeverageSetting):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, CrossMarginRepayRequest):
+ if not isinstance(other, UnifiedLeverageSetting):
return True
return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/portfolio_loan.py b/gate_api/models/unified_loan.py
similarity index 60%
rename from gate_api/models/portfolio_loan.py
rename to gate_api/models/unified_loan.py
index 569b5ea..d8d000c 100644
--- a/gate_api/models/portfolio_loan.py
+++ b/gate_api/models/unified_loan.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@
from gate_api.configuration import Configuration
-class PortfolioLoan(object):
+class UnifiedLoan(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -32,21 +32,25 @@ class PortfolioLoan(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'type': 'str', 'amount': 'str', 'repaid_all': 'bool', 'text': 'str'}
+ openapi_types = {
+ 'currency': 'str',
+ 'type': 'str',
+ 'amount': 'str',
+ 'repaid_all': 'bool',
+ 'text': 'str'
+ }
attribute_map = {
'currency': 'currency',
'type': 'type',
'amount': 'amount',
'repaid_all': 'repaid_all',
- 'text': 'text',
+ 'text': 'text'
}
- def __init__(
- self, currency=None, type=None, amount=None, repaid_all=None, text=None, local_vars_configuration=None
- ): # noqa: E501
+ def __init__(self, currency=None, type=None, amount=None, repaid_all=None, text=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, bool, str, Configuration) -> None
- """PortfolioLoan - a model defined in OpenAPI""" # noqa: E501
+ """UnifiedLoan - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -68,22 +72,22 @@ def __init__(
@property
def currency(self):
- """Gets the currency of this PortfolioLoan. # noqa: E501
+ """Gets the currency of this UnifiedLoan. # noqa: E501
Currency # noqa: E501
- :return: The currency of this PortfolioLoan. # noqa: E501
+ :return: The currency of this UnifiedLoan. # noqa: E501
:rtype: str
"""
return self._currency
@currency.setter
def currency(self, currency):
- """Sets the currency of this PortfolioLoan.
+ """Sets the currency of this UnifiedLoan.
Currency # noqa: E501
- :param currency: The currency of this PortfolioLoan. # noqa: E501
+ :param currency: The currency of this UnifiedLoan. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501
@@ -93,22 +97,22 @@ def currency(self, currency):
@property
def type(self):
- """Gets the type of this PortfolioLoan. # noqa: E501
+ """Gets the type of this UnifiedLoan. # noqa: E501
- type: borrow - borrow, repay - repay # noqa: E501
+ Type: `borrow` - borrow, `repay` - repay # noqa: E501
- :return: The type of this PortfolioLoan. # noqa: E501
+ :return: The type of this UnifiedLoan. # noqa: E501
:rtype: str
"""
return self._type
@type.setter
def type(self, type):
- """Sets the type of this PortfolioLoan.
+ """Sets the type of this UnifiedLoan.
- type: borrow - borrow, repay - repay # noqa: E501
+ Type: `borrow` - borrow, `repay` - repay # noqa: E501
- :param type: The type of this PortfolioLoan. # noqa: E501
+ :param type: The type of this UnifiedLoan. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501
@@ -116,29 +120,30 @@ def type(self, type):
allowed_values = ["borrow", "repay"] # noqa: E501
if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
raise ValueError(
- "Invalid value for `type` ({0}), must be one of {1}".format(type, allowed_values) # noqa: E501
+ "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
+ .format(type, allowed_values)
)
self._type = type
@property
def amount(self):
- """Gets the amount of this PortfolioLoan. # noqa: E501
+ """Gets the amount of this UnifiedLoan. # noqa: E501
- The amount of lending or repaying # noqa: E501
+ Borrow or repayment amount # noqa: E501
- :return: The amount of this PortfolioLoan. # noqa: E501
+ :return: The amount of this UnifiedLoan. # noqa: E501
:rtype: str
"""
return self._amount
@amount.setter
def amount(self, amount):
- """Sets the amount of this PortfolioLoan.
+ """Sets the amount of this UnifiedLoan.
- The amount of lending or repaying # noqa: E501
+ Borrow or repayment amount # noqa: E501
- :param amount: The amount of this PortfolioLoan. # noqa: E501
+ :param amount: The amount of this UnifiedLoan. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501
@@ -148,22 +153,22 @@ def amount(self, amount):
@property
def repaid_all(self):
- """Gets the repaid_all of this PortfolioLoan. # noqa: E501
+ """Gets the repaid_all of this UnifiedLoan. # noqa: E501
- Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. # noqa: E501
+ Full repayment, only used for repayment operations. When set to `true`, overrides `amount` and directly repays the full amount # noqa: E501
- :return: The repaid_all of this PortfolioLoan. # noqa: E501
+ :return: The repaid_all of this UnifiedLoan. # noqa: E501
:rtype: bool
"""
return self._repaid_all
@repaid_all.setter
def repaid_all(self, repaid_all):
- """Sets the repaid_all of this PortfolioLoan.
+ """Sets the repaid_all of this UnifiedLoan.
- Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. # noqa: E501
+ Full repayment, only used for repayment operations. When set to `true`, overrides `amount` and directly repays the full amount # noqa: E501
- :param repaid_all: The repaid_all of this PortfolioLoan. # noqa: E501
+ :param repaid_all: The repaid_all of this UnifiedLoan. # noqa: E501
:type: bool
"""
@@ -171,22 +176,22 @@ def repaid_all(self, repaid_all):
@property
def text(self):
- """Gets the text of this PortfolioLoan. # noqa: E501
+ """Gets the text of this UnifiedLoan. # noqa: E501
User defined custom ID # noqa: E501
- :return: The text of this PortfolioLoan. # noqa: E501
+ :return: The text of this UnifiedLoan. # noqa: E501
:rtype: str
"""
return self._text
@text.setter
def text(self, text):
- """Sets the text of this PortfolioLoan.
+ """Sets the text of this UnifiedLoan.
User defined custom ID # noqa: E501
- :param text: The text of this PortfolioLoan. # noqa: E501
+ :param text: The text of this UnifiedLoan. # noqa: E501
:type: str
"""
@@ -199,16 +204,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
@@ -224,14 +231,14 @@ def __repr__(self):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, PortfolioLoan):
+ if not isinstance(other, UnifiedLoan):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, PortfolioLoan):
+ if not isinstance(other, UnifiedLoan):
return True
return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_loan_record.py b/gate_api/models/unified_loan_record.py
new file mode 100644
index 0000000..4cce938
--- /dev/null
+++ b/gate_api/models/unified_loan_record.py
@@ -0,0 +1,319 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedLoanRecord(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'int',
+ 'type': 'str',
+ 'repayment_type': 'str',
+ 'borrow_type': 'str',
+ 'currency_pair': 'str',
+ 'currency': 'str',
+ 'amount': 'str',
+ 'create_time': 'int'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'type': 'type',
+ 'repayment_type': 'repayment_type',
+ 'borrow_type': 'borrow_type',
+ 'currency_pair': 'currency_pair',
+ 'currency': 'currency',
+ 'amount': 'amount',
+ 'create_time': 'create_time'
+ }
+
+ def __init__(self, id=None, type=None, repayment_type=None, borrow_type=None, currency_pair=None, currency=None, amount=None, create_time=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, str, str, str, str, str, int, Configuration) -> None
+ """UnifiedLoanRecord - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._id = None
+ self._type = None
+ self._repayment_type = None
+ self._borrow_type = None
+ self._currency_pair = None
+ self._currency = None
+ self._amount = None
+ self._create_time = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if type is not None:
+ self.type = type
+ if repayment_type is not None:
+ self.repayment_type = repayment_type
+ if borrow_type is not None:
+ self.borrow_type = borrow_type
+ if currency_pair is not None:
+ self.currency_pair = currency_pair
+ if currency is not None:
+ self.currency = currency
+ if amount is not None:
+ self.amount = amount
+ if create_time is not None:
+ self.create_time = create_time
+
+ @property
+ def id(self):
+ """Gets the id of this UnifiedLoanRecord. # noqa: E501
+
+ ID # noqa: E501
+
+ :return: The id of this UnifiedLoanRecord. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this UnifiedLoanRecord.
+
+ ID # noqa: E501
+
+ :param id: The id of this UnifiedLoanRecord. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ @property
+ def type(self):
+ """Gets the type of this UnifiedLoanRecord. # noqa: E501
+
+ Type: `borrow` - borrow, `repay` - repay # noqa: E501
+
+ :return: The type of this UnifiedLoanRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this UnifiedLoanRecord.
+
+ Type: `borrow` - borrow, `repay` - repay # noqa: E501
+
+ :param type: The type of this UnifiedLoanRecord. # noqa: E501
+ :type: str
+ """
+
+ self._type = type
+
+ @property
+ def repayment_type(self):
+ """Gets the repayment_type of this UnifiedLoanRecord. # noqa: E501
+
+ Repayment type: none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after order cancellation, different_currencies_repayment - Cross-currency repayment # noqa: E501
+
+ :return: The repayment_type of this UnifiedLoanRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._repayment_type
+
+ @repayment_type.setter
+ def repayment_type(self, repayment_type):
+ """Sets the repayment_type of this UnifiedLoanRecord.
+
+ Repayment type: none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after order cancellation, different_currencies_repayment - Cross-currency repayment # noqa: E501
+
+ :param repayment_type: The repayment_type of this UnifiedLoanRecord. # noqa: E501
+ :type: str
+ """
+
+ self._repayment_type = repayment_type
+
+ @property
+ def borrow_type(self):
+ """Gets the borrow_type of this UnifiedLoanRecord. # noqa: E501
+
+ Borrowing type, returned when querying loan records: manual_borrow - Manual borrowing, auto_borrow - Automatic borrowing # noqa: E501
+
+ :return: The borrow_type of this UnifiedLoanRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._borrow_type
+
+ @borrow_type.setter
+ def borrow_type(self, borrow_type):
+ """Sets the borrow_type of this UnifiedLoanRecord.
+
+ Borrowing type, returned when querying loan records: manual_borrow - Manual borrowing, auto_borrow - Automatic borrowing # noqa: E501
+
+ :param borrow_type: The borrow_type of this UnifiedLoanRecord. # noqa: E501
+ :type: str
+ """
+
+ self._borrow_type = borrow_type
+
+ @property
+ def currency_pair(self):
+ """Gets the currency_pair of this UnifiedLoanRecord. # noqa: E501
+
+ Currency pair # noqa: E501
+
+ :return: The currency_pair of this UnifiedLoanRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._currency_pair
+
+ @currency_pair.setter
+ def currency_pair(self, currency_pair):
+ """Sets the currency_pair of this UnifiedLoanRecord.
+
+ Currency pair # noqa: E501
+
+ :param currency_pair: The currency_pair of this UnifiedLoanRecord. # noqa: E501
+ :type: str
+ """
+
+ self._currency_pair = currency_pair
+
+ @property
+ def currency(self):
+ """Gets the currency of this UnifiedLoanRecord. # noqa: E501
+
+ Currency # noqa: E501
+
+ :return: The currency of this UnifiedLoanRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this UnifiedLoanRecord.
+
+ Currency # noqa: E501
+
+ :param currency: The currency of this UnifiedLoanRecord. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def amount(self):
+ """Gets the amount of this UnifiedLoanRecord. # noqa: E501
+
+ Borrow or repayment amount # noqa: E501
+
+ :return: The amount of this UnifiedLoanRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this UnifiedLoanRecord.
+
+ Borrow or repayment amount # noqa: E501
+
+ :param amount: The amount of this UnifiedLoanRecord. # noqa: E501
+ :type: str
+ """
+
+ self._amount = amount
+
+ @property
+ def create_time(self):
+ """Gets the create_time of this UnifiedLoanRecord. # noqa: E501
+
+ Created time # noqa: E501
+
+ :return: The create_time of this UnifiedLoanRecord. # noqa: E501
+ :rtype: int
+ """
+ return self._create_time
+
+ @create_time.setter
+ def create_time(self, create_time):
+ """Sets the create_time of this UnifiedLoanRecord.
+
+ Created time # noqa: E501
+
+ :param create_time: The create_time of this UnifiedLoanRecord. # noqa: E501
+ :type: int
+ """
+
+ self._create_time = create_time
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedLoanRecord):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedLoanRecord):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_loan_result.py b/gate_api/models/unified_loan_result.py
new file mode 100644
index 0000000..58dced5
--- /dev/null
+++ b/gate_api/models/unified_loan_result.py
@@ -0,0 +1,123 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedLoanResult(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'tran_id': 'int'
+ }
+
+ attribute_map = {
+ 'tran_id': 'tran_id'
+ }
+
+ def __init__(self, tran_id=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, Configuration) -> None
+ """UnifiedLoanResult - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._tran_id = None
+ self.discriminator = None
+
+ if tran_id is not None:
+ self.tran_id = tran_id
+
+ @property
+ def tran_id(self):
+ """Gets the tran_id of this UnifiedLoanResult. # noqa: E501
+
+ Transaction ID # noqa: E501
+
+ :return: The tran_id of this UnifiedLoanResult. # noqa: E501
+ :rtype: int
+ """
+ return self._tran_id
+
+ @tran_id.setter
+ def tran_id(self, tran_id):
+ """Sets the tran_id of this UnifiedLoanResult.
+
+ Transaction ID # noqa: E501
+
+ :param tran_id: The tran_id of this UnifiedLoanResult. # noqa: E501
+ :type: int
+ """
+
+ self._tran_id = tran_id
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedLoanResult):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedLoanResult):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_margin_tiers.py b/gate_api/models/unified_margin_tiers.py
new file mode 100644
index 0000000..8e61cbe
--- /dev/null
+++ b/gate_api/models/unified_margin_tiers.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedMarginTiers(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'currency': 'str',
+ 'margin_tiers': 'list[MarginTiers]'
+ }
+
+ attribute_map = {
+ 'currency': 'currency',
+ 'margin_tiers': 'margin_tiers'
+ }
+
+ def __init__(self, currency=None, margin_tiers=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, list[MarginTiers], Configuration) -> None
+ """UnifiedMarginTiers - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._currency = None
+ self._margin_tiers = None
+ self.discriminator = None
+
+ if currency is not None:
+ self.currency = currency
+ if margin_tiers is not None:
+ self.margin_tiers = margin_tiers
+
+ @property
+ def currency(self):
+ """Gets the currency of this UnifiedMarginTiers. # noqa: E501
+
+ Currency name # noqa: E501
+
+ :return: The currency of this UnifiedMarginTiers. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this UnifiedMarginTiers.
+
+ Currency name # noqa: E501
+
+ :param currency: The currency of this UnifiedMarginTiers. # noqa: E501
+ :type: str
+ """
+
+ self._currency = currency
+
+ @property
+ def margin_tiers(self):
+ """Gets the margin_tiers of this UnifiedMarginTiers. # noqa: E501
+
+ Tiered margin # noqa: E501
+
+ :return: The margin_tiers of this UnifiedMarginTiers. # noqa: E501
+ :rtype: list[MarginTiers]
+ """
+ return self._margin_tiers
+
+ @margin_tiers.setter
+ def margin_tiers(self, margin_tiers):
+ """Sets the margin_tiers of this UnifiedMarginTiers.
+
+ Tiered margin # noqa: E501
+
+ :param margin_tiers: The margin_tiers of this UnifiedMarginTiers. # noqa: E501
+ :type: list[MarginTiers]
+ """
+
+ self._margin_tiers = margin_tiers
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedMarginTiers):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedMarginTiers):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_mode_set.py b/gate_api/models/unified_mode_set.py
new file mode 100644
index 0000000..8fe6a71
--- /dev/null
+++ b/gate_api/models/unified_mode_set.py
@@ -0,0 +1,150 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedModeSet(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'mode': 'str',
+ 'settings': 'UnifiedSettings'
+ }
+
+ attribute_map = {
+ 'mode': 'mode',
+ 'settings': 'settings'
+ }
+
+ def __init__(self, mode=None, settings=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, UnifiedSettings, Configuration) -> None
+ """UnifiedModeSet - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._mode = None
+ self._settings = None
+ self.discriminator = None
+
+ self.mode = mode
+ if settings is not None:
+ self.settings = settings
+
+ @property
+ def mode(self):
+ """Gets the mode of this UnifiedModeSet. # noqa: E501
+
+ Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501
+
+ :return: The mode of this UnifiedModeSet. # noqa: E501
+ :rtype: str
+ """
+ return self._mode
+
+ @mode.setter
+ def mode(self, mode):
+ """Sets the mode of this UnifiedModeSet.
+
+ Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501
+
+ :param mode: The mode of this UnifiedModeSet. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and mode is None: # noqa: E501
+ raise ValueError("Invalid value for `mode`, must not be `None`") # noqa: E501
+
+ self._mode = mode
+
+ @property
+ def settings(self):
+ """Gets the settings of this UnifiedModeSet. # noqa: E501
+
+
+ :return: The settings of this UnifiedModeSet. # noqa: E501
+ :rtype: UnifiedSettings
+ """
+ return self._settings
+
+ @settings.setter
+ def settings(self, settings):
+ """Sets the settings of this UnifiedModeSet.
+
+
+ :param settings: The settings of this UnifiedModeSet. # noqa: E501
+ :type: UnifiedSettings
+ """
+
+ self._settings = settings
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedModeSet):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedModeSet):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_portfolio_input.py b/gate_api/models/unified_portfolio_input.py
new file mode 100644
index 0000000..57ca957
--- /dev/null
+++ b/gate_api/models/unified_portfolio_input.py
@@ -0,0 +1,291 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedPortfolioInput(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'spot_balances': 'list[MockSpotBalance]',
+ 'spot_orders': 'list[MockSpotOrder]',
+ 'futures_positions': 'list[MockFuturesPosition]',
+ 'futures_orders': 'list[MockFuturesOrder]',
+ 'options_positions': 'list[MockOptionsPosition]',
+ 'options_orders': 'list[MockOptionsOrder]',
+ 'spot_hedge': 'bool'
+ }
+
+ attribute_map = {
+ 'spot_balances': 'spot_balances',
+ 'spot_orders': 'spot_orders',
+ 'futures_positions': 'futures_positions',
+ 'futures_orders': 'futures_orders',
+ 'options_positions': 'options_positions',
+ 'options_orders': 'options_orders',
+ 'spot_hedge': 'spot_hedge'
+ }
+
+ def __init__(self, spot_balances=None, spot_orders=None, futures_positions=None, futures_orders=None, options_positions=None, options_orders=None, spot_hedge=None, local_vars_configuration=None): # noqa: E501
+ # type: (list[MockSpotBalance], list[MockSpotOrder], list[MockFuturesPosition], list[MockFuturesOrder], list[MockOptionsPosition], list[MockOptionsOrder], bool, Configuration) -> None
+ """UnifiedPortfolioInput - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._spot_balances = None
+ self._spot_orders = None
+ self._futures_positions = None
+ self._futures_orders = None
+ self._options_positions = None
+ self._options_orders = None
+ self._spot_hedge = None
+ self.discriminator = None
+
+ if spot_balances is not None:
+ self.spot_balances = spot_balances
+ if spot_orders is not None:
+ self.spot_orders = spot_orders
+ if futures_positions is not None:
+ self.futures_positions = futures_positions
+ if futures_orders is not None:
+ self.futures_orders = futures_orders
+ if options_positions is not None:
+ self.options_positions = options_positions
+ if options_orders is not None:
+ self.options_orders = options_orders
+ if spot_hedge is not None:
+ self.spot_hedge = spot_hedge
+
+ @property
+ def spot_balances(self):
+ """Gets the spot_balances of this UnifiedPortfolioInput. # noqa: E501
+
+ Spot # noqa: E501
+
+ :return: The spot_balances of this UnifiedPortfolioInput. # noqa: E501
+ :rtype: list[MockSpotBalance]
+ """
+ return self._spot_balances
+
+ @spot_balances.setter
+ def spot_balances(self, spot_balances):
+ """Sets the spot_balances of this UnifiedPortfolioInput.
+
+ Spot # noqa: E501
+
+ :param spot_balances: The spot_balances of this UnifiedPortfolioInput. # noqa: E501
+ :type: list[MockSpotBalance]
+ """
+
+ self._spot_balances = spot_balances
+
+ @property
+ def spot_orders(self):
+ """Gets the spot_orders of this UnifiedPortfolioInput. # noqa: E501
+
+ Spot orders # noqa: E501
+
+ :return: The spot_orders of this UnifiedPortfolioInput. # noqa: E501
+ :rtype: list[MockSpotOrder]
+ """
+ return self._spot_orders
+
+ @spot_orders.setter
+ def spot_orders(self, spot_orders):
+ """Sets the spot_orders of this UnifiedPortfolioInput.
+
+ Spot orders # noqa: E501
+
+ :param spot_orders: The spot_orders of this UnifiedPortfolioInput. # noqa: E501
+ :type: list[MockSpotOrder]
+ """
+
+ self._spot_orders = spot_orders
+
+ @property
+ def futures_positions(self):
+ """Gets the futures_positions of this UnifiedPortfolioInput. # noqa: E501
+
+ Futures positions # noqa: E501
+
+ :return: The futures_positions of this UnifiedPortfolioInput. # noqa: E501
+ :rtype: list[MockFuturesPosition]
+ """
+ return self._futures_positions
+
+ @futures_positions.setter
+ def futures_positions(self, futures_positions):
+ """Sets the futures_positions of this UnifiedPortfolioInput.
+
+ Futures positions # noqa: E501
+
+ :param futures_positions: The futures_positions of this UnifiedPortfolioInput. # noqa: E501
+ :type: list[MockFuturesPosition]
+ """
+
+ self._futures_positions = futures_positions
+
+ @property
+ def futures_orders(self):
+ """Gets the futures_orders of this UnifiedPortfolioInput. # noqa: E501
+
+ Futures order # noqa: E501
+
+ :return: The futures_orders of this UnifiedPortfolioInput. # noqa: E501
+ :rtype: list[MockFuturesOrder]
+ """
+ return self._futures_orders
+
+ @futures_orders.setter
+ def futures_orders(self, futures_orders):
+ """Sets the futures_orders of this UnifiedPortfolioInput.
+
+ Futures order # noqa: E501
+
+ :param futures_orders: The futures_orders of this UnifiedPortfolioInput. # noqa: E501
+ :type: list[MockFuturesOrder]
+ """
+
+ self._futures_orders = futures_orders
+
+ @property
+ def options_positions(self):
+ """Gets the options_positions of this UnifiedPortfolioInput. # noqa: E501
+
+ Options positions # noqa: E501
+
+ :return: The options_positions of this UnifiedPortfolioInput. # noqa: E501
+ :rtype: list[MockOptionsPosition]
+ """
+ return self._options_positions
+
+ @options_positions.setter
+ def options_positions(self, options_positions):
+ """Sets the options_positions of this UnifiedPortfolioInput.
+
+ Options positions # noqa: E501
+
+ :param options_positions: The options_positions of this UnifiedPortfolioInput. # noqa: E501
+ :type: list[MockOptionsPosition]
+ """
+
+ self._options_positions = options_positions
+
+ @property
+ def options_orders(self):
+ """Gets the options_orders of this UnifiedPortfolioInput. # noqa: E501
+
+ Option orders # noqa: E501
+
+ :return: The options_orders of this UnifiedPortfolioInput. # noqa: E501
+ :rtype: list[MockOptionsOrder]
+ """
+ return self._options_orders
+
+ @options_orders.setter
+ def options_orders(self, options_orders):
+ """Sets the options_orders of this UnifiedPortfolioInput.
+
+ Option orders # noqa: E501
+
+ :param options_orders: The options_orders of this UnifiedPortfolioInput. # noqa: E501
+ :type: list[MockOptionsOrder]
+ """
+
+ self._options_orders = options_orders
+
+ @property
+ def spot_hedge(self):
+ """Gets the spot_hedge of this UnifiedPortfolioInput. # noqa: E501
+
+ Whether to enable spot hedging # noqa: E501
+
+ :return: The spot_hedge of this UnifiedPortfolioInput. # noqa: E501
+ :rtype: bool
+ """
+ return self._spot_hedge
+
+ @spot_hedge.setter
+ def spot_hedge(self, spot_hedge):
+ """Sets the spot_hedge of this UnifiedPortfolioInput.
+
+ Whether to enable spot hedging # noqa: E501
+
+ :param spot_hedge: The spot_hedge of this UnifiedPortfolioInput. # noqa: E501
+ :type: bool
+ """
+
+ self._spot_hedge = spot_hedge
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedPortfolioInput):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedPortfolioInput):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_portfolio_output.py b/gate_api/models/unified_portfolio_output.py
new file mode 100644
index 0000000..ed08278
--- /dev/null
+++ b/gate_api/models/unified_portfolio_output.py
@@ -0,0 +1,207 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedPortfolioOutput(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'maintain_margin_total': 'str',
+ 'initial_margin_total': 'str',
+ 'calculate_time': 'int',
+ 'risk_unit': 'list[MockRiskUnit]'
+ }
+
+ attribute_map = {
+ 'maintain_margin_total': 'maintain_margin_total',
+ 'initial_margin_total': 'initial_margin_total',
+ 'calculate_time': 'calculate_time',
+ 'risk_unit': 'risk_unit'
+ }
+
+ def __init__(self, maintain_margin_total=None, initial_margin_total=None, calculate_time=None, risk_unit=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, int, list[MockRiskUnit], Configuration) -> None
+ """UnifiedPortfolioOutput - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._maintain_margin_total = None
+ self._initial_margin_total = None
+ self._calculate_time = None
+ self._risk_unit = None
+ self.discriminator = None
+
+ if maintain_margin_total is not None:
+ self.maintain_margin_total = maintain_margin_total
+ if initial_margin_total is not None:
+ self.initial_margin_total = initial_margin_total
+ if calculate_time is not None:
+ self.calculate_time = calculate_time
+ if risk_unit is not None:
+ self.risk_unit = risk_unit
+
+ @property
+ def maintain_margin_total(self):
+ """Gets the maintain_margin_total of this UnifiedPortfolioOutput. # noqa: E501
+
+ Total maintenance margin, including only portfolio margin calculation results for positions in risk units, excluding borrowing margin. If borrowing exists, conventional borrowing margin requirements will still apply # noqa: E501
+
+ :return: The maintain_margin_total of this UnifiedPortfolioOutput. # noqa: E501
+ :rtype: str
+ """
+ return self._maintain_margin_total
+
+ @maintain_margin_total.setter
+ def maintain_margin_total(self, maintain_margin_total):
+ """Sets the maintain_margin_total of this UnifiedPortfolioOutput.
+
+ Total maintenance margin, including only portfolio margin calculation results for positions in risk units, excluding borrowing margin. If borrowing exists, conventional borrowing margin requirements will still apply # noqa: E501
+
+ :param maintain_margin_total: The maintain_margin_total of this UnifiedPortfolioOutput. # noqa: E501
+ :type: str
+ """
+
+ self._maintain_margin_total = maintain_margin_total
+
+ @property
+ def initial_margin_total(self):
+ """Gets the initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501
+
+ Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders # noqa: E501
+
+ :return: The initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501
+ :rtype: str
+ """
+ return self._initial_margin_total
+
+ @initial_margin_total.setter
+ def initial_margin_total(self, initial_margin_total):
+ """Sets the initial_margin_total of this UnifiedPortfolioOutput.
+
+ Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders # noqa: E501
+
+ :param initial_margin_total: The initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501
+ :type: str
+ """
+
+ self._initial_margin_total = initial_margin_total
+
+ @property
+ def calculate_time(self):
+ """Gets the calculate_time of this UnifiedPortfolioOutput. # noqa: E501
+
+ Calculation time # noqa: E501
+
+ :return: The calculate_time of this UnifiedPortfolioOutput. # noqa: E501
+ :rtype: int
+ """
+ return self._calculate_time
+
+ @calculate_time.setter
+ def calculate_time(self, calculate_time):
+ """Sets the calculate_time of this UnifiedPortfolioOutput.
+
+ Calculation time # noqa: E501
+
+ :param calculate_time: The calculate_time of this UnifiedPortfolioOutput. # noqa: E501
+ :type: int
+ """
+
+ self._calculate_time = calculate_time
+
+ @property
+ def risk_unit(self):
+ """Gets the risk_unit of this UnifiedPortfolioOutput. # noqa: E501
+
+ Risk unit # noqa: E501
+
+ :return: The risk_unit of this UnifiedPortfolioOutput. # noqa: E501
+ :rtype: list[MockRiskUnit]
+ """
+ return self._risk_unit
+
+ @risk_unit.setter
+ def risk_unit(self, risk_unit):
+ """Sets the risk_unit of this UnifiedPortfolioOutput.
+
+ Risk unit # noqa: E501
+
+ :param risk_unit: The risk_unit of this UnifiedPortfolioOutput. # noqa: E501
+ :type: list[MockRiskUnit]
+ """
+
+ self._risk_unit = risk_unit
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedPortfolioOutput):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedPortfolioOutput):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_risk_units.py b/gate_api/models/unified_risk_units.py
new file mode 100644
index 0000000..7197a7e
--- /dev/null
+++ b/gate_api/models/unified_risk_units.py
@@ -0,0 +1,179 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedRiskUnits(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'user_id': 'int',
+ 'spot_hedge': 'bool',
+ 'risk_units': 'list[RiskUnits]'
+ }
+
+ attribute_map = {
+ 'user_id': 'user_id',
+ 'spot_hedge': 'spot_hedge',
+ 'risk_units': 'risk_units'
+ }
+
+ def __init__(self, user_id=None, spot_hedge=None, risk_units=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, bool, list[RiskUnits], Configuration) -> None
+ """UnifiedRiskUnits - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._user_id = None
+ self._spot_hedge = None
+ self._risk_units = None
+ self.discriminator = None
+
+ if user_id is not None:
+ self.user_id = user_id
+ if spot_hedge is not None:
+ self.spot_hedge = spot_hedge
+ if risk_units is not None:
+ self.risk_units = risk_units
+
+ @property
+ def user_id(self):
+ """Gets the user_id of this UnifiedRiskUnits. # noqa: E501
+
+ User ID # noqa: E501
+
+ :return: The user_id of this UnifiedRiskUnits. # noqa: E501
+ :rtype: int
+ """
+ return self._user_id
+
+ @user_id.setter
+ def user_id(self, user_id):
+ """Sets the user_id of this UnifiedRiskUnits.
+
+ User ID # noqa: E501
+
+ :param user_id: The user_id of this UnifiedRiskUnits. # noqa: E501
+ :type: int
+ """
+
+ self._user_id = user_id
+
+ @property
+ def spot_hedge(self):
+ """Gets the spot_hedge of this UnifiedRiskUnits. # noqa: E501
+
+ Spot hedging status: true - enabled, false - disabled # noqa: E501
+
+ :return: The spot_hedge of this UnifiedRiskUnits. # noqa: E501
+ :rtype: bool
+ """
+ return self._spot_hedge
+
+ @spot_hedge.setter
+ def spot_hedge(self, spot_hedge):
+ """Sets the spot_hedge of this UnifiedRiskUnits.
+
+ Spot hedging status: true - enabled, false - disabled # noqa: E501
+
+ :param spot_hedge: The spot_hedge of this UnifiedRiskUnits. # noqa: E501
+ :type: bool
+ """
+
+ self._spot_hedge = spot_hedge
+
+ @property
+ def risk_units(self):
+ """Gets the risk_units of this UnifiedRiskUnits. # noqa: E501
+
+ Risk unit # noqa: E501
+
+ :return: The risk_units of this UnifiedRiskUnits. # noqa: E501
+ :rtype: list[RiskUnits]
+ """
+ return self._risk_units
+
+ @risk_units.setter
+ def risk_units(self, risk_units):
+ """Sets the risk_units of this UnifiedRiskUnits.
+
+ Risk unit # noqa: E501
+
+ :param risk_units: The risk_units of this UnifiedRiskUnits. # noqa: E501
+ :type: list[RiskUnits]
+ """
+
+ self._risk_units = risk_units
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedRiskUnits):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedRiskUnits):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/unified_settings.py b/gate_api/models/unified_settings.py
new file mode 100644
index 0000000..7ab84b4
--- /dev/null
+++ b/gate_api/models/unified_settings.py
@@ -0,0 +1,207 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UnifiedSettings(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'usdt_futures': 'bool',
+ 'spot_hedge': 'bool',
+ 'use_funding': 'bool',
+ 'options': 'bool'
+ }
+
+ attribute_map = {
+ 'usdt_futures': 'usdt_futures',
+ 'spot_hedge': 'spot_hedge',
+ 'use_funding': 'use_funding',
+ 'options': 'options'
+ }
+
+ def __init__(self, usdt_futures=None, spot_hedge=None, use_funding=None, options=None, local_vars_configuration=None): # noqa: E501
+ # type: (bool, bool, bool, bool, Configuration) -> None
+ """UnifiedSettings - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._usdt_futures = None
+ self._spot_hedge = None
+ self._use_funding = None
+ self._options = None
+ self.discriminator = None
+
+ if usdt_futures is not None:
+ self.usdt_futures = usdt_futures
+ if spot_hedge is not None:
+ self.spot_hedge = spot_hedge
+ if use_funding is not None:
+ self.use_funding = use_funding
+ if options is not None:
+ self.options = options
+
+ @property
+ def usdt_futures(self):
+ """Gets the usdt_futures of this UnifiedSettings. # noqa: E501
+
+ USDT futures switch. In cross-currency margin mode, can only be enabled and cannot be disabled # noqa: E501
+
+ :return: The usdt_futures of this UnifiedSettings. # noqa: E501
+ :rtype: bool
+ """
+ return self._usdt_futures
+
+ @usdt_futures.setter
+ def usdt_futures(self, usdt_futures):
+ """Sets the usdt_futures of this UnifiedSettings.
+
+ USDT futures switch. In cross-currency margin mode, can only be enabled and cannot be disabled # noqa: E501
+
+ :param usdt_futures: The usdt_futures of this UnifiedSettings. # noqa: E501
+ :type: bool
+ """
+
+ self._usdt_futures = usdt_futures
+
+ @property
+ def spot_hedge(self):
+ """Gets the spot_hedge of this UnifiedSettings. # noqa: E501
+
+ Spot hedging switch # noqa: E501
+
+ :return: The spot_hedge of this UnifiedSettings. # noqa: E501
+ :rtype: bool
+ """
+ return self._spot_hedge
+
+ @spot_hedge.setter
+ def spot_hedge(self, spot_hedge):
+ """Sets the spot_hedge of this UnifiedSettings.
+
+ Spot hedging switch # noqa: E501
+
+ :param spot_hedge: The spot_hedge of this UnifiedSettings. # noqa: E501
+ :type: bool
+ """
+
+ self._spot_hedge = spot_hedge
+
+ @property
+ def use_funding(self):
+ """Gets the use_funding of this UnifiedSettings. # noqa: E501
+
+ Earn switch, when mode is cross-currency margin mode, whether to use Earn funds as margin # noqa: E501
+
+ :return: The use_funding of this UnifiedSettings. # noqa: E501
+ :rtype: bool
+ """
+ return self._use_funding
+
+ @use_funding.setter
+ def use_funding(self, use_funding):
+ """Sets the use_funding of this UnifiedSettings.
+
+ Earn switch, when mode is cross-currency margin mode, whether to use Earn funds as margin # noqa: E501
+
+ :param use_funding: The use_funding of this UnifiedSettings. # noqa: E501
+ :type: bool
+ """
+
+ self._use_funding = use_funding
+
+ @property
+ def options(self):
+ """Gets the options of this UnifiedSettings. # noqa: E501
+
+ Options switch. In cross-currency margin mode, can only be enabled and cannot be disabled # noqa: E501
+
+ :return: The options of this UnifiedSettings. # noqa: E501
+ :rtype: bool
+ """
+ return self._options
+
+ @options.setter
+ def options(self, options):
+ """Sets the options of this UnifiedSettings.
+
+ Options switch. In cross-currency margin mode, can only be enabled and cannot be disabled # noqa: E501
+
+ :param options: The options of this UnifiedSettings. # noqa: E501
+ :type: bool
+ """
+
+ self._options = options
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UnifiedSettings):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UnifiedSettings):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/portfolio_borrowable.py b/gate_api/models/unified_transferable.py
similarity index 62%
rename from gate_api/models/portfolio_borrowable.py
rename to gate_api/models/unified_transferable.py
index 3fcb02b..e4b5311 100644
--- a/gate_api/models/portfolio_borrowable.py
+++ b/gate_api/models/unified_transferable.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@
from gate_api.configuration import Configuration
-class PortfolioBorrowable(object):
+class UnifiedTransferable(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -32,13 +32,19 @@ class PortfolioBorrowable(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'currency': 'str', 'amount': 'str'}
+ openapi_types = {
+ 'currency': 'str',
+ 'amount': 'str'
+ }
- attribute_map = {'currency': 'currency', 'amount': 'amount'}
+ attribute_map = {
+ 'currency': 'currency',
+ 'amount': 'amount'
+ }
def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, Configuration) -> None
- """PortfolioBorrowable - a model defined in OpenAPI""" # noqa: E501
+ """UnifiedTransferable - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -54,22 +60,22 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None):
@property
def currency(self):
- """Gets the currency of this PortfolioBorrowable. # noqa: E501
+ """Gets the currency of this UnifiedTransferable. # noqa: E501
Currency detail # noqa: E501
- :return: The currency of this PortfolioBorrowable. # noqa: E501
+ :return: The currency of this UnifiedTransferable. # noqa: E501
:rtype: str
"""
return self._currency
@currency.setter
def currency(self, currency):
- """Sets the currency of this PortfolioBorrowable.
+ """Sets the currency of this UnifiedTransferable.
Currency detail # noqa: E501
- :param currency: The currency of this PortfolioBorrowable. # noqa: E501
+ :param currency: The currency of this UnifiedTransferable. # noqa: E501
:type: str
"""
@@ -77,22 +83,22 @@ def currency(self, currency):
@property
def amount(self):
- """Gets the amount of this PortfolioBorrowable. # noqa: E501
+ """Gets the amount of this UnifiedTransferable. # noqa: E501
- Max borrowable amount # noqa: E501
+ Maximum transferable amount # noqa: E501
- :return: The amount of this PortfolioBorrowable. # noqa: E501
+ :return: The amount of this UnifiedTransferable. # noqa: E501
:rtype: str
"""
return self._amount
@amount.setter
def amount(self, amount):
- """Sets the amount of this PortfolioBorrowable.
+ """Sets the amount of this UnifiedTransferable.
- Max borrowable amount # noqa: E501
+ Maximum transferable amount # noqa: E501
- :param amount: The amount of this PortfolioBorrowable. # noqa: E501
+ :param amount: The amount of this UnifiedTransferable. # noqa: E501
:type: str
"""
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
@@ -130,14 +138,14 @@ def __repr__(self):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, PortfolioBorrowable):
+ if not isinstance(other, UnifiedTransferable):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, PortfolioBorrowable):
+ if not isinstance(other, UnifiedTransferable):
return True
return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/user_ltv_info.py b/gate_api/models/user_ltv_info.py
index d0985ed..e56f15a 100644
--- a/gate_api/models/user_ltv_info.py
+++ b/gate_api/models/user_ltv_info.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -39,7 +39,7 @@ class UserLtvInfo(object):
'alert_ltv': 'str',
'liquidate_ltv': 'str',
'min_borrow_amount': 'str',
- 'left_borrowable_amount': 'str',
+ 'left_borrowable_amount': 'str'
}
attribute_map = {
@@ -49,20 +49,10 @@ class UserLtvInfo(object):
'alert_ltv': 'alert_ltv',
'liquidate_ltv': 'liquidate_ltv',
'min_borrow_amount': 'min_borrow_amount',
- 'left_borrowable_amount': 'left_borrowable_amount',
+ 'left_borrowable_amount': 'left_borrowable_amount'
}
- def __init__(
- self,
- collateral_currency=None,
- borrow_currency=None,
- init_ltv=None,
- alert_ltv=None,
- liquidate_ltv=None,
- min_borrow_amount=None,
- left_borrowable_amount=None,
- local_vars_configuration=None,
- ): # noqa: E501
+ def __init__(self, collateral_currency=None, borrow_currency=None, init_ltv=None, alert_ltv=None, liquidate_ltv=None, min_borrow_amount=None, left_borrowable_amount=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, str, str, str, str, str, Configuration) -> None
"""UserLtvInfo - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
@@ -97,7 +87,7 @@ def __init__(
def collateral_currency(self):
"""Gets the collateral_currency of this UserLtvInfo. # noqa: E501
- 质押币种 # noqa: E501
+ Collateral currency # noqa: E501
:return: The collateral_currency of this UserLtvInfo. # noqa: E501
:rtype: str
@@ -108,7 +98,7 @@ def collateral_currency(self):
def collateral_currency(self, collateral_currency):
"""Sets the collateral_currency of this UserLtvInfo.
- 质押币种 # noqa: E501
+ Collateral currency # noqa: E501
:param collateral_currency: The collateral_currency of this UserLtvInfo. # noqa: E501
:type: str
@@ -120,7 +110,7 @@ def collateral_currency(self, collateral_currency):
def borrow_currency(self):
"""Gets the borrow_currency of this UserLtvInfo. # noqa: E501
- 借款币种 # noqa: E501
+ Borrowed currency # noqa: E501
:return: The borrow_currency of this UserLtvInfo. # noqa: E501
:rtype: str
@@ -131,7 +121,7 @@ def borrow_currency(self):
def borrow_currency(self, borrow_currency):
"""Sets the borrow_currency of this UserLtvInfo.
- 借款币种 # noqa: E501
+ Borrowed currency # noqa: E501
:param borrow_currency: The borrow_currency of this UserLtvInfo. # noqa: E501
:type: str
@@ -143,7 +133,7 @@ def borrow_currency(self, borrow_currency):
def init_ltv(self):
"""Gets the init_ltv of this UserLtvInfo. # noqa: E501
- 初始质押率 # noqa: E501
+ Initial collateralization rate # noqa: E501
:return: The init_ltv of this UserLtvInfo. # noqa: E501
:rtype: str
@@ -154,7 +144,7 @@ def init_ltv(self):
def init_ltv(self, init_ltv):
"""Sets the init_ltv of this UserLtvInfo.
- 初始质押率 # noqa: E501
+ Initial collateralization rate # noqa: E501
:param init_ltv: The init_ltv of this UserLtvInfo. # noqa: E501
:type: str
@@ -166,7 +156,7 @@ def init_ltv(self, init_ltv):
def alert_ltv(self):
"""Gets the alert_ltv of this UserLtvInfo. # noqa: E501
- 预警质押率 # noqa: E501
+ Warning collateralization rate # noqa: E501
:return: The alert_ltv of this UserLtvInfo. # noqa: E501
:rtype: str
@@ -177,7 +167,7 @@ def alert_ltv(self):
def alert_ltv(self, alert_ltv):
"""Sets the alert_ltv of this UserLtvInfo.
- 预警质押率 # noqa: E501
+ Warning collateralization rate # noqa: E501
:param alert_ltv: The alert_ltv of this UserLtvInfo. # noqa: E501
:type: str
@@ -189,7 +179,7 @@ def alert_ltv(self, alert_ltv):
def liquidate_ltv(self):
"""Gets the liquidate_ltv of this UserLtvInfo. # noqa: E501
- 平仓质押率 # noqa: E501
+ Liquidation collateralization rate # noqa: E501
:return: The liquidate_ltv of this UserLtvInfo. # noqa: E501
:rtype: str
@@ -200,7 +190,7 @@ def liquidate_ltv(self):
def liquidate_ltv(self, liquidate_ltv):
"""Sets the liquidate_ltv of this UserLtvInfo.
- 平仓质押率 # noqa: E501
+ Liquidation collateralization rate # noqa: E501
:param liquidate_ltv: The liquidate_ltv of this UserLtvInfo. # noqa: E501
:type: str
@@ -212,7 +202,7 @@ def liquidate_ltv(self, liquidate_ltv):
def min_borrow_amount(self):
"""Gets the min_borrow_amount of this UserLtvInfo. # noqa: E501
- 借款币种的最小可借数量 # noqa: E501
+ Minimum borrowable amount for the loan currency # noqa: E501
:return: The min_borrow_amount of this UserLtvInfo. # noqa: E501
:rtype: str
@@ -223,7 +213,7 @@ def min_borrow_amount(self):
def min_borrow_amount(self, min_borrow_amount):
"""Sets the min_borrow_amount of this UserLtvInfo.
- 借款币种的最小可借数量 # noqa: E501
+ Minimum borrowable amount for the loan currency # noqa: E501
:param min_borrow_amount: The min_borrow_amount of this UserLtvInfo. # noqa: E501
:type: str
@@ -235,7 +225,7 @@ def min_borrow_amount(self, min_borrow_amount):
def left_borrowable_amount(self):
"""Gets the left_borrowable_amount of this UserLtvInfo. # noqa: E501
- 借款币种的剩余可借数量 # noqa: E501
+ Remaining borrowable amount for the loan currency # noqa: E501
:return: The left_borrowable_amount of this UserLtvInfo. # noqa: E501
:rtype: str
@@ -246,7 +236,7 @@ def left_borrowable_amount(self):
def left_borrowable_amount(self, left_borrowable_amount):
"""Sets the left_borrowable_amount of this UserLtvInfo.
- 借款币种的剩余可借数量 # noqa: E501
+ Remaining borrowable amount for the loan currency # noqa: E501
:param left_borrowable_amount: The left_borrowable_amount of this UserLtvInfo. # noqa: E501
:type: str
@@ -261,16 +251,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/user_sub.py b/gate_api/models/user_sub.py
new file mode 100644
index 0000000..d3728b1
--- /dev/null
+++ b/gate_api/models/user_sub.py
@@ -0,0 +1,207 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UserSub(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'uid': 'int',
+ 'belong': 'str',
+ 'type': 'int',
+ 'ref_uid': 'int'
+ }
+
+ attribute_map = {
+ 'uid': 'uid',
+ 'belong': 'belong',
+ 'type': 'type',
+ 'ref_uid': 'ref_uid'
+ }
+
+ def __init__(self, uid=None, belong=None, type=None, ref_uid=None, local_vars_configuration=None): # noqa: E501
+ # type: (int, str, int, int, Configuration) -> None
+ """UserSub - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._uid = None
+ self._belong = None
+ self._type = None
+ self._ref_uid = None
+ self.discriminator = None
+
+ if uid is not None:
+ self.uid = uid
+ if belong is not None:
+ self.belong = belong
+ if type is not None:
+ self.type = type
+ if ref_uid is not None:
+ self.ref_uid = ref_uid
+
+ @property
+ def uid(self):
+ """Gets the uid of this UserSub. # noqa: E501
+
+ User ID # noqa: E501
+
+ :return: The uid of this UserSub. # noqa: E501
+ :rtype: int
+ """
+ return self._uid
+
+ @uid.setter
+ def uid(self, uid):
+ """Sets the uid of this UserSub.
+
+ User ID # noqa: E501
+
+ :param uid: The uid of this UserSub. # noqa: E501
+ :type: int
+ """
+
+ self._uid = uid
+
+ @property
+ def belong(self):
+ """Gets the belong of this UserSub. # noqa: E501
+
+ User's system affiliation (partner/referral). Empty means not belonging to any system # noqa: E501
+
+ :return: The belong of this UserSub. # noqa: E501
+ :rtype: str
+ """
+ return self._belong
+
+ @belong.setter
+ def belong(self, belong):
+ """Sets the belong of this UserSub.
+
+ User's system affiliation (partner/referral). Empty means not belonging to any system # noqa: E501
+
+ :param belong: The belong of this UserSub. # noqa: E501
+ :type: str
+ """
+
+ self._belong = belong
+
+ @property
+ def type(self):
+ """Gets the type of this UserSub. # noqa: E501
+
+ Type (0-Not in system 1-Direct subordinate agent 2-Indirect subordinate agent 3-Direct direct customer 4-Indirect direct customer 5-Regular user) # noqa: E501
+
+ :return: The type of this UserSub. # noqa: E501
+ :rtype: int
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this UserSub.
+
+ Type (0-Not in system 1-Direct subordinate agent 2-Indirect subordinate agent 3-Direct direct customer 4-Indirect direct customer 5-Regular user) # noqa: E501
+
+ :param type: The type of this UserSub. # noqa: E501
+ :type: int
+ """
+
+ self._type = type
+
+ @property
+ def ref_uid(self):
+ """Gets the ref_uid of this UserSub. # noqa: E501
+
+ Inviter user ID # noqa: E501
+
+ :return: The ref_uid of this UserSub. # noqa: E501
+ :rtype: int
+ """
+ return self._ref_uid
+
+ @ref_uid.setter
+ def ref_uid(self, ref_uid):
+ """Sets the ref_uid of this UserSub.
+
+ Inviter user ID # noqa: E501
+
+ :param ref_uid: The ref_uid of this UserSub. # noqa: E501
+ :type: int
+ """
+
+ self._ref_uid = ref_uid
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UserSub):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UserSub):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/user_sub_relation.py b/gate_api/models/user_sub_relation.py
new file mode 100644
index 0000000..533e250
--- /dev/null
+++ b/gate_api/models/user_sub_relation.py
@@ -0,0 +1,123 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class UserSubRelation(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'list': 'list[UserSub]'
+ }
+
+ attribute_map = {
+ 'list': 'list'
+ }
+
+ def __init__(self, list=None, local_vars_configuration=None): # noqa: E501
+ # type: (list[UserSub], Configuration) -> None
+ """UserSubRelation - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._list = None
+ self.discriminator = None
+
+ if list is not None:
+ self.list = list
+
+ @property
+ def list(self):
+ """Gets the list of this UserSubRelation. # noqa: E501
+
+ Subordinate relationship list # noqa: E501
+
+ :return: The list of this UserSubRelation. # noqa: E501
+ :rtype: list[UserSub]
+ """
+ return self._list
+
+ @list.setter
+ def list(self, list):
+ """Sets the list of this UserSubRelation.
+
+ Subordinate relationship list # noqa: E501
+
+ :param list: The list of this UserSubRelation. # noqa: E501
+ :type: list[UserSub]
+ """
+
+ self._list = list
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UserSubRelation):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, UserSubRelation):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/models/user_total_amount.py b/gate_api/models/user_total_amount.py
index 5341a99..759f31e 100644
--- a/gate_api/models/user_total_amount.py
+++ b/gate_api/models/user_total_amount.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -32,9 +32,15 @@ class UserTotalAmount(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
- openapi_types = {'borrow_amount': 'str', 'collateral_amount': 'str'}
+ openapi_types = {
+ 'borrow_amount': 'str',
+ 'collateral_amount': 'str'
+ }
- attribute_map = {'borrow_amount': 'borrow_amount', 'collateral_amount': 'collateral_amount'}
+ attribute_map = {
+ 'borrow_amount': 'borrow_amount',
+ 'collateral_amount': 'collateral_amount'
+ }
def __init__(self, borrow_amount=None, collateral_amount=None, local_vars_configuration=None): # noqa: E501
# type: (str, str, Configuration) -> None
@@ -56,7 +62,7 @@ def __init__(self, borrow_amount=None, collateral_amount=None, local_vars_config
def borrow_amount(self):
"""Gets the borrow_amount of this UserTotalAmount. # noqa: E501
- 借贷总额,以 USDT 计算 # noqa: E501
+ Total borrowing amount in USDT # noqa: E501
:return: The borrow_amount of this UserTotalAmount. # noqa: E501
:rtype: str
@@ -67,7 +73,7 @@ def borrow_amount(self):
def borrow_amount(self, borrow_amount):
"""Sets the borrow_amount of this UserTotalAmount.
- 借贷总额,以 USDT 计算 # noqa: E501
+ Total borrowing amount in USDT # noqa: E501
:param borrow_amount: The borrow_amount of this UserTotalAmount. # noqa: E501
:type: str
@@ -79,7 +85,7 @@ def borrow_amount(self, borrow_amount):
def collateral_amount(self):
"""Gets the collateral_amount of this UserTotalAmount. # noqa: E501
- 质押总额,以 USDT 计算 # noqa: E501
+ Total collateral amount in USDT # noqa: E501
:return: The collateral_amount of this UserTotalAmount. # noqa: E501
:rtype: str
@@ -90,7 +96,7 @@ def collateral_amount(self):
def collateral_amount(self, collateral_amount):
"""Sets the collateral_amount of this UserTotalAmount.
- 质押总额,以 USDT 计算 # noqa: E501
+ Total collateral amount in USDT # noqa: E501
:param collateral_amount: The collateral_amount of this UserTotalAmount. # noqa: E501
:type: str
@@ -105,16 +111,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/withdraw_status.py b/gate_api/models/withdraw_status.py
index 6badeab..8803fc9 100644
--- a/gate_api/models/withdraw_status.py
+++ b/gate_api/models/withdraw_status.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -44,6 +44,7 @@ class WithdrawStatus(object):
'withdraw_day_limit_remain': 'str',
'withdraw_eachtime_limit': 'str',
'withdraw_fix_on_chains': 'dict(str, str)',
+ 'withdraw_percent_on_chains': 'dict(str, str)'
}
attribute_map = {
@@ -58,24 +59,11 @@ class WithdrawStatus(object):
'withdraw_day_limit_remain': 'withdraw_day_limit_remain',
'withdraw_eachtime_limit': 'withdraw_eachtime_limit',
'withdraw_fix_on_chains': 'withdraw_fix_on_chains',
+ 'withdraw_percent_on_chains': 'withdraw_percent_on_chains'
}
- def __init__(
- self,
- currency=None,
- name=None,
- name_cn=None,
- deposit=None,
- withdraw_percent=None,
- withdraw_fix=None,
- withdraw_day_limit=None,
- withdraw_amount_mini=None,
- withdraw_day_limit_remain=None,
- withdraw_eachtime_limit=None,
- withdraw_fix_on_chains=None,
- local_vars_configuration=None,
- ): # noqa: E501
- # type: (str, str, str, str, str, str, str, str, str, str, dict(str, str), Configuration) -> None
+ def __init__(self, currency=None, name=None, name_cn=None, deposit=None, withdraw_percent=None, withdraw_fix=None, withdraw_day_limit=None, withdraw_amount_mini=None, withdraw_day_limit_remain=None, withdraw_eachtime_limit=None, withdraw_fix_on_chains=None, withdraw_percent_on_chains=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, str, str, dict(str, str), dict(str, str), Configuration) -> None
"""WithdrawStatus - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -92,6 +80,7 @@ def __init__(
self._withdraw_day_limit_remain = None
self._withdraw_eachtime_limit = None
self._withdraw_fix_on_chains = None
+ self._withdraw_percent_on_chains = None
self.discriminator = None
if currency is not None:
@@ -116,6 +105,8 @@ def __init__(
self.withdraw_eachtime_limit = withdraw_eachtime_limit
if withdraw_fix_on_chains is not None:
self.withdraw_fix_on_chains = withdraw_fix_on_chains
+ if withdraw_percent_on_chains is not None:
+ self.withdraw_percent_on_chains = withdraw_percent_on_chains
@property
def currency(self):
@@ -190,7 +181,7 @@ def name_cn(self, name_cn):
def deposit(self):
"""Gets the deposit of this WithdrawStatus. # noqa: E501
- Deposits fee # noqa: E501
+ Deposit fee # noqa: E501
:return: The deposit of this WithdrawStatus. # noqa: E501
:rtype: str
@@ -201,7 +192,7 @@ def deposit(self):
def deposit(self, deposit):
"""Sets the deposit of this WithdrawStatus.
- Deposits fee # noqa: E501
+ Deposit fee # noqa: E501
:param deposit: The deposit of this WithdrawStatus. # noqa: E501
:type: str
@@ -370,6 +361,29 @@ def withdraw_fix_on_chains(self, withdraw_fix_on_chains):
self._withdraw_fix_on_chains = withdraw_fix_on_chains
+ @property
+ def withdraw_percent_on_chains(self):
+ """Gets the withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501
+
+ Percentage withdrawal fee on multiple chains # noqa: E501
+
+ :return: The withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501
+ :rtype: dict(str, str)
+ """
+ return self._withdraw_percent_on_chains
+
+ @withdraw_percent_on_chains.setter
+ def withdraw_percent_on_chains(self, withdraw_percent_on_chains):
+ """Sets the withdraw_percent_on_chains of this WithdrawStatus.
+
+ Percentage withdrawal fee on multiple chains # noqa: E501
+
+ :param withdraw_percent_on_chains: The withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501
+ :type: dict(str, str)
+ """
+
+ self._withdraw_percent_on_chains = withdraw_percent_on_chains
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -377,16 +391,18 @@ def to_dict(self):
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
- result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
- value.items(),
- )
- )
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
else:
result[attr] = value
diff --git a/gate_api/models/withdrawal_record.py b/gate_api/models/withdrawal_record.py
new file mode 100644
index 0000000..ee0cf4c
--- /dev/null
+++ b/gate_api/models/withdrawal_record.py
@@ -0,0 +1,490 @@
+# coding: utf-8
+
+"""
+ Gate API
+
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
+
+ Contact: support@mail.gate.com
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from gate_api.configuration import Configuration
+
+
+class WithdrawalRecord(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'str',
+ 'txid': 'str',
+ 'block_number': 'str',
+ 'withdraw_order_id': 'str',
+ 'timestamp': 'str',
+ 'amount': 'str',
+ 'fee': 'str',
+ 'currency': 'str',
+ 'address': 'str',
+ 'fail_reason': 'str',
+ 'timestamp2': 'str',
+ 'memo': 'str',
+ 'status': 'str',
+ 'chain': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'txid': 'txid',
+ 'block_number': 'block_number',
+ 'withdraw_order_id': 'withdraw_order_id',
+ 'timestamp': 'timestamp',
+ 'amount': 'amount',
+ 'fee': 'fee',
+ 'currency': 'currency',
+ 'address': 'address',
+ 'fail_reason': 'fail_reason',
+ 'timestamp2': 'timestamp2',
+ 'memo': 'memo',
+ 'status': 'status',
+ 'chain': 'chain'
+ }
+
+ def __init__(self, id=None, txid=None, block_number=None, withdraw_order_id=None, timestamp=None, amount=None, fee=None, currency=None, address=None, fail_reason=None, timestamp2=None, memo=None, status=None, chain=None, local_vars_configuration=None): # noqa: E501
+ # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None
+ """WithdrawalRecord - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._id = None
+ self._txid = None
+ self._block_number = None
+ self._withdraw_order_id = None
+ self._timestamp = None
+ self._amount = None
+ self._fee = None
+ self._currency = None
+ self._address = None
+ self._fail_reason = None
+ self._timestamp2 = None
+ self._memo = None
+ self._status = None
+ self._chain = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if txid is not None:
+ self.txid = txid
+ if block_number is not None:
+ self.block_number = block_number
+ if withdraw_order_id is not None:
+ self.withdraw_order_id = withdraw_order_id
+ if timestamp is not None:
+ self.timestamp = timestamp
+ self.amount = amount
+ if fee is not None:
+ self.fee = fee
+ self.currency = currency
+ if address is not None:
+ self.address = address
+ if fail_reason is not None:
+ self.fail_reason = fail_reason
+ if timestamp2 is not None:
+ self.timestamp2 = timestamp2
+ if memo is not None:
+ self.memo = memo
+ if status is not None:
+ self.status = status
+ self.chain = chain
+
+ @property
+ def id(self):
+ """Gets the id of this WithdrawalRecord. # noqa: E501
+
+ Record ID # noqa: E501
+
+ :return: The id of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this WithdrawalRecord.
+
+ Record ID # noqa: E501
+
+ :param id: The id of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+
+ self._id = id
+
+ @property
+ def txid(self):
+ """Gets the txid of this WithdrawalRecord. # noqa: E501
+
+ Hash record of the withdrawal # noqa: E501
+
+ :return: The txid of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._txid
+
+ @txid.setter
+ def txid(self, txid):
+ """Sets the txid of this WithdrawalRecord.
+
+ Hash record of the withdrawal # noqa: E501
+
+ :param txid: The txid of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+
+ self._txid = txid
+
+ @property
+ def block_number(self):
+ """Gets the block_number of this WithdrawalRecord. # noqa: E501
+
+ Block Number # noqa: E501
+
+ :return: The block_number of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._block_number
+
+ @block_number.setter
+ def block_number(self, block_number):
+ """Sets the block_number of this WithdrawalRecord.
+
+ Block Number # noqa: E501
+
+ :param block_number: The block_number of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+
+ self._block_number = block_number
+
+ @property
+ def withdraw_order_id(self):
+ """Gets the withdraw_order_id of this WithdrawalRecord. # noqa: E501
+
+ Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501
+
+ :return: The withdraw_order_id of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._withdraw_order_id
+
+ @withdraw_order_id.setter
+ def withdraw_order_id(self, withdraw_order_id):
+ """Sets the withdraw_order_id of this WithdrawalRecord.
+
+ Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501
+
+ :param withdraw_order_id: The withdraw_order_id of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+
+ self._withdraw_order_id = withdraw_order_id
+
+ @property
+ def timestamp(self):
+ """Gets the timestamp of this WithdrawalRecord. # noqa: E501
+
+ Operation time # noqa: E501
+
+ :return: The timestamp of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._timestamp
+
+ @timestamp.setter
+ def timestamp(self, timestamp):
+ """Sets the timestamp of this WithdrawalRecord.
+
+ Operation time # noqa: E501
+
+ :param timestamp: The timestamp of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+
+ self._timestamp = timestamp
+
+ @property
+ def amount(self):
+ """Gets the amount of this WithdrawalRecord. # noqa: E501
+
+ Token amount # noqa: E501
+
+ :return: The amount of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this WithdrawalRecord.
+
+ Token amount # noqa: E501
+
+ :param amount: The amount of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501
+ raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501
+
+ self._amount = amount
+
+ @property
+ def fee(self):
+ """Gets the fee of this WithdrawalRecord. # noqa: E501
+
+ fee # noqa: E501
+
+ :return: The fee of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._fee
+
+ @fee.setter
+ def fee(self, fee):
+ """Sets the fee of this WithdrawalRecord.
+
+ fee # noqa: E501
+
+ :param fee: The fee of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+
+ self._fee = fee
+
+ @property
+ def currency(self):
+ """Gets the currency of this WithdrawalRecord. # noqa: E501
+
+ Currency name # noqa: E501
+
+ :return: The currency of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._currency
+
+ @currency.setter
+ def currency(self, currency):
+ """Sets the currency of this WithdrawalRecord.
+
+ Currency name # noqa: E501
+
+ :param currency: The currency of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501
+ raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501
+
+ self._currency = currency
+
+ @property
+ def address(self):
+ """Gets the address of this WithdrawalRecord. # noqa: E501
+
+ Withdrawal address # noqa: E501
+
+ :return: The address of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._address
+
+ @address.setter
+ def address(self, address):
+ """Sets the address of this WithdrawalRecord.
+
+ Withdrawal address # noqa: E501
+
+ :param address: The address of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+
+ self._address = address
+
+ @property
+ def fail_reason(self):
+ """Gets the fail_reason of this WithdrawalRecord. # noqa: E501
+
+ Reason for withdrawal failure. Has a value when status = CANCEL, empty for all other statuses # noqa: E501
+
+ :return: The fail_reason of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._fail_reason
+
+ @fail_reason.setter
+ def fail_reason(self, fail_reason):
+ """Sets the fail_reason of this WithdrawalRecord.
+
+ Reason for withdrawal failure. Has a value when status = CANCEL, empty for all other statuses # noqa: E501
+
+ :param fail_reason: The fail_reason of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+
+ self._fail_reason = fail_reason
+
+ @property
+ def timestamp2(self):
+ """Gets the timestamp2 of this WithdrawalRecord. # noqa: E501
+
+ Withdrawal final time, i.e.: withdrawal cancellation time or withdrawal success time When status = CANCEL, corresponds to cancellation time When status = DONE and block_number > 0, it is the withdrawal success time # noqa: E501
+
+ :return: The timestamp2 of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._timestamp2
+
+ @timestamp2.setter
+ def timestamp2(self, timestamp2):
+ """Sets the timestamp2 of this WithdrawalRecord.
+
+ Withdrawal final time, i.e.: withdrawal cancellation time or withdrawal success time When status = CANCEL, corresponds to cancellation time When status = DONE and block_number > 0, it is the withdrawal success time # noqa: E501
+
+ :param timestamp2: The timestamp2 of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+
+ self._timestamp2 = timestamp2
+
+ @property
+ def memo(self):
+ """Gets the memo of this WithdrawalRecord. # noqa: E501
+
+ Additional remarks with regards to the withdrawal # noqa: E501
+
+ :return: The memo of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._memo
+
+ @memo.setter
+ def memo(self, memo):
+ """Sets the memo of this WithdrawalRecord.
+
+ Additional remarks with regards to the withdrawal # noqa: E501
+
+ :param memo: The memo of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+
+ self._memo = memo
+
+ @property
+ def status(self):
+ """Gets the status of this WithdrawalRecord. # noqa: E501
+
+ Transaction status - DONE: Completed (block_number > 0 is considered to be truly completed) - CANCEL: Canceled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: Recharge code operation - EXTPEND: Sent awaiting confirmation - FAIL: Failure on the chain awaiting confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: pending manual review - REVIEW: Under review # noqa: E501
+
+ :return: The status of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this WithdrawalRecord.
+
+ Transaction status - DONE: Completed (block_number > 0 is considered to be truly completed) - CANCEL: Canceled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: Recharge code operation - EXTPEND: Sent awaiting confirmation - FAIL: Failure on the chain awaiting confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: pending manual review - REVIEW: Under review # noqa: E501
+
+ :param status: The status of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+
+ self._status = status
+
+ @property
+ def chain(self):
+ """Gets the chain of this WithdrawalRecord. # noqa: E501
+
+ Name of the chain used in withdrawals # noqa: E501
+
+ :return: The chain of this WithdrawalRecord. # noqa: E501
+ :rtype: str
+ """
+ return self._chain
+
+ @chain.setter
+ def chain(self, chain):
+ """Sets the chain of this WithdrawalRecord.
+
+ Name of the chain used in withdrawals # noqa: E501
+
+ :param chain: The chain of this WithdrawalRecord. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and chain is None: # noqa: E501
+ raise ValueError("Invalid value for `chain`, must not be `None`") # noqa: E501
+
+ self._chain = chain
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, WithdrawalRecord):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, WithdrawalRecord):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/gate_api/rest.py b/gate_api/rest.py
index b505e8b..8781e1b 100644
--- a/gate_api/rest.py
+++ b/gate_api/rest.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -19,7 +19,6 @@
import ssl
import certifi
-
# python 2 and python 3 compatibility library
import six
from six.moves.urllib.parse import urlencode
@@ -32,6 +31,7 @@
class RESTResponse(io.IOBase):
+
def __init__(self, resp):
self.urllib3_response = resp
self.status = resp.status
@@ -48,6 +48,7 @@ def getheader(self, name, default=None):
class RESTClientObject(object):
+
def __init__(self, configuration, pools_size=4, maxsize=None):
# urllib3.PoolManager will pass all kw parameters to connectionpool
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
@@ -105,17 +106,9 @@ def __init__(self, configuration, pools_size=4, maxsize=None):
**addition_pool_args
)
- def request(
- self,
- method,
- url,
- query_params=None,
- headers=None,
- body=None,
- post_params=None,
- _preload_content=True,
- _request_timeout=None,
- ):
+ def request(self, method, url, query_params=None, headers=None,
+ body=None, post_params=None, _preload_content=True,
+ _request_timeout=None):
"""Perform requests.
:param method: http request method
@@ -135,20 +128,25 @@ def request(
(connection, read) timeouts.
"""
method = method.upper()
- assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS']
+ assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT',
+ 'PATCH', 'OPTIONS']
if post_params and body:
- raise ApiValueError("body parameter cannot be used with post_params parameter.")
+ raise ApiValueError(
+ "body parameter cannot be used with post_params parameter."
+ )
post_params = post_params or {}
headers = headers or {}
timeout = None
if _request_timeout:
- if isinstance(_request_timeout, (int,) if six.PY3 else (int, long)): # noqa: E501,F821
+ if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
timeout = urllib3.Timeout(total=_request_timeout)
- elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2:
- timeout = urllib3.Timeout(connect=_request_timeout[0], read=_request_timeout[1])
+ elif (isinstance(_request_timeout, tuple) and
+ len(_request_timeout) == 2):
+ timeout = urllib3.Timeout(
+ connect=_request_timeout[0], read=_request_timeout[1])
if 'Content-Type' not in headers:
headers['Content-Type'] = 'application/json'
@@ -163,50 +161,42 @@ def request(
if body is not None:
request_body = json.dumps(body)
r = self.pool_manager.request(
- method,
- url,
+ method, url,
body=request_body,
preload_content=_preload_content,
timeout=timeout,
- headers=headers,
- )
+ headers=headers)
elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501
r = self.pool_manager.request(
- method,
- url,
+ method, url,
fields=post_params,
encode_multipart=False,
preload_content=_preload_content,
timeout=timeout,
- headers=headers,
- )
+ headers=headers)
elif headers['Content-Type'] == 'multipart/form-data':
# must del headers['Content-Type'], or the correct
# Content-Type which generated by urllib3 will be
# overwritten.
del headers['Content-Type']
r = self.pool_manager.request(
- method,
- url,
+ method, url,
fields=post_params,
encode_multipart=True,
preload_content=_preload_content,
timeout=timeout,
- headers=headers,
- )
+ headers=headers)
# Pass a `string` parameter directly in the body to support
# other content types than Json when `body` argument is
# provided in serialized form
elif isinstance(body, str) or isinstance(body, bytes):
request_body = body
r = self.pool_manager.request(
- method,
- url,
+ method, url,
body=request_body,
preload_content=_preload_content,
timeout=timeout,
- headers=headers,
- )
+ headers=headers)
else:
# Cannot generate the request from given parameters
msg = """Cannot prepare a request message for provided
@@ -215,9 +205,11 @@ def request(
raise ApiException(status=0, reason=msg)
# For `GET`, `HEAD`
else:
- r = self.pool_manager.request(
- method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers
- )
+ r = self.pool_manager.request(method, url,
+ fields=query_params,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
except urllib3.exceptions.SSLError as e:
msg = "{0}\n{1}".format(type(e).__name__, str(e))
raise ApiException(status=0, reason=msg)
@@ -233,117 +225,67 @@ def request(
return r
- def GET(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None):
- return self.request(
- "GET",
- url,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- query_params=query_params,
- )
-
- def HEAD(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None):
- return self.request(
- "HEAD",
- url,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- query_params=query_params,
- )
-
- def OPTIONS(
- self,
- url,
- headers=None,
- query_params=None,
- post_params=None,
- body=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- return self.request(
- "OPTIONS",
- url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
-
- def DELETE(self, url, headers=None, query_params=None, body=None, _preload_content=True, _request_timeout=None):
- return self.request(
- "DELETE",
- url,
- headers=headers,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
-
- def POST(
- self,
- url,
- headers=None,
- query_params=None,
- post_params=None,
- body=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- return self.request(
- "POST",
- url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
-
- def PUT(
- self,
- url,
- headers=None,
- query_params=None,
- post_params=None,
- body=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- return self.request(
- "PUT",
- url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
-
- def PATCH(
- self,
- url,
- headers=None,
- query_params=None,
- post_params=None,
- body=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- return self.request(
- "PATCH",
- url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
+ def GET(self, url, headers=None, query_params=None, _preload_content=True,
+ _request_timeout=None):
+ return self.request("GET", url,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ query_params=query_params)
+
+ def HEAD(self, url, headers=None, query_params=None, _preload_content=True,
+ _request_timeout=None):
+ return self.request("HEAD", url,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ query_params=query_params)
+
+ def OPTIONS(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("OPTIONS", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def DELETE(self, url, headers=None, query_params=None, body=None,
+ _preload_content=True, _request_timeout=None):
+ return self.request("DELETE", url,
+ headers=headers,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def POST(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("POST", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def PUT(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("PUT", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def PATCH(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("PATCH", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
diff --git a/setup.cfg b/setup.cfg
index 4d8daf3..1d2fcfb 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -6,8 +6,8 @@ classifiers:
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
-maintainer = gateio
-maintainer_email = dev@mail.gate.io
+maintainer = gate
+maintainer_email = dev@mail.gate.com
[flake8]
max-line-length=99
diff --git a/setup.py b/setup.py
index 5e02c51..d0fc88e 100644
--- a/setup.py
+++ b/setup.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Gate API v4
+ Gate API
- Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
+ Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501
- Contact: support@mail.gate.io
+ Contact: support@mail.gate.com
Generated by: https://openapi-generator.tech
"""
@@ -13,7 +13,7 @@
from setuptools import setup, find_packages # noqa: H301
NAME = "gate-api"
-VERSION = "4.56.0"
+VERSION = "7.1.8"
# To install the library, run the following
#
# python setup.py install
@@ -26,11 +26,11 @@
setup(
name=NAME,
version=VERSION,
- description="Gate API v4",
+ description="Gate API",
author="Gate API support",
- author_email="support@mail.gate.io",
+ author_email="support@mail.gate.com",
url="https://github.com/gateio/gateapi-python",
- keywords=["OpenAPI", "OpenAPI-Generator", "Gate API v4"],
+ keywords=["OpenAPI", "OpenAPI-Generator", "Gate API"],
install_requires=REQUIRES,
packages=find_packages(exclude=["test", "tests"]),
include_package_data=True,